Latex使用了期刊templates但是字体样式不对
一、字体样式存在出入
这是期刊上发表论文的字体样式:
我用了该期刊的模板:
\documentclass{IEEEtaes}
但是我的字体样式明显不对:
二、原因分析
我猜测原因可能有两个,一个是包引起的,这是我的.tex文件中用的包:
\documentclass{IEEEtaes}
\usepackage{amsmath,amsfonts}
\usepackage{color,array,amsthm}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\usepackage{textcomp}
\usepackage{stfloats}
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{cite}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{balance}%my add
%\usepackage[hidelinks]{hyperref}
\usepackage{orcidlink}
%\usepackage{orcid}
\usepackage{cancel}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{academicons}
\usepackage{xcolor} % 让 ORCID 图标带绿色
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\textcolor{orcidlogocol}{\aiOrcid}}}\captionsetup[subfloat]{font={rm}, labelfont={rm}}
%\usepackage{subcaption}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}\jvol{XX}
\jnum{XX}
\jmonth{XXXXX}
\paper{1234567}
\pubyear{2022}
\doiinfo{TAES.2022.Doi Number}\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\setcounter{page}{1}
另一个是编译器的问题:
所以,我的另一篇博客专门研究了下Latex,PDFLatex,XeLatex和LualaLatex的不同:
TexStudio中的Latex,PDFLatex,XeLatex和LualaLatex的区别-CSDN博客
三、usepackage优化
官方模板IEEE_TAES_regular_template_latex.tex运行结果的字体样式和我论文的字体样式一样:
IEEE_TAES_regular_template_latex.tex
\documentclass{IEEEtaes}
\usepackage{color,array,amsthm}
\usepackage{graphicx}\jvol{XX}
\jnum{XX}
\jmonth{XXXXX}
\paper{1234567}
\pubyear{2022}
\doiinfo{TAES.2022.Doi Number}\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\setcounter{page}{1}
%% \setcounter{secnumdepth}{0}\begin{document}
\title{IEEE Transactions on Aerospace and Electronic Systems}
所以,问题并不在package上
四、编译器排查
换了TexWorks editor后,字体样式确实变了:


但很明显还不是我想要的字体样式。
五、Warning分析
我注意到Warning的内容好像是和字体样式有关的:
LaTeX Warning: You have requested document class `IEEEtaes',
but the document class provides `IEEEphot'.
Document Class: IEEEphot 2009/06/23 V1.2
-- See the "IEEEphot_HOWTO" manual for usage information.
LaTeX Font Warning: Font shape `TU/ptm/m/n' undefined
(Font) using `TU/lmr/m/n' instead on input line 384.
luaotfload | db : Font names database not found, generating new one.
luaotfload | db : This can take several minutes; please be patient.
-- Using 8.25in x 10.75in (IEEE Photonics PaperSize) paper.
-- Using DVI output.
-- This is a 10 point document.
5.1 provides `IEEEphot'警告
LaTeX Warning: You have requested document class `IEEEtaes',
but the document class provides `IEEEphot'.
IEEE PHOTONICS也是一本期刊。
打开IEEEtaes.cls:
我觉得warning的IEEEphot不是指IEEEtaes.cls的IEEEphot,感觉IEEEtaes.cls
文件压根不在 LaTeX 的搜索路径下。
在我的另一篇博客解决了这个Warning:
You have requested document class `IEEEtaes‘, but the document class provides `IEEEphot‘.-CSDN博客
很可惜还是报错。
5.2 TU/ptm/m/n警告
这个警告用PDFLaTeX进行编译就会消失,在我的另一篇博客有专门讲解:
Font shape `TU/ptm/m/n‘ undefined(Font) using `TU/lmr/m/n‘ instead-CSDN博客
六、各部分字体样式对比
6.1 大标题
现在已知标题的字体样式是不一样的
6.2 正文


可以看出正文的字体样式还是一样的
6.3 摘要


编译的摘要前面有个Abstract
写一个新的命令:
\renewcommand{\abstractname}{}
\begin{abstractname}It is a common requirement for over-the-horizon radar to detect the air and sea targets in the same direction simultaneously. A long observation time is needed to detect them.
\end{abstractname}
这样编译出来的摘要前面就没有Abstract——了。
还得单独加粗下:
不行,字体大小也不对。
6.4 章节标题


后来又发现IEEE_TAES_regular_template_latex.tex模板生成的PDF章节标题是没问题的,说明章节标题的问题是package导致的。
\documentclass{IEEEtaes}
\usepackage{amsmath,amsfonts}
\usepackage{color,array,amsthm}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\usepackage{textcomp}
\usepackage{stfloats}
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{cite}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{balance}%my add
\usepackage{orcidlink}
\usepackage{cancel}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{academicons}
\usepackage{xcolor} % 让 ORCID 图标带绿色
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\textcolor{orcidlogocol}{\aiOrcid}}}\captionsetup[subfloat]{font={rm}, labelfont={rm}}
其中ams开头的package是American Mathematical Society(美国数学学会)发布并维护的。
服了,packages都删了,这个Introduction还是没有变成INTRODUCTION!
服了服了,原来是手动大写的。
七、Overleaf尝试
本来想借助overleaf解决问题,没想到引出更多的问题......
核心原因Overleaf不给我编译全部论文:
我拿一小段先试试,把论文大量文字注释了:
Overleaf的字体样式也不对......
八、bibliographystyle
\bibliographystyle{IEEEtran}
\bibliography{zzc-multisignals}
文献引用用IEEEtran就行,没有IEEE TAES特殊的文献引用格式。