Tag Info

New answers tagged

3

Change the order of the packages: \documentclass{book} \usepackage{fontspec} \usepackage{extarrows} \setmainfont{Times New Roman} \begin{document} \[ Q\xLongrightarrow{\text{Maximum}} P \] \end{document}


5

You have to use the no-math option to fontspec: \documentclass{book} \usepackage{extarrows} \usepackage[no-math]{fontspec} \setmainfont{Times New Roman} \begin{document} $Q\xLongrightarrow{\text{Maximum}} P$ \end{document} But the result is disputable, as Computer Modern math fonts don't combine well with Times. What happens without the no-math option ...


6

You need to load a math font that's compatible with the chosen text font. (A give-away that you're using Computer Modern is contained in the shapes of the letters P and Q.) I suggest you load the package unicode-math and set \setmathfont{XITS Math}. If you choose this route, I would also recommend you set XITS (a Times Roman clone) as the main text font. ...


4

Ok, so I found the answer to my own question. It turns out I was pretty close: \setmainfont[SizeFeatures = {{Size = -8, Font = <Font_A>}, {Size = 8-12, Font = <Font_B>}, {Size = 12- , Font = <Font_C>}}]{<Typeface>} produces exactly what I wanted.


2

An example for HelveticaNeue-Light \documentclass{article} \usepackage{fontspec} \setmainfont[ ItalicFont = HelveticaNeue-Italic, BoldFont = HelveticaNeue-Bold, BoldItalicFont = HelveticaNeue-BoldItalic]{HelveticaNeue} \newfontfamily\NHLight[ ItalicFont = HelveticaNeue-LightItalic, BoldFont = HelveticaNeue-UltraLight, ...


3

in a texlive 2014, updated this morning I get the following from grep (with my annotation in comment at the end of each line): $ grep "[^a-z]textlf[^a-z]" */* allrunes/allrunes.sty:\DeclareTextFontCommand{\textlf}{\lfseries} baskervaldx/Baskervaldx.sty:\DeclareRobustCommand{\textlf}[1]{% lining figures fbb/fbb.sty:\DeclareRobustCommand{\textlf}[1]{% ...


4

egreg's answer now explains why this works which I didn't understand when I posted it as a comment. If you load fontspec after babel, then it all works: \documentclass[11pt]{article} \usepackage[british,russian]{babel} \newcommand*\English{\selectlanguage{british}} \usepackage{fontspec} \setmainfont{Heuristica}% \usepackage{poetrytex} \begin{document} ...


8

The relevant part from babel.def is \AtEndOfPackage{\edef\latinencoding{\cf@encoding}} \AtBeginDocument{% \gdef\latinencoding{OT1}% \ifx\cf@encoding\bbl@t@one \xdef\latinencoding{\bbl@t@one}% \else \@ifl@aded{def}{t1enc}{\xdef\latinencoding{\bbl@t@one}}{}% \fi } Let's see what happens: at the end of the loading of babel, the instruction ...


4

I guess it's a problem due to the new syntax for \fontspec. It's better, anyway, to declare the fonts beforehand: \documentclass[12pt]{article} \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text} \setmainfont{Hoefler Text} \newfontfamily{\thaifont}{Thonburi}[Scale=MatchLowercase] \usepackage[Latin, Thai]{ucharclasses} ...


2

datetime needs definitions for all this \cyrXX commands. And you need a font with cyrillic chars. I used t2aenc.dfu to get all the names and the number. I ignored the commands with accents. They would need other xunicode definitions: \documentclass[a4paper,11pt]{article} \usepackage[main=russian,english]{babel} \usepackage{fontspec} \setmainfont{Arial ...



Top 50 recent answers are included