Text FormattingSimple Removal of Period from Enumerated List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
surrix
Posts: 9
Joined: Sun Nov 08, 2009 7:07 pm

Simple Removal of Period from Enumerated List

Post by surrix »

Hey all,

I'm using the following code to add brackets in an enumerated list:

Code: Select all

\renewcommand{\theenumi}{[\arabic{enumi}]}
The result is this:
[1]. Stuff
[2]. Stuff
Is there a simple way to remove the periods ideally (but not necessarily) without resorting to additional packages? I want this:
[1] Stuff
[2] Stuff
Thanks

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Simple Removal of Period from Enumerated List

Post by frabjous »

Why don't you want to load additional packages?

With enumitem loaded, it's this:

Code: Select all

\begin{enumerate}[label={[\arabic*]}]
\item One
\item Two
\end{enumerate}
If you don't want to load enumitem, probably you'd need to say what document class you were using -- and it wouldn't be "simple".
surrix
Posts: 9
Joined: Sun Nov 08, 2009 7:07 pm

Simple Removal of Period from Enumerated List

Post by surrix »

frabjous wrote:Why don't you want to load additional packages?

With enumitem loaded, it's this:

Code: Select all

\begin{enumerate}[label={[\arabic*]}]
\item One
\item Two
\end{enumerate}
If you don't want to load enumitem, probably you'd need to say what document class you were using -- and it wouldn't be "simple".
That actually works great. Better than I was expecting. Thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Simple Removal of Period from Enumerated List

Post by localghost »

The approach without any package is very similar to yours.

Code: Select all

\renewcommand{\labelenumi}{[\arabic{enumi}]}

Best regards
Thorsten
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Simple Removal of Period from Enumerated List

Post by phi »

localghost wrote:The approach without any package is very similar to yours.

Code: Select all

\renewcommand{\labelenumi}{[\arabic{enumi}]}
That works, but usually you define \labelenumi in terms of \theenumi:

Code: Select all

\renewcommand*{\labelenumi}{\theenumi}
Post Reply