longtables

20 views
Skip to first unread message

Ian Fantom

unread,
Oct 27, 2023, 5:06:32 PM10/27/23
to latexus...@googlegroups.com
I'm trying to find the best way of creating a two-column table across
the page, or 75% or so, in which each column consists of text to be wrapped.

I got as far as:


\begin{longtable}[l]{l|p{0.75\textwidth}}

which worked fine as long as the left column was short, and didn't need
wrapping. I've played with it quite a bit, but can't find any solution
in which the left column will wrap, that will compile.

Any ideas?

Regards,

Ian Fantom


Ariovaldo V Garcia

unread,
Oct 28, 2023, 9:26:39 AM10/28/23
to latexus...@googlegroups.com
Hi

Below is a small example and attached is the result. Is that what you need?

Regards

Ariovaldo

--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/latexusersgroup/bacdf2b0-10d4-eaba-0e3a-6203568b008b%40fantom.org.uk.
output.png

Ariovaldo V Garcia

unread,
Oct 28, 2023, 9:28:22 AM10/28/23
to latexus...@googlegroups.com
Ooops... I forgot the latex file:


\documentclass[]{article}
\usepackage{longtable}

\begin{document}

 \begin{longtable}{|p{0.25\textwidth}|p{0.75\textwidth}|}
\hline
Left column & Right column \\
\hline
Text in left column Text in left column Text in left column Text in left column Text in left column Text in left column Text in left column & Text in right column Text in right column Text in right column Text in right column Text in right column Text in right column Text in right column Text in right column Text in right column Text in right column v Text in right column\\
    \hline
  \end{longtable}

\end{document}

Ian Fantom

unread,
Oct 28, 2023, 3:45:25 PM10/28/23
to latexus...@googlegroups.com

Perfect. Thanks!

I was struggling to understand how the bracketing worked. I'd attempted something like your solution but the bracketing was wrong.

Now full steam ahead :-)

Ian

Ariovaldo V Garcia

unread,
Oct 29, 2023, 6:33:10 PM10/29/23
to latexus...@googlegroups.com
OK.

Good luck

Ariovaldo




Reply all
Reply to author
Forward
0 new messages