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.
\usepackage{ctex}
\usepackage{amsmath,amssymb,amsfonts,amsthm,fancyhdr}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{url}
\usepackage{ifthen}
\usepackage{times}
\usepackage{ifpdf}
\usepackage[total={130mm,203mm}, top=28.3mm, headheight=20pt, headsep=4truemm,bindingoffset=1.5cm]{geometry}
\renewcommand{\baselinestretch}{1.04}
\parindent 21pt
\makeatletter
\def\@maketitle{%
\newpage
\null
\vskip 0em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\makeatother
\usepackage{sectsty}
\sectionfont{\large}
\subsectionfont{\normalsize}
\newtheoremstyle{mythm}{2ex}{2ex}{}{}{\bfseries}{}{1em}{}
\theoremstyle{mythm}
\newtheorem{definition}{{\bf{Definition}}}
\newtheorem*{definition*}{{\bf{Definition}}}
\makeatletter
\renewenvironment{proof}[1][Proof]{\par
\pushQED{\hfill$\square$}%
\normalfont \topsep6\p@\@plus6\p@ \labelsep1em\relax
\trivlist
\item[\hskip\labelsep\bfseries #1]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
} \makeatother
\newcommand{\mypiia}{%
\ifthenelse{\myfirstpage < 10}{000\myfirstpage}{%
\ifthenelse{\myfirstpage < 100}{00\myfirstpage}{%
\ifthenelse{\myfirstpage < 1000}{0\myfirstpage}{%
\myfirstpage}%
}%
}%
}
\newcommand{\mypiib}{%
\ifthenelse{\mypages < 10}{0\mypages}{\mypages}
}
\newcommand{\mypii}{PII: 1674-3202(\mypubyear)-0% %
\myissnumber-\mypiia-\mypiib}
\newcommand{\myauthors}{%
\ifthenelse{\equal{\mysecondauthor}{null}
\and \equal{\mythirdauthor}{null}}{\myfirstauthor}{%
\ifthenelse{\equal{\mythirdauthor}{null}}
{\myfirstauthor, \mysecondauthor}{%
\myfirstauthor, \mysecondauthor, \mythirdauthor
}
}
}
\newcommand{\myoneauthors}{\author{\myfirstauthor\\
\myfirstaffiliation \\ \myfirstemail}}
\newcommand{\mytwoauthors}{\author{\myfirstauthor\\
\myfirstaffiliation \\ \myfirstemail
\and \mysecondauthor \\ \mysecondaffiliation \\
\small \mysecondemail}%
}%
\newcommand{\mythreeauthors}{\author{\myfirstauthor\\
\myfirstaffiliation \\ \myfirstemail
\and \mysecondauthor \\ \mysecondaffiliation \\
\mysecondemail
\and \mythirdauthor \\ \mythirdaffiliation \\
\mythirdemail}%
}%
\newcommand{\authors}{%
\ifthenelse{\equal{\mysecondauthor}{null}}{\myoneauthors}{%
\ifthenelse{\equal{\mythirdauthor}{null}}{\mytwoauthors}{%
\mythreeauthors
}
}
}
\newcommand{\mylhead}{Studies in Logic, Vol.~\myvolnumber,
No.~\myissnumber~(\mypubyear):~\myfirstpage--\mylastpage \\\mypii}
\newcommand{\myfancyheadCO}{\myauthors~/ \myrunningtitle}
\newcommand{\myfancyheadCE}{Studies in Logic, Vol.~\myvolnumber,
No.~\myissnumber~(\mypubyear)}
\newcommand{\mytitlepage}{%
\setcounter{page}{\myfirstpage}
\fancypagestyle{plain}{\fancyhf{}
\lhead{\zihao{6}\mylhead}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
}
}
\pagestyle{fancy} \fancyhf{}
\fancyhead[CE]{\zihao{6}\myfancyheadCE}
\fancyhead[LE,RO]{\zihao{-5}\thepage}
\fancyhead[CO]{\zihao{6}\myfancyheadCO}
\fancyhead[LO]{} \fancyhead[RE]{} \lfoot{} \cfoot{} \rfoot{}
\renewcommand{\headrulewidth}{0.4pt}
\title{%
\ifthenelse{\equal{\mythanks}{null}}{\mytitle}{%
\mytitle\thanks{\mythanks}}
}
\newcommand{\originaltitlepage}{%
\mytitlepage
\authors
\date{}
\maketitle
\vspace{-4ex}
\begin{center}
\begin{minipage}[c]{12cm}
\zihao{-5} \noindent\textbf{Abstract.}\quad\myabstract
\end{minipage}
\end{center}
}
\newcommand{\reviewtitlepage}{%
\mytitlepage
\author{}
\date{}
\maketitle
\vspace*{-8ex}
\zihao{5}
\noindent\reviewbooktitle
\ifthenelse{\equal{\reviewbooktitleEN}{null}}{}{\\ \reviewbooktitleEN}
\vspace*{2ex}
}
\newcommand{\reporttitlepage}{%
\mytitlepage
\author{}
\date{}
\maketitle
\vspace*{-8ex}
}
\newcommand{\printtitlepage}{%
\ifthenelse{\equal{\myarticletype}{original}}{\originaltitlepage}{%
\ifthenelse{\equal{\myarticletype}{bookreview}}{\reviewtitlepage}{%
\reporttitlepage
}
}
}
\newcommand{\myoneauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\
\myfirstaffiliationCN \\ \myfirstemail}
\newcommand{\mytwoauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\
\myfirstaffiliationCN \\ \myfirstemail \\
{\kaishu \large{\mysecondauthorCN}} \\ \mysecondaffiliationCN \\
\mysecondemail}
\newcommand{\mythreeauthorsCN}{{\kaishu \large{\myfirstauthorCN}}\\
\myfirstaffiliationCN \\ \myfirstemail \\
{\kaishu \large{\mysecondauthorCN}} \\ \mysecondaffiliationCN \\
\mysecondemail \\
{\kaishu \large{\mythirdauthorCN}} \\ \mythirdaffiliationCN \\
\mythirdemail}
\newcommand{\printtitlepageCN}{%
\vspace*{0.5mm}
\begin{center}
\renewcommand{\baselinestretch}{1.3}
\zihao{3}\mytitleCN\\[4mm]
\ifthenelse{\equal{\mysecondauthorCN}{null}}{\myoneauthorsCN}{
\ifthenelse{\equal{\mythirdauthorCN}{null}}{\mytwoauthorsCN}{
\mythreeauthorsCN
}
}
\\[4mm]
\end{center}
\renewcommand{\baselinestretch}{1.3}
\zihao{5} \hspace*{\parindent} \myabstractCN
}
\usepackage{enumitem}
\setenumerate{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt}
\setitemize{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt}
\setdescription{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt}
I was trying to compile this article via LuaLaTeX
\documentclass[b5paper,11pt,onecolumn,twoside,UTF8]{article}
\usepackage{SLEN}
\begin{document}
Hello World!
\end{document}
But got a fatal crash:
This is LuaTeX, Version beta-0.70.2-2012060719 (MiKTeX 2.9 64-bit)
...
(D:/CTEX/MiKTeX/tex/generic/oberdiek/ifpdf.sty){C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}{D:/CTEX/MiKTeX/fonts/sfd/ttf2pk/UGBK.sfd}{D:/CTEX/MiKTeX/fonts/sfd/ttf2pk/Unicode.sfd
!LuaTeX error (file D:/CTEX/MiKTeX/fonts/sfd/ttf2pk/Unicode.sfd): invalid range
:
_0xFFFF
==> 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.
polyglossiawith LuaLaTeX – egreg Mar 01 '13 at 16:18.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 01 '13 at 16:27fitch,mathhero) and many that are clearly unrelated to the problem. It's unknown what you usedsfontfor (a candidate for being transformed in a "non math alphabet"). Too generic = not answerable. – egreg Mar 01 '13 at 16:58slen.styandslen.texwith the inputs you've provided, I get an error message when trying to compile the.texfile under XeLaTeX as well. Specifically:! LaTeX Error: Missing \begin{document}right after thesectstypackage is loaded. Thus, the compilation problem doesn't seem to be limited to LuaLaTeX. – Mico Mar 01 '13 at 17:33.styfile that are not (yet) defined. You also can't have........in the.styfile. I also see no reason why this file needs to be compiled with any specificTeXengine. Note also that\bfcommands are deprecated: you are encouraged to use either the\bfseriesswitch or the\textbf{<text>}commands in your definitions. – jon Mar 01 '13 at 20:18ctexpackage 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. – Alan Munn Mar 02 '13 at 03:47\newtheorem{definition}{{\bf{Definition}}}and\newtheorem*{definition*}{{\bf{Definition}}}. Change the\bfto\textbf. – jon Mar 02 '13 at 19:38