2

When I use xelatex compile the following code:

\documentclass{article}

\usepackage{tipa}

\begin{document}

     [\textsecstress h\textopeno m\textschwa\textprimstress\textdyoghlig in\i\textschwa s]

\end{document}

there are two warnings:

  1. Font shape `T3/lmr/m/n' undefined(Font) using `T3/cmr/m/n' instead(Font) for symbol `textsecstress';

  2. Some font shapes were not available, defaults substituted.

But if I choose pdflatex to compile this code, there is no warning. I want to remove these warnings with the xelatex compiler. How can I solve this problem?

egreg
  • 1,121,712
Peng
  • 23

1 Answers1

1

These warnings are innocuous. You can remove them, though:

\documentclass{article}

\usepackage{iftex} \usepackage{tipa}

\iftutex \DeclareFontFamilySubstitution{T3}{\rmdefault}{cmr} \fi

\begin{document}

[\textsecstress h\textopeno m\textschwa\textprimstress\textdyoghlig in\i\textschwa s]

\end{document}

The font substitution cannot be done with pdflatex, because it would lead to an infinite loop, so it's necessary to do it conditionally. The conditional \iftutex is true when using XeLaTeX or LuaLaTeX.

Note: see edit history for a previous solution using the substitutefont package, now declared obsolete.

egreg
  • 1,121,712