
私はこの問題に対する MWE を見つけるために一生懸命働き、プリアンブルと SAE クラス ファイルからほぼすべてを削除しましたが、siunitx パッケージは times フォントではうまく動作しない (Helvetica では問題なく動作する) ことが判明しました。
まず、クラス ファイルの MWE から始めます。ここでは、times フォントを SAE ガイドラインとそのテンプレート ファイルに準拠するように強制しています。
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{saeRyan}[2016/02/23 SAE Technical paper format^^J]
% Option for the "Times New Roman" font
\DeclareOption{times}{%
\renewcommand{\familydefault}{ptm}%
\typeout{^^JSetting document font to Times^^J}%
}
% Option for letter size paper (U.S.)
\DeclareOption{letterpaper}{%
% Define the margins for letter size paper (0.5" margins all the way around) using the geometry package.
\PassOptionsToPackage{letterpaper,nohead,left=.5in,top=.5in,right=.5in,textheight=10in}{geometry}%
\typeout{^^JPaper size: Letter^^J}%
\AtBeginDocument{ \columnsep .5in }
}
\DeclareOption{pdftex}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}
}
\DeclareOption{nonumber}{%
\pagestyle{empty}%
}
% This handles any options that are not understood by the class.
\DeclareOption*{\typeout{^^JOption [\CurrentOption] not supported by this style.^^J}}
% Default Options
\ExecuteOptions{times,letter,9pt}
\ProcessOptions
% The extarticle class allows for 9 pt font as the normalsize font.
\LoadClass[twocolumn,9pt]{extarticle}
ここで、この最小クラス ファイルの使用時に発生する問題の MWE を示します。
\documentclass[letterpaper]{saeRyan}
%\usepackage{lmodern}
\usepackage[detect-all]{siunitx}
\usepackage{enumitem,booktabs,cfr-lm}
\usepackage{tabularx}
\usepackage[referable]{threeparttablex}
\renewlist{tablenotes}{enumerate}{1}
% This package is for convenience in making notes during the revision process.
%\usepackage[colorinlistoftodos]{todonotes}
\begin{document}
\begin{table}[h]
\footnotesize
\centering
\begin{tabular}{ll}
\toprule
times vs. helvetica using siunitx: & \SI{110}{\micro\meter} 110 micrometers (correct font)\\
\bottomrule
\end{tabular}
\caption{Font Test}\label{tab:test}
\end{table}
\end{document}
ここで何が問題なのかがわかります... siunitx に全検出スイッチがあるにもかかわらず、siunitx の単位は helvetica ですが、ドキュメントの残りの部分は times です。これにより、ドキュメント全体で奇妙な単位が表示されます (表だけではありません)。明らかな問題に気づいた人はいますか? クラス ファイルの記述についてはあまり詳しくありません。作業しながら理解しようとしているだけです。
答え1
これは Latin Modern です。デフォルトのフォントとして、Latin Modern Roman、Sans、Mono を使用しています。具体的には、セリフ体はプロポーショナルなぶら下がり数字の LM Roman、サンセリフ体はプロポーショナルなぶら下がり数字の LM Sans、タイプライターはおそらく可変幅の LM タイプライターで、プロポーショナルなぶら下がり数字です。
何をするかわからないものは絶対にロードしないでください。
セリフを単に設定するだけではptm
良い結果は得られません。サンセリフ、モノ、そしてすべての数式はComputer Modernになります。おそらく、次のようなものが欲しいでしょう。するNimbusRomanNo9L を使用します:
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
さらに、クラス ファイルには不要なスペースがいくつか含まれており、オプションの処理が混乱しています。クラスでは、9pt
または のいずれもletter
有効なオプションとして宣言されていません。
おそらく、次のようなものがほしいと思います:
\begin{filecontents}{saeRyan.cls}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{saeRyan}[2016/02/23 SAE Technical paper format]
\newif\iftimesfont\timesfontfalse
% Option for the "Times New Roman" font
\DeclareOption{times}{%
\timesfonttrue
\typeout{Setting document font to Times, with complementary sans, typewriter and mathematics fonts.}%
}
% Option for letter size paper (U.S.)
\DeclareOption{letterpaper}{%
% Define the margins for letter size paper (0.5" margins all the way around) using the geometry package.
\PassOptionsToPackage{letterpaper,nohead,left=.5in,top=.5in,right=.5in,textheight=10in}{geometry}%
\typeout{Paper size: Letter}%
\AtBeginDocument{\columnsep .5in}%
}
\DeclareOption{nonumber}{%
\pagestyle{empty}%
}
% This handles any options that are not understood by the class.
\DeclareOption*{\typeout{Option [\CurrentOption] not supported by this style.}}
% Default Options
\ExecuteOptions{times,letterpaper}
\ProcessOptions
% The extarticle class allows for 9 pt font as the normalsize font.
\LoadClass[twocolumn,9pt]{extarticle}
\iftimesfont
\RequirePackage{mathptmx}
\RequirePackage[scaled=.90]{helvet}
\RequirePackage{courier}
\fi
\endinput
\end{filecontents}
\documentclass[letterpaper]{saeRyan}
\usepackage[detect-all]{siunitx}
\usepackage{enumitem,booktabs}
\usepackage{tabularx}
\usepackage[referable]{threeparttablex}
\renewlist{tablenotes}{enumerate}{1}
\begin{document}
\begin{table}[h]
\footnotesize
\centering
\begin{tabular}{ll}
\toprule
times vs.\ helvetica using siunitx: & \SI{110}{\micro\meter} 110 micrometers (correct font)\\
\bottomrule
\end{tabular}
\caption{Font Test}\label{tab:test}
\end{table}
\end{document}