Tag Info

New answers tagged

1

I can't figure out why fontspec is acting so, but here is a workaround: add another size-feature, and so every SmallCapsFeatures will apply to the next size. A MWE: \documentclass[12pt]{article} \usepackage{xcolor,fontspec} \setmainfont[ SizeFeatures = { { Size = { -1}, Color = blue, SmallCapsFeatures = { ...


1

EDITED to line up top of right stack with top of "Subject" Following "Subject" in the header, I used a right-aligned \Longunderstack for the right-hand text, pushing it to the right with an \hfill. I had to \smash it so that it did not affect the vertical spacing on the left. Also, because the word "Subject" was scaled up by a factor of 1.55, I had to ...


3

(La)TeX is free to use, but with some restrictions (not copylefted is probably meaningless in your case). You can see the licence for example here: http://www.latex-project.org/lppl.txt. Information about licence of XeLaTeX you can find even here: http://en.wikipedia.org/wiki/MIT_License (I know: Wikipedia is not a perfect source).


2

I am currently disabling kerning between an apostrophe and a succeeding letter by using XeTeX's interchartoken mechanism: \XeTeXinterchartokenstate=1 \newXeTeXintercharclass\ApostropheClass \XeTeXcharclass`'\ApostropheClass \newXeTeXintercharclass\AfterApostropheClass \XeTeXcharclass`a\AfterApostropheClass \XeTeXcharclass`A\AfterApostropheClass ...


5

You can obtain this information from the log with a bit of effort. \documentclass{article} \showoutput \begin{document} One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven ...


5

This problem affects most Adobe fonts (Adobe, are you listening?). I don’t use xetex enough to know what can be done about it in xetex, but in luatex you can write a feature file to adjust the kerning without editing the font itself. It’s much easier than it sounds. E.g., \documentclass[12pt]{article} \usepackage[french]{babel} ...


1

I find a solution with a tiny trick, but temporarily! I define some command in my latex such: \newcommand{\prb}{\rl{تابع احتمال}}, and in my .m file, I use the command \prb instead of unicode characters: تابع احتمال. So, the .m file, just consist of ASCI characters. Latex then, execute the command and view تابع احتمال in the PDF and work fine!


2

A “real” math font, such as those that can be used with unicode-math, has glyphs specially tailored for math fonts. For instance with \documentclass{article} \usepackage{unicode-math} \setmainfont{Latin Modern Roman} \setmathfont{Latin Modern Math} \begin{document} \textit{f} $f(x)$ \end{document} the character used for the second “f” is U+1D453 ...


3

You don't need it. Only the dvips driver has problems to break links and needs breakurl. xdvipdfmx (used by xetex) works without it: \documentclass{article} \usepackage{hyperref} \textwidth=2cm \begin{document} \url{http://tex.stackexchange.com/questions/218196/breakurl-doesnt-work-with-xelatex} \end{document}


4

The package wasysym has nothing to do with \textrecipe. The command is defined in standard LaTeX by the textcomp package, which is not to be loaded with XeLaTeX and fontspec. The problem is that the Sanskrit 3000 font has no glyph for ℞ (U+211E PRESCRIPTION TAKE) so \textrecipe produces nothing (with XeLaTeX a small square is drawn). You can substitute the ...


1

I guess that your font does not provide this symbol (here is a collection of fonts, which do). Therefore, you will have to redefine this command in order to use an other font for this very symbol: % arara: xelatex \documentclass{article} \usepackage{fontspec} \setmainfont{Sanskrit2003.ttf} ...


5

Vollkorn Here is a great open-source font from Friedrich Althausen with eight styles and multilingual support. http://vollkorn-typeface.com/. The following font flavors are supported: PostScript OpenType .otf TrueType OpenType .ttf Web open Font Format .woff Embedded OpenType .eot Ligatures Glyphs Kerning Found in this tex.stackexchange ...


1

As you have a variable font for the 'unit' part of quantities, and that is a text mode font, I think you are best off using text mode with siunitx \sisetup{unit-mode = text} This will then use whatever the current text font is for units, so the math font will have no impact. (Untested as I don't have the appropriate fonts.)


1

This is the kind of problem which exists in the current TeX--XeT algorithm of e-tex (used by xetex engine); of course this has nothing to do with the bidi package and is an engine bug. I believe it should be fixed with the xetex binary shipping with TeXLive 2015. For the moment, the solution is perhaps to surround the relevant things between \beginL and ...


2

In relation to the extra question about \square. I do not have Minion Pro, but out commenting the two \setm... font lines and adding amssymb, then this compiles just fine using xelatex \documentclass{article} \usepackage{mathtools,amssymb} \usepackage{polyglossia} % also loads package fontspec \usepackage{unicode-math} % if you also need maths ...


2

The class europecv says \DeclareOption{utf8}{\AtEndOfClass{\inputencoding{utf8x}}} which is a very big mistake. At the time the class was first released, utf8 didn't support direct input with Greek, which was the main reason for using utf8x. Since some years, utf8 does support Greek, so there's no reason for keeping the option in that way. However, for ...


3

The command \DeclarePairedDelimiter is defined by mathtools. Since this package also loads amsmath it must go before fontspec: \documentclass{article} \usepackage{mathtools} \usepackage{polyglossia} % also loads package fontspec \usepackage{unicode-math} % if you also need maths \setmainlanguage{english} % loads language hyphenation rules and such ...


3

You need to tell fontspec to emulate traditional TeX typesetting features, such as turning backticks and straight quotation marks into curly quotation marks. You can do this using Mapping but the recommended syntax is Ligatures=TeX: \documentclass{article} \usepackage[a4paper, margin = 0.4in]{geometry} \usepackage{fontspec} \begin{document} ...


5

Just add Mapping=tex-text or Ligatures=TeX to the \fontspec options (see §11.1 of the docs).


6

The mapping substitutions work on a character basis, but XeTeX never uses the space character; rather, it changes space tokens into horizontal glue, so when the substitution stage is reached, there's never a combination U+0020 U+00B7. You can use newunicodechar for this purpose: \documentclass{article} \usepackage{fontspec} ...


3

It looks like surrounding the English text in the xepersian package's latin environment is the solution. Disclaimer: I don't know this language, but I copied the text below from the first page of the xepersian documentation. I used the Nazli font because it is freely available through my Debian distribution. \documentclass{article} \usepackage{xepersian} ...


2

\ifxetex detects whether you are compiling with XeTeX or not. If you are, it executes the if bit. If not, it executes the else bit. Moreover, you cannot use inputenc with XeTeX (so it is good, really, that that code is never read). You can use 'normal LaTeX fonts' for the rest of the document, though. Just use the three lines of code from ...


5

As for your primary question: use the Ligatures=TeX when selecting the font; for example, \setmainfont[Ligatures=TeX]{Segoe UI}. You can use Unicode en dash (–; U+2013) directly instead, which I find better than using the old TeX ligatures. As for your secondary question: I can recommend wholeheartedly Gentium. It is free, libre, comprehensive and extremely ...


2

See section 3.2.1 of the manual: 3.2.1 Contextual analysis of hamza As with ArabTeX, a contextual analysis of the input encoding is performed (at the font-mapping level) to automatically determine the carrier of the hamza, as illustrated by the following examples: \begin{arab} 'amruN, 'ibiluN, 'u_htuN, '"u_ht"uN, '"Uql"Id"Is, ra'suN, 'ar'asu, sa'ala, ...


4

Replace \begin{center} by {\centering and \end{center} by \par} to lose the vertical spaceing. \fontsize{12}{2} means 12pt font with 2pt baseline, do you intend that?


3

This will work with XeTeX (i.e., using the xelatex command): \documentclass{article} \usepackage[dvips,xetex]{graphicx} \usepackage{ifpdf,mla}% <-- mla.sty requires ifpdf.sty, but (perversely) doesn't load it %\usepackage{fontspec} \begin{document} \begin{figure} \centering \includegraphics[scale=0.6]{chiaroscuro-victorian.png} \end{figure} ...


0

A PNG image is a raster image, which has no physical dimensions. If you image is 100 pixels by 100 pixels, you can print that out in thumbnail size or as a full page. Since XeTeX is putting the picture on a page, it needs to know how large to make it, e.g., \includegraphics[width=3in]{chiaroscuro-victorian.png} You don't need to specify the width and the ...


0

Respectfully folks, while I understand that Thanks is not an answer, your comments do not add any value while, at least, my thanks comment at least provides a new data point of validity. I have searched for a mention of this and other problems and I find forum adjudication to diminish the value of some comments that actually do provide information ... and ...


5

The only way I could get that many hyphens in that text is to force tex to prefer them, this shows various alternative settings \documentclass{article} \usepackage{ragged2e} \begin{document} \def\t{I want to hyphenate this sentence, but the presence of quadruple lines successively hyphenated} \noindent\mbox{\vrule\ \begin{minipage}[t]{3.1cm} ...


4

Just load microtype and see, if it helps: % xelatex \documentclass{article} \usepackage{polyglossia} \setdefaultlanguage{english} \setlength{\textwidth}{6.3em} \setlength{\parindent}{0em} %\usepackage{microtype} \begin{document} I want to hyphenate this sentence, but the presence of quadruple lines successively hyphenated \end{document} Without: ...


0

Tagged PDF is a pervasive technology in all but the oldest PDF standards. It is the means that all 'semantics' of PDFs is modelled, and it is the extra-sauce that PDFs bring over the Postscript graphics description language that the PDF standards build on. If you use any of the following with xelatex, you will be generating PDFs with tags: Chapters and ...


2

You should use fontspec to select fonts and font features. You can change the script now using \addfontfeature{Script=Latin}. To make things more convenient it is possible to renew \LRE: \documentclass[a4paper]{article} \usepackage{fontspec} \setmainfont[Script=Arabic]{Amiri} \usepackage[RTLdocument]{bidi} \let\oldLRE\LRE ...


4

\usepackage{fontspec} is sufficient. It will set the fonts to Latin Modern by default. That said, your code compiles fine for me. I am not that familiar with XeLaTeX. However, I know it uses OS fonts and I know it handles things differently from LuaLaTeX. So you may need to tell your system about the TeX fonts. For example, I have the following ...


2

This works (except for the fact that you probably shouldn't be citing an "article" without a journal title...). The thing to note is that you can use both cite and natbib at the same time, so pick one or the other. This example uses natbib, but you can switch with cite if you like. \documentclass{article} \usepackage{filecontents} ...


2

You have to use a font that supports the IPA characters, for instance CMU Serif: \documentclass[a4paper,12pt]{book} \usepackage{fontspec} \setmainfont{CMU Serif} \begin{document} \textipa{\|`\oe}, \textipa{\|+0} \end{document} You can also input the characters directly: \documentclass[a4paper,12pt]{book} \usepackage{fontspec} \setmainfont{CMU ...


2

You can use enumitem for all your list needs. For this particular need, you need to use \begin{enumerate}[leftmargin=0pt,itemindent=2em] Adjust the values appropriately. \documentclass{article} \usepackage{enumitem} \usepackage{kantlipsum,showframe} %% just for this example \begin{document} \begin{enumerate}[leftmargin=0pt,itemindent=2em] \item ...


1

That may be due to the reason that Hoefler Text uses special AAT (Apple Advance Typography) features for the swashes. As Windows supports the Opentype ones, XeLaTeX doesn't support them, so, what I do (I love that font and I've been working with it for many years), is that I replace manually in TexWorks the normal capital "Q" character with the swashed one, ...


3

If I change Minion pro (which I don't have) it runs without error in texlive 2014. If I add \listfiles I get the list below (which is why this is posted as an answer, to format the list: *File List* article.cls 2007/10/19 v1.4h Standard LaTeX document class size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) mathtools.sty 2014/07/16 ...


0

This answer provided by @egreg is to use \setcounter{secnumdepth}{0} so the complete test file is: \documentclass{scrbook} \addtokomafont{section}{\centering} \addtokomafont{subsection}{\centering} \setcounter{secnumdepth}{0} \begin{document} \mainmatter \chapter{Sample Chapter} \section{First Section} asdfasdfasdf \subsection{Subsection} asdfasdfasdf ...


2

The makecell package is done for that: it allows for linebreaks in cells, and common formatting for column heads. Also you shouldn't use \esizebox as it also scales the text in a tabular. I used the tabulars environment instead, with a table total width of 16 cm.. Although one should not use \multicolumns that come across X type columns, it seems to be ...


3

You can achieve all this with David Carlisle's tabularx package. I thought to provide 2 different solutions, since manual breaks can be done inside a tabular environment, but that does not solve your problem properly IMO. Column width is fixed within tabularx preamble: >{\centering\arraybackslash}X means "centered-text (>{\centering\arraybackslash}), ...


3

\dfrac is defined in amsmath but never use \\ to force line breaks: \documentclass{article} \usepackage{amsmath} \usepackage{unicode-math} \setmathfont{XITS Math} \begin{document} The quadratic formula is \[ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} \] \end{document}


1

It's apparently the ISO 639-1 code that is used. For Khmer the two-letter code is "km" (official source: Language codes - ISO 639).



Top 50 recent answers are included