![如何让 IEEE 会议模板在标题中显示会议名称?](https://linux22.com/image/420377/%E5%A6%82%E4%BD%95%E8%AE%A9%20IEEE%20%E4%BC%9A%E8%AE%AE%E6%A8%A1%E6%9D%BF%E5%9C%A8%E6%A0%87%E9%A2%98%E4%B8%AD%E6%98%BE%E7%A4%BA%E4%BC%9A%E8%AE%AE%E5%90%8D%E7%A7%B0%EF%BC%9F.png)
我想让会议标题如图所示显示,这(对于IEEEtran
课堂)可以使用 来完成\markboth{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}{}
。但是,当传递选项 时conference
,标题会完全消失
解决方案的一项要求是删除页码。
\documentclass[conference]{IEEEtran}
\usepackage{blindtext}
\usepackage{adjustbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\begin{document}
% ===== The Paper Title =====
\title{Statistical Analysis of Wind Power Using Weibull Distribution to Maximize Energy Yield}
% ===== Author names =====
\author{\IEEEauthorblockN{Al-Motasem I. Aldaoudeyeh}
\IEEEauthorblockA{
\textit{Tafila Technical University}
\\
\textit{Electrical Power and Mechatronics Engineering Department}
\\
Tafila, Jordan
\\
[email protected]
}
\and
\IEEEauthorblockN{Khaled Alzaareer}
\IEEEauthorblockA{
\textit{Electrical Engineering Department}
\\
\textit{Quebec University (ETS) }
\\
Montreal, Canada
\\
[email protected]
}
}
% ===== Conference Name =====
\markboth{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}{}
% ===== Title =====
\maketitle
% ===== The Abstract =====
\begin{abstract}
\blindtext
\end{abstract}
% ===== Keywords =====
\begin{IEEEkeywords}
power-speed characteristics, capacity factor, wind energy yield
\end{IEEEkeywords}
% ===== Copyright =====
\IEEEoverridecommandlockouts
\IEEEpubid{%
\adjustbox{raise=-2.5\baselineskip}{\makebox[\columnwidth]{\space\textbf{978-1-7281-6746-6/20/\$31.00~\copyright2020 IEEE} \hfill} \hspace{\columnsep}\makebox[\columnwidth]{~}}
}
\blinddocument
\end{document}
答案1
在会议模式下,某些命令被故意禁用,\markboth{}{}
这就是其中之一。因此,使用\IEEEoverridecommandlockouts
应该可以解决这个问题,但不幸的是,它不能(我不知道原因)。
现在我找到了解决方案这里。由于我看到有人建议在链接中添加完整的解决方案,因此我也在这里添加了解决方案。
在序言中,您可以添加以下代码片段来显示会议名称。
\usepackage[mathlines,switch]{lineno}
\makeatletter
\let\old@ps@IEEEtitlepagestyle\ps@IEEEtitlepagestyle
\def\confheader#1{%
% for the first page
\def\ps@IEEEtitlepagestyle{%
\old@ps@IEEEtitlepagestyle%
\def\@oddhead{\strut\hfill#1\hfill\strut}%
\def\@evenhead{\strut\hfill#1\hfill\strut}%
}%
\ps@headings%
}
\makeatother
\confheader{%
\parbox{20cm}{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}
}
以下是根据该问题得出的 MWE:
\documentclass[conference]{IEEEtran}
\usepackage{blindtext}
\usepackage{adjustbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\usepackage[mathlines,switch]{lineno}
\makeatletter
\let\old@ps@IEEEtitlepagestyle\ps@IEEEtitlepagestyle
\def\confheader#1{%
% for the first page
\def\ps@IEEEtitlepagestyle{%
\old@ps@IEEEtitlepagestyle%
\def\@oddhead{\strut\hfill#1\hfill\strut}%
\def\@evenhead{\strut\hfill#1\hfill\strut}%
}%
\ps@headings%
}
\makeatother
\confheader{%
\parbox{20cm}{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}
}
\begin{document}
% ===== The Paper Title =====
\title{Statistical Analysis of Wind Power Using Weibull Distribution to Maximize Energy Yield}
% ===== Author names =====
\author{\IEEEauthorblockN{Al-Motasem I. Aldaoudeyeh}
\IEEEauthorblockA{
\textit{Tafila Technical University}
\\
\textit{Electrical Power and Mechatronics Engineering Department}
\\
Tafila, Jordan
\\
[email protected]
}
\and
\IEEEauthorblockN{Khaled Alzaareer}
\IEEEauthorblockA{
\textit{Electrical Engineering Department}
\\
\textit{Quebec University (ETS) }
\\
Montreal, Canada
\\
[email protected]
}
}
% ===== Conference Name =====
\markboth{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}{}
% ===== Title =====
\maketitle
% ===== The Abstract =====
\begin{abstract}
\blindtext
\end{abstract}
% ===== Keywords =====
\begin{IEEEkeywords}
power-speed characteristics, capacity factor, wind energy yield
\end{IEEEkeywords}
% ===== Copyright =====
\IEEEoverridecommandlockouts
\IEEEpubid{%
\adjustbox{raise=-2.5\baselineskip}{\makebox[\columnwidth]{\space\textbf{978-1-7281-6746-6/20/\$31.00~\copyright2020 IEEE} \hfill} \hspace{\columnsep}\makebox[\columnwidth]{~}}
}
\blinddocument
\end{document}
请注意,可能需要安装“TeX Gyre Termes”字体才能成功运行此代码。