在同一页中多次更改列数,无需分页符

在同一页中多次更改列数,无需分页符

我想更改页面的列数,如下所示:

2 列 --> 无列 --> 3 列。

但是每当我使用它的环境时,multicol都会插入一个分页符。

最小工作示例:

\documentclass{scrartcl}
\usepackage{multicol}

\begin{document}

\begin{multicols*}{2}

abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc

\end{multicols*}

abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc

\begin{multicols*}{3}

abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc

\end{multicols*}
\end{document}

答案1

解决方案是使用“\begin{multicols}{} ... \end{multicols}”(星号版本会中断页面​​)。

\documentclass{scrartcl}
\usepackage{multicol,lipsum,tikz}

\begin{document}

\begin{multicols}{2}
  \section{Two columns}
    \lipsum[1-1]
\end{multicols}

\section{No column}

\begin{center}
  \begin{tikzpicture}[scale=2]
    \path[thick,fill=red!80] (1.7,1)--(1.7,-1)--(5,0)--cycle;
    \path[thick,fill=blue!80] (1.7,1)--(1.7,-1)--(-0.2,0)--cycle;
    \draw[ultra thick] (-0.2,0)--(1.7,1)--(5,0)--(1.7,-1)--cycle;
    \draw[ultra thick] (1.7,1)--(1.7,-1);
    \node[label={center:\Huge{N}}] at (2.5,0) {};
    \node[label={center:\Huge{S}}] at (0.9,0) {};
  \end{tikzpicture}
\end{center}

\begin{multicols}{3}
  \section{Two columns}
    \lipsum[2-3]
\end{multicols}

\end{document}

在此处输入图片描述

相关内容