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.

The following MWE gives me an error:

%Page layout here
\documentclass[letterpaper]{article}
\usepackage{kantlipsum}

%Font stuff here
\usepackage{tgtermes}


\begin{document}
\kant
\oldstylenums{314159} %This is line 11
\kant
\end{document}

LaTeX Font Info: Try loading font information for OML+qtm on input line 11. LaTeX Font Info: No file OMLqtm.fd. on input line 11.

LaTeX Font Warning: Font shape OML/qtm/m/it' undefined (Font)
using
OML/cmm/m/it' instead on input line 11.

[2] [3] [4] (./MWE.aux)

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

Now, this seems pretty obvious that it is a problem using \oldstylenums{314159} with tgterms. However, I had to edit out everything but this code to find that: In this MWE (based on my original document)

%Page layout here
\documentclass[letterpaper]{article}
\usepackage{kantlipsum}

%Font stuff here
\usepackage{tgtermes}

\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\setlength{\headheight}{30pt}
\chead{\oldstylenums{314159}}

\begin{document}
Here is some normal text
\kant
More normal text %This is line 18
\end{document}

The error points to the last line before the end of the document, line 18.

However, I made another MWE, where I pasted a couple of pages of the lipsum in manually and got something strange that seems replicate my original problem: The error message moves seemingly randomly (In this case it is on the first blank line after a command; in my more complex document... I have no idea, it is line 97, which is the first blank line on the second page, but there are lots of commands on the first page. Possibly the first blank line after \emph{}?

%Page layout here
\documentclass[letterpaper]{article}
\usepackage{kantlipsum}

%Font stuff here
\usepackage{tgtermes}

\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\setlength{\headheight}{30pt}
\chead{\oldstylenums{314159}}

\begin{document}
   Here is some normal text As any dedicated reader can clearly see, the Ideal of practical
   reason is a representation of, as far as I know, the things in themselves; as I have
   shown elsewhere, the phenomena should only be used as a canon for our understanding.
   The paralogisms of practical reason are what first give rise to the architectonic of
   practical reason. 

   Kant here

\kant %This is line 23, error occures on next line unless I put a comment there

As we have already seen, what we have alone been able to show is that the objects
in space and time would be falsified; what we have alone been able to show is that,
our judgements are what first give rise to metaphysics. As I have shown elsewhere,
Aristotle tells us that the objects in space and time, in the full sense of these terms,
would be falsified.
\end{document}

That one puts the error on the first blank line after \kant. Can someone explain what this error is and why the heck it keeps moving around?

share|improve this question
2  
LaTeX is warning you that TeX Gyre Termes doesn't have old style digits. And it's obvious it hasn't, since the original design of Times New Roman or Times Roman (Linotype and Monotype versions) had only lining digits. Old style digits with Times is like adding hearphones and an iPod to Monna Lisa. –  egreg Oct 31 '12 at 18:13
1  
@egreg TeX Gyre Termes does have old style digits (and "taboldstyle", whatever that is). what latex asserts is that it has non-working instructions about how to get to those glyphs. (of course, it would all be ok in lua/xe-tex and otf versions of the fonts ... there's even an otf maths font, now.) –  wasteofspace Oct 31 '12 at 19:32
    
@wasteofspace Everybody is entitled to add an iPod to their own copy of Monna Lisa; but the original remains untouched. –  egreg Oct 31 '12 at 20:35
    
Please switch to XeLaTeX or LuaLaTeX; there you can easily get old style digits with Termes (textcomp with pdflatex will give you Computer Modern old style digits). –  Martin Schröder Nov 3 '12 at 18:52
    
@MartinSchröder Ah, I'll just stop using old style numbers then. LuaTeX doesn't support some features of microtype I need on occasion yet. (As of the microtype 2.4 manual) –  Canageek Nov 3 '12 at 18:58
show 1 more comment

2 Answers 2

up vote 9 down vote accepted

You don't get an error but a warning. The default definition of \oldstylenums switch to the OML-encoding. As tgtermes doesn't know it, LaTeX falls back to the cm fonts and warns you when the oldstyle numbers are used the first time.

Load the textcomp package to get oldstyle numbers with tgtermes.

share|improve this answer
    
+1 I knew we'd put an alternative definition of oldstylenums somewhere but couldn't recall where:-) –  David Carlisle Oct 31 '12 at 17:37
    
So why does the error message move around? –  Canageek Oct 31 '12 at 18:19
    
@Canageek: Because the font is called the first time at different places. If you use it e.g. in the header it will be needed when the first page is shipped out. –  Ulrike Fischer Oct 31 '12 at 19:45
    
@UlrikeFischer Will that give me real old style numbers, or fake ones? –  Canageek Oct 31 '12 at 20:32
1  
textcomp will give you the real old style number from the font. –  Ulrike Fischer Oct 31 '12 at 20:39
add comment

\oldstylenums as defined in the base LaTeX format is really designed to extract the numbers from the eccentric encoding layouts of the original TeX fonts. Specifically it does

 \usefont{OML}{\rmdefault}{\f@series}{it}

using the OML encoding which is the encoding used for the original 7bit TeX fonts such as computer modern math italic.

So LaTeX is telling you that for the font family you have, there is no font defined for the math letters encoding:

OML/qtm/m/it'

so it is going to use cmmi (computer modern math italic instead.)

Note it's not an error, "just" a warning.

If there is a font matching tgtermes that has old style figures, then either you need to encode that in OML encoding and tell LaTeX about it in an fd file, or you need to locally redefine \oldstylenums to get the digits from wherever they are in the font set you are using.


In your longer example the command is in the page head so you get the warning when the output routine assembles the first page. A common trigger for the output routine is a blank line (\par) which most likely accounts for your remark "first blank line on second page" .

share|improve this answer
    
So why does the error message move around? –  Canageek Oct 31 '12 at 18:27
    
I'm not sure what you mean by move, In the longer example you have used it in the page head so it will trigger when the output routine assembles the page which occurs at an essentially arbitrary point in the file once Tex has assembled more than a page worth of text. –  David Carlisle Oct 31 '12 at 18:40
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.