Hello, (complete this time, I accidentally pushed Ctrl-Enter) I tried out beta 0.11.2 yesterday, and it works great. Still, I noticed a few things that seem weird or wrong. First thing: I tried to use 'require', and the error message I got was slightly weird:
! LuaTeX error [string "luas[0]"]:1: module '/Dokumente/Writing/trunk/Writing/T eX/tex/KTeX/lua/l-callback.klua' not found: no field package.p. \LU:require ...ed {require(kpse.find_file('#2'))}} <<<
I look into Lua 5.1.2 and found this error message in loadlib.c:
lua_pushfstring(L, "\n\tno field package.preload['%s']", name); <<<
A variation (shorter pathname, thus longer message):
! LuaTeX error [string "luas[0]"]:1: module 'l-callback.klua' not found: no field package.preload['l-callback.klua'] no file './l-callback/k. <<<
So it seems that Lua's error message is truncated by LuaTeX. Second thing: I typeset a document of mine and got quite a few overfull boxes (more on this later). I looked into the log file, which my editor warned me was not valid UTF-8. Following is an excerpt of said log file. It seems that an UTF-8 sequence is broken across two lines:
Overfull \hbox (1.53935pt too wide) in paragraph at lines 1493--1498 \FS:O@font@t1/lmr/r/r/n/n/10@font er-wi-der-te Kaya. Sie zog ih-re Freun-din nà ¤-her zu sich, zog Ataamis| <<<
Third thing: I am currently typesetting documents with pdfTeX as well as with LuaTeX. The documents use Latin Modern with font expansion and protrusion. While pdfTeX typesets them without any overfull/underfull boxes, LuaTeX produces quite a few overfull boxes (one of them above). Before I investigate further: Is it possible that font expansion is currently disabled in LuaTeX? And a question regarding hyphenation trie size: pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6):
Beginning to dump on file ../../web2c/ktex.fmt (format=ktex 2007.9.19) 3176 strings of total length 48723 7253 memory locations dumped; current usage is 64&7010 1616 multiletter control sequences \font\nullfont=nullfont 0 words of font info for 0 preloaded fonts 14 hyphenation exceptions Hyphenation trie of length 13987 has 388 ops out of 35111 207 for language 1 ^^^^^ 181 for language 0 No pages of output. Transcript written on ../../web2c/ktex.log. <<<
luaTeX, Version 3.141592-beta-0.11.2-2007091918 (Web2C 7.5.6)
Beginning to dump on file ../../web2c/luaktex.fmt (format=luaktex 2007.9.19) 2992 strings of total length 48651 7223 memory locations dumped; current usage is 48&7048 1717 multiletter control sequences \font\nullfont=nullfont 0 preloaded fonts 0 words of active ocps \ocp\nullocp=nullocp 0 preloaded ocps \ocplist\nullocplist=[] 14 hyphenation exceptions Hyphenation trie of length 79256 has 388 ops out of 35111 207 for language 1 ^^^^^ 181 for language 0 No pages of output. Transcript written on ../../web2c/luaktex.log. <<<
Is this difference due to Unicode? And finally: \catcode changes are not logged when using \tracingassigns. \pdfTeX logs these changes. These things do not diminish my excitement about LuaTeX. Thank you for your time for developing it! Jonathan
Jonathan Sauer wrote:
I typeset a document of mine and got quite a few overfull boxes (more on this later). I looked into the log file, which my editor warned me was not valid UTF-8. Following is an excerpt of said log file. It seems that an UTF-8 sequence is broken across two lines:
Overfull \hbox (1.53935pt too wide) in paragraph at lines 1493--1498 \FS:O@font@t1/lmr/r/r/n/n/10@font er-wi-der-te Kaya. Sie zog ih-re Freun-din nà ¤-her zu sich, zog Ataamis| <<<
luatex assumes valid utf; if you want to handle such cases, you can hook in code in the file reading callbacks
Third thing:
I am currently typesetting documents with pdfTeX as well as with LuaTeX. The documents use Latin Modern with font expansion and protrusion. While pdfTeX typesets them without any overfull/underfull boxes, LuaTeX produces quite a few overfull boxes (one of them above).
font expansions etc is on the agenda for later; some things may even change (certainly the font related *codes)
Before I investigate further: Is it possible that font expansion is currently disabled in LuaTeX?
probably not disabled but partially broken Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hello
I typeset a document of mine and got quite a few overfull boxes (more on this later). I looked into the log file, which my editor warned me was not valid UTF-8. Following is an excerpt of said log file. It seems that an UTF-8 sequence is broken across two lines:
Overfull \hbox (1.53935pt too wide) in paragraph at lines 1493--1498 \FS:O@font@t1/lmr/r/r/n/n/10@font er-wi-der-te Kaya. Sie zog ih-re Freun-din nà ¤-her zu sich, zog Ataamis|
luatex assumes valid utf; if you want to handle such cases, you can hook in code in the file reading callbacks
Yes, of course (and I am using such a callback to great success). But I am talking about the log file, which is created by LuaTeX, not read by it. Jonathan
Jonathan Sauer wrote:
Overfull \hbox (1.53935pt too wide) in paragraph at lines 1493--1498 \FS:O@font@t1/lmr/r/r/n/n/10@font er-wi-der-te Kaya. Sie zog ih-re Freun-din nà ¤-her zu sich, zog Ataamis|
This line is incorrect luatex output, I will fix it.
I am currently typesetting documents with pdfTeX as well as with LuaTeX. The documents use Latin Modern with font expansion and protrusion. While pdfTeX typesets them without any overfull/underfull boxes, LuaTeX produces quite a few overfull boxes (one of them above).
Can you send me a small test file? I will get back to your other remarks later. Best wishes, Taco
Hello,
I am currently typesetting documents with pdfTeX as well as with LuaTeX. The documents use Latin Modern with font expansion and protrusion. While pdfTeX typesets them without any overfull/underfull boxes, LuaTeX produces quite a few overfull boxes (one of them above).
Can you send me a small test file?
I will. I will send it to you tomorrow (I am currently at work).
Best wishes, Taco
Jonathan
Hello,
I am currently typesetting documents with pdfTeX as well as with LuaTeX. The documents use Latin Modern with font expansion and protrusion. While pdfTeX typesets them without any overfull/underfull boxes, LuaTeX produces quite a few overfull boxes (one of them above).
Can you send me a small test file?
As promised, I looked into the phenomenon. Follows the test file (using Computer Modern instead of Latin Modern) as well as some observations (you might want to skip to my conclusion/theory at the end first). pdfTeX is 3.141592-1.40.3, LuaTeX 3.141592-beta-0.11.2-2007091918. Format is, as usual, PlainTeX. ------------------------------------------------------------------------ \pdfoutput1 \pdffontexpand\tenrm 10 10 10 autoexpand\relax % A % \pdffontexpand\tenrm 10 20 10 autoexpand\relax % B % \pdffontexpand\tenrm 10 30 10 autoexpand\relax % C % \pdffontexpand\tenrm 10 40 10 autoexpand\relax % D % \pdffontexpand\tenrm 10 50 10 autoexpand\relax % E % \pdffontexpand\tenrm 10 60 10 autoexpand\relax % F % \pdffontexpand\tenrm 60 10 10 autoexpand\relax % G % \pdffontexpand\tenrm 0 10 10 autoexpand\relax % H % \pdffontexpand\tenrm 0 20 10 autoexpand\relax % I % \pdffontexpand\tenrm 0 30 10 autoexpand\relax % J % \pdffontexpand\tenrm 0 40 10 autoexpand\relax % K % \pdffontexpand\tenrm 0 50 10 autoexpand\relax % L % \pdffontexpand\tenrm 60 110 10 autoexpand\relax % M % Can be set to 1, no change in the result \pdfadjustspacing2 % Is 56.9055pt in pdfTeX as well as LuaTeX: \hsize=2cm % \message{\the\hsize} \tenrm nnnnnnn \bye ---------------------------------------------------------------- A side-note: I do not know if this is due to an error in logging, but compare pdfTeX and LuaTeX:
This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6) entering extended mode (./OverfullBoxTest.tex Overfull \hbox (1.5946pt too wide) in paragraph at lines 10--11 []\tenrm (-10) nnnnnnn | <<<
The (-10) is missing in LuaTeX:
This is luaTeX, Version 3.141592-beta-0.11.2-2007091918 (Web2C 7.5.6) (OverfullBoxTest.tex Overfull \hbox (1.97966pt too wide) in paragraph at lines 10--11 [][]\tenrm nnnnnnn | <<<
Looking at the results below, I would guess that this is a logging problem. Or a side-effect of the `fixed' expansion (see below). ---------------------------------------------------------------- Typesetting the document: No expansion + \pdfadjustspacing=2, pdfTeX: Overfull \hbox (1.9835pt too wide) in paragraph at lines 20--21 []\tenrm nnnnnnn | No expansion + \pdfadjustspacing=2, LuaTeX: Overfull \hbox (1.9835pt too wide) in paragraph at lines 20--21 [][]\tenrm nnnnnnn | ****** No expansion + \pdfadjustspacing=0, pdfTeX: Overfull \hbox (1.9835pt too wide) in paragraph at lines 20--21 []\tenrm nnnnnnn | No expansion + \pdfadjustspacing=0, LuaTeX: Overfull \hbox (1.9835pt too wide) in paragraph at lines 20--21 [][]\tenrm nnnnnnn | ****** Expansion A + \pdfadjustspacing=0, pdfTeX: Overfull \hbox (1.9835pt too wide) in paragraph at lines 20--21 []\tenrm nnnnnnn | Expansion A + \pdfadjustspacing=0, LuaTeX: Overfull \hbox (1.97966pt too wide) in paragraph at lines 20--21 [][]\tenrm nnnnnnn | ****** Typesetting the document with one of the lines A-M active: A, pdfTeX: Overfull \hbox (1.5946pt too wide) in paragraph at lines 14--15 []\tenrm (-10) nnnnnnn | (0.3889pt less than no expansion) A, LuaTeX: Overfull \hbox (1.97966pt too wide) in paragraph at lines 14--15 [][]\tenrm nnnnnnn | (0.00384pt less than no expansion) ****** B, pdfTeX: Overfull \hbox (1.2057pt too wide) in paragraph at lines 14--15 []\tenrm (-20) nnnnnnn | (0.3889pt less than A) B, LuaTeX: Overfull \hbox (1.5868pt too wide) in paragraph at lines 14--15 [][]\tenrm nnnnnnn | (0.39286pt less than A) ****** C, pdfTeX: Overfull \hbox (0.8168pt too wide) in paragraph at lines 14--15 []\tenrm (-30) nnnnnnn | (0.3889pt less than B) C, LuaTeX: Overfull \hbox (1.19406pt too wide) in paragraph at lines 14--15 [][]\tenrm nnnnnnn | (0.39274pt less than B) ****** D, pdfTeX: Overfull \hbox (0.4279pt too wide) in paragraph at lines 14--15 []\tenrm (-40) nnnnnnn | (0.3889pt less than C) D, LuaTeX: Overfull \hbox (0.80132pt too wide) in paragraph at lines 14--15 [][]\tenrm nnnnnnn | (0.39274pt less than C) ****** E, pdfTeX: (no overfull boxes) E, LuaTeX: Overfull \hbox (0.40846pt too wide) in paragraph at lines 15--16 [][]\tenrm nnnnnnn | (0.30286pt less than D) ****** F, pdfTeX: (no overfull boxes) F, LuaTeX: (no overfull boxes) ****** G, pdfTeX: Overfull \hbox (1.5946pt too wide) in paragraph at lines 21--22 []\tenrm (-10) nnnnnnn | (as expected, see A) G, LuaTeX: Overfull \hbox (3.90462pt too wide) in paragraph at lines 21--22 [][]\tenrm nnnnnnn | (1.92112pt wider than the overfull box when no expansion is used, and 1.92496pt wider than the overfull box when expansion `10 10 10' is used) ****** H, pdfTeX: Overfull \hbox (1.5946pt too wide) in paragraph at lines 22--23 []\tenrm (-10) nnnnnnn | (as expected, see A) H, LuaTeX: Overfull \hbox (1.5946pt too wide) in paragraph at lines 22--23 [][]\tenrm nnnnnnn | (the same result as pdfTeX) ****** I, pdfTeX: Overfull \hbox (1.2057pt too wide) in paragraph at lines 26--27 []\tenrm (-20) nnnnnnn | (as expected, see B) I, LuaTeX: Overfull \hbox (1.2057pt too wide) in paragraph at lines 26--27 [][]\tenrm nnnnnnn | (the same result as pdfTeX) ****** J, pdfTeX: Overfull \hbox (0.8168pt too wide) in paragraph at lines 26--27 []\tenrm (-30) nnnnnnn | (as expected, see C) J, LuaTeX: Overfull \hbox (0.8168pt too wide) in paragraph at lines 26--27 [][]\tenrm nnnnnnn | (the same result as pdfTeX) ***** K, pdfTeX: Overfull \hbox (0.4279pt too wide) in paragraph at lines 26--27 []\tenrm (-40) nnnnnnn | (as expected, see D) K, LuaTeX: Overfull \hbox (0.4279pt too wide) in paragraph at lines 26--27 [][]\tenrm nnnnnnn | (the same result as pdfTeX) ****** L, pdfTeX: (no overfull boxes, see E) L, LuaTeX: (no overfull boxes, the same result as pdfTeX) ****** M, pdfTeX: (no overfull boxes) M, LuaTeX: (no overfull boxes) -------------------------------------------------------------------- Observations (in chronological order): - LuaTeX creates wider overfull boxes than pdfTeX (thus requiring more shrinking to fit the text onto the line). - This is only true when expansion is used. - When a font is expanded in LuaTeX, the overfull box is slightly smaller, even if \pdfadjustspacing is zero. In fact, it seems that LuaTeX ignores \pdfadjustspacing (using what value instead?). - Using pdfTeX, the overfull boxes shrink a constant amount, in LuaTeX the amount varies (quite considerably, when comparing the first step and the other ones). - Increasing the stretch for a font seems to stretch the font even if this is not necessary (case G). - If a font has no stretch (cases H-L), the result is identical to pdfTeX. - As shown in case M, increasing the maximum shrink finally cancels out even a (more or less) big stretch. - Stretch and shrink to not cancel each other out exactly, as shown in case A: Stretch 10 - shrink 10 should give the same result as no expansion, but the overfull box is slightly less overfull. - Not shown in the log, but when examining the PDF (see OverfullBoxTest_N_110.pdf and OverfullBoxTest_N_1000.pdf): Larger shrink values (i.e. 1000) make LuaTeX shrink the font further, even if not required, resulting in lines which are too short. Note: expansion for the two PDFs was `60 110 10' and `60 1000 10', respectively. Theory: When shrinking a font, LuaTeX first stretches it as far as the \pdffontexpand parameters will allow, and then shrinks it, again as far as allowed. ------------------------------------------------------------------------
Best wishes, Taco
I hope this helps, Jonathan
Jonathan Sauer wrote:
Hello,
(complete this time, I accidentally pushed Ctrl-Enter)
I tried out beta 0.11.2 yesterday, and it works great. Still, I noticed a few things that seem weird or wrong.
First thing: I tried to use 'require', and the error message I got was slightly weird:
I've fixed the error message. But keep in mind that does not mean that require now works as you expect. There are a few reasons for that: * package.path is not initialized to the texmf path, and require does not like absolute filenames. * Hans' lua files are not modules, they should be loaded using dofile() Best wishes, Taco
participants (3)
-
Hans Hagen
-
Jonathan Sauer
-
Taco Hoekwater