Tag Info

0

The problem is in luatex (possibly in luaotfload); if I ask the font corresponding to \liningmain from your code, I get "[EBGaramond12-Regular.otf]/ICU:script=latn;language=DFLT;+liga;mapping=tex-text;+lnum;+tnum;" with XeLaTeX and "[EBGaramond12-Regular.otf]:mode=node;script=latn;language=DFLT;+liga;+tlig;+trep;+lnum;+tnum;" with LuaLaTeX. So I ...

0

I found a useful fix at the link below, after many hours of searching: https://github.com/jgm/pandoc/issues/889 Basically change \setmonofont[]{$monofont$} to \setmonofont[Mapping=tex-ansi]{$monofont$}

7

The character you're using is ɣ U+0263 LATIN SMALL LETTER GAMMA while the character you want is γ U+03B3 GREEK SMALL LETTER GAMMA They're different and should not be confused with each other. See http://en.wikipedia.org/wiki/Latin_gamma for some information about U+0263.

3

Don't use $c=$ foo as if = is not used in infix position it will get the wrong spacing if you must mix math and text then $c={}$foo will ensure that you get mathrel spacing on both sides of the = but here \emph seems logically wrong (you want italic not emphasis) so I used c=\mathit{foo}. However the text simply doesn't fit. You could re-write to make it ...

5

The good news is that there are lots and lots of opentype font families that provide a full Cyrillic alphabet and are easy to use with XeLaTeX (and LuaLaTeX). The bad news is that you may have to spend some time choosing which font family best suits your needs. MacOS X provides quite a few such font families; it's also fairly easy to download and activate ...

4

Since, from the question, only the \cdot for the multiplier of the y-axis must bechanged, you can use ytick scale label code/.code={$\times 10^{#1}$}, (the only change from the default definition is that \cdot was replaced by \times). If the \cdot of both axis multiplier is to be changed, you can change the definition of tick scale binop instead, using ...

1

The first questions is answered by adding tick scale binop=\times to the axis options. All the things you can with that number is described in the pgfplots manual section Tick Scaling - Common Factors In Ticks working on the precision for the x ticks...

4

You should use combining characters, instead. Unfortunately, Latin Modern does not fully implement them; for instance, there's no combining cedilla, so with the code below you'd get only characters with cedilla which exist in the font. Before: \c{e} \{e} \'{e} \v{e} \u{e} \={e} \^{e} \.{e} \H{e} \~{e} \"{e} ...

1

By copying the definitions at page 356 of the TeXbook but changing the character codes, this fixes it: Before: \c{e} \{e} \'{e} \v{e} \u{e} \={e} \^{e} \.{e} \H{e} \~{e} \"{e} \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text" \tenrm \def\#1{{\accent768 #1}} \def\'#1{{\accent180 #1}} \def\v#1{{\accent711 #1}} \def\u#1{{\accent728 #1}} ...

5

You shouldn't use inputencwith XeLaTeX : it supposes your document is in utf8 encoding. And you shouldn't use fontenc either, since it manages fonts directly. Also, it is recommended to use polyglossia rather than babel: it is tailored for XeLaTeX. Here is a code that works: \documentclass{article} \usepackage{fontspec} \setmainfont{Minion Pro} ...

0

I got the same (space to the right of the theorem head only when using RTL: \setdefaultlanguage[locale=morocco]{arabic}). However, I think this problem is related to mdframed.. because the problem disappears when using framed and ntheorem. \documentclass[12pt,a4paper]{book} \usepackage[x11names]{xcolor} \usepackage{amssymb} \usepackage{framed} ...

2

This one is subtle, and I don’t really understand why it happens yet. Unfortunately I’m tired and still have a lot to do before tomorrow morning, so I don’t have time to work out it out tonight, but I do have a fix. If you remove the lines setting the document text to Arabic: \usepackage{polyglossia} \setdefaultlanguage[locale=morocco]{arabic} ...

1

This seems to work but will presumably have unwanted side-effects so I doubt this is really a solution. I would wait to see alexwlchan's solution which will likely be better: \documentclass{book} \usepackage[framemethod=tikz]{mdframed} \usepackage{amsmath, amssymb} \usepackage{polyglossia} \setdefaultlanguage[locale=morocco]{arabic} \setmainfont{Times New ...

5

The code in my answer to TeX accents do not seem to work with fontspec and xe/lua/latex gives the idea, but for the dot above some additional code is needed. \documentclass[a4paper,12pt]{article} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Minion Pro} % a font without Latin Ext. Additional \usepackage{newunicodechar} ...

1

It does not compile because of the line 11, uncomment %\usepackage{unicode-math} and uncomment %%%%%%%%%%%%%%% BRACES %%%%%%%%%%%%%%%% %\setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf} %\setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf} where I don't know anything about the package. Perhaps someone here able to help with ...

3

If you mean counting the spaces in the argument, at all brace levels, with l3regex you can do it: \documentclass{article} \usepackage{xparse,l3regex} \ExplSyntaxOn \NewDocumentCommand{\countwords}{+m} % allow \par (or blank lines in the argument) { \regex_count:nnN { \s } { #1 } \l_corneli_words_int \int_to_arabic:n { \l_corneli_words_int + 1 } } ...

3

\documentclass{article} \usepackage{readarray} \begin{document} \getargsC{Four and twenty blackbirds} Words = \narg\par The words are \argi, \argii, \argiii, and \argiv. \end{document} Thus, based on this MWE, \def\wordcount#1{\getargsC{#1}\narg} would suffice to answer the OP's question. Note that \getargsC is functionally equivalent but far superior in ...

5

Here's a simple solution using xstring % arara: pdflatex \documentclass{article} \usepackage{xstring} \newcommand{\wordcount}[1]{\StrCount{#1}{\space}[\tmp]% \number\numexpr\tmp+1\relax} \begin{document} \wordcount{Four and twenty blackbirds} \end{document} It works by counting the spaces, and then adding 1; it works fine even when there are multiple ...

3

The simplest method for centering section titles is with sectsty: \documentclass{article} \usepackage{sectsty} \allsectionsfont{\centering} \begin{document} \section{A section} Some tex here. \subsection{A sub section} Some tex here. \section*{An un numbered section} Some tex here. \subsection*{An un numbered sub section} Some tex here. \end{document}

4

I assume that you are trying to center the headings of the sections and subsections. For this I will use titlesec package. \documentclass{article} \usepackage{titlesec} \titleformat{\section}{\filcenter\bfseries} {\thesection.}{0.5em}{} \titleformat{\subsection}{\filcenter\bfseries} {\thesection.\thesubsection.}{0.5em}{} ...

1

With the help of Paul Gessler's link to How to enable shell-escape in TeXworks?, --shell-escape can be added to the XeLaTeX compilation in TeXworks like this: Running the MWE in the original question, the compiler will compile a separate file main-figure0.pdf with only the TikZ figure, in addition to the full document main.pdf:

5

Here's a workaround with fontspec only. The trick is to define a new math symbol font for the lining figures. I wouldn't use detect-all: numbers in \SI or \num should always be typeset in math mode (hence with lining figures). \begin{filecontents}{test.bib} @Article{Hay2011, Title = {Can humans force a return to a Cretaceous' ...

1

With OTF's, one way is to define them with \Umathcharnumdef\Alpha="0391 \Umathcharnumdef\Beta="0392 % ... \Umathcharnumdef\Omega="03A9

2

If you want that the Greek letters respect the current family you have to completely redefine the math fonts, probably using Latin Modern Math. A better way to define them as “fixed” symbols is as follows: \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text" \textfont0=\tenrm \font\greekcapstenrm=cmr10 \font\greekcapssevenrm=cmr7 ...

0

This fix is not robust to italic, slanted or bold capital Greek letters but should be easily adapted. It loads the missing letters from the original Computer Modern fonts. \font\greekcapstenrm=cmr10 \font\greekcapssevenrm=cmr7 \font\greekcapsfiverm=cmr5 \newfam\greekcapsfam \textfont\greekcapsfam=\greekcapstenrm \scriptfont\greekcapsfam=\greekcapssevenrm ...

3

For a change, you can use background package that provides \BgThispage macro: \documentclass[ letterpaper, 10pt]{article} \usepackage{pdfpages} \usepackage[]{background} %% this loads tikz \backgroundsetup{ pages=some, scale=1, opacity=1, angle=0, color=black, contents={% \begin{tikzpicture}[overlay,remember picture,shift={(current page.north west)}] ...

6

Option remember picture remembers the position of tikzpicture in the .aux file and uses the remembered value in the next LaTeX run. In more complicate cases (as in the question with nested tikzpictures) it can take even more runs. In your case three runs are needed: pdflatex xxx pdflatex xxx pdflatex xxx or xelatex xxx xelatex xxx xelatex xxx But do ...

5

The answer might be too late but for anyone else who might have the same problem.. You need just to put tikz package before setting languages: \usepackage{setspace} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{tikz} \usepackage{etoolbox} \setmainlanguage{arabic} \setotherlanguage{english} ...

6

In case if you are tied to article document class, here are the two options: Option-1 You can use scrextend package, that extends the facilities (like font sizes) of `KOMA-script classes to other classes: %!TEX TS-program = xelatex \documentclass{article} \usepackage{scrextend} %%% this line \changefontsizes[24pt]{20pt} %%% and this line ...

2

use \documentclass[fontsize=20pt]{scrartcl}

6

The article class only supports 10pt, 11pt, and 12pt. You can use the extarticle (extended article) class which supports 20pt. In the following MWE I've changed "Times" to "Times New Roman" and I get the correct quotes using Ligatures=TeX option, but you have to use the standard LaTeX way for double quotes. %!TEX TS-program = xelatex ...

1

I can't really test your example file due to how old biblatex-historian is. (I have version 0.4, which is from 2010, which is 'ancient' given how actively biblatex and biber are being developed.) As @cfr noted, the package relies on (I believe) an old and no longer used command, \SetCiteCommand. I need to disable the command to get your example file to ...

0

I found the solution myself and will describe what I did in case somebody else runs into the same problem: Installing TeXLive "on top" of the old one will not work. The error persists. One has to delete /usrlocal/texlive/2013/* and /usrlocal/texlive/texmf-local/* manually. After that, the error no longer occurs after performing a new installation. However, ...

1

While true Kiviat diagrams attribute meaning to the area enclosed, I've seen them used for many numbers of axes. So, appropriateness comments notwithstanding, here are a couple of possible solutions: Using pstricks-add: \documentclass{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}(-6,-5)(5,5) \psset{unit=1.2} ...

1

A solution using the stackengine package: it's by construction that the "Heading" part cannot be separated from the first line of the content since it belongs to the first line. It also has the advantage to greatly simplify the code – unless you have specific reasons to type the heading with its own \item command: \documentclass[a4paper]{article} ...

5

You're forgetting to define a main font; don't use \text... in the bibliographic entries. Don't try mixing Latin Modern and Linux Libertine, they're visually incompatible with each other. If you want a Computer Modern style font, use the CMUnicode fonts. % !TEX TS-program = arara % !TEX encoding = UTF-8 Unicode % arara: xelatex: { shell: true } % arara: ...

5

First of all, note that you have some strange accented characters in your .bib file. For example é is the combination of a normal e (U+0065) plus a "Combining acute accent" character (U+0301), instead of the normal accented e é (U+00E9). Having said that, notice that the compilation returns first an "Overfull \hbox" warning caused by the word ...

3

The needspace package allows reserving vertical space before doing the next thing. If the space does not exist, it issues a page break. Here, I redefined \item to perform a \needspace before it. You can change the value I used (\baselineskip), but it works for your MWE. \documentclass[letterpaper]{article} \usepackage{enumitem} \usepackage{lipsum} ...

0

You can use the esvect package: it manages the subscript with a \vv*command, the arrow doesn't collide with what is underneath and you can choose between eight forms of arrow. Here is an example, to be compared with \overrightarrow: \documentclass[12pt, a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...

2

If you use unicode-math along with XeLaTeX, there's no difference in what's printed with or without the arrow over the V; only the arrow length changes if you use \vec or \overrightarrow: \documentclass{article} \usepackage{unicode-math} \linespread{1.05} % if you have arrows over capital letters \begin{document} $V_{AB}$ \sbox0{$V_{AB}$}\the\wd0 ...

1

The problem is that \overrightarrow produces a box. When a subscript is added to a box, it treats it as a rectangle, and can't see what's inside. When a subscript is added to a character, it sees the italic correction of that character (roughly proportional to the amount of slant) and compensates for it. The easy work-around is to insert negative space, with ...

2

Welcome to TeX.se! :-) Try this: $\overrightarrow{V}_{\!AB}$. The \! inserts negative horizontal spacing.

4

The latest revision of xunicode-addon try to fix this bug (avaliable in ctex-kit or Google Driver currently). Please have a try. Update: The new version is available in TeX Live 2013.

3

I wouldn't recommend using utf8x; with the package option utf8x to either inputenc or inputenx, but it works also with XeLaTeX and LuaLaTeX, you can use newunicodechar: \documentclass{article} %%% Optional part if you want to use multiple engines \usepackage{ifxetex,ifluatex} \newif\ifxetexorluatex \ifx\ifxetex\ifluatex % see ...

3

\usepackage[utf8]{inputenc} or \usepackage[utf8x]{inputenc} are needed for TeX engines that do not support UTF-8. Then TeX sees the two bytes C2 and AD and utf8.def or utf8x.def make C2 active to catch AD to print the symbol or execute \- or whatever. In XeTeX, the bytes C2 AD become the "big" character AD. "Big" character means that character with ...

1

You can also do the following: Go into Command mode in vim by hitting ESC, so what you enter appears in a special command-line at the bottom of the screen. Search: Enter / directly followed by what you want to search for and hit enter to search in forward direction. To search in backwards direction, use ? instead of /. To repeat the search in forward ...

1

Sometimes you might want to use an actual no-break space. So turning them into normal spaces altogether might not be the best idea. In that case Adityas solution is a good start. But I don’t like my indentation displayed as ^I. The following colours the no-break spaces in gvim: hi NoBreakSpace guibg=LightGoldenrod1 guifg=black syn match NoBreakSpace / / ...

1

Per jon's comment above, \setboolean{SetDSpace}{false} worked, with my custom .cls, to change double- to single-spacing, and \setboolean{SetDSpace}{true} will restore double-spacing. Thank you all for your help!

3

I suppose, this is what you meant. \documentclass{article} \usepackage{multirow} \usepackage{array} \usepackage{mwe} \begin{document} \begin{tabular}{|p{.03\textwidth}|p{.73\textwidth}|p{.03\textwidth}|p{.15\textwidth}|} Test1 & Test2 & Test3 & ...

Top 50 recent answers are included