Hi all, the lettrine module leads to an error with this example and MkIV. MkII is fine. ····8<··························································· \usemodule[lettrine] \starttext \chapter{And Now: an Error} \lettrine{E}{rror} \stoptext ····8<··························································· * With Luatex 0.63.0-2010091123 I get an ``error on line 6 in file ../environ.tex: Attempt to double-free glue node 1001, ignored ...`` * Can be circumvented via “\dontleavehmode”. * Never ran into a “glue node” error before; is there general rule how to avoid them? Thanks for any advice, Philipp PS: Taco, the french blindtext in lettrine-doc.pdf has an issue concerning guillemets, which are rendered as inverted question marks and exclamation marks. I wasn't able to compile the document myself so unfortunately I can't send a patch. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 21-9-2010 8:39, Philipp Gesang wrote:
Hi all,
the lettrine module leads to an error with this example and MkIV. MkII is fine.
····8<··························································· \usemodule[lettrine]
\starttext \chapter{And Now: an Error} \lettrine{E}{rror} \stoptext ····8<···························································
* With Luatex 0.63.0-2010091123 I get an ``error on line 6 in file ../environ.tex: Attempt to double-free glue node 1001, ignored ...``
* Can be circumvented via “\dontleavehmode”.
* Never ran into a “glue node” error before; is there general rule how to avoid them?
Thanks for any advice,
Alan ran into this at the ctx conference and it is under investigation. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2010-09-21 <21:47:35>, Hans Hagen wrote:
On 21-9-2010 8:39, Philipp Gesang wrote:
* Can be circumvented via “\dontleavehmode”.
Alan ran into this at the ctx conference and it is under investigation.
Hi, in case this helps with debugging: you can’t work around the issue by means of “\dontleavehmode” if you set up the paragraph auto-indentation to “yes,medium”: ····8<··························································· \setupindenting[yes,medium] % comment this out and it works again \usemodule[lettrine] \starttext \chapter{Some Section} \startparagraph \dontleavehmode\lettrine{D}{on Knuth asserts:} \input knuth \stopparagraph \stoptext ····8<··························································· This results, again, in the glue node error. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 23-9-2010 2:32, Philipp Gesang wrote:
On 2010-09-21<21:47:35>, Hans Hagen wrote:
On 21-9-2010 8:39, Philipp Gesang wrote:
* Can be circumvented via “\dontleavehmode”.
Alan ran into this at the ctx conference and it is under investigation.
Hi,
in case this helps with debugging: you can’t work around the issue by means of “\dontleavehmode” if you set up the paragraph auto-indentation to “yes,medium”:
····8<··························································· \setupindenting[yes,medium] % comment this out and it works again \usemodule[lettrine] \starttext
\chapter{Some Section} \startparagraph \dontleavehmode\lettrine{D}{on Knuth asserts:} \input knuth \stopparagraph
\stoptext ····8<···························································
This results, again, in the glue node error.
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs)
As Hans indicated, he is aware of the problem with the lettrine module and will fix it. In the meantime, you can get by using simply: %\usemodule [lettrine] % broken, so let's fake it: \def\lettrine#1#2{{\tfc #1}#2} Of course, this is no good for production, but it is a simple solution if you are working on drafts. Alan P.S. Those who were at Brejlov will remember that a "solution" is something that is all mixed-up!
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs)
As Hans indicated, he is aware of the problem with the lettrine module and will fix it. In the meantime, you can get by using simply:
%\usemodule [lettrine] % broken, so let's fake it: \def\lettrine#1#2{{\tfc #1}#2}
Of course, this is no good for production, but it is a simple solution if you are working on drafts.
Isn't it better to use initials? This is what one of setups has" \definehead[initialtitle][title] \setuphead[initialtitle] [after=\placeinitial] \definefontsynonym[initial][name:fontin] \setupinitial [ state=start, n=3, distance=-.1pc, ] And then I can simply use \initialtitle {Don Knuth said} \input knuth Aditya
On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs)
As Hans indicated, he is aware of the problem with the lettrine module and will fix it. In the meantime, you can get by using simply:
%\usemodule [lettrine] % broken, so let's fake it: \def\lettrine#1#2{{\tfc #1}#2}
Of course, this is no good for production, but it is a simple solution if you are working on drafts.
Isn't it better to use initials? This is what one of setups has"
\definehead[initialtitle][title]
\setuphead[initialtitle] [after=\placeinitial]
\definefontsynonym[initial][name:fontin]
\setupinitial [ state=start, n=3, distance=-.1pc, ]
And then I can simply use
\initialtitle {Don Knuth said}
\input knuth
Aditya
I don't think that it is the same thing, but I do not understand your example. Did you try running it? Alan
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs)
As Hans indicated, he is aware of the problem with the lettrine module and will fix it. In the meantime, you can get by using simply:
%\usemodule [lettrine] % broken, so let's fake it: \def\lettrine#1#2{{\tfc #1}#2}
Of course, this is no good for production, but it is a simple solution if you are working on drafts.
Isn't it better to use initials? This is what one of setups has"
\definehead[initialtitle][title]
\setuphead[initialtitle] [after=\placeinitial]
\definefontsynonym[initial][name:fontin]
\setupinitial [ state=start, n=3, distance=-.1pc, ]
And then I can simply use
\initialtitle {Don Knuth said}
\input knuth
Aditya
I don't think that it is the same thing, but I do not understand your example. Did you try running it?
Sorry... \placeinitial gobbles \input.... but here is a standalone example: \setupinitial [ state=start, n=3, distance=-.1pc, ] \starttext \placeinitial This is what Knuth said: \input knuth \stoptext Aditya
On Thursday 23 September 2010 18:46:00 you wrote:
Sorry... \placeinitial gobbles \input.... but here is a standalone example:
\setupinitial [ state=start, n=3, distance=-.1pc, ]
\starttext
\placeinitial This is what Knuth said: \input knuth
\stoptext
I didn't know about initial... %D \macros %D {setupinitial,placeinitial,checkinitial} %D %D {\em To be documented.} Indeed! Nice, I would like to use something like this, even setting it up to be automatic at the beginning of chapters, for example. But it does not quite work as lettrines. In a silly language such as French, the following fails: \placeinitial L'objet de cette commande\dots as one needs: \lettrine{L'}{objet} de cette commande\dots Other heuristics might apply in different cases. Alan
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 18:46:00 you wrote:
Sorry... \placeinitial gobbles \input.... but here is a standalone example:
\setupinitial [ state=start, n=3, distance=-.1pc, ]
\starttext
\placeinitial This is what Knuth said: \input knuth
\stoptext
I didn't know about initial...
%D \macros %D {setupinitial,placeinitial,checkinitial} %D %D {\em To be documented.}
Indeed!
So you do not consider the source itself as the documentation :)
Nice, I would like to use something like this, even setting it up to be automatic at the beginning of chapters, for example.
The example that I showed earlier did that. Essentially, just use \setuphead[chapter][after=\placeinitial]
But it does not quite work as lettrines.
Indeed. Otherwise, there would no need for a separate module. Actually, it will be nice if the functionality of lettrine can be merged with \placeintial.
In a silly language such as French, the following fails:
\placeinitial L'objet de cette commande\dots
as one needs:
\lettrine{L'}{objet} de cette commande\dots
Other heuristics might apply in different cases.
And there are sentences starting with quotations, etc. Aditya
On Thursday 23 September 2010 19:38:46 Aditya Mahajan wrote:
%D \macros %D {setupinitial,placeinitial,checkinitial} %D %D {\em To be documented.}
Indeed!
So you do not consider the source itself as the documentation :)
Copied verbatum! I (still) read documentation better than source code, although I am learning how to read \TeX macros and now even lua functions. I am also supposed to work on *writing* the documentation!
But it does not quite work as lettrines.
Indeed. Otherwise, there would no need for a separate module. Actually, it will be nice if the functionality of lettrine can be merged with \placeintial.
Would be very nice. Do you have good ideas about how to better parse the beginning of text? One needs to be clever.
\lettrine{L'}{objet} de cette commande\dots
Other heuristics might apply in different cases.
And there are sentences starting with quotations, etc.
As in: \quote{The rain in Spain...} Maybe others on the mailing list can suggest many particular cases. Alan
Hi, Just a note: the node-freeing bug that showed up in the lettrine module has been solved (it took taco and me a while to nail down the exact circumstances and location in the luatex source -- it had to do with some broken linked list prev chain). As the solution is in the binary (catching it in mkiv does not make much sense) the fix will be there when the minimals use the next beta of luatex (unless you compile yourself). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2010-09-23 <12:24:05>, Aditya Mahajan wrote:
On Thu, 23 Sep 2010, Alan BRASLAU wrote:
On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
we know and we will take a look at it next week (as it takes some time to nail down node allocation bugs)
As Hans indicated, he is aware of the problem with the lettrine module and will fix it. In the meantime, you can get by using simply:
%\usemodule [lettrine] % broken, so let's fake it: \def\lettrine#1#2{{\tfc #1}#2}
Of course, this is no good for production, but it is a simple solution if you are working on drafts.
Isn't it better to use initials? This is what one of setups has"
\definehead[initialtitle][title]
\setuphead[initialtitle] [after=\placeinitial]
\definefontsynonym[initial][name:fontin]
\setupinitial [ state=start, n=3, distance=-.1pc, ]
And then I can simply use
\initialtitle {Don Knuth said}
\input knuth
Dear Alan, Aditya, and everybody else, thanks for your efforts, but I’m afraid that you were being mislead about my intentions. I am (probably mis-)using the lettrine module in order to fake the Knuthian \danger and \ddanger macros in auto-generated context code. One of the main goals is, other than pure convenience on my part, that understanding of the resulting code requires only knowledge of high-level context macros, not of high-level tex wizardry. Of course I could start with texbook, p. 419, and try to adapt it to context (seems to be non-trivial), but even if I should succeed, the effort necessary to understand what’s going on is huge compared to when using a well-known and well-documented module. That’s why I rather do without autoindentation, as it concerns only the layout of the manual, not the code itself. @Aditya, I couldn’t get your code to work, neither in mkii nor in mkiv. Anyways, I wasn’t aware of \setup/placeinitial before so I learned something new today. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
participants (4)
-
Aditya Mahajan
-
Alan BRASLAU
-
Hans Hagen
-
Philipp Gesang