I wish to write the code of the picture displayed below..
How do I code this? I am confused
I wish to write the code of the picture displayed below..
How do I code this? I am confused
One simple way to put a short portion of text into two columns, if the rows need to line up, is to use the basic tabular environment. You can use the p specification to get a row with wrapped text.
\documentclass{article}
\begin{document}
\begin{tabular}{l p{0.5\linewidth}}
Line 1 on the left & Line 1 on the right\\
Line 2 on the left & Line 2 on the right overflowing with a lot of extra text\\
\end{tabular}
\end{document}
For beginners in TeX who find this answer helpful, you can find a basic introduction to LaTeX by entering texdoc lshort at a terminal.
As seen on https://stackoverflow.com/questions/1491717/how-to-display-a-content-in-two-column-layout-in-latex there are multiple useful options:
Use the multicol package (if you omit the \columnbreak, the columns will balance automatically):
\usepackage{multicol}
\begin{multicols}{2}
Column 1
\columnbreak
Column 2
\end{multicols}
Alternatively, for precise control, add a minipage:
\begin{minipage}[position]{width}
text
\end{minipage}
You may also find this useful: How do I force a column-break in a multi-column page?
tabularenvironment with two columns:\begin{tabular}{ll} [. . .] \end{tabular}If you need text wrapping in the right column you can write\begin{tabular}{l p{0.5\linewidth}for example. – musarithmia Dec 08 '14 at 17:45multicolandminipagesat https://stackoverflow.com/questions/1491717/how-to-display-a-content-in-two-column-layout-in-latex – xeruf Jan 05 '22 at 12:13