General ⇒ enumerate
enumerate
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
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
enumerate
Try with no empty lines between \item commands. \textbf{} command cannot take empty lines.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
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}
Re: enumerate
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
enumerate
1. You need to use package enumitem, so in the preamble put:
Code: Select all
\usepackage{enumitem}
Code: Select all
\newcommand\litem[1]{\item{\bfseries #1\enspace}}
\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}