TransWikia.com

How to mix itemized and enumerate items in the same list?

TeX - LaTeX Asked on June 22, 2021

I have a situation where I need to generate lists which contain a mix of numbered items and non-numbered items. Only the numbered items increment the counter. So something like this:

enter image description here

I know how to suppress the bullet by using item[], but it looks like whether an item is numbered (and increments the counter) is a function of the list environment, not the item itself. How can I do this? Stock LaTeX, please, I don’t want to install more packages if I can help it.

One Answer

No packages needed really (though enumitem is the package to tame lists). Use enumerate, which will do the numbering for you, then use item[textbullet] to force a bullet, item[] to have nothing, and item to have it numbered normally. You may want to define a shortcut to item[textbullet] like newcommandbitem{item[textbullet]}.

documentclass{article}

begin{document}

begin{enumerate}
  item[textbullet] bullet
  item[textbullet] bullet
  item[] no bullet
  item[] no bullet
  item number
  item number
  item[] no bullet
  item number
  item[textbullet] bullet
end{enumerate}

end{document}

enter image description here

Correct answer by Phelype Oleinik on June 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP