为什么 \markboth 命令在我的背页中不起作用?

问题描述 投票:0回答:1

我正在准备我的会议论文,会议委员会提供了一个word文档模板。但是,我对乳胶很满意。我正在使用背页。在模板的最开始,会议名称应包含在 2 行中,如下图所示。

我找到了很多博客,他们建议使用

/markboth
。但这个命令在我使用的模板中不起作用。

我的代码:

\documentclass[conference, a4paper]{IEEEtran}
\IEEEoverridecommandlockouts

\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{multirow}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}


\begin{document}

\title{Title}
\input{authorInfo}


\maketitle

% ========Header and Pub Id=======
\markboth{IEEE Transactions on Evolutionary Computation}{AA}

\IEEEpubid{\begin{minipage}{\textwidth}\ \\[150pt] \raggedright
  979-8-3503-5901-5/23/\$31.00 ©2023 IEEE 
\end{minipage}}
% =============

请建议我一些方法。

latex overleaf ieee conference
1个回答
0
投票

我也尝试用 /markboth 解决这个问题,但失败了。然而,Overleaf 的文档说:

fancyhdr 生成的页眉和页脚可以包含多行。

所以,如果你想用 fncyhdr 来解决它,你可以在你的代码中这样使用它:

\documentclass[conference, a4paper]{IEEEtran}
\IEEEoverridecommandlockouts

\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{multirow}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\usepackage{fancyhdr} %load fancyhdr package

\begin{document}
\title{Title}
\input{authorInfo}

\pagestyle{fancy} % set pagestyle to fancy
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt}  %delete decorative lines under header
\fancyhead[L]{2023 26th International Conference on Computer and Information Technology (ICCIT)\\13-15 December 2023, Cox's Bazar, Bangladesh } %define header

\maketitle

\thispagestyle{fancy} %\maketitle defines the current page style as plain so you should readjust the page style after \maketitle to make the header appear on the first page as well

% ========Header and Pub Id=======
\markboth{IEEE Transactions on Evolutionary Computation}{AA}

\IEEEpubid{\begin{minipage}{\textwidth}\ \\[150pt] \raggedright
  979-8-3503-5901-5/23/\$31.00 ©2023 IEEE 
\end{minipage}}
% =============

\end{document}
© www.soinside.com 2019 - 2024. All rights reserved.