[lltx] [luaotfload] Footnotes

Khaled Hosny khaledhosny at eglug.org
Thu Apr 8 01:16:24 CEST 2010


On Wed, Apr 07, 2010 at 11:08:23PM +0200, Georg A. Duffner wrote:
> Am 2010-04-07 11:55, schrieb Khaled Hosny:
> >On Wed, Apr 07, 2010 at 11:05:26AM +0200, Georg A. Duffner wrote:
> >>There seems to be a problem with footnotes when using luaotfload.
> >>The footnotemark in the text is rendered smaller but not
> >>superscript.
> >>
> >>Example:
> >>
> >>\documentclass{article}
> >>\usepackage{luaotfload}
> >>\begin{document}
> >>Text\footnote{footnote text}
> >>\end{document}
> >>
> >>The error:
> >>! Math error: parameter \Umathquad\displaystyle is not set.
> >>\@ensuredmath #1->$\relax #1$
> >>
> >>l.8 Text\footnote{
> >>                   footnote text}
> >>Sorry, but I can't typeset math unless various parameters have
> >>been set. This is normally done by loading special math fonts
> >>into the math family slots. Your font set is lacking at least
> >>the parameter mentioned earlier.
> >
> >Most likely this is because you've a TTF version of CM math fonts that
> >luaotfload is trying to load, and it is lacking such parameters. If you
> >are running debian, do you've either ttf-lyx or latex-xft-fonts packages
> >installed?
> >
> 
> 
> Well, you are partly right. This minimal example is using CM TTF
> fonts (and I have ttf-lyx installed, but not latex-xft-fonts). But
> the following examples are showing the same error (see attached
> logfile of #1):
> 
> 1. using “libertine” package with an adapted fd-file (see attachment)
> 
> \documentclass{article}
> \usepackage[EU2]{fontenc}
> \usepackage{luaotfload}
> \usepackage{libertine}
> \begin{document}
> Text\footnote{footnote text}
> \end{document}
> 
> 2. using Linux Libertine OTF with fontspec
> 
> \documentclass{article}
> \usepackage{fontspec}
> \setmainfont{Linux Libertine O}
> \begin{document}
> Text\footnote{footnote text}
> \end{document}

Luaotfload doesn't change default latex fonts, what happens is that your
document requests one of CM math fonts, say cmmi10, which have the
necessary font parameters in the tfm file, but luaotfload finds the ttf
version you have and so loads it through the opentype font loader which
will not load any tfm files and thus the required font parameters will
not be set, resulting in the \Umathquad error you get.

A quick solution is to uninstall the ttf-lyx package then update you
luaotfload font database, and every thing will be back to normal.

Now, having several different fonts with the same font name is reciby
for troubles, and I don't consider this a luaoftload bug per se (you ask
for a font named "cmmi10" and you get one), but since this going to
affect many users (me included!), we need to find a better way to handle
this.

> What I don’t understand: \textsuperscript sometimes does work and
> sometimes it doesn’t. The following sequences behave differently
> when inserted in the above examples:
> 
> a) Text\textsuperscript{a}\footnote{footnote text}\textsuperscript{2}
> → “a” small on baseline, “1” (footnote mark) small on baseline, “2”
> superscript
> 
> b) Text\textsuperscript{a}\textsuperscript{2}
> → “a” small on baseline, “2” small on baseline
> 
> c) Text\textsuperscript{a\textsuperscript{2}}
> → “a” superscript, “2” supersuperscript, no error.

Here I get the expected output, most probably what you get is related to
the math issue.

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


-- 
To unsubscribe, reply using "remove me" as the subject.



More information about the lualatex-dev mailing list