Tag Info

New answers tagged

0

Seems like wrapping \chemfig with the appropriate \mathversions works: \makeatletter \let\@@chemfig\chemfig \def\chemfig#1{\mathversion{ssp}\@@chemfig{#1}\mathversion{cm}} \makeatother


3

TeX will automatically space out a line that has contains excessively ‘high’ material; consider a line that contains maths like $\frac{\int_0^1 x dx}{\int_0^1 y dy}$ This is what you're seeing here, because your large font scaling has caused even regular letters to become ‘high’. David has already given a number of solutions to avoid this problem. TeX ...


6

When scaling fonts you need to make sure that the interline spacing is big enough to hold the characters. Using scale in the font loading is intended to make small adjustments to tune different fonts so match in some way, perhaps making two different fonts have the same x-height when loaded at the same nominal size. As it is every time you ask for a 10pt ...


0

Another possible reason why you might have trouble getting straight quotes when using fontspec: the config file. I'm not sure where it lives on other platforms; on linux locate fontspec.cfg will show you where it is. I just discovered that my wife's laptop (TeX Live 2014) had a very different fontspec.cfg than my laptop (TeX Live 2013). Specifically, hers ...


2

This MWE demonstrates the simple idea and that you don't need to be a "rockstar brogrammer": Just use fontspec and luaLaTeX ... \documentclass[12pt]{article} \usepackage{filecontents,fontspec} \begin{filecontents*}{sbs100demo.fea} languagesystem DFLT dflt; languagesystem latn dflt; lookup demo_bs { sub N S A ...


9

In the 2015/01/01 latex release, it's not needed, but for 2014, the easiest way to get \textsubscript defined is \RequirePackage{fixltx2e} \documentclass[11pt]{article} \usepackage{fontspec} \begin{document} X\textsubscript{Y} \end{document} Older releases of fontspec included fixltx2e automatically, that was removed at some point, and in latex 2015 ...


0

As @Will_Robertson pointed out, I had an old version of fontspec installed. I actually had multiple versions of fontspec installed in different folders in miktex. Miktex was finding the older version and using it. Once I deleted the old version, it started working.


1

The CMBright fonts are available in OpenType format as part of the cm-unicode project. Granted that your file is UTF-8 encoded, you should get comparable results by doing \documentclass{scrartcl} \usepackage{ifluatex} \ifluatex \usepackage{fontspec} \setmainfont{XCharter} \setsansfont{CMU Bright}[ Scale=MatchUppercase ] \setmonofont{Ubuntu ...


2

Your path needs to be surrounded by braces {}. I also separate the ending comma-delimiters with a space. Here is how I would do it. I used: Folder called Fonts inside of base directory (where your font files are located) MinionPro*.otf (grabs all variants, assuming your file name scheme is fontname-type.otf where -type represents: -Bold, -Italic, ...


1

The problem is probably in the different value of the em; but your way of setting the itemize is wrong: \documentclass{scrreprt} \usepackage{lipsum, enumitem,adjustbox} \usepackage{fontspec} \newcommand{\myicon}[1]{% \adjustbox{valign=t,set depth=0pt}{#1}% } \setlist{nosep} \begin{document} \lipsum[1] \begin{itemize}[labelindent=-4cm, ...


3

(I run MacTeX2015 on a MacBookPro running MacOSX 10.10.3 "Yosemite".) I would load the Cambria and Calibri fonts via \setmainfont and \setsansfont instructions. The program runs equally well under XeLaTeX and LuaLaTeX. \documentclass{article} \usepackage{fontspec} \setmainfont{Cambria} \setsansfont[Scale=MatchLowercase]{Calibri} \newcommand\test{The ...


5

I won't consider this as a bug. It’s kind of common sense for – at least some – designer/typographers to kern the period and a quotations mark in that way. The amount of necessary kerning depends on the typeface and is subjective to the designer’s eye, though. On my system all optical sizes apply the same kerning: In XeTeX you can define custom kerning ...


4

I don't know what negative side effects this ugly workaround will cause, but it seems to work (tested with lualatex): \enquote{Hallo Welt\mbox{.}} Are there better alternatives? Yes, next to Tobi's answer that addresses xeLaTeX the following solution is compatible with luaLaTeX. It implements a font feature file that introduces two additional features ...


1

I'm not sure what the fc-list output after the comma is, but XeTeX seems to want the family name (before the comma, Helvetica Neue LT Pro), optionally followed by the style (55 Roman). This gives the first line you used. So the fc-list output seems to be reliable, just not that part. I don't have Helvetica Neue LT Pro, but I experimented with Latin Modern ...


1

Try giving (say) \setromanfont{Bitstream Charter} \setmathfont[range=\mathup/{num}]{Courier New} \setmathfont[range=\mathit/{latin,Latin,greek,Greek}]{Bitstream Charter} This will produce numbers in Bitstream Charter font in normal text and Courier New font numbers in Math mode.


8

The user guide of the fontspec package is indeed quite lengthy. However, I would not go as far as calling it intimidating. There's a huge and wonderful world out there related to OpenType and TrueType fonts, and it's not surprising (to me at least) that the manual that explains how to explore this world isn't brief. In what follows, I will assume that your ...


0

Thanks for this! It helped me a lot, but it still required some experiments to get it working. Hence, I would like to contribute a functional example here: File letter-preamble-th.tex %%% IMPORTANT --- must be compiled with XeLaTeX!!! %%% \documentclass[a4paper, footsepline, pagenumber=botcenter, fromalign=left, fromrule=below, fromemail=true, ...


0

This is fixed by passing the path as an option to \newfontfamily: \newfontfamily{\FA}[Path = C:/Windows/Fonts/]{FontAwesome-1000upm}


10

You seem to have a misunderstanding of font lookup of xetex. The different lookup mechanisms are described in detail in the XeTeX manual, but I will try to boil things down a little for an answer. If you provide a font name, e.g. Times New Roman, as in your first example, where you call \setmainfont{Times New Roman} then XeTeX will use your system's ...


3

Probably hidden use of math mode is forcing some direction nodes to intervene. You can protect the code inside \mbox \documentclass{article} \usepackage{fontspec} \usepackage{tikz} \usepackage{polyglossia} \setmainlanguage{french} \setotherlanguage{arabic} % comment that line, the problem disappears. \setmainfont[Ligatures=TeX, ...


2

I found a solution that works for me. I started playing around with version=bold, as David suggested, but that kept turning all my math mode text bold. In the end I switched from file names to system font names. (I wanted to avoid that initially, since I am working on the same document from several different machines.) With system font names, \boldmath ...


1

Using the package amsbsy and \pmb seems to get the boldmath. \documentclass{minimal} \usepackage{fontspec} \usepackage{unicode-math} \usepackage{amsbsy} \setmainfont[% Ligatures=TeX, BoldFont=LinLibertine_RB.otf, ItalicFont=LinLibertine_RI.otf, BoldItalicFont=LinLibertine_RBI.otf] {LinLibertine_R.otf} \setmathfont{texgyrepagella-math.otf} ...


5

Just convince siunitx to use your newly created font family by: \sisetup{text-rm=\oldstyle} full example: \documentclass{standalone} \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \newfontfamily\oldstyle[Numbers={Monospaced,OldStyle}]{TeX Gyre Pagella} \usepackage[detect-all]{siunitx} \AtBeginDocument{ \sisetup{text-rm=\oldstyle} } ...



Top 50 recent answers are included