我需要使用 使页眉和页脚居中isov2
。对于页眉,我成功地\hfill
在页眉文本周围添加了 s。但页脚不是那么容易定制的。我需要将版权声明放在首位,并将页码放在下方,两者均居中。这是我通过重新定义页脚命令尝试的(目前我只是添加了文本d1
以查看发生了什么。但它仅适用于单个页面)。如何实现?
\documentclass[final,copyright]{isov2}
\renewcommand{\copyrightname}{MISO/MIEC}
\yearofedition{2024}
\languageofedition{(en)}
\ifpdf
\pdfoutput=1
\usepackage[plainpages=false,
pdfpagelabels,
bookmarksnumbered,
hyperindex=true
]{hyperref}
\fi
\makeindex
\setcounter{tocdepth}{3} % add more levels to table of contents
\def\mywarning{draft-version\ }
\standard{\hfill\mywarning \copyrightname\ Text1--99:2099 (en)\hfill}
\begin{document}
\makeatletter
\renewcommand{\ps@headings}{% my futile attempt
\def\@oddhead{\bfseries\extrahead\hfil\@runninghead}%
\def\@evenhead{\bfseries\@runninghead\hfil\extrahead}%
\def\@oddfoot{\copyrighthead d1-even\hfil\thepage}%
\def\@evenfoot{\thepage\hfil d1-odd\copyrighthead}}
\makeatother
\begin{cover}
Replace by real coverpage
\clearpage
\end{cover}
\begin{foreword}
\tocskip{\tocentryskip}
\addcontentsline{toc}{clause}{\forewordname}
A terse foreword.
\newpage
And the final page.
\end{foreword}
\end{document}
答案1
此代码重新定义了页面样式,以根据要求将版权和页码居中。我不知道该文档是否符合 ISO 标准。
(\pagestyle{headings}
在 后添加\begin{document}
)
\documentclass[final,copyright]{isov2}
\renewcommand{\copyrightname}{MISO/MIEC}
\yearofedition{2024}
\languageofedition{(en)}
\ifpdf
\pdfoutput=1
\usepackage[plainpages=false,
pdfpagelabels,
bookmarksnumbered,
hyperindex=true
]{hyperref}
\fi
\makeindex
\setcounter{tocdepth}{3} % add more levels to table of contents
%**************************************************************
\makeatletter
\renewcommand{\ps@headings}{%
\def\@oddhead{\bfseries\extrahead\hfil\@runninghead}%
\def\@evenhead{\bfseries\@runninghead\hfil\extrahead}%
\def\@oddfoot{\parbox{\textwidth}{\centering\copyrighthead\linebreak\thepage}}% changed <<<<<<<<<<<<
\def\@evenfoot{\parbox{\textwidth}{\centering\copyrighthead\linebreak\thepage}}}
\renewcommand{\ps@startpage}{%
\def\@oddhead{\bfseries\extrahead\hfil\@runninghead}%
\def\@evenhead{\bfseries\@runninghead\hfil\extrahead}%
\def\@oddfoot{\hfil\thepage\hfil}% changed <<<<<<<<<<<<
\def\@evenfoot{\hfil\thepage\hfil}}
\def\ps@isotitlehead{%
\def\@oddhead{\parbox{\textwidth}{\protect\rectoisotitlehead}}%
\def\@evenhead{\parbox{\textwidth}{\protect\versoisotitlehead}}%
\def\@oddfoot{\parbox{\textwidth}{\centering \copyrighthead\linebreak\thepage}}% changed <<<<<<<<<<<<
\def\@evenfoot{\parbox{\textwidth}{\centering \copyrighthead\linebreak\thepage}}}
\makeatother
%**************************************************************
\def\mywarning{draft-version\ }
\standard{\hfill\mywarning \copyrightname\ Text1--99:2099 (en)\hfill}
\usepackage{kantlipsum}% ONLY to add dummy text <<<<<<<<<<<<<<
\begin{document}
\pagestyle{headings} % added <<<<<<<<<<<<<<
\begin{cover}
Replace by real coverpage
\clearpage
\end{cover}
\begin{foreword}
\tocskip{\tocentryskip}
\addcontentsline{toc}{clause}{\forewordname}
A terse foreword.
\newpage
And the final page.
\end{foreword}
\begin{introduction}
Introduction\newpage
some text
\end{introduction}
\title{}{Main Title}{complement}
\clearpage
\kant[1-5]
\end{document}