3

How could I create two columns that are arranged side by side. By side by side I mean that, the one on the left is flushed to the right and the one on the right is flushed to the left. Also, they need to be mutually independent, in other words have to be able to support texts in different amounts without the text flushed to the right (e.g.) is concatenated to the other column that has text to the left.

I've made this try but it isn't sufficient, as if the text on the first column which is flushed right is much larger then it gets concatenated with the second column, which should only have the text flushed to the left. This is shown in the following code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage{lipsum}

\begin{document}

\begin{multicols}{2}
% -> %
\begin{flushright}
\lipsum[1-2]
\end{flushright}
% -> %


% <- %
\begin{flushleft}
\lipsum[2]
\end{flushleft}
% <- %

\end{multicols}

\end{document}

Could you please give me a hand, as it is beyond my current knowledge

It is for organizing lyrics and the translation side by side

  • The text will be contained in a single page or do you require that this two-column layout keeps across page boundaries? – Phelype Oleinik Sep 10 '18 at 0:30
  • It isn't fully required that the text keeps the layout across page boundaries as the majority of the text will be only one page. As long as there is a Workaround-oriented programming way to use it when the text is close to 3 pages long it's more than fine. – theBotelho Sep 10 '18 at 0:36
  • 1
    Sorry, I had to leave and couldn't answer you. I was going to suggest inserting a \columnbreak between the columns, but this doesn't work if the text flows to the next page. Apparently Mr. Marmot's answer is the way to go :) – Phelype Oleinik Sep 10 '18 at 15:42
4

I'd use paracol for that.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{paracol}
\usepackage{lipsum}

\begin{document}

\begin{paracol}{2}
% -> %
\begin{flushright}
\lipsum[1-2]
\end{flushright}
% -> %

\switchcolumn

% <- %
\begin{flushleft}
\lipsum[2]
\end{flushleft}
% <- %

\end{paracol}

\end{document}

enter image description here

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.