LaTeX forum ⇒ 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

Postby mukizaenos » Mon Mar 20, 2023 3:45 am

Hello members,

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

\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:

\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 2021:

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

Using \inparaitem with customized numbering

Postby Stefan Kottwitz » Fri May 12, 2023 5:21 pm

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:

\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

Postby mukizaenos » Fri May 19, 2023 5:30 pm

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


Return to “LaTeX Beginner's Guide”

Who is online

Users browsing this forum: No registered users and 3 guests