Text FormattingItemized List in Table

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Third Joker
Posts: 6
Joined: Wed Oct 24, 2012 10:19 am

Itemized List in Table

Post by Third Joker »

Hello,

I'm trying to put use {itemize} in my {tabular} environment. This is my code :

Code: Select all

\newcolumntype{M}[1]{>{\raggedleft}p{#1}}
\newcolumntype{N}[1]{>{\raggedright}p{#1}}

\begin{tabular}{M{7cm} p{1cm} N{7.3cm}}
\textsc{Text} & \dotfill & \begin{itemize} 
\item item 1
\item Item 2
\end{itemize}
\end{tabular}
And this is what I get :
itemize-tabular.jpg
itemize-tabular.jpg (10.51 KiB) Viewed 2663 times
Of course, I would like my first item to be in front of my first line. Why does it skip a line ? How can I fix that ?

Thank's a lot for your help !
TJ
Last edited by localghost on Wed Oct 24, 2012 5:28 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Itemized List in Table

Post by localghost »

I'm sure you will find useful approaches by searching the forum or looking at the »Similar Topics« on the bottom of this page (only when logged in).

And by the way, please exclusively attach pictures (and other files) by upload to the forum server. External links can get lost with time and make a problem incomprehensible later.


Thorsten
Third Joker
Posts: 6
Joined: Wed Oct 24, 2012 10:19 am

Itemized List in Table

Post by Third Joker »

Oh. I didn't know for the picture. I will edit my post.

And you were right, the problem were already mentionned. It worked, even if I have no idea of what I've done :mrgreen:

So for all purposes, here is the solution :

Put this code :

Code: Select all

\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
and juste before the \begin{itemize}, put \compress.

It's magic !

Thank's !
Post Reply