LaTeX Beginner's GuideUsing \inparaitem with customized numbering

Questions and answers about the LaTeX Beginner's Guide
mukizaenos
Posts: 3
Joined: Mon Mar 20, 2023 3:36 am

Using \inparaitem with customized numbering

Post 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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10266
Joined: Mon Mar 10, 2008 9:44 pm

Using \inparaitem with customized numbering

Post 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
LaTeX.org admin
mukizaenos
Posts: 3
Joined: Mon Mar 20, 2023 3:36 am

Using \inparaitem with customized numbering

Post by mukizaenos »

Thank you. I will check if it works for inline list.
Post Reply