如何让 IEEE 会议模板在标题中显示会议名称?

如何让 IEEE 会议模板在标题中显示会议名称?

我想让会议标题如图所示显示,这(对于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}

输出 pdf 的部分截图 输出图像

请注意,可能需要安装“TeX Gyre Termes”字体才能成功运行此代码。

相关内容