2

I want to get the title of a conference to appear as shown in the figure which (for IEEEtran class) might be done using \markboth{\textbf{\textit{2020 IEEE PES/IAS PowerAfrica}}}{}. However, when passing the option conference, the headers entirely disappear

enter image description here

One requirement for the solution is to remove page numbering.

\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
            \\
            almotasem.aldaoudeye@ndsu.edu
            }
        \and
        \IEEEauthorblockN{Khaled Alzaareer}
        \IEEEauthorblockA{
            \textit{Electrical Engineering Department}
            \\
            \textit{Quebec University (ETS) }
            \\
            Montreal, Canada 
            \\
            kaledz87@yahoo.com
            }
        }
    
    % ===== 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}
3

In conference mode, some of the commands are intentionally disabled and \markboth{}{} is one of those. So, using \IEEEoverridecommandlockouts should have worked for it but unfortunately, it doesn't (I don't know the reason).

Now, I have found a solution here. As I have seen people advise to add the full solution along with the link, I am also adding the solution here.

In the preamble, you can add the following code snippet to show the conference name.

\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}}}
}

Here is an MWE based on the question:

\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
            \\
            almotasem.aldaoudeye@ndsu.edu
        }
        \and
        \IEEEauthorblockN{Khaled Alzaareer}
        \IEEEauthorblockA{
            \textit{Electrical Engineering Department}
            \\
            \textit{Quebec University (ETS) }
            \\
            Montreal, Canada 
            \\
            kaledz87@yahoo.com
        }
    }
    
    % ===== 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}

Screenshot of a portion of the output pdf OutputImage

Please note that one may need to install the 'TeX Gyre Termes' font to successfully run this code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.