[lltx] [luaotfload] Footnotes

Georg A. Duffner g.duffner at gmail.com
Thu Apr 8 11:58:32 CEST 2010


Am 2010-04-08 01:16, schrieb Khaled Hosny:
> 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.

Thank you, that fixed it.

> 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.

Yes, font management is definitely a problem on linux systems when you 
try to stay with the distribution’s packages. On Debian systems, if you 
install texlive from the repos and want to use the same fonts in other 
apps, you have to install several packages, which probably ship 
different versions. This gets even worse if you install vanilla texlive 
and update regularly. I have been trying to keep my system “clean” by 
not installing font-packages if texlive contains the fonts and instead 
putting a symlink to tex-fonts into my system’s fonts folder. Thus 
luaotfload and xetex do find two copies of some fonts, but they are in 
fact the same file. For me personally this works, but I think, something 
more generic would be good.

Best regards
Georg


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



More information about the lualatex-dev mailing list