我想隐藏第一列(封面)的列号。
我使用了以下代码: Stack Exchange 答案
\documentclass[paper=A3, landscape]{scrartcl}
\usepackage{multicol}
\usepackage{blindtext}
\usepackage{everypage}
\newcounter{column}
\AddEverypageHook{\ifdim\columnwidth<\textwidth
\ifodd\value{page}\rlap{\hspace{\oddsidemargin}%
\raisebox{\dimexpr-\topmargin-\headheight-\headsep-\textheight- 0.5\footskip}[0pt][0pt]%
{\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}}}%
\else\rlap{\hspace{\evensidemargin}%
\raisebox{\dimexpr-\topmargin-\headheight-\headsep-\textheight-0.5\footskip}[0pt][0pt]%
{\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\thecolumn}}}%
\fi%
\fi}
\begin{document}
\begin{multicols}{4}
\blinddocument{} \blindtext
\end{multicols}
\end{document}
我已经尝试过了
\thispagestyle{empty}
但它没有作用。
答案1
除了,您还可以使用仅当计数器不为 1 时才\thecolumn
产生结果的命令。这里我根据常见的拼写错误将其命名为 (是的,这是个玩笑):column
\tehcolumn
\documentclass[paper=A3, landscape]{scrartcl}
\usepackage{multicol}
\usepackage{blindtext}
\usepackage{everypage}
\newcounter{column}
\newcommand\tehcolumn{\ifnum\value{column}=1 \else\thecolumn\fi}
\AddEverypageHook{\ifdim\columnwidth<\textwidth
\ifodd\value{page}\rlap{\hspace{\oddsidemargin}%
\raisebox{\dimexpr-\topmargin-\headheight-\headsep-\textheight- 0.5\footskip}[0pt][0pt]%
{\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}}}%
\else\rlap{\hspace{\evensidemargin}%
\raisebox{\dimexpr-\topmargin-\headheight-\headsep-\textheight-0.5\footskip}[0pt][0pt]%
{\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}\hspace{\columnsep}%
\makebox[\columnwidth]{\stepcounter{column}\tehcolumn}}}%
\fi%
\fi}
\begin{document}
\begin{multicols}{4}
\blinddocument{} \blindtext
\end{multicols}
\end{document}