Biometrika 저널 스타일 파일이 TeXLive-2020과 맞지 않습니다.

Biometrika 저널 스타일 파일이 TeXLive-2020과 맞지 않습니다.

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파일에서는 (적어도) 세 가지 잘못된 오류가 발생합니다.

  1. 이 명령은 25년 동안 더 이상 사용되지 않았음에도 불구하고 모든 면에서 사용됩니다 \rm(출시 날짜에 따르면 14년이지만 어쨌든 오랜 시간이 걸립니다).

  2. \document그것은 더 나쁜 것을 재정의합니다 .

  3. \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

(TeX Live 2007에서 확인 latex.ltx) 그렇게 할 이유가 전혀 없습니다.

어떻게 고치나요?

다음은 무작동으로 만드는 적절한 서문입니다 . 따라서 문서에서 명시적으로 나타나는 모든 항목은 올바른 명령( 수학 모드에서) \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을 사용하려고 하는 것 같습니다.

관련 정보