TransWikia.com

Use Font and Emphasise at the same time

TeX - LaTeX Asked by Bowen Liu on April 4, 2021

It seems that whenever I use setmainfont(Cochin), all the textbf{}, textit{} in the main text will just not work. Anyone know how to fix this? Thanks! I am not sure if it’s because of the font.

The following is a code black:

documentclass{article}
usepackage{amsmath}
usepackage{amsthm}
usepackage{amssymb}
usepackage{amsfonts}
usepackage{fontspec}
usepackage[dvipsnames]{xcolor}
setmainfont{Cochin}
begin{document}
textbf{Hi}
end{document}

One Answer

Welcome to TeX.SE...

You have to define the roman, italic, bold and bolditalic fonts, like (I used AdoneTextPro as example) as below:

setmainfont[Mapping=tex-text, Path = mention file path where you keep the fonts,
UprightFont= AdobeTextPro-Regular.otf,
BoldFont=AdobeTextPro-Bold.otf,
ItalicFont=AdobeTextPro-It.otf,
BoldItalicFont=AdobeTextPro-BoldIt.otf
]{AdobeTextPro}
settextfont{AdobeTextPro}

Answered by MadyYuvi on April 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP