Text FormattingAdditional Line for Item in itemized List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Additional Line for Item in itemized List

Post by dieinfolk »

Hello to everyone,

I'm using an itemize list. Each item is like a 2x2 matrix (4 elements in total which their own font). The structure for each item is:

[*]text1[/b].....................................[*]text2
[*]text3[/i].....................................[*]text4

Code: Select all

\newcommand{\ressubheading}[4]{
  \begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
    \textbf{#1} & #2 \\
    \emph{#3} & \textnormal{#4} \\
  \end{tabular*}\vspace{-6pt}
}
This works fine. The problem shows up when text on the first column is very long. I want something that looks like this:

[*]text1.text1.text1.text1.text1[/b]......... [*]text2
[*]text1.text1.text1[/b]
[*]text3[/i].........................................[*]text4

So i can keep the same font.

Thank you so much in advance,
dieinfolk
Last edited by dieinfolk on Tue Oct 02, 2012 11:10 pm, edited 9 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

Additional Line for Item in itemized List

Post by localghost »

I order to avoid guesswork and random shots kindly prepare a proper, self-contained and minimal example.

Addendum:
Though there are endless edits of your post, you still haven't added useful information. You should do so if you expect helpful answers.


Best regards and welcome to the board
Thorsten
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Re: Additional Line for Item in itemized List

Post by dieinfolk »

Hello,

I edited my post, but it seems like I should have replied instead.

Please, does someone know how i could add a line? (see my first post)

Thanks a lot to everyone,
dieinfolk
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Additional Line for Item in itemized List

Post by cgnieder »

Maybe using the tabu package?

Code: Select all

\documentclass{article}
\usepackage{array,tabu}
\newcommand{\ressubheading}[4]{%
  \begin{tabu} to 4cm {X[l]<{\strut}X[r]<{\strut}}
    \textbf{#1} & #2 \\
    \emph{#3} & \textnormal{#4} \\
  \end{tabu}%
}
\begin{document}

Text
\ressubheading{A long text long text long text long text}{B}{C}{D}
Text

\end{document}
Please notice that I changed the 6.5in to 4cm for the example.

Regards
site moderator & package author
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Re: Additional Line for Item in itemized List

Post by dieinfolk »

Thanks you so much cgnieder!

It really works :) I've achieved something but doing a lot of nonsense and tricky things. This is very simple and useful!
Post Reply