2

I'm just gonna add a header to my ieeetran document based on Ruben's solution.

But no header is added after compilation.

Here is the MWE:

%% bare_conf.tex
%% V1.4b
%% 2015/08/26
\documentclass[conference]{IEEEtran}

\makeatletter

%%%%%%%%%%%for copyright notice
\def\ps@IEEEtitlepagestyle{%
    \def\@oddfoot{\mycopyrightnotice}%
    \def\@evenfoot{}%
}
\def\mycopyrightnotice{%
    {\footnotesize  978-1-4799-6773-5/14/\$31.00 \textcopyright2017 Crown\hfill}
    \gdef\mycopyrightnotice{}
}
%%%%%%%%%%%

\makeatletter
\newcommand{\algrule}[1][.2pt]{\par\vskip.5\baselineskip\hrule height #1\par\vskip.5\baselineskip}
\makeatother

\makeatletter
\newcommand*\titleheader[1]{\gdef\@titleheader{#1}}
\AtBeginDocument{%
    \let\st@red@title\@title
    \def\@title{%
        \bgroup\normalfont\large\centering\@titleheader\par\egroup
        \vskip1.5em\st@red@title}
}
\makeatother

\begin{document}

\title{X}
\titleheader{2017 IEEE 999999th International Something Conference}
\author{\IEEEauthorblockN{{X}
\IEEEauthorblockA{H}\\
J\\
I\\
Email: a@b.c}
}

\maketitle

\begin{abstract}

\end{abstract}

\IEEEpeerreviewmaketitle

\end{document}
4

The usual definition of \title is to define \@title, so even if there is the \AtBeginDocument{...} hook with the Ruben's nice idea, it will fail, if \title is used after \begin{document}, since \title overrules \@title again.

Solution: Use \title and \titleheader before \begin{document}.

%% bare_conf.tex
%% V1.4b
%% 2015/08/26
\documentclass[conference]{IEEEtran}

\makeatletter

%%%%%%%%%%%for copyright notice
\def\ps@IEEEtitlepagestyle{%
    \def\@oddfoot{\mycopyrightnotice}%
    \def\@evenfoot{}%
}
\def\mycopyrightnotice{%
    {\footnotesize  978-1-4799-6773-5/14/\$31.00 \textcopyright2017 Crown\hfill}
    \gdef\mycopyrightnotice{}
}
%%%%%%%%%%%

\makeatletter
\newcommand{\algrule}[1][.2pt]{\par\vskip.5\baselineskip\hrule height #1\par\vskip.5\baselineskip}
\makeatother

\makeatletter
\newcommand*\titleheader[1]{\gdef\@titleheader{#1}}
\AtBeginDocument{%
  \let\st@red@title\@title%
  \def\@title{%
    \bgroup\normalfont\large\centering\@titleheader\par\egroup
    \vskip1.5em\st@red@title}
}
\makeatother

\title{X}

\titleheader{2017 IEEE 999999th International Something Conference}

\begin{document}


%\makeatletter
%\meaning\@title
%\makeatother

\author{\IEEEauthorblockN{{X}
\IEEEauthorblockA{H}\\
J\\
I\\
Email: a@b.c}}


\maketitle

\begin{abstract}

\end{abstract}

\IEEEpeerreviewmaketitle

\end{document}
  • Thanks. There is a \centering in the titleheader command. I'd just removed it to get rid of centered title (i.e., align the header from left-hand side), but nothing is changed. How can I do that? – Roboticist Jun 18 '17 at 0:15
  • @Roboticist: The \centering issue has nothing to do with your question. – user31729 Jun 18 '17 at 0:19
  • You mean I should open a new thread for the left-alignment of the header? – Roboticist Jun 18 '17 at 0:21
  • @Roboticist: Yes. Usually, the title page is set in a \begin{center}...\end{center} environment. I did not check whether this is true for IEEEtran.cls as well – user31729 Jun 18 '17 at 0:22

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.