Consider this MWE:
\documentclass{article}
\usepackage{pslatex}
%\usepackage{fontspec}
\begin{document}
\bfseries Hello World!
\end{document}
With pdflatex
, the PDF comes out as expected. But with xelatex
, the "Hello World!" is not in bold. However I can uncomment the fontspec
line and then with xelatex
it is back to having bold.
Is this all expected behavior? And if so, can someone explain what's going on?
In my application, there are .tex
files that (presently) always use pslatex
. Sometimes they are processed with pdflatex
and other times with xelatex
. I noticed the latter had an absence of bold (as well as small caps) and investigated. And came to this point.
pslatex
is a legacy font package. With XeLaTeX and LuaLaTeX it even does not use times, reported by the font warning:Font shape `TU/ptm/m/n' undefined using `TU/lmr/m/n' instead on input line 457
. For XeLaTeX or LuaLaTeX you should usefontspec
and\setmainfont
,\setsansfont
etc. to setup a times like text font, a helvetica like text font etc. andunicode-math
to setup a suitable math font. But if you really want to try the legacy fonts with XeLaTeX, you may try\usepackage[T1]{fontenc}
. But don't expect correct output for all unicode chars (e.g.ß
would be incorrect).pslatex
is no longer serving a purpose and should be removed. FWIW, it's WeBWorK generating PDF homework sets for students.pslatex
.pslatex
package is serving a purpose, namely to allow running LaTeX over older documents that use it. Loading it in newer document isn't recommended (to use understatement). Where “newer” means “after 2000” or so.