为什么 TeXlive 2017 无法编译 MiKTeX 2.9 可以正确编译的内容?

为什么 TeXlive 2017 无法编译 MiKTeX 2.9 可以正确编译的内容?

我有一篇使用spiemanclass 的论文,即将上传到期刊的网页。然后,他们的服务器会编译文件以生成合并的 PDF。

考虑以下示例(我故意复制整个序言,因为问题可能与之相关):

\RequirePackage{fix-cm}
\RequirePackage{amsmath}

\PassOptionsToPackage{table}{xcolor}
\PassOptionsToPackage{hang,flushmargin}{footmisc}

\documentclass[12pt]{spieman} 

\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{tocloft}

\let\proof\relax
\let\endproof\relax
\let\openbox\relax

\usepackage[right=2.5cm]{geometry}

%\usepackage[utf8]{inputenc}

\usepackage[version=4]{mhchem}
\usepackage{siunitx}
\usepackage{longtable,tabularx}
\setlength\LTleft{0pt} 

\usepackage{amsthm}
\usepackage[table]{xcolor} 
\usepackage[hang,flushmargin]{footmisc}
\usepackage{mathtools}
\usepackage{newtxtext,newtxmath} 
\usepackage{relsize}
\usepackage[overload]{empheq}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{bm}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{fnpct}
\usepackage{lineno}
\linenumbers
\usepackage{tabstackengine}
\setstacktabbedgap{1.5ex}
\setstackgap{L}{1.2\normalbaselineskip}
\def\stackalignment{c}
\renewcommand{\arraystretch}{1.9}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\renewcommand{\qedsymbol}{}
\DeclareMathOperator*{\argA}{arg}

\makeatletter
\def\thmheadbrackets#1#2#3{%
    \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
    \thmnote{ {\the\thm@notefont[#3]}}}
\makeatother

\newtheoremstyle{brakets}% Name
{}% space above
{}% space below
{\itshape}% body font
{}% indent
{\bfseries}% head font
{.}% punctuation after head
{ }% space after head (has to be space or dimension!)
{\thmheadbrackets{#1}{#2}{#3}}% head spec

\newtheoremstyle{defbrakets}% Name
{}% space above
{}% space below
{\normalfont}% body font
{}% indent
{\bfseries}% head font
{.}% punctuation after head
{ }% space after head (has to be space or dimension!)
{\thmheadbrackets{#1}{#2}{#3}}% head spec

\newtheoremstyle{defproblem}% Name
{}% space above
{}% space below
{\normalfont}% body font
{}% indent
{\bfseries}% head font
{.}% punctuation after head
{ }% space after head (has to be space or dimension!)
{\thmheadbrackets{#1}{#2}{#3}}% head spec

\theoremstyle{brakets}

\newtheorem{thm}{Theorem}

\newtheorem{lem}[thm]{Lemma}
\theoremstyle{definition}
\theoremstyle{defbrakets}
\newtheorem{defn}{Definition}
\newtheorem{rem}{Remark}
\newtheorem{plm}{Problem}

\mdfdefinestyle{mystyle}{
    hidealllines=true,
    leftline=true,
    innerleftmargin=10pt,
    innerrightmargin=10pt,
    innertopmargin=0pt,
}
\surroundwithmdframed[style=mystyle]{proof}

\DeclareFontFamily{OT1}{pzc}{}
\DeclareFontShape{OT1}{pzc}{m}{it}{<-> s * [1.10] pzcmi7t}{}
\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}

\newcommand{\z}[1]{\textcolor{red}{#1}}

\makeatletter
\newcommand{\algrule}[1][.2pt]{\par\vskip.5\baselineskip\hrule height #1\par\vskip.5\baselineskip}
\makeatother

\title{This is some Title\footnote{This work was financially supported by grant number 111 and the MMM agreement number eee.}}

\author[a,*]{John Ryan Doe}
\author[b]{Brian Edward Henderson}
\affil[a]{School of Engineering, University of Sussex, UK}
\affil[b]{School of Cybernetics, Technical University of Munich, Germany}

\renewcommand{\cftdotsep}{\cftnodots}
\cftpagenumbersoff{figure}
\cftpagenumbersoff{table} 

\begin{document} 

\maketitle

\begin{abstract}
...
\end{abstract}

\keywords{a}

{\noindent \footnotesize\textbf{*}Corresponding author: \linkable{[email protected]}}

\end{document}

当我使用 MiKTeX 2.9(特别是 XeLaTeX)在 Windows 10 上编译上述代码时,一切都很好:

在此处输入图片描述

但是当我把代码上传到期刊的网页上时,编译结果有问题,比如第一页有:

在此处输入图片描述

另一条则写道:

在此处输入图片描述

日志文件显示服务器使用 Texlive 2017,但我不明白为什么日志档案返回这 3 个错误,而 MikTeX 对此却没有意见。

! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H   for immediate help.
 ...                                              

l.121 \author[a
               ,*]{x}
You're in trouble here.  Try typing    to proceed.
If that doesn't work, type  X   to quit.
! Undefined control sequence.
l.123 \affil
            [a]{X}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.124 \affil
            [b]{Y}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

这里有什么问题?

相关内容