0

I am using

\renewcommand*\ttdefault{cmvtt} \renewcommand*\familydefault{\ttdefault}

in order to get typewriting style. However, I notice that, \textbf does not work? There is no error or warning. I just see that the font of the text is still the same without any changing.

Any help please?

3
  • 4
    This means that your cmvtt most likely does not have a bold version of tt
    – user31729
    Commented Feb 18, 2018 at 11:09
  • @ChristianHupfer thank you so much for your help. How could I solve the problem?
    – Silver_80
    Commented Feb 18, 2018 at 11:22
  • 1
    Probably, nobody has designed a matching bold version. It is not available. There is no bold for cmvtt
    – Johannes_B
    Commented Feb 18, 2018 at 11:38

1 Answer 1

3

The Latin Modern fonts (kind of successor of the Computer Modern fonts) have bold variants for the type writer families:

\documentclass{article}

\usepackage[variablett]{lmodern}% use lmvtt instead of lmtt for \ttfamily
\renewcommand*{\familydefault}{\ttdefault}

\begin{document}
Lorem \textbf{ipsum} \textsl{dolor} \textbf{\textsl{sit}} amur.
\end{document}

Result

3
  • Thank you so, so much for your great help. Thank you for all the people in this site. All the best.
    – Silver_80
    Commented Feb 19, 2018 at 6:38
  • Is it possible to make it look a bit bolder? I've followed the answer to this question but its still quite difficult to distinguish bold text.
    – slew123
    Commented Sep 14, 2018 at 14:17
  • @slew123 There is not much place for thicker letters without increasing the monospace letter width. You can experiment with package pdfrender to fill and stroke the letters with an additional stroke width. Commented Sep 14, 2018 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .