8

The following MWE should demonstrate the problem. My platform: Lualatex (Win32/64 with TL2016, both with current updates).

\documentclass{book}

\usepackage{fontspec}
\setmainfont{Times New Roman}% without this, everything seems to work fine
%\setmainfont{Arial}% the same here

\usepackage[%
    main=english,
]{babel}%

\begin{document}
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

\chapter{Symbolic footnotes and Times New Roman or Arial}

First footnote\footnote{Hello World!}\\
Second footnote\footnote{Hello Again!}\\
Third footnote\footnote{Heeeeello Agaiiiiiinn!}

\bigskip

Question(s):

When I use TNR or Arial font for example, the first footnotemark symbol (asterisk) is missing. Why?
(Note: Using Latin Modern, the output is fine.)

\end{document}
6
  • 1
    Add \DeclareTextSymbol{\textasteriskcentered}\UnicodeEncodingName{"002A} -- This should be fixed by the LaTeX-Team Feb 12 '17 at 10:29
  • @MarcoDaniel Works fine. Thanks a lot. As I would like to remove this workaround as soon as possible, I've two additional questions: Is the Latex-Team already aware of this. If so, where can I track the progress?
    – lAtExFaN
    Feb 12 '17 at 10:43
  • @MarcoDaniel actually it's not so clear what the fix should be Feb 12 '17 at 10:44
  • 1
    @DavidCarlisle: It's just a quick and dirty solution. However I think there should be a more general solution. Feb 12 '17 at 11:28
  • Thanks for the report, This is now fixed in the base LaTeX release. Feb 22 '17 at 17:21
6

Update

In the 2017/01/01 Patch Level 2 release of LaTeX (which is today's texlive update) The document as posted in the question works without missing footnotes.


Original Answer

You will have a warning in the log

Missing character: There is no ∗ (U+2217) in font TimesNewRoman:mode=node;scri
pt=latn;language=DFLT;+tlig;!

or if you have an earlier version of tuenc.def (U+294E)

You could use * (U+002A) which is available in all fonts but is a superscript asterisk.

so one of these:

\DeclareTextSymbol{\textasteriskcentered}{TU}{"204E} [⁎] [LOW ASTERISK]

\DeclareTextSymbol{\textasteriskcentered}{TU}{"2217}%  [∗] [ASTERISK OPERATOR]

\DeclareTextSymbol{\textasteriskcentered}{TU}{"002A}% [*] [ASTERISK]

The tricky thing is to find a setup that works in all fonts, and gives a low asterisk.

Possibly as a default we will use

\DeclareTextCommand{\textasteriskcentered}{TU}{%
  \iffontchar\font"2217 \char"2217 \else\raisebox{-.5ex}{*}\fi}

Current plan (in svn sources for the next release) is as below, but may adjust it a bit more before release.

%    \end{macrocode}
% Not all fonts have U+2217 but using U+002A requires some adjustment.
%    \begin{macrocode}
\DeclareTextCommand{\textasteriskcentered}\UnicodeEncodingName{%
  \iffontchar\font"2217 \char"2217 \else
    \begingroup
      \fontsize
       {\the\dimexpr1.2\dimexpr\f@size pt\relax}%
       {\f@baselineskip}%
      \selectfont 
      \raisebox{-0.6ex}[\dimexpr\height-0.6ex][0pt]{*}%
    \endgroup
  \fi
}
%    \end{macrocode}
3
  • your generic answer seems very interesting and helpful to me, as I also use commercial fonts others might not have access to and thus cannot help I need to be able to solve this problem by my own (thanks). Nevertheless I currently don't know which answer is more acceptable. Need to think about it.
    – lAtExFaN
    Feb 12 '17 at 11:08
  • @lAtExFaN we will probably do some test for the character on the next release I was just chatting with other team members here chat.stackexchange.com/transcript/message/35384419#35384419 and suggested similar to I see egreg just answered Feb 12 '17 at 11:13
  • @lAtExFaN updated with a possible definition Feb 12 '17 at 12:04
7

With the current TU default encoding, \textasteriskcentered is mapped to U+2217 ASTERISK OPERATOR which Times New Roman happens to miss.

The old EU1/EU2 encodings are based on xunicode that mapped \textasteriskcentered to U+002A ASTERISK, which was the wrong thing to do, since the output when used as a footnote marker is definitely bad:

enter image description here

Compare with the output we get with TeX Gyre Termes

enter image description here

If I add

\UndeclareTextCommand{\textasteriskcentered}{TU}
\DeclareRobustCommand{\textasteriskcentered}{%
  \iffontchar\font"2217 \char"2217 \else\loweredasterisk\fi
}
\newcommand\loweredasterisk{\raisebox{-.5ex}{*}}

to the preamble, I get, with Times New Roman,

enter image description here

which is still not very good, but definitely better than the previous output.

An altogether different solution: use TeX Gyre Termes for the symbol. You could also add code for coping with different font families.

\documentclass{book}

\usepackage{fontspec}
\usepackage{etoolbox}

\usepackage[
    main=english,
]{babel}

\setmainfont{Times New Roman}
\newfontfamily{\termes}{TeX Gyre Termes}% for the asterisk

\makeatletter
\patchcmd{\@fnsymbol}
  {\textasteriskcentered}
  {{\termes\textasteriskcentered}}
  {}{\ddt}
\makeatother

\begin{document}
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

\chapter{Symbolic footnotes and Times New Roman or Arial}

First footnote\footnote{Hello World!}\\
Second footnote\footnote{Hello Again!}\\
Third footnote\footnote{Heeeeello Agaiiiiiinn!}

\bigskip

Question(s):

When I use TNR or Arial font for example, the first footnotemark symbol (asterisk) is missing. Why?
(Note: Using Latin Modern, the output is fine.)

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.