Page 1 of 1

Using \inparaitem with customized numbering

Posted: Mon Mar 20, 2023 3:45 am
by mukizaenos
Hello members,

I have created the following style for labelling my list items.

Code: Select all

\newcommand*\circled[1]{\kern-2.5em%
  \put(0,4){\color{black}\circle*{18}}\put(0,4){\circle{16}}%
  \put(-3,0){\color{white}\bfseries\large#1}~~}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
            \node[shape=circle,fill=black!20,draw,inner sep=2pt] (char) {#1};}}

When I create my inparaitem list, and try to call the label as I do for \enumerate, it is not working.

\begin{inparaitem}[label=\protect\circled{\arabic*}]
\item First item,
\item Second item
\end{inparaitem}
I will appreciate if anyone can help me to know how to use this.


This is the complete code:

Code: Select all

\documentclass{article}
\usepackage{paralist}
\usepackage{tikz}
\usepackage{xcolor}
\newcommand*\circled[1]{\kern-2.5em%
  \put(0,4){\color{black}\circle*{18}}\put(0,4){\circle{16}}%
  \put(-3,0){\color{white}\bfseries\large#1}~~}
\begin{document}



\begin{enumerate}[label=\protect\circled{\color{red}\arabic*}]
\item Step one
\item Step two
\item Step three
\end{enumerate}

\begin{enumerate}[label=\protect\circled{\arabic*}]
\item Step one
\item Step two
\item Step three
\end{enumerate}

\begin{inparaitem}[label=\protect\circled{\arabic*}]
\item First item,
\item Second item
\end{inparaitem}

\end{document}
Thank you.

Using \inparaitem with customized numbering

Posted: Fri May 12, 2023 5:21 pm
by Stefan Kottwitz
Hi,

welcome to the forum!

Sorry for my late answer, somehow the notifications for this forum were turned off.

For the numbered lists you need to load the enumitem package, so that would work:

Code: Select all

\usepackage{enumitem}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
            \node[shape=circle,fill=black!20,draw,inner sep=2pt] (char) {#1};}}
inparaenum and paralist would be different, let me know if this is still needed.

tefan

Using \inparaitem with customized numbering

Posted: Fri May 19, 2023 5:30 pm
by mukizaenos
Thank you. I will check if it works for inline list.