2

Have a document with newpx and use bold, small caps and large text (with MikTeX 2.9).

\documentclass{article}
\usepackage[largesc]{newpxtext}
\begin{document}
Normal

\textbf{Bold textbf}

{\bfseries Bold bfseries}

\large{large}

\large{\textbf{large Bold}}

\large{\textbf{\textsc{large Bold Small Caps}}}
\end{document}

MikTeX throws these LaTeX Font Info in the log file.

LaTeX Font Info:    Font shape `T1/zpltlf/bx/n' in size <10> not available
(Font)              Font shape `T1/zpltlf/b/n' tried instead on input line 6.
LaTeX Font Info:    Font shape `T1/zpltlf/b/n' will be
(Font)              scaled to size 10.0pt on input line 6.
LaTeX Font Info:    Font shape `T1/zpltlf/m/n' will be
(Font)              scaled to size 12.0pt on input line 10.
LaTeX Font Info:    Font shape `T1/zpltlf/bx/n' in size <12> not available
(Font)              Font shape `T1/zpltlf/b/n' tried instead on input line 12.
LaTeX Font Info:    Font shape `T1/zpltlf/b/n' will be
(Font)              scaled to size 12.0pt on input line 12.
LaTeX Font Info:    Font shape `T1/zpltlf/bx/sc' in size <12> not available
(Font)              Font shape `T1/zpltlf/b/sc' tried instead on input line 14.
LaTeX Font Info:    Font shape `T1/zpltlf/b/sc' will be
(Font)              scaled to size 12.0pt on input line 14.

Two questions:

1) Why is bold extended (bx) called, when I use textbf (b)? When using bfseries, bx is not called and no LeTeX Font Info is triggered!

2) Can I improve the compiling speed somehow, by getting rid of all the LaTeX Font Info, especially when having a large Thesis document?

TobiasDK
  • 808
  • 5
  • 19

3 Answers3

1

You get the message with \bfseries too. But in a document you get it only once, as from then on latex knows that this combination of font setting should be substituated:

\documentclass{article}
\usepackage[largesc]{newpxtext}
\begin{document}
Normal

{\bfseries Bold bfseries}

blblb

{\bfseries Bold bfseries}

\end{document}

gives message for line 6 but not for line 10:

 ... scaled to size 10.0pt on input line 6.

In your example the \textbf came first and so triggered the message.

One can silence the messages, but I doubt that you would win much.

Ulrike Fischer
  • 327,261
1

The kernel value of \bfdefault is bx, but the NewPX fonts use b and, indeed, in the t1zpltlf.fd file you find lines such as

\DeclareFontShape{T1}{zpltlf}{bx}{n}{<->ssub * zpltlf/b/n}{}

When you do \bfseries (which is implicitly done when \textbf is processed), LaTeX will set the font series to bx and so there will be a “silent substitution” (declared by ssub), which will nevertheless recorded in the log file as “Font Info”.

If the substitution had been declared with sub, instead of a “Font Info” message only in the log file you'd get a “Font Warning” also on the console.

If all fonts you use in boldface series have a b series denotator instead of bx, you can do

\renewcommand{\bfdefault}{b}

in the preamble. But I don't recommend doing it: it just reduces the number of “Font Info” message without giving a real benefit.

With the following code

\documentclass{article}
\usepackage[largesc]{newpxtext}

\renewcommand{\bfdefault}{b}

\begin{document}
Normal

\textbf{Bold textbf}

{\bfseries Bold bfseries}

{\large large\par}

{\large\textbf{large Bold}\par}

{\large\textbf{\textsc{large Bold Small Caps}}\par}
\end{document}

the log file will have

LaTeX Font Info:    Font shape `T1/zpltlf/b/n' will be
(Font)              scaled to size 10.0pt on input line 9.
LaTeX Font Info:    Font shape `T1/zpltlf/m/n' will be
(Font)              scaled to size 12.0pt on input line 13.
LaTeX Font Info:    Font shape `T1/zpltlf/b/n' will be
(Font)              scaled to size 12.0pt on input line 15.
LaTeX Font Info:    Font shape `T1/zpltlf/b/sc' will be
(Font)              scaled to size 12.0pt on input line 17.

The information is recorded just once, when a font is loaded for the first time.

As an aside, note that \large, like all font size declarations, is not a command with an argument.

egreg
  • 1,121,712
0

1) These two commands are not entirely identical. You can think of it like this*: \bfseries says, "switch to the default bold typeface from here on, whatever that might be." That may or may not be extended depending on what font family you are using. If your font family does not contain a bold shape LaTeX would complain and use a substitute as well. (\bfseries is only interested in whether you are in math mode or not.)

The command \textbf uses LaTeX's new font selection scheme, i.e., it tries to be clever in "adding boldness" to the font family and font shape that is used at the position where it is called. By default, it tries to add extended bold because that's what you would expect when using the default family Computer Modern (or Latin Modern).

The document class article also only loads some specific font sizes and complains if you try to use something extraordinary.

2) Yes. Well, it depends. First, try using \package{lmodern}and see, if that better fits your needs. It allows for more font sizes and doesn't complain about that. If you are using pdf(la)tex, take a look here: Suppress fontaxes warnings

* Don't bet your money on this.

alexkelbo
  • 837
  • 1
    \bfseries gives the same message if it used before \textbf. The first one wins. – Ulrike Fischer Mar 11 '16 at 14:07
  • Well, it doesn't on my system, which is TeXLive, using pdftex. However, as I said in my answer, if you use lmodern, there should be no errors at all. – alexkelbo Mar 11 '16 at 14:10
  • The thing is that I want newpx :-) So being consistent with using bfseries, would only invoke one LaTeX Font Info and "maybe" increase the speed. – TobiasDK Mar 11 '16 at 14:15
  • This are not errors but substituation messages (in this case harmless). And switching to a completly different font is not really a solution. – Ulrike Fischer Mar 11 '16 at 14:15
  • Yes, I know that it is not an error, just a message. Thanks – TobiasDK Mar 11 '16 at 14:18
  • 1
    I'm sorry, I didn't realize that the font was important to you. Since I'm on TeXLive, I can't reproduce your error. But you could try the following command: \renewcommand{\bfdefault}{b}. That should make bfseries choose bold instead of bold extended. – alexkelbo Mar 11 '16 at 14:24