Page LayoutStart itemize at same line

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Start itemize at same line

Post by MatthiasN »

Hi everyone,

I was wonderin if it would be possible to start itemize at the same line that you have written your last line of text. This is not something I would like to do consequently through the document.
For example I would write:

There are causes for this: -Cause 1

And the other causes should appear indented so that they are aligned with "Cause 1".
I hope I've made my question clear.

Greetings,
Matthias

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Start itemize at same line

Post by Stefan Kottwitz »

Hi Matthias,

you could use a {minipage} environment with the optional argument t for top alignment, for example:

Code: Select all

\documentclass{article}
\begin{document}
text
\begin{minipage}[t]{.8\textwidth}
  \begin{itemize}
    \item item
    \item another item
  \end{itemize}
\end{minipage}
\end{document}
itemize.png
itemize.png (1.94 KiB) Viewed 8060 times
Stefan
LaTeX.org admin
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Re: Start itemize at same line

Post by MatthiasN »

Thanks Stefan, it works^^
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Start itemize at same line

Post by MatthiasN »

Is there a way of letting the minipage environment use the horizontal space left on the page in stead of having to specify the width?
I have tried:

Code: Select all

\begin{minipage}[t]{\hfill}
Text
\end{minipage}
But it gives errors...
Last edited by Stefan Kottwitz on Thu Apr 12, 2012 12:10 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Start itemize at same line

Post by Stefan Kottwitz »

You could switch to a tabular structure and use tabularx with an X column for the itemize environment.

Stefan
LaTeX.org admin
Post Reply