I have a set of commands for producing various kinds of specific list-items, such as

\newcommand{\staritem}{\item[$\star$]} % not really, but you get the gist

All the ones I currently have can be used in the same way as \item, that is, just specify the item type at the start of the paragraph, and then write text as normal.

Now, I want to create a \bolditem command, that produces an \item and wraps the text in \textbf{...}. However, I'd like to make it available with the same syntax (so the users don't have to wrap the entire item text in braces).

Is this possible? How?

  • There might be more appropriate tags for this question, but I don't have enough rep to create new ones. – Tomas Aschan Aug 5 '10 at 12:36

Assuming I understand correctly what you want, here's one way to do it:



Before the list
\item First item
\bolditem Second item
\item Third item
\bolditem Fourth item
After the list

That produces:

Before the list

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

After the list

If you want the numbers in bold font as well, put the \bfseries before the \origitem. If you want to be able to write \bolditem[A] then that will work with the \bfseries before the \origitem without further modification (but would need a modicum of modification if you don't want the numbers in bold font).

| improve this answer | |
  • 2
    \newcommand{\bolditem}{\item\bfseries} would be sufficient as \item already has been redefined. – Stefan Kottwitz Aug 5 '10 at 12:58
  • @Stefan Kottwitz: Good point! – Andrew Stacey Aug 5 '10 at 13:13
  • Exactly what I was after - thanks! =) – Tomas Aschan Aug 5 '10 at 13:19
  • Is there a similar "\itseries" somewhere? – Tomas Aschan Aug 5 '10 at 16:57
  • 1
    Not quite, it is \itshape. Then you can combine them: \itshape\bfseries does what you'd want it to. – Andrew Stacey Aug 5 '10 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.