# enumerate / itemize : add content before label item except for the first

In the following code I would like to define special items that add content just before the item that follow use.

\documentclass[12pt]{article}

\usepackage{amssymb}

\newcommand\squareitem{\item}
\newcommand\bulletitem{\item}

\begin{document}

What I want to type using special items.

\begin{itemize}
\squareitem Item 1
\item Item 2
\bulletitem Item 3
\end{itemize}

What I would like to do without typing all the code.

\begin{itemize}
\item Item 1

\hfill $\square$

\item Item 2

\item Item 3

\hfill \textbullet
\end{itemize}

\end{document}


• And \item Item 2 should produce what? – Bernard Sep 26 '19 at 11:19
• \item keeps its standard behavior without adding anything. – projetmbc Sep 26 '19 at 11:23
• So it is a \bulletitem, no more, no less? – Bernard Sep 26 '19 at 11:25
• No it does nothing special contrary to \squareitem and \bulletitem. – projetmbc Sep 26 '19 at 11:42
• I hadn't noticed how they behave, sorry. Should the square and textbullet be at the right margin of the first line of the item, in case it has several? – Bernard Sep 26 '19 at 12:08

\documentclass[12pt]{article}
\usepackage{amssymb}
\let\svitem\item
\let\itemtag\relax
\newcommand\squareitem{\let\nextitemtag S\item}
\newcommand\bulletitem{\let\nextitemtag B\item}
\newenvironment{tagitemize}{
\renewcommand\item{%
\ifx S\itemtag\par\hfill$\square$\par\fi
\ifx B\itemtag\par\hfill$\bullet$\par\fi
\let\itemtag\nextitemtag\let\nextitemtag\relax
\svitem
}
\itemize
}{%
\ifx S\itemtag\par\hfill$\square$\par\fi
\ifx B\itemtag\par\hfill$\bullet$\par\fi
\enditemize}
\begin{document}
\begin{tagitemize}
\squareitem Item 1
\item Item 2
\bulletitem Item 3
\end{tagitemize}
\end{document}


• Thanks for this ! LaTeX and its community are great. ;-) – projetmbc Sep 26 '19 at 18:20
• @projetmbc It is my pleasure to assist. – Steven B. Segletes Sep 26 '19 at 18:34