1

My amsbook document using the font packages fontenc, inputenx, txfonts, mathptmx, newunicodechar is nearly complete. / I don't want to introduce any more fonts at this stage. Can I achieve semi-bold on localized normal text with this setup, please?

2 Answers2

2

As far as I know, txfonts and mathptmx don't have semibold fonts. But many other fonts do. One example is:

\documentclass{article}
\usepackage{libertine}
\begin{document}
\textbf{Regular bold} and {\libertineSB{localized semibold}}.
\end{document}

enter image description here

EDIT: The semibold is of the same height as the bold type (or if you have super vision, it's actually ever so slightly taller for the character b).

\documentclass{article}
\usepackage{libertine}
\begin{document}
\textbf{\the\fontcharht\font`b}

{\libertineSB{\the\fontcharht\font`b}}
\end{document}

enter image description here

Sverre
  • 20,729
2

First you need a font, which provides semi-bold. Because of mathptmx I assume, you want to have a semi-bold variant of Times? Usually, Times only comes with regular, bold, italics and bold italics.

A poor man's version can be created with package pdfrender. The glyphs of the outline font are additionally drawn with a configurable line width to get the impression of a semi-bold font.

However, the details are not so good as when a real semi-bold font is used. For example, the left stem of the N is even thicker than the bold version. Also the widths of the glyphs do not change.

Full example:

\documentclass{article}
\usepackage{mathptmx}
\usepackage{pdfrender}
\usepackage{lipsum}

\newcommand{\pmsb}[1]{%
  \begingroup
    \pdfrender{
      TextRenderingMode=FillStroke,
      LineWidth=.17pt,
    }%
    #1%
  \endgroup
}

\begin{document}
\lipsum[2]
\pmsb{\lipsum[2]}
\textbf{\lipsum[2]}
\end{document}

Result

Heiko Oberdiek
  • 271,626