Generalenumerate

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

enumerate

Post by omkardpd »

Hi,

I need the document like following....

1. title1 (bold letters)
blah blah blah.
2. title2 (bold letters)
blah blah blah.

I am using following code....
\textbf{\begin{enumerate}
\item title1
blah blah blah....

\item title2
blah blah blah....
\end{enumerate}}

But I am getting some error messages. Not sure what is wrong with the code. If I separately enumerate for title2, then obviously I get same number for title1 and title2.

Can someone help me with this?

Thank you,

Omkar

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

enumerate

Post by meho_r »

omkardpd wrote:Hi,

I need the document like following....

1. title1 (bold letters)
blah blah blah.
2. title2 (bold letters)
blah blah blah.

I am using following code....
\textbf{\begin{enumerate}
\item title1
blah blah blah....

\item title2
blah blah blah....
\end{enumerate}}

But I am getting some error messages. Not sure what is wrong with the code. If I separately enumerate for title2, then obviously I get same number for title1 and title2.

Can someone help me with this?

Thank you,

Omkar
Try with no empty lines between \item commands. \textbf{} command cannot take empty lines.

Do you need all the text be bold (title + blah blah...)? If do, try:

Code: Select all

\begin{enumerate}\bfseries
\item first
\item second
\item third...
\end{enumerate}
This way you get all inside enumerate environment bold and you can separate \item command with empty line(s).
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Re: enumerate

Post by omkardpd »

Hi,

the code that you have suggested is giving me all text in bold. I want only text corresponding to \item under enumeration to be bold.

Thank you


Omkar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

enumerate

Post by meho_r »

OK, let's try this:

1. You need to use package enumitem, so in the preamble put:

Code: Select all

\usepackage{enumitem}
2. Create new customized list:

Code: Select all

\newcommand\litem[1]{\item{\bfseries #1\enspace}}
3. Use enumerate environment this way:
\begin{enumerate}[label=\textbf{\arabic*.}]
\litem{item bold} and text not bold

...or in new paragraph...
\litem{item bold} and text not bold...

...or in new paragraph...
\end{enumerate}
Post Reply