8

In the following example the line \renewcommand\emshape works fine on one Linux computer using Kile but has to be commented out on another Linux computer also using Kile.

There are not other differences between the files and no known differences between the computers.

The error message is Command \emshape undefined.

\documentclass[a4paper,12pt]{letter}

\usepackage{fontspec} \usepackage{graphicx} \usepackage{wrapfig}

\defaultfontfeatures{Ligatures=TeX} \setmainfont{UnifrakturMaguntia16}

\renewcommand\emshape{\addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}}

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

\begin{document} \begin{letter}{Fred,} \address{The earth} \opening{Hi,} Lots of waffle

\end{letter} \end{document}

egreg
  • 1,121,712
Richard
  • 81
  • Welcome! I guess that one computer has TeX Live 2018 (or earlier) and the other one TeX Live 2019 (or later). Look at the first line in the log file to see it. – egreg Mar 26 '21 at 17:28

1 Answers1

5

The management of \emph has changed from 2018 to 2019. So the guess is that one computer has TeX Live 2018 (or earlier) and the other one has TeX Live 2019 (or later).

You can check the first line in a log file: you'll see something like

This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018)

This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019)

This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020)

depending on the distribution you're running on the machine.

You can make the code to work in both environments:

\documentclass[a4paper,12pt]{letter}

\usepackage{fontspec}

%\defaultfontfeatures{Ligatures=TeX} % not needed

\setmainfont[ Path=./UnifrakturMaguntia.2017-03-19/switched-on_features/, Extension=.ttf, ]{UnifrakturMaguntia16}

\ifdefined\emshape \renewcommand\emshape{% \addfontfeature{LetterSpace=20.0,Ligatures={Required,NoCommon}}% } \else \DeclareEmphSequence{% \addfontfeature{LetterSpace=20.0,Ligatures=Required,Ligatures=NoCommon}, % possibly other levels } \fi

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

\begin{document}

\begin{letter}{Fred,} \address{The earth} \opening{Hi,} Lots of \emph{waffle}

\end{letter} \end{document}

The setting of Path and Extension is because I don't have UnifrakturMaguntia as a system font, adapt the call to your needs.

The output would be the same on both machines.

enter image description here

egreg
  • 1,121,712