[Tex/LaTex] Automatically end list item with proper punctuation (semicolon, period)

itemizelistspunctuation

If I have a list using itemize, I want to automatically end each \item with a semicolon (for all but the last item) or a period (for the last item).

For example:

\begin{itemize}
  \item One
  \item Two
  \item Three
\end{itemize}

Should display as

  • One;
  • Two;
  • Three.

Is there any way to make that happen? I looked around but didn't really find anything. The closest I could find was this, but that seems to be a fancy, custom list rather than a vanilla itemize.

Best Answer

I'm not sure whether it is a good idea to do this, maybe you should use a different environment for that. The following patches \item inside every itemize environment to add a semicolon after the first, and the \enditemize macro is changed to add a dot. You can no longer nest itemize environments with this simple approach. All in all I think this creates more problems than it solves...

\documentclass[]{article}

\usepackage{etoolbox}
\AtBeginEnvironment{itemize}
  {%
    \def\itemizepunctuation{\def\itemizepunctuation{\ifhmode\unskip\fi;}}%
    \pretocmd\item{\itemizepunctuation}{}{}%
    \pretocmd\enditemize{\ifhmode\unskip\fi.}{}{}%
  }

\newenvironment{punctitemize}
  {%
    \itemize
    \def\itemizepunctuation{\def\itemizepunctuation{\ifhmode\unskip\fi;}}%
    \pretocmd\item{\itemizepunctuation}{}{}%
    \pretocmd\enditemize{\ifhmode\unskip\fi.}{}{}%
  }
  {%
    \enditemize
  }

\begin{document}
\begin{itemize}
  \item One
  \item Two
  \item Three
\end{itemize}

\begin{punctitemize}
  \item One
  \item Two
  \item Three
\end{punctitemize}
\end{document}

enter image description here

EDIT: added the environment approach, nesting is still not supported.