Tag Info

Hot answers tagged

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} ...


7

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


6

The Calluna font misses U+0301 (COMBINING ACUTE ACCENT), so your input that uses it will not produce the accent. On the other hand the precomposed glyphs for á and ú exist, but not ḿ (U+1E3F LATIN SMALL LETTER M WITH ACUTE). There's no “t with acute” in Unicode, so you can't get it either. However, you can use lower level TeX features, in this case \accent: ...


5

this is just one person's opinion, but maybe it will help you understand why latex is the way it is. latex is a "front end" to tex. tex is a macro language, so "problems" (think about them instead as "how do we get the results on a page looking the way we want them to?") are inevitably going to be "solved" with macros. the tex language was created by one ...


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


4

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


4

I won't convert every of your commands but three typical can be done like this \font\BIG="CMU Serif" at 17pt \BIG blablb \font\sc="CMU Serif:+smcp" \sc Blabla \font\itbf="CMU Serif/BI" \itbf Blalblab \bye You can find some information about the various font settings in xetex-reference.pdf


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


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}


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} ...


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}.


1

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} ...


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} ...


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

On miktex xetex seems to find the type1 variant of the font. Try this \documentclass{article} \usepackage{fontawesome} \newfontfamily{\FA}{fontawesome.otf} \begin{document} \faTwitter Some Text \faLinkedin \end{document}



Only top voted, non community-wiki answers of a minimum length are eligible