New answers tagged

0

Ok, I got this (thanks a bunch @alwaysask). It turns out that I actually had to specify the name of the *.otf file (instead of the abstract human-readable name of the font) as the argument of the \newfontfamily\russianfont command, as it was suggested here. The only thing that was wrong in that post was that you have to specify the complete file name (with ...


0

Note this answer assumes you didn't add the TeX Live fonts to the system environment variables such that they are found when fontspec searches the system fonts. (either because you don't know how or because it isn't practical e.g. multi-client Version Control System situation) Assuming you are using XeLaTeX: To minimize maintenance with each sequential TeX ...


1

Using system fonts requires xelatex or lualatex. Just load the fontspec package, set the font as shown below and compile the document with lualatex or xelatex. %!TEX program = lualatex \documentclass{article} \usepackage{fontspec,blindtext} \setmainfont{<your font name>} \begin{document} \blindtext \end{document} You can determine the font name for ...


1

In texmf-dist/doc/latex/arabi/user_guide.pdf, pages 50–51 give samples of fonts from Microsoft and from arabeyes.org. And the documentation for dad shows examples of its output. Of course, with xetex and luatex, you can use any unicode, OpenType font, whether free or commercial. Here are some free fonts: \documentclass{article} \usepackage[novoc]{...


3

Inserting the following code somewhere would work \special{pdf:ann width 3in height 1in << /T (My Signature) /Subtype /Widget /FT /Sig /F 4 /Q 1 /MK << /BC [] >> >> } This is XeLaTeX version of what digsig.sty actually does.


0

You can try to experiment with this: \newwrite\tmpfile \newcount\numpar \newcount\numpars \openin10=\jobname.num \ifeof10 \numpars=-1 \else \closein10 \numpars=\input\jobname.num \relax \fi \immediate\openout\tmpfile=\jobname.num \def\thelasttext{{\bf (The last blaf.)}} \def\par{\ifhmode \global\advance\numpar by1 \ifnum\numpar=\numpars \...


3

It doesn't make much sense to use XeLaTeX without fontspec. In particular, you can see that the .bbl file contains \refsection{0} \sortlist[entry]{anyt/global/} \entry{luka}{article}{} \name{author}{1}{}{% {{hash=8778d2a5968de5f48517c0ace345d5a1}{% family={Modrić}, family_i={M\bibinitperiod}, given={Luka},...


1

Disclaimer: I am the author of the package discussed below. This does not answer the question as such. Rather, it answers a related question which is how the same thing may be done using pdfLaTeX or, indeed, LaTeX. I assume this is legitimate since when people ask how to use a font, even if they specifically say they can't use Xe/LuaTeX, enthusiasts ...


4

Internally, beamer replaces certain fonts. Apparently the you don't have the replacement font in a place where XeLaTeX can find it, so it doesn't appear. To suppress this replacement, you can either load the beamer class with the professionalfont option, or add \usefonttheme{professionalfonts} to your preamble. (Note the difference!) See section 18.1 of the ...


2

If you don't want to see the parent entry conf1, you might want to have a look at the mincrossrefs option (pp. 51, 24 of the biblatex docs). By default it is set to 2. That means that if you have two entries in your bibliography that crossref the same entry, that entry is automatically added to the bibliography even if it wasn't cited. You can effectively ...


2

You are using titlesec, tocloft, and titletoc in the same class file. You should include the option titles when loading tocloft. Compare the MWE (btw, your MWE is not really minimal) \documentclass{book} \usepackage{tocloft} \usepackage{setspace} \usepackage{titlesec} \usepackage{titletoc} \usepackage{blindtext} \titlecontents{chapter}[0mm]{\addvspace{...


3

Here is a possible solution using the Saab font. I don't know anything about the Gurmukhi script, and the Saab font doesn't seem to recognize the Gurmukhi script tag, even though it should, so there may be problems with the font. For small sections of Punjabi text, this may be sufficient. For whole documents you would need to write your own version of a ...


1

My advice is to not use Scale in this way. You'll note that you are defining a 'new font family' with \newfontfamily, so it is not reasonable to expect it to intuit that this 'new' family is in fact not new. Perhaps a better way is to use the regular LaTeX2e font command, \DeclareTextCommand: \documentclass[10pt]{article} \parindent 0pt \usepackage{...


5

use the SizeFeature instead of Scale. The last line shows that the two 10pt lines have the same height: \documentclass[10pt]{article} \usepackage{fontspec} \parindent=0pt \setmainfont{DejaVu Serif} \setsansfont[Scale=MatchLowercase]{Latin Modern Sans} \newfontfamily\dejavuseriften[SizeFeatures={Size=10}]{DejaVu Serif} \newfontfamily\dejavuseriftwelve[...


5

If I reorganize the preamble like below, the \Gamma appears. \documentclass[12pt]{article} \usepackage[spanish,es-nodecimaldot,es-lcroman]{babel} \usepackage[export]{adjustbox} \usepackage{amsmath} \let\hbar\relax \usepackage[lite]{mtpro2} \usepackage{sectsty} \usepackage{subcaption} \usepackage{arydshln} \usepackage{fontspec} \setmainfont{Baskerville} \...


3

It's a misfeature, but a workaround is to load again the main math font for the \mathscr range; you also have to declare anew the main math font. \documentclass{article} \usepackage{mathtools} \usepackage{ fontspec, unicode-math, } \setmathfont{Latin Modern Math} \setmathfont{XITS Math}[ range = \mathcal, ] \setmathfont{Latin Modern Math}[ ...


1

You can get this information from the log, I didn't have the font so I used latin modern but encouraged it to have some hyphens % XeLaTeX \documentclass{article} \usepackage{microtype} \usepackage{fontspec} \doublehyphendemerits=-10000000 \finalhyphendemerits=-10000000 \usepackage{lipsum} \begin{document} \tracingparagraphs1 \lipsum \end{document} ...


1

The following may be in line with what you're after: \documentclass{article} \usepackage{tabularx} \newcommand{\setyear}[1]{{\small #1}} \begin{document} \section{Work Experience} \noindent \begin{tabularx}{\linewidth}{r|X} \smash{\begin{tabular}[t]{>{\scshape}c@{}} Aug \setyear{2011} to \\ Jul \setyear{2015} \end{tabular}} & Application ...


1

You might want to have a look at the KOMA script classes, esp. scrbook. They provide a number of easy-to-use options to configure the page layout (the English manual is available via http://www.komascript.de/~mkohm/scrguien.pdf). For example, using KOMA’s \documentclass{scrbook} \usepackage{scrlayer-scrpage} \pagestyle{scrheadings} \clearscrheadfoot \...


4

Section 4.2 in the manual of unicode-math specifies that the Style=MathScript and Style=MathScriptScript are automatically applied for sizes less than the font's base size. The Libertinus Math font happens to support these features by defining specific shapes for the digits. You can disable this by setting a different font for the digits only by specifying ...


4

Adapting the code by Andrey Vihrov to your needs and to the changed number of character classes, I can offer \documentclass{article} \usepackage{fontspec} \XeTeXinterchartokenstate=1 \newXeTeXintercharclass \uppercaseclass \makeatletter % Assign the new class to all Latin capital letters \@tempcnta=`\A \loop\unless\ifnum\@tempcnta>`\Z \...


8

With luatex/luaotfload you can (in texlive 2016 and up-to-date miktex) build a combo font. Imho there is no high-level interface yet, but beside this it works: \documentclass[]{article} \usepackage{fontspec} \font \one = file:EBGaramond12-Italic.otf \font \two = file:EBGaramond12-Regular.otf \font \onetwo = "combo: 1 -> \fontid \one ; ...


0

microtype has defaults which can take care of most of the text in memoir. I tried the defaults with LuaLaTeX as well as XeLaTeX. And then I tried it with pdfLaTeX. I liked the output of pdfLaTeX as well as LuaLaTeX. Takeaway: LuaLaTeX seems to work better with microtype, when compared with XeLaTeX.


0

When minted finds a syntax error (such as ...) it draws an fcolorbox. You can redefine this command within minted environments to prevent drawing of the box, as per https://github.com/gpoore/minted/issues/69#issuecomment-81612590. For future reference, please provide a complete minimal working example (MWE) instead of a few fragments, as shown below. I have ...


3

There's nothing more than a visual comparison, showing that ptm is exactly the same as what you get with TeX Gyre Termes. \documentclass{article} \usepackage{amsmath} \usepackage{fontspec} \setmainfont{TeX Gyre Termes} \newfontfamily{\OTIMES}{Times New Roman} \def\fn"#1/#2"{#1}% \begin{document} {\OTIMES abcdefghijklmnopqrstuvwxyzfifl \expandafter\fn\...


5

The syntax uses file as in pdftex, \documentclass{article} \usepackage{ifxetex} \begin{document} %for text \ifxetex \mdfivesum{Hello World!} \else \pdfmdfivesum{Hello World!} \fi %for file (content) \ifxetex \mdfivesum file {\jobname.tex} \typeout{ xetex \mdfivesum file {\jobname.tex}} \else \pdfmdfivesum file {\jobname.tex} \typeout{pdftex \...


6

There is a problem in line 1061 of algorithm2e.sty, that reads \newboolean{algocf@displaygroupmarkers}{\setboolean{algocf@displaygroupmarkers}{false} but the { brace before \setboolean is wrong (and unbalanced). This gets mostly unnoticed, just causing a warning in the log file; in the case of xeCJK, the tons of assignments it does are performed in the ...


0

OK, following up on Barbara Beeton's comment -- it's just a matter of introducing white space between the standard text and the \begin{quote} and \end{quote}. conversation is actually foundational for meaning. It looks as though Ogden and Richards have already been all over this point, and so I'll cede the floor to them.\footnote{\url{https://en.wikipedia....


3

Here are two versions where the leading & force left alignment; since lines are long, I also provided a version with split lines. Note that \left( t\right) and \left( 1-F\left( t\right) \right) just waste space. I also removed useless parentheses around fractions. The \limits declaration is not needed in displays. \documentclass{article} \usepackage[...


5

I know the OP wants Xelatex solutions, and here I give a pdf solution, so i don't expect any votes, but wanted to show it anyhow, because it is so less grainy than the other answer of mine. For this different answer, I steal from our most excellent LaTeX colleague Malipivo, extracting bits of \pdfliteral code from his answer at TikZ: halo around text? that ...


3

I changed a bit your fine example just to make some more comparisons: \documentclass[]{article} \usepackage{ifxetex} \ifxetex\else\usepackage[utf8]{inputenc}\fi \usepackage{hyperref} %\usepackage{bookmark} \begin{document} \section{\%á} \section{\%a} \end{document} When pdflatex is used for processing, the .out file reads \BOOKMARK [1][-]{section.1}{\045\...


8

Once you download the font, extract the .zip contents to your ~/.fonts directory and run fc-cache. Then, you can use the \fontspec package, loading the font with \setmainfont{Coolvetica} (if you want your entire document to use Coolvetica) or \setsansfont{Coolvetica} (if you want Coolvetica to appear only when you call \sffamily). Your document should look ...


1

The file is quite old, in comparison to the big developments on XeTeX and fontspec that have been made in the last eight years. Here's a fixed version that works well. Note that I'm on a Mac OS X machine, where Zapfino is provided along with the operating system. However, the font is not free, so you have to buy it in order to be able of exploiting its ...


1

Looking at revision 147 of moderncv, I am using following workaround with version 1.5.1 of moderncv as included in TeXLive 2015: \def\faCircleBlank{{\faCircleO}}. Make sure to place that directly after \documentclass, before \moderncvstyle or similar! Another solution would be to update to version 2.0.0 of moderncv.


3

bidi tests for \if@Latin, so you can get around the problem by setting it to true: \documentclass{book} \usepackage{polyglossia} \setotherlanguage{hebrew} \makeatletter\@Latintrue\makeatother \begin{document} 6. \end{document}


4

\QPCSymbols doesn't take an argument, it is a switch. So with \QPCSymbols{\XeTeXglyph 32} you are actually activating your font for the rest of the document and as it hasn't much glyphs you don't see anything. Move the brace before the command to group the effect: {\QPCSymbols\XeTeXglyph 32}


2

Look again at your bib-entries. First, you have the book: @book{baxandall1971, author={Baxandall, Michael}, title = {Giotto and the Orators}, year = {1971}, } Here, you set the year to 1971. Now you crossreference it: @bookinbook{manuel, author = {{Manuel 2. Palaiologos}}, title = {Beskrivelse af tapet}, pages = {148--49}, ...


4

Add the fragile option to your frame (section 12.9 "Verbatim and Fragile Text", beamer user guide): \documentclass{beamer} \mode<presentation> { \usetheme{Madrid} } \usepackage{listings} \begin{document} \begin{frame}[fragile] \frametitle{Test Slide} \begin{enumerate} \item Item 1 \begin{lstlisting}[language=bash] echo "Item 1" \end{lstlisting} \...


6

There maybe a problem with XeLaTeX and Javascript from the package animate. In that case use latex->dvips->ps2pdf \documentclass{article} \usepackage{pst-plot,animate} \begin{document} \begin{animateinline}[controls,autoplay, begin={\psset{unit=2}\begin{pspicture*}(-2.2,-0.5)(2.2,5.5)}, end={\end{pspicture*}}]{8} % % Generate frames for -...


1

Alternative, you can use the XITS fonts for both math and text. \documentclass{article} \usepackage{mathtools} \usepackage{unicode-math}% loads fontspec \usepackage{polyglossia} \setdefaultlanguage{english} \setotherlanguage[variant=modern]{greek} \defaultfontfeatures{Mapping=tex-text} \setromanfont[Mapping=tex-text]{XITS} \setmathfont{XITS Math} \begin{...


2

newtxtext doesn't support the Greek language; besides, you're using fontspec and XeLaTeX, so newtxtext is out of the question to begin with. Set a Times like text font supporting Greek, for instance Tempora. \documentclass[11pt,a4paper]{article} \usepackage{amssymb} \usepackage{amsmath} \usepackage{newtxmath} \usepackage[no-math]{fontspec} \usepackage{...



Top 50 recent answers are included