在 IEEEtran 类的标题中放置双行会议名称

在 IEEEtran 类的标题中放置双行会议名称

我一直在尝试在 IEEEtran 类的标题中添加会议名称。我一直在关注格式。它适用于单行会议名称。当会议名称长度为 2 行时,第二行变为右对齐。我想让它左对齐。

MWE 如下所示

\documentclass[conference]{IEEEtran}

\usepackage[T1] {fontenc}
\usepackage{textcomp}
\usepackage{lipsum}
\usepackage{eso-pic}


%------Conference Name-------%
\newcommand\AtPageUpperMyright[1]{\AtPageUpperLeft{%
        \put(\LenToUnit{0.0\paperwidth},\LenToUnit{-1cm}){%
            \parbox{.96\textwidth}{\raggedleft\fontsize{9}{11}\selectfont #1}}%
}}%
\newcommand{\conf}[1]{%
    \AddToShipoutPictureBG*{%
        \AtPageUpperMyright{#1}
    }
}


\begin{document}    
\title{A random xyz manuscript}
\maketitle

        %------conference Name-------%
\conf{2021 5th International Conference on Electrical Engineering and Information \& Communication Technology (ICEEICT)\\ 
    Military Institute of Science and Technology (MIST), Dhaka-1216, Bangladesh}

\begin{abstract}
\lipsum[2-3].
\end{abstract}

\section{Section 1}
\lipsum[1-2]

    \subsection{Subsection A}
    ........
    
\end{document}

有人能解释一下这部分代码吗-它是如何右对齐的

\newcommand\AtPageUpperMyright[1]{\AtPageUpperLeft{%
        \put(\LenToUnit{0.0\paperwidth},\LenToUnit{-1cm}){%
            \parbox{.96\textwidth}{\raggedleft\fontsize{9}{11}\selectfont #1}}%

答案1

那么为什么不直接\parbox在页眉中插入一个? \headheight足够容纳两行。

顺便说一句,没有它看起来很奇怪\centering

\documentclass[conference]{IEEEtran}

\usepackage[T1] {fontenc}
\usepackage{textcomp}
\usepackage{lipsum}
\usepackage{eso-pic}

\makeatletter
\newcommand{\conf}[1]{%
\def\ps@IEEEtitlepagestyle{% default title page headers, no footers
\def\@oddhead{\parbox[b]{\dimexpr \textwidth-\wd\headerbox-\columnsep}{\centering \@IEEEheaderstyle #1}}%
\let\@evenhead\@empty
\def\@oddfoot{\mycopyrightnotice}% 
\let\@evenfoot\@empty}}
\newcommand{\mycopyrightnotice}{\footnotesize 978-0-7381-1102-5/20/\$31.00 $\copyright$ 2021 IEEE\hfill}
\makeatother

%------conference Name-------%
\conf{2021 5th International Conference on Electrical Engineering and Information \& Communication Technology (ICEEICT)\\ 
    Military Institute of Science and Technology (MIST), Dhaka-1216, Bangladesh}

\begin{document}    
\title{A random xyz manuscript}
\maketitle

\begin{abstract}
\lipsum[2-3].
\end{abstract}

\section{Section 1}
\lipsum[1-2]

    \subsection{Subsection A}
    ........
    
\end{document}

如果会议有标志,您可以使用它来平衡不平衡。

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage[T1] {fontenc}
\usepackage{textcomp}
\usepackage{lipsum}

%------Conference Header-------%
\newsavebox\headerbox
\savebox\headerbox{\includegraphics[height=\headheight]{example-image}}

\makeatletter
\newcommand{\conf}[1]{%
\def\ps@IEEEtitlepagestyle{% default title page headers, no footers
\def\@oddhead{\parbox[b]{\dimexpr \textwidth-\wd\headerbox-\columnsep}{\@IEEEheaderstyle #1}\hfill{\usebox\headerbox}}\relax
\let\@evenhead\@empty
\def\@oddfoot{\mycopyrightnotice}% 
\let\@evenfoot\@empty}}
\newcommand{\mycopyrightnotice}{\footnotesize 978-0-7381-1102-5/20/\$31.00 $\copyright$ 2021 IEEE\hfill}
\makeatother

%------conference Name-------%
\conf{2021 5th International Conference on Electrical Engineering and Information \& Communication Technology (ICEEICT)\\ 
    Military Institute of Science and Technology (MIST), Dhaka-1216, Bangladesh}

\begin{document}    
\title{A random xyz manuscript}
\maketitle

\begin{abstract}
\lipsum[2-3].
\end{abstract}

\section{Section 1}
\lipsum[1-2]

    \subsection{Subsection A}
    ........
    
\end{document}

相关内容