[vecarrow]{svmono} 失敗

[vecarrow]{svmono} 失敗

svmano v5.6 的文檔來自http://www.springer.com/gp/authors-editors/book-authors-editors/resources-guidelines/rights-permissions-licensing/manuscript-preparation/5636refguide.pdf 中說:

當使用 \vec-command 時,vecarrow 用上面的箭頭描繪向量

然而,運行pdflatex

\documentclass[vecarrow]{svmono}% v5.6 from https://resource-cms.springernature.com/springer-cms/rest/v1/content/20566/data/v10
\begin{document}
\(C\vec{C}\)
\end{document}

結果是

編譯結果

沒有列印箭頭。任何錯誤修復,最好是透過\patchcmd或類似的方式修復,這樣我就不必破解svmono?我無法聯繫 Springer(我的電子郵件在 SMTP 層級被拒絕)。

日誌摘錄:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex 2018.8.21)  9 AUG 2019 21:12
LaTeX2e <2018-04-01> patch level 5
Document Class: svmono 2018/06/25 v5.6
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
File: color.cfg 2016/01/02 v1.6 sample color configuration
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
File: x11nam.def 2016/05/11 v2.12 Predefined colors according to Unix/X11 (UK)
Package: ntheorem 2011/08/15 1.33
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
[Loading MPS to PDF converter (version 2006.09.02).]
LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <8.5> not available
(Font)              size <8> substituted on input line 4.
LaTeX Font Warning: Size substitutions with differences
(Font)              up to 0.5pt have occurred.

交叉郵報: http://latex.org/forum/viewtopic.php?t=32738

答案1

該類(5.6 版)有

\DeclareOption{vecarrow}{\def\vec@style{arrow}}

進而

\def\fig@type{arrow}% temporarily abused
\AtBeginDocument{\ifx\vec@style\fig@type\else
\@ifundefined{vec@style}{%
 \def\vec#1{\ensuremath{\mathchoice
                     {\mbox{\boldmath$\displaystyle\mathbf{#1}$}}
                     {\mbox{\boldmath$\textstyle\mathbf{#1}$}}
                     {\mbox{\boldmath$\scriptstyle\mathbf{#1}$}}
                     {\mbox{\boldmath$\scriptscriptstyle\mathbf{#1}$}}}}%
}
{\def\vec#1{\ensuremath{\mathchoice
                     {\mbox{\boldmath$\displaystyle#1$}}
                     {\mbox{\boldmath$\textstyle#1$}}
                     {\mbox{\boldmath$\scriptstyle#1$}}
                     {\mbox{\boldmath$\scriptscriptstyle#1$}}}}%
}
\fi}

然而,同一個班級後來卻這麼做了

\def\fig@type{figure}

結果是,在開始文件時,測試會\ifx\vec@style\fig@type傳回 false。

5.5版本沒有,\AtBeginDocument測試也沒有失敗。

這顯然是一個錯誤。

您可以透過重新定義來修復它\vec

\documentclass{svmono}

\AtBeginDocument{%
  \let\vec\relax
  \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}%
}

\begin{document}

\(C\vec{C}\)

\end{document}

在此輸入影像描述

如果您使用amsmath,解決方法會有所不同。

\documentclass{svmono}
\usepackage{amsmath}

\AtBeginDocument{%
  \def\vec{\protect\mathaccentV{vec}17E}%
}

\begin{document}

\(C\vec{C}\)

\end{document}

解決newtxmath方法又不同了:

\documentclass{svmono}
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}

\AtBeginDocument{%
  \def\vec{\protect\mathaccentV{vec}2AE}%
}

\begin{document}

\(C\vec{C}\)

\end{document}

相關內容