0

I have a problem to do the alignment with a two side text in paracol package.

  \documentclass[14pt,openany ]{book}

\usepackage[a4paper,ignoreall,right=2cm, left=2cm,bottom=1.5cm,top=1.5cm]{geometry}
\usepackage{lipsum}
\usepackage{paracol}
\newcommand\mystrut{\rule{0pt}{14pt}}  
\begin{document}

\begin{paracol}{2}


\begin{leftcolumn*}\noindent
\lipsum[1]
\end{leftcolumn*}

\begin{rightcolumn*}\noindent\mystrut
Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u
\end{rightcolumn*}

\begin{leftcolumn*}\noindent\mystrut
\lipsum[1]
\end{leftcolumn*}

\begin{rightcolumn*}\noindent\mystrut
Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u
\end{rightcolumn*}

\begin{leftcolumn*}\noindent\mystrut
Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u\end{leftcolumn*}

\begin{rightcolumn*}\noindent\mystrut
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec elementum, neque non pharetra placerat, mauris felis facilisis nisl, ut tempus lacus magna vitae arcu.
\end{rightcolumn*}

\begin{leftcolumn*}\noindent\mystrut
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec elementum, neque non pharetra placerat, mauris felis facilisis nisl, ut tempus lacus magna vitae arcu.
\end{leftcolumn*}

\begin{rightcolumn*}\noindent\mystrut
ed ipsum lectus, facilisis quis velit convallis, hendrerit suscipit augue. Quisque tincidunt hendrerit nulla, vel pulvinar turpis feugiat sit amet. Nam hendrerit diam quis velit porttitor, sed ornare mauris tempus. Morbi in sapien at ligula tincidunt condimentum. Proin interdum feugiat dui rutrum commodo. Aliquam dapibus nibh e
\end{rightcolumn*}



\end{paracol}
\end{document}

I want to do the alignment between paragraphs, i.e., when I star a paragraph in the first column, the package alignments with the first paragraph in the second column text, second with second and so on.

But at best, I just get this output.

enter image description here

2

Maybe this is what you are looking for:

\documentclass[14pt,openany ]{book}

\usepackage[a4paper,ignoreall,right=2cm, left=2cm,bottom=1.5cm,top=1.5cm]{geometry}
\usepackage{lipsum}
\usepackage{paracol}
\setlength{\parindent}{0pt}
\setlength{\parskip}{14pt}
\begin{document}

\begin{paracol}{2}

\lipsum[1]

\switchcolumn

Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u

\switchcolumn*

\lipsum[1]

\switchcolumn

Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u
\end{paracol}
\end{document}

enter image description here

From the paracols documentation (section 3 Column Synchronization)

The \switchcolumn command may also be followed by a ‘ * ’ to synchronize columns. After you switch from a column to another by \switchcolumn* (or \switchcolumn[ i ]* ), all the columns are vertically aligned at the bottom of the deepest one preceding the command.

If you prefer the leftcolumn and rightcolumn notation, you can also use the following to achieve the above shown result:

\begin{paracol}{2}

\begin{leftcolumn*}
\lipsum[1]
\end{leftcolumn*}

\begin{rightcolumn}
Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u
\end{rightcolumn}

\begin{leftcolumn*}
\lipsum[1]
\end{leftcolumn*}

\begin{rightcolumn}
Nam nibh leo, scelerisque quis ex a, venenatis iaculis libero. Integer neque libero, interdum quis nisl id, accumsan semper tortor. Aenean cursus quam sit amet nibh rhoncus tempor u
\end{rightcolumn}

\end{paracol}

In general please note the alternating usage of starred and unstarred of commands/environments.

Additionally, I have used \setlength{\parindent}{0pt} to remove the indentation of the first line globally and \setlength{\parskip}{14pt} to change the vertical spacing between paragraphs (I guess this is what you wanted to do with \mystrut?).

  • Thank you very much! I prefer the first solution, it is much more simple. I used \mytrust because I saw this answer: tex.stackexchange.com/questions/357317/… , but did not work here. It was just tricky, I used \switchcolumn* , but in all division column, so that did not work! Thank you again. – Gergian Apr 29 '18 at 15:10

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.