
biometrika.zip内のstyleguide.texをコンパイルできません(https://academic.oup.com/biomet/pages/General_Instructions)。
ここに同じエラー メッセージが表示される MWE がありますが、重要な部分を無駄にしていないかどうかはまだわかりません。
\documentclass{article}
\RequirePackage[thmmarks]{ntheorem}
\makeatletter
\def\arabic#1{{\rm\expandafter\@arabic\csname c@#1\endcsname}}
\theoremnumbering{arabic}
\newtheorem{definition}{Definition}
\makeatother
\begin{document}
\begin{definition}
This is a definition.
\end{definition}
\end{document}
出力は次のとおりですpdflatex
:
% pdflatex styleguide
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./styleguide.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo)) (./ntheorem.sty
Style `ntheorem', Version 1.24 <2004/09/20>
) (/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
) (./styleguide.aux)
! Use of \@item doesn't match its definition.
\update@series@target@value #1->\def \reserved@a {
#1}\ifx \target@meta@famil...
l.13 T
his is a definition.
? q
OK, entering \batchmode
答え1
クラスbiometrika
ファイルには (少なくとも) 3 つの重大なエラーがあります。
\rm
このコマンドは 25 年間 (リリース日によると 14 年間ですが、いずれにしても長い期間です) 非推奨になっているにもかかわらず、あらゆる場所で使用されています。を再定義します
\document
が、これはさらに悪いことです。\def\arabic#1{{\rm\expandafter\@arabic\csname c@#1\endcsname}}
公開サイトでコメントすることはできません。
実際、エラー3はLaTeXプログラマなら誰でも避けるべきエラーです。2については、このクラスの目的は単に削除することのようです。
\ifx\normalsfcodes\@empty
\ifnum\sfcode`\.=\@m
\let\normalsfcodes\frenchspacing
\else
\let\normalsfcodes\nonfrenchspacing
\fi
\fi
\ifx\document@default@language\m@ne
\chardef\document@default@language\language
\fi
( latex.ltx
TeX Live 2007 で確認済み) なので、これを実行する理由はまったくありません。
どうすれば修正できますか?
ここでは、何も実行されない適切な前文を示します。そのため、ドキュメント内の明示的な出現箇所はすべて、正しいコマンド (数式モードの場合)\rm
に置き換える必要があります。\mathrm
%%% fix the plain theorem style to have numbers upright
\RequirePackage[thmmarks]{ntheorem}
\makeatletter
\renewtheoremstyle{plain}
{\item[\hskip\labelsep \theorem@headerfont ##1\ \textup{##2}\theorem@separator]}
{\item[\hskip\labelsep \theorem@headerfont ##1\ \textup{##2}\ (##3)\theorem@separator]}
\makeatother
%%% save \document and \arabic to be reinstated after loading the class
\let\latexdocument\document
\let\latexarabic\arabic
%%% load the class (use the option you need)
\documentclass[manuscript]{biometrika}
%\documentclass[lineno]{biometrika}
%%% reinstate the original \document and \arabic
\let\document\latexdocument
\let\arabic\latexarabic
%%% make \rm into a no-op
\def\rm{}
次に、ドキュメントとドキュメント本体に必要なその他のパッケージに進みます。
このクラスの著者は知っているについて\renewtheoremstyle
!
答え2
ご了承ください
\documentclass{article}
\RequirePackage[thmmarks]{ntheorem}
\newtheorem{definition}{Definition}
\begin{document}
\begin{definition}
This is a definition.
\end{definition}
\end{document}
問題は発生しません。ntheorem を非標準的な方法で使用しようとしているようです。