0

I used to have this code in the beginning just in case I need quickly to process something with Xelatex because of the language and utf8 requirements. I have noticed just lately that running pdflatex --shell-escape on this file makes the interpreter pick up the lines within the \ifxetex statement (and then to give me an error on \setdefaultlanguage[spelling=modern]{russian}).

\usepackage{ifxetex}

\ifxetex
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=modern]{russian}
   \setotherlanguages{german,french,greek,latin,spanish,italian,english}
\setkeys{greek}{variant=ancient}
\enablehyphenation    
\else
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
     \usepackage[greek.ancient,latin,russian,german,french,dutch,italian,spanish,english]{babel}
\fi

put on hold as off-topic by moewe, JouleV, Phelype Oleinik, marmot, Raaja Feb 14 at 19:06

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I ran the code (embedded into a slightly larger context to make it compilable) with pdfLaTeX with and without --shell-escape (on MikTeX) and never got any error. The \ifxetex code was not executed (otherwise there would have been an error about fontspec and polyglossia). If I do run the code with XeLaTeX I get the complaint The current roman font does not contain the Cyrillic script!. – moewe Feb 12 at 16:29
  • 1
    Make a complete example and show the log-file. – Ulrike Fischer Feb 12 at 18:57
  • It was a bug, after hard-resetting the machine all worked! \newfontfamily{\cyrillicfont}[Script=Cyrillic]{CMU Serif} was the line for cyrillic font. – Dmitry Starostin Feb 13 at 20:10
  • 4
    I'm voting to close this question as off-topic because the issue can not be reproduced with the code snippet from the question and the OP noted in the comments that there was a different issue with their code. – moewe Feb 14 at 17:44

Browse other questions tagged or ask your own question.