[Tex/LaTex] Automatically itemize a paragraph

itemizelistsmacrosparagraphs

I'd like to use LaTeX for lecture notes but I use bullet lists extensively, and the itemize macro in LaTeX is too time consuming for lecture notes. But if I could teach LaTeX how to do it for me things would be beautiful! (Typing equations in OpenOffice is annoying…)

If I'm typing a regular paragraph in LaTeX, every new line would be bulleted. There would be a command to denote an item that exists outside the bulleted paragraph. Finally, commands like \up, \down to promote/demote all lines of text that follow them in the list.

An example:

\title{this would be the title of a slide}
this is a line of text
this is another line of text
\up
this is a subpoint
another
\down
last line

To get:

This would be the title of a slide

  • this is a line of text
  • this is another line of text
    • this is a subpoint
    • another
  • last line

In a comment below, Werner described this more specifically. I want to "avoid using \item for every paragraph, and instead just let the paragraph breaks be "equivalent to" \item, while \up initiates a new itemize environment, and \down closes it." \title would then close all itemize environments (the bolding is something I'd like to automatically have done but not necessarily relevant to the question).

Best Answer

I'm sure there are packages doing this, but probably it's too simple for there to be a dedicated package exactly for this.

Here's a simple solution which probably has to be extended to be really useful.

\documentclass{article}

\makeatletter

\newcommand\startitems
{%
  \begingroup
  \parindent\z@
  \@itemdepth\@ne
  \@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname
  \leftskip\@totalleftmargin
  \everypar
  {%
    \llap{%
      \makebox[\labelsep][l]
      {%
        \csname labelitem\romannumeral\the\@itemdepth\endcsname
      }
    }%
  }%
  \obeylines
}
\newcommand\stopitems
{%
  \bottom
  \par\endgroup
}

\newcommand\up
{%
  \par
  \begingroup
    \advance\@itemdepth\@ne
    \advance\@totalleftmargin\csname leftmargin\romannumeral\the\@itemdepth\endcsname
    \leftskip\@totalleftmargin
}

\newcommand\down{\par\endgroup}

\newcommand\bottom
{%
  \ifnum\@itemdepth>\@ne
    \down\bottom
  \fi
}

\makeatother

\begin{document}

\section*{title}
\startitems
this is a line of text
this is another line of text
\up
this is a subpoint
another
\up
sub-sub  point
\bottom
back to first level
\stopitems

\noindent Normal text
\end{document}

There has to be some way to enclose the itemizing effect, so I added \startitems \stopitems.

example