[luatex] \localleftbox, \localrightbox and \footnotes

Hans Hagen pragma at wxs.nl
Thu Jul 27 18:50:11 CEST 2017


On 7/27/2017 5:04 PM, Daniel Flipo wrote:
> Hi all,
> 
> The following example shows that the content of \localleftbox leaks into
> footnotes.  The same is true with \localrightbox.
> 
> --8<---------------cut here---------------start------------->8---
> \input luaotfload.sty
> \def\myfontname{Arial}
> \font\myfont={name:\myfontname} at 12pt
> \myfont
> 
> \hsize=160mm
> \parindent=0mm
> 
> Bla bla bla\footnote{*}{Foo}
> 
> \localleftbox{|}
> Bla bla bla\footnote{**}{Bar}
> \bye
> --8<---------------cut here---------------end--------------->8---
> 
> Is it a known feature or a bug?  Coding
> {\localleftbox{}\footnote{**}{Bar}} is an option, not very pleasant though…
It's a feature .. but if you want to use trickery like \local*box your 
macro package needs to manage it properly (because only the package know 
what is intended) .. you can do:

\let\normalfootnote\footnote

\def\footnote#1#2%
   {\begingroup
    \localleftbox{}%
    \normalfootnote{#1}{#2}%
    \endgroup}

but even then I bet that you get local boxes in places. In fact it's an 
example of a limited useable feature (and why not more such features get 
aded to the core). In retrospect we could have removed it.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list