
Trabalhei muito para encontrar um MWE para esse problema, eliminando quase tudo do meu preâmbulo e do meu arquivo de classe SAE até descobrir que parece que o pacote siunitx não funciona bem com a fonte times (funciona bem com Helvetica).
Começarei com um MWE do meu arquivo de classe, no qual forcei a fonte times a cumprir as diretrizes da SAE e seus arquivos de modelo:
\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}
Agora, aqui está um MWE do problema que estou tendo ao usar este arquivo de classe mínimo:
\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}
Você pode ver qual é o problema aqui... apesar do siunitx ter a opção detectar tudo, a unidade do siunitx é helvética enquanto o resto do documento é times. Isso cria algumas unidades de aparência estranha em todo o documento (não apenas nas tabelas). Alguém vê um problema óbvio? Eu realmente não sei muito sobre como escrever arquivos de classe, só estou tentando pegar as coisas à medida que prossigo.
Responder1
Isso é latim moderno. Você está usando Latin Modern Roman, Sans e Mono como fontes padrão. Mais especificamente, sua serifa é LM Roman com figuras proporcionais e pendentes; seu sans é LM Sans com figuras proporcionais e pendentes; e sua máquina de escrever é provavelmente uma máquina de escrever LM de largura variável com figuras proporcionais e pendentes.
Nunca carregue aquilo que você não sabe o que faz.
Simplesmente definir a serifa como ptm
não obterá bons resultados. Seu sans, mono e toda a sua matemática estarão no Computer Modern. Provavelmente, você quer algo assim quefazuse NimbusRomanNo9L:
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
Além disso, seu arquivo de classe contém vários espaços falsos e o tratamento de opções é confuso. Sua classe não declara nenhuma 9pt
das letter
opções válidas.
Provavelmente você quer algo mais parecido com isto:
\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}