Re: RequirePackageでバージョンが合わないときにはエラー処理

名前: .
日時: 2006-04-13 17:53:37
IPアドレス: 59.134.169.*

>>42503 LaTeX の内部処理を書き換えるしか手はないでしょう. # “未定義オプションに関するエラー処理”と“バージョンの不整合に関する警告” # の順序を変更すればよい,ということです. \documentclass{article} \makeatletter \def\@onefilewithoptions#1[#2][#3]#4{% \@pushfilename \xdef\@currname{#1}% \global\let\@currext#4% \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty \let\CurrentOption\@empty \@reset@ptions \makeatletter \def\reserved@a{% \@ifl@aded\@currext{#1}% {\@if@ptions\@currext{#1}{#2}{}% {\@latex@error {Option clash for \@cls@pkg\space #1}% {The package #1 has already been loaded with options:\MessageBreak \space\space[\@ptionlist{#1.\@currext}]\MessageBreak There has now been an attempt to load it with options\MessageBreak \space\space[#2]\MessageBreak Adding the global options:\MessageBreak \space\space \@ptionlist{#1.\@currext},#2\MessageBreak to your \noexpand\documentclass declaration may fix this.% \MessageBreak Try typing \space <return> \space to proceed.}}}% {\@pass@ptions\@currext{#2}{#1}% \global\expandafter \let\csname ver@\@currname.\@currext\endcsname\@empty \InputIfFileExists {\@currname.\@currext}% {}% {\@missingfileerror\@currname\@currext}% %%% 2 箇所の (A) で挟まれた部分のコードは,オリジナルでは (B) の位置に存在. %%% (A) \@ifl@ter\@currext{#1}{#3}{}% {\@latex@warning@no@line {You have requested,\on@line, version\MessageBreak `#3' of \@cls@pkg\space #1,\MessageBreak but only version\MessageBreak `\csname ver@#1.\@currext\endcsname'\MessageBreak is available}}% %%% (A) \let\@unprocessedoptions\@@unprocessedoptions \csname\@currname.\@currext-h@@k\endcsname \expandafter\let\csname\@currname.\@currext-h@@k\endcsname \@undefined \@unprocessedoptions}% %%% (B) \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi \@popfilename \@reset@ptions}% \reserved@a} \makeatother \RequirePackage[superscript]{cite}[2003/11/04 \space v 4.01] \begin{document} sample \end{document}

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます。適宜改行を入れてください)