TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My article used a template which can only be accepted by XeLaTeX. Now I want to convert it to LuaLaTeX. How to do this?

Especially for this template.

SLEN template



\usepackage[total={130mm,203mm}, top=28.3mm, headheight=20pt, headsep=4truemm,bindingoffset=1.5cm]{geometry}
\parindent 21pt

  \vskip 0em%
 \let \footnote \thanks
   {\LARGE \@title \par}%
   \vskip 1.5em%
     \lineskip .5em%
   \vskip 1em%
   {\large \@date}%
 \vskip 1.5em}




    \normalfont \topsep6\p@\@plus6\p@ \labelsep1em\relax
    \item[\hskip\labelsep\bfseries #1]\ignorespaces
} \makeatother

    \ifthenelse{\myfirstpage < 10}{000\myfirstpage}{%                    
        \ifthenelse{\myfirstpage < 100}{00\myfirstpage}{%                 
            \ifthenelse{\myfirstpage < 1000}{0\myfirstpage}{%             

    \ifthenelse{\mypages < 10}{0\mypages}{\mypages}                       

\newcommand{\mypii}{PII: 1674-3202(\mypubyear)-0%                         %

    \and \equal{\mythirdauthor}{null}}{\myfirstauthor}{%
        {\myfirstauthor, \mysecondauthor}{%
        \myfirstauthor, \mysecondauthor, \mythirdauthor

    \myfirstaffiliation \\ \myfirstemail}}

    \myfirstaffiliation \\ \myfirstemail
    \and \mysecondauthor \\ \mysecondaffiliation \\
    \small \mysecondemail}%

    \myfirstaffiliation \\ \myfirstemail
    \and \mysecondauthor \\ \mysecondaffiliation \\
    \and \mythirdauthor \\ \mythirdaffiliation \\


\newcommand{\mylhead}{Studies in Logic, Vol.~\myvolnumber,
No.~\myissnumber~(\mypubyear):~\myfirstpage--\mylastpage \\\mypii}

\newcommand{\myfancyheadCO}{\myauthors~/ \myrunningtitle}

\newcommand{\myfancyheadCE}{Studies in Logic, Vol.~\myvolnumber,


\pagestyle{fancy} \fancyhf{}
\fancyhead[LO]{} \fancyhead[RE]{} \lfoot{} \cfoot{} \rfoot{}             


        \zihao{-5} \noindent\textbf{Abstract.}\quad\myabstract

  \ifthenelse{\equal{\reviewbooktitleEN}{null}}{}{\\ \reviewbooktitleEN}



\newcommand{\myoneauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\         
    \myfirstaffiliationCN \\ \myfirstemail}

\newcommand{\mytwoauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\        
    \myfirstaffiliationCN \\ \myfirstemail \\
    {\kaishu \large{\mysecondauthorCN}} \\ \mysecondaffiliationCN \\

\newcommand{\mythreeauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\       
    \myfirstaffiliationCN \\ \myfirstemail \\
    {\kaishu \large{\mysecondauthorCN}} \\ \mysecondaffiliationCN \\
    \mysecondemail \\
    {\kaishu \large{\mythirdauthorCN}} \\ \mythirdaffiliationCN \\

    \zihao{5} \hspace*{\parindent} \myabstractCN


I was trying to compile this article via LuaLaTeX



  Hello World!

But got a fatal crash:

This is LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9 64-bit) 

!LuaTeX error (file D:/CTEX/MiKTeX/fonts/sfd/ttf2pk/Unicode.sfd): invalid range

 ==> Fatal error occurred, no output PDF file produced!

LuaLaTeX failed to create a pdf file.
For possible explanations start the command from the Command Prompt...

What I want to do is to make it can be compiled by LuaLaTeX.

share|improve this question

closed as too localized by Martin Schröder, Werner, Kurt, Stefan Kottwitz Mar 5 '13 at 15:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You can't use polyglossia with LuaLaTeX – egreg Mar 1 '13 at 16:18
@DavidCarlisle I have updated my post. – Popopo Mar 1 '13 at 16:21
This is either too localized or a duplicate of Frequently loaded packages: Differences between XeLaTeX and LuaLaTeX. – doncherry Mar 1 '13 at 16:26
The link you provide is to a file with extension .rar. I'm not familiar with this file type (probably some kind of archive, right?). Could you post a link to a file with a somewhat more standard file type? – Mico Mar 1 '13 at 16:27
This is not really a minimal example since there are many commands in the .sty file that are not (yet) defined. You also can't have ........ in the .sty file. I also see no reason why this file needs to be compiled with any specific TeX engine. Note also that \bf commands are deprecated: you are encouraged to use either the \bfseries switch or the \textbf{<text>} commands in your definitions. – jon Mar 1 '13 at 20:18
up vote 6 down vote accepted

You can't convert this template to LuaLateX. The SLEN package loads the ctex package which checks for XeLaTeX and then loads the xeCJK package, which is only compatible with XeLaTeX. When it doesn't find XeLaTeX it loads CJK which is incompatible with LuaLaTeX which is why you get the error you get.

The following minimal document replicates the problem (compile with LuaLaTeX for the error; this particular minimal example will also not compile with XeLaTeX unless you have the simkai.ttf font installed.)

% !TEX TS-program = LuaLaTeX


!LuaTeX error (file /usr/local/texlive/2012/texmf-dist/fonts/sfd/ttf2pk/Unicode
.sfd): invalid token:
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.