Re: [NTLK] html2newt; bookmaker woes

From: Vladimir Alexiev (Vladimir_at_worklogic.com)
Date: Fri Nov 15 2002 - 10:36:58 EST


Dakkar (ceccarel_at_cibslogin.sns.it)
>Hey! I'm lazily trying to do the same! ;-)

Ok, if perl sounds like the right thing to you then let's work
together. What I like about perl is:
- cross-platform
- HTML parsing libs
- font libs
- text munging

I can really use some help for Newtonscript, I'm just starting with it
(I like it, it's similar to emacs lisp and to perl's way of doing
objects). At least we should share info.

>There was a way to patch the executable to set other layout sizes.
>Don't do it.

Do you have it? It doesn't seem to be on the net, at least Google
doesn't know about "newton bookmaker patch". (My favorite mis-hit is
expert.zoomsoccer.com/source/picks/
Englis4702_CHARLT74_LIVERP74_2001_05_19_pick.html
that talks about "Shaun Newton, Bookmaker's Odds, and beating Charlton
on their own patch" :-)

Victor Rehorst mentions that he made(?) a dual-screen-size book with
Press (an ascii table): how?

> The best way (IMO) is to convert straight into
> NewtonScript, then compile with the NTK.

Perhaps, but that means:

1. Knowing the .f format. I can grok most of it, but what are
book.hints?

>> Is there any documentation on the bookreader interfaces
>Don't really think so. People were supposed to use NewtonPress or
BookMaker.

Ok, so are we up to reversing it? Maybe Steve will help?

2. Writing a layout engine. Which we may have to do anyway since
bookmaker gets the layout slightly wrong 5 out of 10 times (eg
half-line at page end, or small font size miscalculations).
It'll also allow us to support more fonts (assuming we can get the
metrics) and eliminate other limitations.

>I did some of the layout engine, as a proof-of-concept. It uses a
>couple of very ugly hacks (mac fonts converted to X11 fonts

>> - what are the "btn" args of message
>> :SetStatusButtons({left: [btn1, btn2], right:[btn]})
>views? Buttons? as in, frames whose _proto points

Guess it's time to hit the prguide and nsguide books :-)

>> - how do I start a new column/row in a table?
>Is it possible to create tables in newtonbooks?

Kinda/sorta:
- I assume you've played with NewtsCape and seen that it can do it
- you can setup a layout with several columns.
- you can switch between two columns using the Sidebar and Main
layout/content flags. I don't know if you can switch between more than
2 columns. "Sidebar" is translated to "type: 1" in the .f file, and
"Main" is translated to "type: 0", but there doesn't seem to be a way
to mark layout columns and contents with other "types".

> The bookmaker docs don't mention anything of the sort.

Here's a list of words extracted with "strings bookmaker.exe" that
don't appear in the bookmaker manual: neither the PDF nor the book
isbn="BMaker:PIEDTS" in BookSample-4.
- Reads WMF files in addition to BMP
- Flags:
  DontShow: alias of NoPage?
  LeftJust: same as \ol RTF command? Sibling of Centered
  RightJust: same as \or RTF command? Sibling of Centered
  KeepWithContent: alias of KeepWith?
  SidebarColumn: alias of Sidebar
  MainColumn: alias of Main?
  NoSpread: alias of NoExtend?
  Reversed: alias of Reverse?
  Rounded: alias of Round?
  Attributes: alias of Attribute
  KioskPage: ?
  style: this is an allowed flag that wants a value, but don't know
what value
Commands?
  deweyDecimal: as useless as .blurb
  libraryOfCongress: as useless as .blurb
  verticalJustify: something to do with Align{Top,Centered,Bottom}?
  kioskCenter: ?
  define: ??
  indent: ??
  size: ??
  table: ??

Of course, there's no guarantee all the above work, but I'll do some
experiments.
.libraryOfCongress whatever works
.size 298 388 doesn't work

>> - can one force bookmaker to not produce the useless border
>Don't think so: it is the bookreader's window border.

NewtsCape does it. I guess the truism "NC converts HTML to newt books"
is not quite true after all :-)

> I think the limitations are due to bookreader (personal idea!)

Some of them aren't:
- screen size.
-- The reader even supports multiple screen sizes in a book (eg see
curRendering and the firstPage array), but I don't know how one would
go about re-layouting all the content.
- more fonts. We should support more of the common fonts, eg monaco
and minico. Minico would be useful for PRE listings etc.
- text and picture on the same line
- tables: the layout engine could make as fancy tables as it can :-)

I have a couple ideas about the pictures:
- big pictures should be shown as a thumbnail reduced to min
(page_width, page_height), so you can get the overall view. Tapping on
it should show the whole picture so you can read the details, either
in a StoryCard or on the next page.
- for big pictures I find the scroller ("compass") a bit slow. It
would be better to scroll by dragging. even bookmaker gives hooks for
this.

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/



This archive was generated by hypermail 2.1.2 : Mon Dec 02 2002 - 22:02:55 EST