
Thesig-alternate
класс по умолчанию отключает нумерацию страниц, что нарушает mparhack
(помимо прочего).
Как включить tex code только если \thepage
правильно определен? Я пробовал \ifcsname
и , но ни один не сработал \ifcsempty
.etoolbox
МВЭ:
\documentclass{sig-alternate}
%\pagenumbering{arabic}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mparhack}
\begin{document}
\title{A Sample {\ttlit ACM} SIG Proceedings Paper in LaTeX}
\numberofauthors{1}
\author{
\alignauthor
Ben Trovato\titlenote{Dr.~Trovato insisted his name be first.}\\
\affaddr{Institute for Clarity in Documentation}\\
\affaddr{1932 Wallamaloo Lane}\\
\affaddr{Wallamaloo, New Zealand}\\
\email{[email protected]}
}
\date{30 July 1999}
\maketitle
\section{Introduction}
The \textit{proceedings} are the records of a conference.
\end{document}
решение1
Использовать \@ifundefined
:
\documentclass{sig-alternate}
%\pagenumbering{arabic}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mparhack}
\makeatletter
\@ifundefined{thepage}{\def\thepage{\arabic{page}}}{}%
\makeatother
\begin{document}
\title{A Sample {\ttlit ACM} SIG Proceedings Paper in LaTeX}
\numberofauthors{1}
\author{
\alignauthor
Ben Trovato\titlenote{Dr.~Trovato insisted his name be first.}\\
\affaddr{Institute for Clarity in Documentation}\\
\affaddr{1932 Wallamaloo Lane}\\
\affaddr{Wallamaloo, New Zealand}\\
\email{[email protected]}
}
\date{30 July 1999}
\maketitle
\section{Introduction}
The \textit{proceedings} are the records of a conference.
\end{document}
Работает как с ., так и без него \pagenumbering{arabic}
.