0

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.

7
  • 2
    pslatex made a bit of sense with latex209nfss for which I wrote it in 1991 or so, it's not very useful with latexe2e pdflatex, and not useful at all with xelatex or lualatex, what is the aim here? there must be an alternative Commented Jun 27, 2023 at 6:36
  • 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 use fontspec and \setmainfont, \setsansfont etc. to setup a times like text font, a helvetica like text font etc. and unicode-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).
    – cabohah
    Commented Jun 27, 2023 at 6:36
  • Thank you @DavidCarlisle. The application has a good deal of legacy code and I suspect (now more than ever with your comment) that pslatex is no longer serving a purpose and should be removed. FWIW, it's WeBWorK generating PDF homework sets for students. Commented Jun 27, 2023 at 7:11
  • 1
    @cabohah Thanks. I think we are content with the default font here, and it sounds like I should examine simply removing pslatex. Commented Jun 27, 2023 at 7:13
  • @alex.jordan The 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.
    – egreg
    Commented Jun 27, 2023 at 9:40

0

You must log in to answer this question.

Browse other questions tagged .