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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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 8191 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: 10348
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