0

My current LaTeX document uses the following font for headings, which is either "CMU Serif Bold" by default or "Latin Modern Roman Bold" (the updated version of the CMU font) if you use \usepackage{lmodern}.:

https://i.stack.imgur.com/UvGeJ.png

However, I want the following font for my headings (it looks like a different bold version of "CMU Serif Roman" / "Latin Modern Roman Regular"):

https://i.stack.imgur.com/TATXs.png

Does anyone know how to do this?

EDIT:

After some more research, here is a CV I found on the internet that has implemented the font I want: http://petar-v.com/PetarV-CurriculumVitae.pdf (located at the very top). Maybe this helps someone?

  • 2
    how did you get those images, if you have pdfs you could say what font is being used so people could say how to get that in latex, rather than rely on recognising a font by eye which isn't impossible but harder. – David Carlisle Sep 23 '17 at 8:41
  • 1
    As @DavidCarlisle says, the PDF will tell you which font it uses. You can look in the document properties as well as anybody else. (Well, Firefox's crappy PDF viewer doesn't tell you. But any halfway reasonable viewer will. Or use pdffonts.) – cfr Sep 24 '17 at 0:18
  • @David Carlisle The first picture is from my LaTeX PDF. The font will be "CMU Serif Bold" by default or "Latin Modern Roman Bold" (the updated version of the CMU font), but that should not really matter as they basically look identical. But if you need to know, I use Latin Modern.The second image is from an image of a paper, to which I don't have the actual PDF source. – Anonymous Sep 24 '17 at 0:19
  • Yes, but you just said you linked to a PDF with exactly the font you want. So look at the fonts that PDF uses. If you don't think it is regular, it might be demi-bold. LM has a demi-bold serif. – cfr Sep 24 '17 at 0:22
  • "At the very top" means the biggest header, that is the CV author name, right? I've found the fonts for that header. (See answer). – Blaisorblade Sep 24 '17 at 2:23
0

Possibly you want the demi-bold. Hard to say, really - the font properties of the PDF you linked to will tell you for sure.

Here's a comparison of Latin Modern Roman medium, demi-bold and bold extended.

LMR weights

LM weight multiple sizes

How to do this depends on your engine, which you didn't specify. I used pdfTeX and cfr-lm. Alternatively, use XeTeX or LuaTeX and fontspec.

\documentclass{article}
\usepackage{cfr-lm}
\begin{document}
\plstyle
\begin{tabular}{ll}
  LMR medium & Chapter 1 \\
  LMR demi & \textsb{Chapter 1} \\
  LMR bold extended & \textbf{Chapter 1}
\end{tabular}
\end{document}

CMU also has a non-extended bold serif. Here's a comparison:

CMU serif weights & sizes

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\begin{tabular}{ll}
  CMRU medium & Chapter 1 \\
  CMRU demi & \fontseries{b}\selectfont Chapter 1 \\
  CMRU bold extended & \textbf{Chapter 1}
\end{tabular}

\newcommand*\chtest{%
  \begin{tabular}{c}
    \tiny Chapter 1\\\scriptsize Chapter 1\\\footnotesize Chapter 1\\\small Chapter 1\\\normalsize Chapter 1\\\large  Chapter 1\\\Large  Chapter 1\\\LARGE  Chapter 1\\\Huge  Chapter 1
  \end{tabular}%
}
\begin{tabular}{ccc}
  \mdseries\chtest & \fontseries{b}\selectfont\chtest & \bfseries\chtest
\end{tabular}
\end{document}
  • Thanks for your answer. I'm still going through the list of embedded fonts in the PDF at the moment. But in the PDF, the "a" of the font looks like this: i68.tinypic.com/2lt4k7q.png (like the "a" of "LMR medium" in the image you posted above). In the bold versions "LMR demi" and "LMR Bold Extended", the "a" looks different. Does that mean LMR medium was somehow made bold in a different way? – Anonymous Sep 24 '17 at 0:43
  • @Anonymous Clicking the link gets me a lot of guff but I don't see an 'a' of the kind you mention at all. Upload to SE's image server if you want me to see it. (You do this by writing an answer or editing the question, uploading the image, copying the URL, discarding the changes and then posting the link.) – cfr Sep 24 '17 at 0:52
  • @Anonymous Could be CMU Serif, in that case. Does it matter especially? I mean, LM will generally be higher quality, so if you substitute CMU, you'll probably find other things you may not like. Could also be an opentype/type1 difference. Shouldn't be, but might be. Try comparing those. – cfr Sep 24 '17 at 1:00
  • @Anonymous See edit above for CMU options. The a with the curly tail (if that's the bit you're looking at) features in the medium and bold extended, but not the non-extended bold. However, the medium weight looks crappy in my viewer. If it is for print, it may print OK, though. – cfr Sep 24 '17 at 1:11
  • 1
    @Blaisorblade lm, lm-math, lmodern & cfr-lm: tex.stackexchange.com/questions/247530/… – cfr Sep 24 '17 at 3:33
0

It appears you're looking for the CM-Super fonts without the effects of package fix-cm, so for the result you ask for, you should remove \usepackage{fix-cm} or similar from your code.

Whether you want that, though, is another matter. As the name suggests, fix-cm corrects design mistakes of the CM-Super packages — in particular, CM-Super is supposed to match Computer Modern, but getting that result requires loading fix-cm. If you want to use the font you ask for just for chapter headings, without altering the rest of the document, you probably can with the right low-level font selection commands. But using Latin Modern Demibold, as in the other answer, is probably a better choice, as Latin Modern is considered by most a higher-quality design.

MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
%\usepackage{fix-cm} % Don't load this for the font you asked for. 

\begin{document}
\Huge\bfseries
Definition.

Petar Velickovic
\end{document}

Without fix-cm, the main font is called SFBX2488 in the PDF, as shown by pdffonts, where BX stands for bold extended, and 2488 means, IIUC, that the design size is 24.88pt. Some PDF viewers show properties of the embedded fonts in a "Fonts" dialog somewhere, among PDF properties or such.

While CM-Super uses scalable (Type 1) fonts, many fonts have multiple designs, optimized for different sizes — that's what it means to have design size 24.88pt.

$ pdffonts pdfgentounicode-mwe.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
TWPACW+SFBX2488                      Type 1            Custom           yes yes no       4  0
VZMLCI+SFRM1000                      Type 1            Custom           yes yes no       5  0

With fix-cm, the main font is called SFBX1200 in the PDF (where 1200 means, IIUC, that the design size is 12pt, though the font has been scaled). That's because Computer Modern uses its variant with design size 12pt also at bigger sizes, and fix-cm ensures CM-Super does the same to obtain results matching Computer Modern.

$ pdffonts pdfgentounicode-mwe.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
NTAZAI+SFBX1200                      Type 1            Custom           yes yes no       4  0
VZMLCI+SFRM1000                      Type 1            Custom           yes yes no       5  0

The original file uses many fonts, including the above mentioned SFBX2488, but also other design sizes of SFBX, which seem consistent with CM-Super.

$ pdffonts PetarV-CurriculumVitae.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XKMHYY+SFBX2488                      Type 1            Custom           yes yes no      17  0
VVIPNQ+SFRM1440                      Type 1            Custom           yes yes no      18  0
CARVZE+SFRM1095                      Type 1            Custom           yes yes no      19  0
PMNZBX+CMSY10                        Type 1            Builtin          yes yes no      20  0
ONIXWK+SFTT1095                      Type 1            Custom           yes yes no      21  0
RTFMYM+SFBX1728                      Type 1            Custom           yes yes no      22  0
KIGRAI+SFBX1095                      Type 1            Custom           yes yes no      23  0
EMOQKA+SFTI1095                      Type 1            Custom           yes yes no      24  0
CIDOGG+CMMI8                         Type 1            Builtin          yes yes no      40  0
EARJII+CMBSY10                       Type 1            Builtin          yes yes no      41  0
FEVOSI+SFXC1095                      Type 1            Custom           yes yes no      42  0
MZPADZ+SFCC1095                      Type 1            Custom           yes yes no      43  0
UTVLIG+SFTI0800                      Type 1            Custom           yes yes no      44  0
XVRAFB+SFBX0600                      Type 1            Custom           yes yes no      49  0
RFTIWK+SFRM0800                      Type 1            Custom           yes yes no      50  0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.