Text Formattingspecial enumeration

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
aleph
Posts: 3
Joined: Wed Feb 10, 2010 9:57 pm

special enumeration

Post by aleph »

Hi! I need to make a list of problems in latex and because I might need later to move some problems up or down, it should be automatically numbered. I know about enumerate, but I also want to add to the number of problem some stars signifying the level of difficulty. For example my list could be "1.*, 2.**, 3.*, 4.***, ...". Is it possible to do this?

Thanks.
Last edited by aleph on Tue Sep 07, 2010 8:48 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

special enumeration

Post by gmedina »

Hi,

you could try something along these lines:

Code: Select all

\documentclass{article}
\usepackage{enumitem}

\newcommand\Easy{\stepcounter{enumi}\item[\theenumi.*]}
\newcommand\Hard{\stepcounter{enumi}\item[\theenumi.**]}
\newcommand\RHard{\stepcounter{enumi}\item[\theenumi.***]}

\begin{document}

\begin{enumerate}[align=left,leftmargin=*,widest=10***]
 \Easy $a=b$.
 \Hard $a=b$.
 \RHard $a=b$.
 \Easy $a=b$.
\end{enumerate}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
aleph
Posts: 3
Joined: Wed Feb 10, 2010 9:57 pm

Re: special enumeration

Post by aleph »

Thank you so much!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

special enumeration

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly described in Section 3 of the Board Rules (actually to be read before posting).


Best regards
Thorsten
Post Reply