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.

When I use tipa and lmodern in the same document, I always get a couple of font substitution warnings. The document looks fine, though. Is there any way around this?

Minimal example:

\documentclass{article}
\usepackage{lmodern}
\usepackage[]{tipa}
\begin{document}
\textesh
\end{document}

pdflatex output:

test.tex|| LaTeX Font Warning: Font shape `T3/lmr/m/n' undefined

test.tex|| LaTeX Font Warning: Some font shapes were not available, defaults substituted.

EDIT: See Filtering font substitution warnings caused by the combination of lmodern and tipa if latex crashes when you try Seamus' solution.

share|improve this question
    
on a recent full MikTeX installation, which I presume is what you have from your other post I don't get any warnings or errors. –  Yiannis Lazarides Dec 4 '11 at 18:38
add comment

migrated from stackoverflow.com Dec 4 '11 at 15:05

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 4 down vote accepted

Leo Liu's answer says that you can safely ignore them. This answer is a complement to that answer. It tells you how to safely ignore them. (And it borrows heavily from Stefan Kottwitz's answer to an earlier question of mine)

You can use the silence package to turn off warnings from the appropriate package. So

\WarningFilter{latexfont}{Some font}
\WarningFilter{latexfont}{Font shape}

should turn off those warnings.

share|improve this answer
    
Unfortunately, I just tried this and it doesn't work. Very strange. I don't have time to work out why not just now… –  Seamus Dec 4 '11 at 16:00
    
Quoting from the silence manual: "In case of a `LaTeX Font' message, the Name of the package is latexfont by convention." –  Erik Dec 4 '11 at 16:14
    
Didn't spot that. But the error is more fundamental: just the combination of the three packages fails to compile. –  Seamus Dec 4 '11 at 17:06
    
Yeah, I amended my question with the crash. (Should I ask a separate question for this?) –  Erik Dec 4 '11 at 17:49
1  
@user1080125 Your first question was very clear and straightforward, and the kind of question that others might have. I think you should ask a new question about the interaction. That way my and Leo's answers to the original question will still be useful to others. –  Alan Munn Dec 4 '11 at 17:57
show 2 more comments

The warnings are harmless, and the substitutions will happen automatically. If you want to get rid of the warning you could redefine the \textipa command and the IPA environments to always use Computer Modern as shown in the example below. If you decide later to change to using e.g. mathptmx then you would need to change the definition of \tiparmdefault to use ptm instead of cmr.

\documentclass[12pt]{article}

\usepackage{lmodern}
\usepackage[T1]{tipa}
\newcommand\tiparmdefault{cmr} % needs to be ptm if using mathptmx
\renewcommand{\textipa}[1]{{\fontencoding{T3}\fontfamily{\tiparmdefault}\selectfont#1}}
\renewenvironment{IPA}{\fontencoding{T3}\fontfamily{\tiparmdefault}\selectfont}{}

\begin{document}

\textipa{\textesh HGTR}
\begin{IPA}
\textesh
\end{IPA}

Note that in your example, you used an IPA defined character without enclosing it in \textipa or an IPA environment. Even with this solution, doing that will still give rise to the warning.

share|improve this answer
add comment

You can ignore it safely.

Latin Modern fonts have no T3 encoding support. Since Latin Modern families come from Computer Modern fonts, it will works fine combining LM fonts with CM IPA fonts in T3 encoding.

share|improve this answer
    
Are there no cases where font substitution warnings are not harmless? –  Erik Dec 4 '11 at 18:20
1  
@erik: Indeed there are some. You are supposed to read the warnings and understand it. For fonts warnings, you should know what the fonts are. When you change the font encodings which are not supported, you probably get some warnings and wrong result. For example, use XeLaTeX with fontspec and txfonts together, the font EU1/txr/m/n (Times) is missing, then changed to EU1/lmr/m/n (Latin Modern): it is wrong result, and you should use a OpenType/TrueType Times font with help of fontspec, or change the text font encoding to T1 sometimes. –  Leo Liu Dec 5 '11 at 2:15
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.