0

Erd\H{o}s produces the following symbol instead of the slanted accent over o.enter image description here

Note: it is not typical latex output. Fontspec was used to change font and weight. Here is the code. I am currently using Erd"{o}s which produces a vertical accent instead of the slanted one. The output I would like is enter image description here

\documentclass{article}

\usepackage[T1]{fontenc} %\usepackage{lmodern} \usepackage[no-math]{fontspec} \setmainfont{ModernMTStd-Extended.otf}[ FakeBold=2, %SmallCapsFont=MrsEavesSmallCaps_Regular.ttf, %BoldFont=Monotype-Modern-Std-Bold_31159.ttf, ItalicFont=ModernMT-ExtendedItalic.otf, BoldItalicFont=ModernMT-ExtendedItalic.otf, Ligatures=TeX, ]

\setsansfont[% FakeBold=2, ItalicFont=NewCMSans10-Oblique.otf,% BoldFont=NewCMSans10-Bold.otf,% BoldItalicFont=NewCMSans10-BoldOblique.otf,% SmallCapsFeatures={Numbers=OldStyle}]{NewCMSans10-Regular.otf}

\setmonofont[% FakeBold=2, ItalicFont=NewCMMono10-Italic.otf,% BoldFont=NewCMMono10-Bold.otf,% BoldItalicFont=NewCMMono10-BoldOblique.otf,% SmallCapsFeatures={Numbers=OldStyle}]{NewCMMono10-Regular.otf}

%\let\mathbbalt\mathbb \usepackage{unicode-math} \setmathfont{NewCMMath-Book.otf}[FakeBold=2] %\let\mathbb\mathbbalt

\begin{document} Erd\H{o}s \end{document}

Masum
  • 1,009
  • Please extend your example to a full example so others have a chance to copy it and test for them self. – daleif Aug 06 '21 at 13:11
  • does the font have an H accent, eg does \H{z} work? if not the question is essentially a duplicate of the automatically linked question https://tex.stackexchange.com/questions/49313/poor-mans-double-acute-accent?rq=1 – David Carlisle Aug 06 '21 at 13:18
  • The answers in your linked question do not work in this case. – Masum Aug 06 '21 at 13:57
  • @Masum they must work, there was nothing specific to any font but also are you using xetex or luatex (try both) and you did not answer anoy \H{z} – David Carlisle Aug 06 '21 at 14:02
  • \H{z} did not work. I even tried $\text{Erd\H{o}s}$ and similar variations with no luck. I am using XeLaTeX as my default compiler. – Masum Aug 06 '21 at 14:04
  • @DavidCarlisle Could fontenc be messing with that? – campa Aug 06 '21 at 14:06
  • @campa oops I dodn't even notice that! – David Carlisle Aug 06 '21 at 14:07
  • 1
    remove \usepackage[T1]{fontenc} never use that with lualatex or xelatex. (although as you load fontspec afterwards fontspec will corect this error it will not do any harm in this case.) – David Carlisle Aug 06 '21 at 14:08
  • @campa I have tried both with and without fontenc and lmodern – Masum Aug 06 '21 at 14:09
  • 2
    Then you can use my answer in the linked question to use \H from a different font. – David Carlisle Aug 06 '21 at 14:09
  • uh finally! only the augie one works and only when it is used with \rmfamily inside \H. this is very weird that the other solutions do not work in this case. Thank you very much @DavidCarlisle – Masum Aug 06 '21 at 14:13
  • Flagged as duplicate to the question @DavidCarlisle linked – Masum Aug 06 '21 at 14:14
  • 1
    If the other part of that answer does not work presumably the fomt doesn't have the acute accent either, if it does not have an acute then faking \H with two accute accents and some space adjustment will not work. – David Carlisle Aug 06 '21 at 14:15

0 Answers0