General ⇒ Numbering items
-
- Posts: 21
- Joined: Mon Apr 21, 2008 3:50 am
Numbering items
I want to produce automatic numbering for items, but preceded with a consistent string.
So far my research on numbering has pulled out things about LaTex counters --- applied to headings, sections et cetera, but not quite the "automatic numbering of things that follow a string" that I have in mind.
Partial success hacking the numberpars package, but this entails some formatting constraints.
Similar results with enumerate ... unless there's some way to prefix "\item" with a string?
Don't want to have to number these things by hand --- time-consuming and too much opportunity for error.
Any advice?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Numbering items
A little example using enumitem:
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\begin{document}
text text text text text
\begin{enumerate}[label=string--\arabic*,leftmargin=*]
\item First item
\item Second item
\end{enumerate}
text text text text text
\end{document}
-
- Posts: 21
- Joined: Mon Apr 21, 2008 3:50 am
Numbering items
What I have in mind is a list of recommendations.
So I am already applying \newcommand to items under enumerate …
In addition …
My objective is to do "Recommendation (number)", where number is set and incremented automatically.
So this is a little different from re\defining enumi et cetera.
Any further advice?
Cheers,
Numbering items
My first suggestion then is still valid.Sekantombi wrote:...What I have in mind is a list of recommendations...My objective is to do "Recommendation (number)", where number is set and incremented automatically...
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\begin{document}
text text text text text
\begin{enumerate}[label=\textbf{Recommendation \arabic*}.,leftmargin=*]
\item First recommendation with some text text text text text text text text text text text text text text text text text text text text text text text text text text text text.
\item Second recommendation.
\end{enumerate}
text text text text text
\end{document}
-
- Posts: 21
- Joined: Mon Apr 21, 2008 3:50 am
Re: Numbering items
That makes perfect sense.
Apologies for not reading your post with a little more diligence.