0

(see edit) I am looking to add incorporate a "semi-bold" (e.g \textsb) option to the default font (serif). I have seen solutions from a few years ago that involve different fonts (not what I'm looking for), but it's been a few years since I've seen a post on this specific inquiry. It seems like it's been implied in the past that it could only work with font packages that naturally come with semibold weight options, and that the default font was not one of them, but I was hoping/wondering if anyone had come up with a work around for this recently.

Solution for other fonts: https://newbedev.com/how-can-one-semi-bold-a-small-group-of-normal-text-words

Packages I'm already using: bbm, amsmath,amsthm,amssymb, enumitem, lipsum, paralist, xcolor, hyperref, framed, mathdesign, pstricks, istings, titlesec, [utf8]{inputenc}, graphicx, document class - article

EDIT: thanks to everyone for the input. I guess I should've clarified that I'm trying to use this in the context of a math operator ; I did not anticipate this being an issue since \textbf, \emph, \underline, etc work without issue. The command is currently \DeclareMathOperator*{\ndd}{\text{ } \underline{\textbf{and}} \text{ }}.

The "duplicate" solution does not quite conform to my font desires, but it would suffice if it could work in the context of declaring a math operator (unfortunately does not). Also tried amending [utf8]{inputenc} to [T1]{fontenc}. The other solution below does not offer a true "semibold", in fact it looks almost bolder when I try. This is a really minor and aesthetic question and I appreciate everyone for indulging me

  • Possibly related: https://tex.stackexchange.com/questions/598328/inter-font-black-style-for-a-few-words-but-rest-in-normal-weighted-bold – Steven B. Segletes Aug 25 '21 at 16:51
  • 1
    your package list implies you are using pdftex and type1 fonts so really you can only (easily) get semibold if you have a semibold font, if you use xelatex or lualatex then fontspec will alow you to apply fakebold to any opentype font to varying levels of boldness – David Carlisle Aug 25 '21 at 17:43
  • the point about the solution that you link to is not that it is using other fonts it is using luatex or xelatex not pdflatex, you could apply fakebold to the default font if you switched from pdflatex. – David Carlisle Aug 25 '21 at 17:58
  • 1
    you could do this (the question is essentially a duplicate) https://tex.stackexchange.com/a/290036/1090 – David Carlisle Aug 25 '21 at 17:59
  • Thanks for the insight @DavidCarlisle – whatmyname Aug 25 '21 at 18:31
  • 5
  • Welcome to the site! It’s a good question, and since it’s been asked before, I’m going to vote to direct anyone who finds it in a search to the earlier one. – Davislor Aug 25 '21 at 23:31
  • Just edited @Davislor – whatmyname Aug 26 '21 at 01:12
  • @whatmyname Ah, okay, the math operator does make the question different. A solution is probably something like \mathop{\textnormal{\sbseries op}}, but could you tell us more about what you’re trying to do? I don’t feel I know enough to write an answer. – Davislor Aug 26 '21 at 01:34
  • And Computer Modern Demibold isn’t noticeably less heavy than Computer Modern Bold, but you’d have to either switch from obsolete 8-bit fonts to fontspec, or take that up with Donald E. Knuth. – Davislor Aug 26 '21 at 01:37
  • I’ve retracted my close vote. – Davislor Aug 26 '21 at 01:39
  • @Davislor Right now I have \DeclareMathOperator*{\ndd}{\text{ } \underline{\textbf{and}} \text{ }}, but would like the and to be less bold than the other bold typeface in the doc. – whatmyname Aug 26 '21 at 01:55
  • What should the output be? – Davislor Aug 26 '21 at 02:31
  • I'm using it so I can list two different equations. Example (equation 1) and (equation two). Just meant to quickly add "and" in math mode – whatmyname Aug 26 '21 at 16:39

1 Answers1

2

The cfr-lm package (Clea F. Rees’ support for Latin Modern) enables Latin Modern Demi as \sbseries or \textsb.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{cfr-lm}

\begin{document} \noindent Latin Modern Regular\ \textsb{Demibold \textsl{Oblique}}\ \textbf{Bold \textsl{Slanted}} \end{document}

Latin Modern Sample

On LuaLaTeX or XeLaTeX, you may use the fonts lmromandemi10-regular.otf and lmromandemi10-oblique.otf.

Davislor
  • 44,045