I would like to skip numbering in a Latex enumerate environment to generate lists as follows:
(1) Item 1..
(2) Item 2..
(5) Item 5..
(6) Item 6..
and so on.
The Latex code is auto-generated, so ideally, I would like to insert "silent" \item-s in the environment, so that they will keep track of the numbering but nothing will appear on the output. However, if I simply add empty \items currently, I get lists like the following:
(1) Item 1
(2) Item 2
(3)
(4)
(5) Item 5
(6) Item 6
While the empty \item-s approach is the most ideal, I'm more than welcome to any other ways of achieving the number-skipping.
Thanks in advance!
You can also use \addtocounter{enumi}{2} (for example, in your particular case) to skip 2 items.
Itemize: This is an environment used for bulleted list basically when the given details or information or to be put in an unordered list. Enumerate: This is an environment used for numbered list. This list is given when the information to be updated should be in a sequence or in a specified order.
Using lists in LaTeX is pretty straightforward and doesn't require you do add any additional packages. For unordered lists, LaTeX provides the itemize environment and for ordered lists there is the enumerate environment. The elements within both environments have to be declared beginning with the \item command.
Depending on the level of enumeration, a simple \setcounter{enumi}{5}
would suffice. (the number of i
's after the enum
in the first argument is the level of enumeration.
Another approach would be to call \stepcounter{enumi}
as many times as you want to skip items. This makes the number of skipped items independent of the number of items before you skip.
EDIT: the last option is the most like inserting "silent item
's".
EDIT: its probably best not to hack LaTeX, but use the list
environment (see the LaTeX documentation on how to use this). Since your LaTeX code is auto-generated, it should not be hard to generate the labels, and put them in a list environment.
You can also use \addtocounter{enumi}{2}
(for example, in your particular case) to skip 2 items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With