# Tag Info

1

The biggest culprit (seems to me) would be a large (file size) image, such as a graph with way too many data points or a bitmap with much higher resolution than you need. (I have a friend back in the day generate a Matlab graph of a several second signal from raw data sampled at 40 kHz; the resulting EPS was hundreds of kilobytes and caused similar ...

2

Yes, LaTeX will parse the left and right quotation marks correctly if you tell it to parse the input with UTF-8 encoding. \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} ‘Hello’ \end{document}

0

Maybe this is what you're looking for: \documentclass{article} \usepackage{amsmath} \usepackage{mathspec} \usepackage{newunicodechar} \defaultfontfeatures{Ligatures=TeX}% not needed with last version of fontspec \setallmainfonts{Old Standard} \makeatletter \def\eu@MathPunctuation@symfont{Latin:m:n} ...

0

It seems you are looking for the Unicode characters U+231C ("top left corner") and U+231F ("bottom right corner"). Can you type these in using your keyboard?

0

In file beamerfontthememetropolis.sty from the theme, change the line \setsansfont[BoldFont={Fira Sans}]{Fira Sans Light} to \setsansfont[BoldFont={Fira Sans},ItalicFont={Fira Sans Light Italic}]{Fira Sans Light} I don't know why luaLaTeX need to specify the italic font explicitly, because XeLaTex compiles the demo file without any problem on my ...

4

Here is a primitive attempt to achieve outcomes which may be close to what you need. This solution is perhaps suitable for those who wish to achieve square corner quotation marks such as yours, but prefer not to use a typesetting system specialised for Japanese such as pTeX [PDF documentation], or who cannot use a TeX engine specialised to use unicode input ...

1

The problem with oversized fonts in adobe reader comes from a bug with XeLaTex when using fonts in OTF format that have a particular resolution (see http://typophile.com/node/46451). What I do to circumvent this issue is to work locally with the .ttf version of FontAwesome. Added benefits to this is to make the new fonts available to you, it's easier to ...

2

You may use a character class: \documentclass[a4paper,14pt,openright,twoside]{memoir} \usepackage{fontspec} \setmainfont{EB Garamond}[ Numbers=Lining, ItalicFeatures={ RawFeature=+hlig, RawFeature=+liga, RawFeature=+dlig, RawFeature=+swsh, Numbers=OldStyle, }, ] \newfontfamily\varv{EB Garamond}[ Numbers=Lining, ...

0

This is a solution for the first issue (taken from here): Download the latest version of fontawesome from their site: http://fortawesome.github.io/Font-Awesome/ Install the .ttf version of the font (by simply double clicking the file on the most operating systems) Replace the line \newfontfamily{\FA}{FontAwesome} in your fontawesome.sty file with ...

0

There are a few packages now available: coloremoji.sty Twitter Emoji For Everyone DoraTeX coloremoji

4

An up-to-date TeX distribution has the XCharter OpenType font, so you can use it instead of \renewcommand{\rmdefault}{bch} which will not give you anything except for ASCII characters. Moreover \la as you defined it is just a switch that tells XeLaTeX to use Brill from that point on. A correct document would be \documentclass{article} ...

3

in \la{N} the {} are not doing anything, \la does not take an argument, it switches font for the remainder of the current group. In this case that is the \end{enumerate} So at that point the font (and any other local declarations) revert to the values they had at \begin{enumerate}. It isn't clear if you intended \la just to change the font of N or if you ...

7

Probably your file is not saved in UTF-8 encoding. Apparently TeXshop allows you to put % !TEX encoding = UTF-8 Unicode as the first line, although since it's now the 21st Century you should probably make that the editor default. This can be done in the main preferences of TeXShop in the Source panel (Encoding). To summarize: Install polyglossia ...

5

You can use the xespotcolor package. You need the latest version of xdvipdfm-x.

3

You can locally redefine \printatom in order to force atom depths to 0pt: \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \begin{document} something $$\renewcommand\printatom[1]{\setbox0=\hbox{\ensuremath{\mathrm{#1}}}\dp0=0pt \box0 } \chemfig{CH_3-*6(-=-(-CH_2-*6(-=-(-CH_2-*6(-=-(-CH_3)=-=))=-=))=-=)}$$ something \end{document}

0

I have a successful attempt, but it is not elegant enough. Code: \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \newcommand{\vr}{{\tikz \draw[draw=none] (0,0) rectangle (0,\dimexpr\fontcharht\font`A);}} \begin{document} something $$\chemfig*{CH_3|\vr-*6(-=-(-CH_2|\vr-*6(-=-(-CH_2|\vr-*6(-=-(-CH_3)=-=))=-=))=-=)}$$ something ...

2

Concentrating on the direct use of emdash as control of --- is a bit harder. The following produces the following in pdflatex, lualatex and xelatex. I think that's the desired outcome. \documentclass{scrartcl} \usepackage[hmargin = 4cm]{geometry} \ifx\Umathchar\undefined %pdftex \usepackage[utf8]{inputenc} \let\oldtextemdash\textemdash ...

5

You can prepare the following example: \input ucode \input lmfonts \hsize=12cm —Hola, esto es un texto absurdo —para ejemplificar lo que ocurreconestedocumento— con algunas palabras más. \end and you can try to process it by 1) xetex test and 2) xetex -fmt pdfcsplain test. You will see different results: 1) the long word isn't hyphenated, 2) the long ...

4

This is for XeLaTeX only, as the behavior of LuaLaTeX when inputting — (U+2014) seems satisfactory. We want to allow hyphenation in the word preceding the em-dash, so we can add a zero kern before it, which will make the word end, but doesn't create a line break point. However, we want also to remove the behavior of the em-dash that, for compatibility with ...

1

An alternative route may be to use compat_freebsd - setup for running FreeBSD binaries under emulation and use the FreeBSD XeTeX port.

2

First of all please avoid using $$...$$ in a LaTeX document. See Why is $...$ preferable to $$...$$? for reasons why. You need to understand that the first atom in a chemfig formula determines the baseline of the formula. If you know this you'll see that the first atom of the first benzene (which is just a point: the left-most edge) aligns with the ...

2

Here are unicode math macros I think I'll try to use: \documentclass{article} \usepackage{amsmath} \usepackage{unicode-math} \setmathfont{Asana Math} \usepackage{newunicodechar} % roots: \newunicodechar{√}{\sqrt} \newunicodechar{∛}{\sqrt[3]} \newunicodechar{∜}{\sqrt[4]} % full differential: \newunicodechar{ｄ}{\,\mathrm{d}} % superscripts: ...

1

This is an issue with TeXShop's file encoding, not XeLaTeX itself. In Sublime Text, this works fine for me: % !TEX TS-program = xelatex \documentclass[12pt]{article} \usepackage{fontspec} \newfontfamily\arabicfont{Al Nile} \begin{document} \arabicfont وَهَذِهِ فِقرَةٌ بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة \end{document} (sorry, I don't ...

1

Using the built-in mechanism of ArabTeX, you can indicate by a hyphen (which becomes invisible) that a given letter should consider itself medial, albeit standing at a word border. kitabu-\textcolor{red}{-hA} should make do in your example. However the choice of the font may change the result significantly. (I don't know, if the two forms of the ha are ...

1

I give it a try, although the answer may not yet be complete/final. The reference to ConTeXt mentioned by @Alan Munn contains a solution to the question of diacritical marks (vowels), including the use of unicode characters instead of translitteration. But it uses general rules to colour all glyphs of a given type in the same way, not individual ones in a ...

6

It's easy with newunicodechar \documentclass{article} \usepackage[intlimits]{amsmath} \usepackage{ifxetex} \ifxetex \usepackage{unicode-math} \removelimits{\int} \else \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \fi \usepackage{newunicodechar} \newunicodechar{√}{\sqrt} \ifxetex\else % these are already available with unicode-math ...

2

If you need to typeset chemical equations, then I suggest using the mhchem package. The chemfig package is intended more for drawing two-dimensional chemical figures. \documentclass{article} \usepackage[version=3]{mhchem} \begin{document} \ce{2NaClO {=} 2NaCl + O2 ^} \ce{CH3CHO + 2Ag(NH3)2OH -> CH3COONH4 + 2Ag v + 3NH3 ^ + H2O} \end{document} ...

1

If this is what you expect to see in your LaTeX / XeTeX output … then you may just have to change the name of the font, which may be outdated in the example you got. I modified your example like this (with comments removed): \documentclass{article} \usepackage{fontspec} \setmainfont[Script=Devanagari]{Lohit-Devanagari} % Hindi -> Devanagari ...

5

For completeness, here's what I actually ended up with, using an argument to set an initial before the redefinition: \newenvironment{textblock}[1] {#1\def\par{\unskip\nobreak\quad{\color{red}\P}\nobreak\enspace}} {\endgraf} This allows me to use a lettrine at the beginning, which is somehow a required use case: ...

2

The change does indeed seem to be due to the HarfBuzz library. I noticed the same "bad" version of the font's rendering in Chrome and Firefox, which both use HarfBuzz, while I saw the "good" version in applications that used Apple's native rendering. I filed a bug with HarfBuzz, and the lead developer explained that this font makes use of contextual swashes ...

1

I personally don't know what the difference between XeTeX and XeLaTeX are, when I looked into it on the sourceforge discussion page linked in the comments above there is a question that configures hyperref for xetex and explicitly states the pdfcreator as xelatex. Additionlly, the Wikipedia page for XeTeX provides a source example which explicity refers to ...

2

This is an update on egreg's answer and - beware - I did not test the code (I only somewhat proved it correct, to quote the author of TeX) \newenvironment{nopars} {\par\def\par{\if\@currenvir\@nopars\unskip\nobreak\quad\P\nobreak\enspace\else\endgraf\fi}} {\endgraf} This should cope at least with anything that introduces a nested environment ...

4

CW from the comments: luaotfload normalizes all names supplied by the font. Apart from lowercasing you can also leave out spaces if you wish. So, for XeLaTeX, spacing and casing are significant, while for LuaLaTeX, they are not. This is not engine-dependent, just how luaotfload (and, incidentally, ConTeXt) treat things. The rationale is simple: ...

14

Here's a nopars environment: \documentclass[a4paper,12pt]{memoir} \usepackage{polyglossia} \usepackage{fontspec} \usepackage{csquotes} \setmainlanguage{german} \newenvironment{nopars} {\par\def\par{\unskip\nobreak\quad\P\nobreak\enspace}} {\endgraf} \begin{document} \begin{nopars} Dies hier ist ein Blindtext zum Testen von Textausgaben. Wer diesen ...

0

There's a package for this, named translations, funnily enough. Thanks clemens for pointing me to Translation of words according to babel language .

2

I also encountered this problem while trying to achieve exactly the same thing as you with the Friggeri template. This problem comes from a bug with the pdf engine of XeLaTex with OTF font file format when it is at a particular resolution as discussed in http://typophile.com/node/46451. As a workaround, you can use the .ttf version of the font. To do this, ...

4

The option is SuperscriptsAndSubscripts (note the uppercase A). Here I use a Tamil font I have on my machine. For the transitions to/from superscripts, it's better to go with \begingroup\normalfont and \endgroup, so this will work independently on the context. \documentclass{article} \usepackage{fontspec,polyglossia} ...

3

This is because different fonts are used when compiling using PDFLaTeX or XeLaTeX. Quoting from the style definition file: \ifxetex %% If the document is compiled with XeLaTeX, we load the TU Delft house %% style fonts: Bookman Old Style (serif) for titles and Tahoma (sans-serif) %% for text. Even if the nativefonts option was specified, we ...

6

It's probably better to use ^^^^043a which produces a character token, rather than use \char"043A which is a non expandable primitive accessing a font position. The character token is usable in more contexts (such as writing to tables of contents) and generally has less restrictions than \char. the ^^^^ notation (and \char"043A) will work in luatex or ...

4

Version 2 After reading a recommendation/comment by Khaled Hosny I've changed the core of the snippet, so it's switching font only when needed. There is no font change on purpose if a character is a space. In the previous version, it wrapped every single character (not recommended in general as it breaks up ligatures, kerning pairs and probably other ...

5

Loading a non existent language is useless. Just add a font family for Ethiopic characters (I used Kefa, use whatever you like). \documentclass[a4paper]{scrartcl} \usepackage{fontspec} \usepackage{polyglossia} \usepackage[Latin,Ethiopic]{ucharclasses} \setmainlanguage{english} \newfontfamily{\tigrinyafont}[Script=Ethiopic, Scale=1]{Kefa} ...

3

Don't load inputenc nor fontenc (this one might be needed in special occasions, though) when you compile with XeLaTeX or LuaLaTeX and use fontspec. \documentclass{article} \usepackage[spanish,american]{babel} \usepackage{fontspec} \setmainfont{erewhon} \begin{document} This is American English: Alcalá de Henares \selectlanguage{spanish} Esto es español: ...

7

Just make \anw@true the same as \anw@false; I'll show a second level enumerate, with subcaptios it will be the same, as they use the Greek version of \alph as well. \documentclass{article} \usepackage{ifxetex} \ifxetex \usepackage{fontspec} \usepackage{polyglossia} \setmainfont{Old Standard} \setmainlanguage{greek} \else \usepackage[T1]{fontenc} ...

5

In this case, Letters=SmallCaps is irrelevant as Alegreya SC only has small caps. In other cases, when a “normal” font is used, this option will enable the +smcp feature when choosing the font. You have to add suitable declarations also for bold, italic and bold italic. \documentclass{report} \usepackage{fontspec} \setmainfont[ ...

2

The fontspec manual addresses this in section 5.1.2, but I don't fully understand what they're writing there. One way to accomplish what you want is done below, where I've redefined \textsc to a new font family that picks out the Alegreya Small Caps font. \documentclass{article} \usepackage{fontspec} \setmainfont{Alegreya} ...

3

Most of the issues are related to Python's __future__ module, which allows Python 3 features to be imported in Python 2. Imports from __future__ can be performed manually. However, by default PythonTeX brings in three things: print_function absolute_import division This corresponds to the package option pyfuture=default. Basically, the default behavior ...

1


10

This combination of packages is attempting to load the xeCJK package twice: once on line 11 of ctex-xecjk-engine.def from the ctex package, and then again on line 43 of xeCJK-listings.sty from the listings package. The clash you are getting is that the options are different in each case (the first one specifies [BoldFont,normalindentfirst] while the second ...

3

Never put manual formatting commands in the arguments to commands for things like \title, \section etc. Formatting should be separate from content. The name of the section is content. The size and font used to typeset section headings is format and should not be in the argument to \section{}. Form and content should be distinct. ...

3

\pgfmathsetmacro wants to see an explicit number, not an internal register. So \the\XeTeXcountglyphs\font would do, but it doesn't for another reason: trying to print the glyph corresponding to the highest count results in an error. Solution: step back by 1. \documentclass{article} \usepackage{fontspec} \usepackage{pgf} \usepackage{pgffor} \begin{document} ...

Top 50 recent answers are included