1

paracol package useful for me. But I have some problme when page break.

The last one over the foot rule, is there any way to let it in the next page automaticly??

(May I put the paracol in a minipage or box???)

Simple codes as following:

\documentclass[]{article}

\usepackage{paracol}
\usepackage{fancyhdr}
\renewcommand{\footrulewidth}{1pt}
\pagestyle{fancy}

\begin{document}

\twosided
\columnratio{0.3}

\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{5cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}

\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}

\end{document}

enter image description here

  • Does your real document also have \rule in the paracolumn? Or is there a piece of text? It would be very difficult to break a \rule in two pieces, but for a text it might be possible. If it is text, please modify your MWE to show that. The rest of the question and the MWE is very nice by the way, +1. – Marijn Jul 4 '18 at 12:07
  • @Marijn real not \rule, is text block, I hope whole block in the next page. Not half text in the page and another half text in the next page. – zongxian Jul 4 '18 at 12:10
1

The paracol package has an \ensurevspace command, which breaks the page unless there is at least the required amount of vertical space left on it.

Here, I’ve inserted the amount of space manually, but you could save the contents of both columns in boxes and take the greater of their heights.

Even without the \ensurevspace, just adapting the code to use \begin{leftcolumn*} will at least get LaTeX to break the page before the \rule, although it will then place the first and second columns on separate pages, not parallel to each other.

I turned off \twosided, which was placing the “right” column on the left of even-numbered pages. If you’re typesetting text in the left column instead of a graphic, consider loading parskip. The \sloppy command and microtype with font expansion may help you wrap text in a narrow column without overflowing.

\documentclass{article}

\usepackage{paracol}
\usepackage{fancyhdr}
\renewcommand{\footrulewidth}{1pt}
\pagestyle{fancy}

%\twosided
\columnratio{0.3}

\newcommand\chunks[2]{%
\begin{leftcolumn*}\nopagebreak\noindent{#1}\end{leftcolumn*}%
\begin{rightcolumn}\nopagebreak\noindent{#2}\end{rightcolumn}%
}

\begin{document}

\begin{paracol}{2}
    \ensurevspace{5cm}
    \chunks{\rule{\linewidth}{5cm}}
           {right right right right right right right right right right}

    \ensurevspace{5cm}
    \chunks{\rule{\linewidth}{5cm}}
           {right right right right right right right right right right}

    \ensurevspace{5cm}
    \chunks{\rule{\linewidth}{5cm}}
           {right right right right right right right right right right}

    \ensurevspace{5cm}
    \chunks{\rule{\linewidth}{5cm}}
           {right right right right right right right right right right}

    \ensurevspace{5cm}
    \chunks{\rule{\linewidth}{5cm}}
           {right right right right right right right right right right}
\end{paracol}

\end{document}

Page 1 Page 2

0

Just give \clearpage

\documentclass[]{article}

\usepackage{paracol}
\usepackage{fancyhdr}
\renewcommand{\footrulewidth}{1pt}
\pagestyle{fancy}

\begin{document}

%\twosided
\columnratio{0.3}

\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{5cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}

\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}\clearpage
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}
\begin{paracol}{2}
    \noindent
    \rule{\linewidth}{6cm}
    \switchcolumn
    right right right right right right right right right right
\end{paracol}

\end{document}
  • clearpage is useful, is there any way to automatically break. Because I have many many page. – zongxian Jul 4 '18 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.