Tag Info

New answers tagged

1

When I run your code with tex live 2015 in Mac OS X, I just get a font-not-found error. As I see it, that's because I can't just say \setmainfont{<name>} if the font isn't installed on your system. But as this discussion shows, other people claim that's wrong. In that case I have no idea why fontspec can't find Alegreya. But at any rate, if I specify ...


0

The problem is pretty similar to the one described in Tabs in output file written by xelatex and pdflatex are different The solution should be to call xelatex with the -8bit option: xelatex -8bit -shell-escape test Here's the test.tex example I used, to show that two byte characters are honored in comments nonetheless. \documentclass[11pt]{article} ...


3

You should set as mono font a font that has the symbol: \documentclass[11pt]{article} \usepackage{fontspec} \setmainfont{DejaVu Sans} \setmonofont{DejaVu Sans Mono} \begin{document} ext: ".☃" \begin{verbatim} stem: "föõbår" ext: ".☃" \end{verbatim} \end{document}


0

Some of those reasons emerged in the comments: backward compatibility only partial microtype support XeTeX brings "complications" english-speaking users who only need ASCII support pdfTeX is faster Feel free to edit to add more reasons, expand or reformulate.


5

The manual of fontspec mentions the key FontFace. So let's assume your font are BestFont-ExtraLight.otf BestFont-ExtraLightItalic.otf BestFont-Light.otf BestFont-LightItalic.otf BestFont-Regular.otf BestFont-Italic.otf BestFont-Medium.otf BestFont-MediumItalic.otf BestFont-Bold.otf BestFont-BoldItalic.otf BestFont-Black.otf BestFont-BlackItalic.otf Then ...


3

The \footnoterule should occupy no vertical space. Here's a redefinition that places it at the right margin: \documentclass[a4paper]{article} \usepackage{xecolor} \usepackage{polyglossia} \usepackage{fontspec} \definergbcolor{titlecolor}{750000} \setmainlanguage{arabic} \setmainfont[Ligatures=TeX]{Amiri} ...


1

This should work (for right-to-left typing), in your preamble (of course the length is adjustable): \renewcommand\footnoterule{\rule{0.4\linewidth}{0.4pt}\hfill}


1

Here’s your example, with xecolor instead of xcolor, to support bidirectional text: \documentclass[a4paper]{article} \usepackage{xecolor} \usepackage{polyglossia} \usepackage{fontspec} \definergbcolor{titlecolor}{750000} \setmainlanguage{arabic} \setmainfont[Ligatures=TeX]{Amiri} ...


3

There are many ways to switch fonts using NFSS and fontspec commands. The other answers on this page are good and I'd suggest that @cfr's is probably the simplest and best; I just wanted to summarise everything that I could think of below. Hooking into \rmdefault is probably a good idea, so I wouldn't recommend \newfontfamily\mainone{...}[...] ...


5

Just after a declaration such as \setmainfont or \newfontfamily is executed, the allocated family name is available in \l_fontspec_family_tl so you can save it under a different name for later usage. \documentclass{article} \usepackage{fontspec} \newfontfamily\ebgaramond{EB Garamond} \ExplSyntaxOn \tl_gset_eq:NN \ebgaramondfamily \l_fontspec_family_tl ...


7

You can simply use \newfontfamily rather than \setmainfont if you do not want to use the font as the default serif for the document. For example (set up for EB Garamond is different because your settings are not suitable for my system): \documentclass{article} \usepackage{fontspec} \newfontfamily\ebgaramondfamily{EB Garamond} \usepackage{kantlipsum} ...


2

As a quick fix use \title{John Smith -- Résumé \hfill \includegraphics[width=2cm]{example-image-a}} % Print the main header Replace \includegraphics[width=2cm]{example-image-a} with \includegraphics[width=<suitable size>]{<yourphotofile}.


9

There have been some changes in unicode-math, for fixing some issues in multiletter identifiers using \mathXY commands. Now, a single bold math symbol should be built with \symbf rather than \mathbf, which is reserved for multiletter things. \documentclass{article} % Load fontspec and define a document font: \usepackage{fontspec} \setmainfont{TeX Gyre ...


0

Make sure the package eu2enc.def is installed. In Ubuntu, it is part of the texlive-xetex package. Otherwise, you can install it using the texlive manager: `tlmgr install euenc` You could also try to install the package manually although I would not recommend it. The sources can be found here.


1

The simplest way to get correct English hyphenation in your setup is to use \foreignlanguage: \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainfont{Cambria} \setsansfont{Candara} \setmonofont{Consolas} \setmainlanguage{greek} \setotherlanguage{english} \begin{document} Αυτό το κείμενο είναι στα ελληνικά ...


2

As Joseph said in the comments there are no fixed rules to decide on an engine. I tend to use pdflatex in most cases but switch to xelatex if I want to use an OpenType font that is not available for pdflatex. An argument to use pdflatex might be that microtype has more power on that engine (as far as I know). While an argument for xelatex (or latex) is the ...


0

Too big for a comment. As Egreg says you need to show us an example of this. This MWE works just fine \documentclass[a4paper]{memoir} \usepackage{etoolbox} \begin{document} \def\do#1{\thesheetsequence\newpage} \docsvlist{1,2,3,4,5,6,7,8,9} \end{document} I'm using etoolbox to give me a loop to produce several pages bidi is a bit of a beast. In this ...


2

Package hyperref needs unique anchor names. The anchor names are mostly using the counter values. To support non-unique counter values, package hyperref uses a companion form of the counter theHcounter, which is not used for typesetting but for the anchor names. Thus you would need, e.g.: \renewcommand*{\theHchapter}{\theHpart.\thechapter). Package ...


1

The first space is due to the fact that the English paragraph is shorter than the corresponding Danish one. The second space is due to the fact that, to TeX's eyes, the Danish paragraph ending with “før ham.” is one line longer, because the space between før ham. and \end{danish} is not removed. The first blank line can be removed by adding \looseness=1 to ...


1

It seems that the backing up done by \arrowfill@ is insufficient when Latin Modern Math is used. Here's a fix: \documentclass{article} \usepackage{ifxetex} \usepackage{amsmath} \usepackage{etoolbox} \ifxetex \usepackage{unicode-math} \makeatletter \patchcmd{\arrowfill@}{-7mu}{-14mu}{}{} \patchcmd{\arrowfill@}{-7mu}{-14mu}{}{} ...


0

It's got something to do with how \: is interpreted. The following code doesn't have the same problem. \documentclass{article} \RequirePackage{amsmath} \usepackage{unicode-math} \begin{document} \begin{equation} \xrightarrow[\; \varepsilon \to 0 \;]{} \end{equation} \end{document}


5

Good question, which includes a thorough analyis! I did not find any official documentation of XeTeX for the equivalent for pdfTeX's \pdfliteral direct. The manual of dvipdfm, some predecessor of XeTeX describes \special{pdf:content ...}. Nothing in xetex-reference.pdf or XeTeX-notes.pdf. In file pgfsys-dvipdfm.def the following "ugly hack" can be found: ...


2

You are using \bf that has been deprecated for 20 years and placing \selectfont in the wrong place. Also \fontsize{10}{0} is wrong. \documentclass[12pt]{article} \usepackage{threeparttable} \usepackage{caption} \usepackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Arial} \DeclareCaptionFormat{mytabformat}{% ...


0

I've just had a similar problem, and got rid of it by merely closing the command line (I use it to compile my documents), opening another one, doing a clean and recompiling everything. If you use an editor provided with a compile option, try closing and re-opening it.


1

The bookmark text for \faWrench contains a font command \Segoe (BTW, the command is a font switch command, not a macro with an argument). Font switch commands are NOT allowed inside bookmarks. Or does a PDF viewer exists, which can make use of a LaTeX font switch command? Instead of \newfontfamily\Segoe{segoeui.ttf} ...


0

As a workaround, you can use the package unicode-math. You can see here the differences between unicode-math and mathspec. In short, mathspec is intended for replace some fonts in math mode with system fonts (which you are looking for), while unicode-math main purpose is use complete math OpenType fonts. Using unicode-math, you can set a complete math ...


4

Bookmark The PDF bookmarks can be encoded in PDFDocEncoding (default, 8bit) or Unicode (UTF-16BE with BOM). Option pdfencoding=auto or unicode are needed to enable Unicode bookmarks: \usepackge[pdfencoding=auto]{hyperref} The wrench symbol 🔧 is available in Unicode as U+1F527. Then the symbol can be supported in the bookmarks via the generic ...


1

That's not an error: just a warning. It is just telling you it can't find bold so is using the regular weight instead. This is nothing to worry about unless you were expecting it to find a bold weight of a font. The bookmarks are displayed in a font determined by your PDF viewer - not the document - as far as I know. Notice that the font of the text does ...


3

The ucharclass package changes the class of the Latin characters, but polyglossia assumes this class is 0. You can try with \documentclass{standalone} \usepackage{ucharclasses} \usepackage{polyglossia} \setmainlanguage{french} \makeatletter \appto\french@punctuation{% \ifluatex\else \XeTeXinterchartoks \BasicLatinClass \french@punctthin = ...


4

Here is a list of context modules that fulfill tasks of LaTeX packages: Annotation for todo notes like todonotes ConTeXt Lettrines for lettrine Gantt for drawing Gantt charts like pgfgantt simpleslides for the beamer class Letter module for writing letters like letter There are also a few direct ports of LaTeX packages to ConTeXt: Algorithmic AMS-LaTeX ...


4

Imho it is a problem of the implementation in polyglossia: the space is lost inside some boxes: \documentclass{article} \usepackage{fontspec, polyglossia} \setdefaultlanguage{french} \begin{document} \begin{tabular}{l} \today{} here: should have been a space before those two dots! \end{tabular} \mbox{\today{} here: should have been a space ...


1

Assuming that the truetype and opentype versions of the Crimson font are similar, the following should work: \documentclass{article} \usepackage{fontspec} \setmainfont{Crimson Roman}[Ligatures=TeX] \begin{document} Some text. \end{document} It should work if you have the truetype but, since I've got the opentype version, that's the one I actually ...


1

If you've installed the font in a proper texmf directory, run texhash or the equivalent for your system. XeTeX will then find the font without having to specify the location. Secondly, including Path in \defaultfontfeatures is almost certainly wrong in almost all cases. This is what is causing your error — after specifying a Path, fontspec assumes that the ...


3

After some more investigation I think the answer to the question "whose bug is it?" is that the problem is in xetex. Somehow the mu value of the scriptscriptsize font is leaking out. I made a bug report in the xetex bug tracker with an example using neither unicode-math nor siunitx. https://sourceforge.net/p/xetex/bugs/117/


1

The Solution I kept digging around searching both XeLaTeX support files and found I completely misunderstood the purpose of the "crop" package. The "crop" package is designed to place various sundry post-production marks on paper that is larger in size than the actual page of content. My misunderstanding was that in either the geometry package or in LyX's ...


0

I had the same problem using \setmathfont. Here is a minimal working example exhibiting problem and solution (using f\prime instead of f'): \documentclass[fontsize=30pt]{scrartcl} \usepackage{unicode-math} \setmathfont{Latin Modern Math} \begin{document} \[ f'\,a'\quad f\prime\,a\prime \] \end{document} Here is the output, compiled by TeX Live 2013's ...



Top 50 recent answers are included