New answers tagged

2

The definitions of \spacedallcaps and \spacedlowsmallcaps seem wrong, because they first apply letter spacing, but then change to a different font and the setting is forgotten. You can fix it as follows. \documentclass[10pt]{book} \usepackage{iftex} \ifTUTeX \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \setsansfont{Iwona} \else \usepackage[...


0

On Windows, you should download the file, and install it for all users (as an Administrator). Installing it as a regular user will not work. If you need it for just one project, you can save it in the project folder. You could also create a local TeX tree and put it there. However, just installing the font for all users is simpler.


0

Just make ⊥ active and define it to be \bot, but redefining this one to be {\perp}. \documentclass{article} \usepackage{unicode-math} \usepackage{newunicodechar} \setmainfont{Fira Sans} \setmathfont{Fira Math} % there is no \bot in Fira Sans \AtBeginDocument{\renewcommand{\bot}{{\perp}}} \newunicodechar{⊥}{\bot} \begin{document} $a\bot b$ or $a ⊥ b$ $a\...


0

As Ulrike Fischer said in her comment, you’re correctly selecting the small caps font but need to also select its small-caps feature. You also need a few more lines to enable slanted small caps. \documentclass{report} \usepackage{fontspec} \setmainfont{Latin Modern Roman}[ SmallCapsFont = Latin Modern Roman Caps, UprightFeatures = {SmallCapsFeatures = {...


1

One way to do this is to select the same font family in both text and math mode, such as \setmainfont{XITS} \setmathfont{XITS Math} (Note that \setmathfont{XITS} is not correct.) Or: \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} All the TeX Gyre fonts are clones of a popular font with a different name, so Palatino matches TeX Gyre ...


0

Simple solutions are often the best... \documentclass{article} \usepackage[no-math]{fontspec} \setmainfont{TeX Gyre Termes} \usepackage{unicode-math} \setmathfont{TeX Gyre Termes Math} \usepackage[cal=pxtx]{mathalpha} \begin{document} $\mathcal{W}$ \end{document} Not the same font, but it's very close.


0

You can declare the character | to be an active character (so that it gets treated like a macro) and give it the same definition as your \sd, by adding these two lines: \catcode`|=\active \let|=\sd Modifying your example: \documentclass[letterpaper,12pt]{article} \usepackage{fontspec} \newfontfamily{\san}[Script=Devanagari,Mapping=velthuis-sanskrit]{...


2

Since you’re using unicode-math, you need to find a font whose version of the symbol looks more like what you want. You can get some font specimens from the documentation. If, for example, you think the script alphabet from STIX Two Math looks better, you can add the line \setmathfont{STIX Two Math}[ range={cal,bfcal}, Scale=MatchUppercase ] It’s ...


7

The axis labels are typeset in math mode and you're not declaring the math font. \documentclass[border=5pt]{standalone} \usepackage[table]{xcolor} % more control over colors \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{amsmath} \usepackage{amssymb} % fonts \usepackage{mathspec} \setmainfont{Open Sans} \setmathsfont(Digits,...


1

To preemptively fix the problems you’ll get if you try \setmainfont{texgyretermes-regular.otf}, here is the recommended way to load the font: \setmainfont{texgyretermes}[ UprightFont = *-regular , BoldFont = *-bold , ItalicFont = *-italic , BoldItalicFont = *-bolditalic , Extension = .otf , Scale = 1.0 ] This tells fontspec what filenames to ...


0

@DavidCarlisle and @Davislor answered the question in the comments. What eventually worked for me was completely updated the entire TeXLive Manager, reinstalling TeX Gyre Termes, and then, instead of using \setmainfont{TeX Gyre Termes}, I used \setmainfont{texgyretermes-regular.otf}. Thank you everyone for your help!!!


0

I found the answer! Adding the following block into the preamble seems to do the job. %%%%%%%%Fonts%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{mathptmx} \setkomafont{chapter}{\fontsize{16}{12}} \setkomafont{section}{\fontsize{15}{12}} \setkomafont{subsection}{\fontsize{14}{12}} \setkomafont{subsubsection}{\fontsize{12}{12}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...


4

You can install it as a system font, and all applications, including LuaTeX and TeX Live, will be able to find it. On Linux, you can copy a font to (a subdirectory of) /usr/local/share/fonts/ to install for all users, or ~/.fonts/ to install for one user. (There might be other font paths that work on your distribution.) On Windows, installing for all users ...


0

I just included a simple MWE build with xelatex to show some of the caption package options that I use often, (though not at the same time.) % !TeX TS-program = xelatex \documentclass[12pt,a4paper]{article} \usepackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Arial} \RequirePackage{booktabs} \RequirePackage{graphicx} \RequirePackage[% ...


3

Roboto Slab has no italic font, but you can use fontspec's fake slant feature: \documentclass{article} \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} \setmainfont{Roboto Slab}[ AutoFakeSlant=0.2, Ligatures={TeX}, ] \begin{document} \textsl{text} ... or ... \itshape mytext \end{document} The result is really ...


3

You can use \newfontfamily with OpenType or TrueType fonts, not with “legacy” Metafont fonts. You need to declare the font in the “traditional” way. \documentclass{article} \usepackage{fontspec} \DeclareFontFamily{U}{mathb}{\hyphenchar\font45} \DeclareFontShape{U}{mathb}{m}{n}{ <-5.5> mathb5 <5.5-6.5> mathb6 <6.5-7.5> mathb7 <7....


2

You can define yourself the names (I guess that TU should add these). \documentclass{article} \usepackage{fontspec} \setmainfont{NewComputerModern} \newfontfamily{\ebgar}{EB Garamond} \newlength{\len} % this is not even in xunicode \DeclareTextSymbol{\textnbhyphen}{\UnicodeEncodingName}{"2011} % this is in xunicode \DeclareTextSymbol{\...


3

Using U+2013 as an example as they are all the same. – Just type the character directly. ^^^^2013 The ^^ notation (as in classic tex but extended to 4 or 6 ^) produces the character (as an input character) at the very earliest stage. So unlike following options can be used anywhere the character can be used eg \^^^^2013 is \– \char"2013 (or latex \...


1

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 ]{...


2

The problem is that you're loading amsfonts and amssymb. With your \let commands you're reverting to the blackboard bold letters from amsfonts that obviously don't respect the FakeBold=2 option. \documentclass[a4paper, 12pt]{article} \usepackage{amsmath, amsthm} \usepackage{fontspec} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf}[FakeBold=10]...


0

\documentclass[a4paper, 12pt]{article} \usepackage{amsfonts, amssymb, amsmath, amsthm} \usepackage[no-math]{fontspec} \setmainfont{ModernMTStd-Extended.otf}[ FakeBold=2, Ligatures=TeX, ] \setsansfont[% FakeBold=2, ItalicFont=NewCMSans10-Oblique.otf,% BoldFont=NewCMSans10-Bold.otf,% BoldItalicFont=NewCMSans10-BoldOblique.otf,% SmallCapsFeatures={Numbers=...


0

Javier Bezos solved your problem, but for a bit more of an explanation. The babel package is great, but you just ran into one of its biggest problems. You loaded \usepackage[english,thai]{babel} When you passed the thai option, babel loaded a file called thai.ldf. It tries to load an 8-bit font and does not work with Unicode. The dead giveaway is that ...


4

If you add \XeTeXtracingfonts=1 you can see in the log that miktex finds for the typewriter font a type1 font (a .pfb): /MiKTeX 2.9/fonts/type1/public/cm-unicode/cmuntt.pfb and this then fails when trying to typeset the char with the accent. You can avoid this by setting the font by file name instead of font name (you perhaps will have to set the bold ...


1

The font you want is Computer Modern not Latin Modern. You can reset mathbblike this: \documentclass[a4paper, 12pt]{article} \usepackage{amsfonts, amssymb, amsmath, amsthm} \usepackage{fontspec} \setmainfont{Latin Modern Roman}[FakeBold=2] \let\mathbbalt\mathbb \usepackage{unicode-math} \setmathfont{latinmodern-math.otf}[FakeBold=2] \let\mathbb\mathbbalt ...


2

The problem is that the font you are using simply does not support those symbols. If you pick a font that does then the symbols appear: \documentclass[a4paper,12pt]{article} \usepackage{rotating} \usepackage{amsmath, amssymb} \usepackage[no-math]{fontspec} \setmainfont{TeX Gyre Termes} \usepackage{unicode-math} \setmathfont{STIX} %\usepackage[cal = txupr]{...


2

The font you’re using is from 1994 and encoded in Windows codepage 1256, which is obsolete. You will need to use a Unicode font in LuaLaTeX or XeLaTeX. Khaled Hosny’s Amiri is an excellent one that also has good complements in his Libertinus and Libertinus Math fonts. Here is an example of a template I made using it. All the fonts it uses should be in ...


2

You need to use a matching OpenType math font and specify the same boldness, I don't have the font you used but, before and after with Latin Modern \documentclass[a4paper, 12pt]{article} \usepackage{amsfonts, amssymb, amsmath, amsthm} \usepackage[]{fontspec} \setmainfont{lmroman10-regular.otf}[ % FakeBold=3, ItalicFont=lmroman10-italic.otf, ...


Top 50 recent answers are included