New answers tagged

2

Tell fontspec to select the bold variant by appending /B. Just for reference, there is also /I for italic and /BI for bold-italic. \documentclass{article} \usepackage{fontspec} \setmainfont[BoldFont={Latin Modern Roman/B}]{CMU Concrete} \begin{document} Hello \textbf{World!} \end{document}


3

You should use the font family name (Cormorant Garamond), not the file name. The following example code works with the .otf version of the fonts. Note this font has small caps in regular and boldface, but not in italic and bold italic, as you see with otfinfo. \documentclass{article} \usepackage{verse} \usepackage{fontspec} \defaultfontfeatures{Ligatures=...


3

With setmainfont you're essential building case-sensitive font paths. Path=working directory for fonts BoldFont=filename segment of path ItalicFont=filename segment of path Extension=file extension of path You're code does not work because you are telling fontspec to look in all paths like this (example shows paths for bold font): /usr/local/texlive/...


0

The \set*font commands should accept a parameter Path=[Path] that points to the directory containing the files. This is only relevant if using fonts that are not known to the system. Otherwise you should provide the name of the font family as noted by bernard (first comment).


2

Remove the trick fontspec does for respecting \itshape when \scshape is executed. \documentclass[a4paper, 12pt]{article} \usepackage{amsmath} \usepackage{fontspec} \usepackage[cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage{polyglossia} \usepackage{mathrsfs} \setmainfont{EB Garamond} \setmonofont{CMU Typewriter Text} \setmainlanguage{french}...


2

Well now, if I wanted something quite as ugly as this (and I accept my taste is probably different from yours), here's how I'd do it. The secret sauce you're looking for is, I think \textup (for "upright"): \documentclass[12pt]{article} \usepackage{ebgaramond} \newcommand{\textscup}[1]{\textsc{\textup{#1}}} \begin{document} \emph{Lorem \textsc{ipsum} dolor}...


2

you could use ...\begin{quote}\linespread{0.9}\finob} ... to reduce the baseline spacing to 90% of its previous value within the environment, although if you reduce it too much (to less than the actual space taken by the characters in the font) then TeX will not preserve equal spacing, and lines with descenders or capitals or accented letters etc will ...


0

As Ulrike Fischer notice, when you are using the Color-key in \setmainfont, this color always wins, you no longer can change it with the \color command. My document was based on popular Deedy Resume and correct solution was: \newcommand{\footeritem}[1]{ \color{footercolor} \fontspec[Path = ../fonts/ubuntu/]{Ubuntu-L} \selectfont{#1} } \newcommand{\...


4

Don't use inputenc or fontenc with xetex. Use fontspec and then specify any opentype font you have on your system. I used one example below. \documentclass[10pt,foldmark,notumble]{leaflet} %\usepackage[utf8]{inputenc} \usepackage[frenchb]{babel} \renewcommand*\foldmarkrule{.3mm} \renewcommand*\foldmarklength{5mm} \usepackage{url} \usepackage{amsmath} %\...


5

The convertor from DVI to HTML doesn't support OpenType fonts, which is automatically selected when the Fontspec package is loaded. This is well known tex4ht bug and also one which is hardest to fix. There are two possible workarounds, both of them require modification of the document, unfortunately. First is to use conditionally luainputenc package: \...


4

You have to confine the font selection only where needed. \documentclass{article} \usepackage{fontspec}% typeset with xelatex \usepackage{tikz} \usepackage{xstring} \usepackage{multicol} \defaultfontfeatures{Extension=.otf} \usepackage{fontawesome} \begingroup\lccode`\|=`\\ \lowercase{\endgroup\def\removebs#1{\if#1|\else#1\fi}} \newcommand{\macroname}[1]{\...



Top 50 recent answers are included