Hi list, I am currently digging into luatex to fix synctex support when typesetting does not follow the standard ltr order. Hartmut suggested to take a look at the box direction so I tried to use the box_dir(aNode). With a bit of reverse engineering, I found how to use this information, but I need some confirmations from you. For the moment, I focus on hlists and I have a few questions. 1) I found that \pardir ignores the first letter argument, is it expected behaviour ? 2) What is the difference between \texdir LTB and \textdir RTB ? 3) for a box created with \texdir LTB , the height and the depth are equal. Is it always true ? 4) I saw that text direction has something to do with rulers, but what about the other nodes ? On another respect, I see that none of luatex nor context command supports the -synctex option. Is there a special reason or is it just a bug ? Regards
Hi Jérome, Jérome Laurens wrote:
For the moment, I focus on hlists and I have a few questions.
1) I found that \pardir ignores the first letter argument, is it expected behaviour ?
It ignores the third letter, not the first.
2) What is the difference between \texdir LTB and \textdir RTB ?
All direction specifiers are set up in the same way: * The first key is the "paragraph progression front edge". A paragraph consists of lines that are stacked starting from this edge. * The second key is the "line progression front edge". Lines consist of glyphs that are placed starting from this edge. * The third is the "glyph orientation". This specifier is only used for special fonts (that I have never seen an actual example of, it is an Omega-specific font extension, afaik). So TLT == paragraphs progress downward (while creating lines), lines progress rightward (while adding glyphs), and the glyphs stand upright. Possible values are T (top) L (left) R (right) B (bottom), and the first and second have to be perpendicular, resulting in eight possible main directions (TL* TR* BL* BR* LT* LB* RT* RB*).
3) for a box created with \texdir LTB , the height and the depth are equal. Is it always true ?
4) I saw that text direction has something to do with rulers, but what about the other nodes ?
I cannot answer these two questions quickly (by now, Hartmut probably understands the direction output better than I do).
On another respect, I see that none of luatex nor context command supports the -synctex option. Is there a special reason or is it just a bug ?
luatex --synctex=NUMBER certainly should work (and it does here). The "context" command does not accept --synctex at the moment. Best wishes, Taco
Hi Jerome, On Thu, 11 Jun 2009, Jérome Laurens wrote:
I am currently digging into luatex to fix synctex support when typesetting does not follow the standard ltr order. Hartmut suggested to take a look at the box direction so I tried to use the box_dir(aNode). With a bit of reverse engineering, I found how to use this information, but I need some confirmations from you. For the moment, I focus on hlists and I have a few questions.
1) I found that \pardir ignores the first letter argument, is it expected behaviour ?
(unsure here, and current complexity is beyond me, just too many \vice- and \deputy- direction primitives, and maybe overall just \textdir + \mathdir + the possibility to state the box dir like in \hbox dir *** {} + let it bubble down from the top box to be shipped + obey grouping + ignore if it's \hbox or \vbox would be sufficient, but it's wishful thinking only. Anyway it's aleph legacy, rather fixed.)
2) What is the difference between \texdir LTB and \textdir RTB ?
please see attached graphics, easier than describing...
3) for a box created with \texdir LTB , the height and the depth are equal. Is it always true ?
for height/depth contributed into the packer by text, yes. But if in the line is a box or rule, i would rather like to have full control over "vertical" positioning, in the way that then the 1st letter would tell the vertical main orientation of the item. Which means that box placement should completely ignore the 3rd letter, which should matter for glyphs only. But that's currently not so. AFAIR boxes would also be "vertically" centered. Maybe a point for discussion.
4) I saw that text direction has something to do with rulers, but what about the other nodes ?
(btw, rulers also shouldn't have to do with the 3rd letter, imho.)
On another respect, I see that none of luatex nor context command supports the -synctex option. Is there a special reason or is it just a bug ?
synctex support is on by \synctex=1 in the tex file. There may be a flaw, that last time i checked it seemed to be always _on_ by default. Regards, Hartmut
Folks, After some experiments, things are not so clear in my mind Here is a sample pdf that does not seem to fit the rules given by Hartmut It is an *LB or *RB direction sample and the characters are aligned top ignoring the baseline. What was wrong ? source: \synctex=1 \starttext \pardir TLB \textdir TLB TLB-Lorem ipsum dolor sit amet, consectetur adipiscing elit. \par\noindent Praesent vitae massa sem. Donec venenatis sem et lectus viverra in adipiscing metus vestibulum. Sed accumsan rutrum sem ut tincidunt. Aenean diam nulla, egestas nec dignissim vitae, congue sed lacus. Nulla iaculis blandit diam eu rutrum. \page[yes] \pardir BRT \textdir BRT BRT-Lorem ipsum dolor sit amet, consectetur adipiscing elit. \par\noindent Praesent vitae massa sem. Donec venenatis sem et lectus viverra in adipiscing metus vestibulum. Sed accumsan rutrum sem ut tincidunt. Aenean diam nulla, egestas nec dignissim vitae, congue sed lacus. Nulla iaculis blandit diam eu rutrum. \stoptext output:
On Fri, 12 Jun 2009, Jérome Laurens wrote:
After some experiments, things are not so clear in my mind Here is a sample pdf that does not seem to fit the rules given by Hartmut It is an *LB or *RB direction sample and the characters are aligned top ignoring the baseline. What was wrong ?
1st page is right, with TLB glyphs hang downward, with their top aligned at the baseline. 2nd page, ooops, with BRT they stand above the baseline with their descenders, but they should be vertically positioned similarly to TLT. And aleph does it right, a bug in luatex, i'll fix. Thanks for spotting this. btw, the attached file shows how the margins are set in the various directions. Regards, Hartmut
Hi folks, still experimenting on luatex, below is a test file of my own that uses the 32 possibilities. Here is the output with hboxes and vboxes hilighted respectively in blue and orange Before I work on the vertical boxes, could you confirm that it is the expected behaviour ? In particular, I find it very weird that sometimes the text is outside the box that contains it. For example on page 3, the rectangle filled with light blue corresponds to "\hbox to 5cm" below which box direction is "dir_TL_". Inside, we have the "vbox" which box direction is "dir_LT_". \synctex=1 \def\sample{Lorem ipsum dolor sit amet, consectetur adipiscing elit. \par\noindent Praesent vitae massa sem. Donec venequatis sem et leptus viverra in adipiscing metus vestibulum. Sed accumsan rugitrum sem ut tincidunt. Aenean diam nulla, egestas nec dignissim vitae, congue sed lacus. Nulla inequalis blandit diam eu rutrum.} \def\test#1{\pardir TLT\textdir TLT Test:#1 \par\kern 20pt\leavevmode\kern 200pt \hbox to 200pt{% \pardir#1 \textdir#1 \setuplayout[textwidth=200pt]% \vbox{\sample}% }% \page[yes]% } \starttext \showframe \test{TLT}\test{TRT}\test{LTT}\test{LBT}\test{BLT}\test{BRT}\test{RTT} \test{RBT} \test{TLB}\test{TRB}\test{LTB}\test{LBB}\test{BLB}\test{BRB}\test{RTB} \test{RBB} \test{TLL}\test{TRL}\test{LTL}\test{LBL}\test{BLL}\test{BRL}\test{RTL} \test{RBL} \test{TLR}\test{TRR}\test{LTR}\test{LBR}\test{BLR}\test{BRR}\test{RTR} \test{RBR} \stoptext \endinput
Dear Jérome,
still experimenting on luatex, below is a test file of my own that uses the 32 possibilities. Here is the output with hboxes and vboxes hilighted respectively in blue and orange Before I work on the vertical boxes, could you confirm that it is the expected behaviour ? In particular, I find it very weird that sometimes the text is outside the box that contains it.
ah, you do it the encyclopedic way (i tried the same), maybe expecting that all directions are working. In fact the h/vpacker is currently only geared for a small subset, only for the directions that are demanded by users. I tried to get some consistency into the backend for all 32 output directions, but i don't know how far they make sense, and i didn't touch the packers (remaining consistent with aleph --- which also behaves funny for many of the directions). As it seems there is no user nor test font for most cases, it's also unclear how the packers should behave, uncharted territory.
For example on page 3, the rectangle filled with light blue corresponds to "\hbox to 5cm" below which box direction is "dir_TL_". Inside, we have the "vbox" which box direction is "dir_LT_".
I'll check more from home... Regards, Hartmut -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Jérome Laurens wrote:
On another respect, I see that none of luatex nor context command supports the -synctex option. Is there a special reason or is it just a bug ?
no special reason for context; as using synctex makes only makes sense when you run from an editor, and because then (at least) I don't want to always use synctex, ways are needed to control it in a different way; and users can always add \synctex=1 to the document they're working with once texworks reaches a stable state, i'll look into it in more detail ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, Jun 12, 2009 at 10:33, Hans Hagen wrote:
Jérome Laurens wrote:
On another respect, I see that none of luatex nor context command supports the -synctex option.
In mkii one can pass parameters to the engine with texexec --passon="--synctex=1" Though I agree that having direct access to --synctex might be more handy. I don't know about mkiv (luatex). Mojca
Mojca Miklavec wrote:
On Fri, Jun 12, 2009 at 10:33, Hans Hagen wrote:
Jérome Laurens wrote:
On another respect, I see that none of luatex nor context command supports the -synctex option.
In mkii one can pass parameters to the engine with texexec --passon="--synctex=1" Though I agree that having direct access to --synctex might be more handy. I don't know about mkiv (luatex).
sure. i'll put it on the todo list ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Hartmut Henkel
-
Jérome Laurens
-
Mojca Miklavec
-
Taco Hoekwater