Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

footnote does not scale properly with using fontspec. Any idea how to solve this problem? Already tried realscripts and xltxtra but no luck. Thanks,

\documentclass[12pt]{article} 
\usepackage[english]{babel} 
\usepackage{fontspec} 
\setmainfont{Times New Roman} 
\newcommand{\phont}[1]{\fontspec[Scale=#1]{Times New Roman}} 

\begin{document}\noindent 

{\phont{1} test\footnote{test}}\\ 
{\phont{2} test\footnote{test}}\\ 
{\phont{3} test\footnote{test}}\\ 
{\phont{1}test\textsuperscript{1}}\\ 
{\phont{2}test\textsuperscript{2}}\\ 
{\phont{3}test\textsuperscript{3}} 

\end{document}
share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

It's "by design". LaTeX's \footnote sets its footnote mark in font \normalfont. However you want the current text font. \textsuperscript keeps the current font except the font size.

The behaviour of LaTeX can be changed by redefining \@makefnmark:

\documentclass[12pt]{article}
\usepackage[english]{babel}   
\usepackage{fontspec} 
\setmainfont{Times New Roman}
\newcommand{\phont}[1]{\fontspec[Scale=#1]{Times New Roman}}

\makeatletter
\renewcommand*{\@makefnmark}{%
  \hbox{%
    \@textsuperscript{%
      % \normalfont % removed
      \selectfont % added
      \@thefnmark
    }%
  }%  
}   
\makeatother

\begin{document}

\vspace*{\fill}

\noindent
{\phont{1} test\footnote{test}}\\
{\phont{2} test\footnote{test}}\\
{\phont{3} test\footnote{test}}\\
{\phont{1}test\textsuperscript{1}}\\
{\phont{2}test\textsuperscript{2}}\\
{\phont{3}test\textsuperscript{3}}  

\end{document}

Result

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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