I want to use the Enumerate list environment for 500 items (that will appear in multiple columns, using the multicol package), formatted as follows:
I want the enumerated list item number to appear in the center of the rounded corner rectangle (vertically and horizontally). I want all rectangles to be the same width, whether the value is 1 (not 001) or 500. I want the rounded corner rectangle to be centered, vertically, on the data that follows it. (This is not the case, in my attachment.)
I have researched a method (with and without the enumitem package) to modify the enumerate counter to appear on top of a symbol or box that resembles the rounded corner rectangle that I want to use. I have not found a solution.
Thank you.
Kurt Todoroff
Text Formatting ⇒ Add A Symbol Or Box To The Enumerate Counter
-
- Posts: 27
- Joined: Thu Feb 07, 2019 4:25 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10343
- Joined: Mon Mar 10, 2008 9:44 pm
Add A Symbol Or Box To The Enumerate Counter
Hi Kurt!
Here is a way to display numbers in such a format:
Stefan
Here is a way to display numbers in such a format:
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\newcommand*\rect[1]{\tikz[baseline=(char.base)]{
\node[shape=rounded rectangle, draw,
inner sep=2pt, minimum width=3em,
fill=blue, text=white, font=\sffamily\bfseries] (char) {#1};}}
\begin{document}
Test: \rect{1} \rect{20} \rect{500} baseline aligned.
\end{document}
LaTeX.org admin
-
- Posts: 27
- Joined: Thu Feb 07, 2019 4:25 pm
Add A Symbol Or Box To The Enumerate Counter
Hi, Stefan.
You have produced a fine piece of work. My gratitude.
I modified your work, and, I used it to obtain the results that I want.
\newcommand*\rect[1]{\tikz[baseline=(char.base)]{
\node[shape=rounded rectangle, draw,
inner sep=4pt, minimum width=3em,
fill=black, text=white, font=\bfseries] (char) {#1};}}
\newcommand*\rectitem{%
\stepcounter{enumi}\item[\rect{\theenumi}]}
How can I alter the box geometry to make it resemble a rectangle, that uses small radius corners, instead of using semi-circles at the left and right sides?
Thank you.
Kurt
You have produced a fine piece of work. My gratitude.
I modified your work, and, I used it to obtain the results that I want.
\newcommand*\rect[1]{\tikz[baseline=(char.base)]{
\node[shape=rounded rectangle, draw,
inner sep=4pt, minimum width=3em,
fill=black, text=white, font=\bfseries] (char) {#1};}}
\newcommand*\rectitem{%
\stepcounter{enumi}\item[\rect{\theenumi}]}
How can I alter the box geometry to make it resemble a rectangle, that uses small radius corners, instead of using semi-circles at the left and right sides?
Thank you.
Kurt
- Stefan Kottwitz
- Site Admin
- Posts: 10343
- Joined: Mon Mar 10, 2008 9:44 pm
Add A Symbol Or Box To The Enumerate Counter
Hi,
you can change to
Stefan
you can change to
rectangle
with rounded corners
and a value, less maximum width:\node[shape=rectangle, draw, inner sep=4pt, minimum width=2em,
fill=black, text=white, font=\bfseries, rounded corners = 4]
Stefan
LaTeX.org admin
-
- Posts: 27
- Joined: Thu Feb 07, 2019 4:25 pm
Add A Symbol Or Box To The Enumerate Counter
Hi, Stefan.
I made a couple of tweaks, and, I am very pleased with the results.
Again, my gratitude.
Regards,
Kurt
I made a couple of tweaks, and, I am very pleased with the results.
Again, my gratitude.
Regards,
Kurt