[Tex/LaTex] Itemize inside a paragraph

itemize

I would like to be able to start an itemize environment after a sentence, on the same line of the sentence, and indent from that point on.

Something like
-exactly what I'm doing

-here but the second item should be aligned with the first one.

Edit: This is for a presentation in beamer, I would like to use this to save space on a slide.

Thank you in advance for your answers!

Best Answer

Here is a definition of an environment that can be used to obtain the look you want.

  \newenvironment{OLitemize}[1][\linewidth]
     {\begin{minipage}[t]{#1}\begin{itemize}}
     {\end{itemize}\end{minipage}
    }

Usage is then:

bla bla bla  \begin{OLitemize} \item test 1 \item test 2 \end{OLitemize}

One remark to this code: I expect you to normally just put small parts of text after each \item. Since I reserve a whole linewidth for the minipage, long texts will hang out on the right side of the page. For this case, one can pass an optional parameter to OLitemize which is the width of the space you want to use. This can be used to fit long texts on your page.

Perhaps one could even improve the definition by calculating how much space is left on the page and then pass this as an argument to the minipage. Unfortunately, my LaTeX-abilities do not allow do this.