Multilevel Numbering With a Zero (like 2.0.1)
Here’s an interesting problem: How can you make an auto-numbered list of paragraphs that goes 1.0, 2.0, 2.01, 2.02, 2.1, and so on? It seems like it should be simple, but it takes a little extra work.
I’ve discussed how to make multi-level numbered lists here, and stressed the importance of making multiple paragraph styles. So here, I’ve made three paragraph styles — one for each level in my list:
As you can see, there is something wrong with “pineapple.” It is numbered 2.2.1, even before 2.1! That’s because the last second-level numbered paragraph was 1.2… so even though the first level “restarted” with 2, it didn’t reset the 2nd level. Oops.
There are two solutions to this, both involving making another paragraph style. The easiest thing is probably to just make a new kind of level-3 numbering, but actually force the “zero” into it in the Number field. See how the Number field in the following image shows “first level number, followed by a zero, followed by the current level-3 number, followed by a tab”:
When you apply this to the paragraph, it appears just the way we want it to. Here I show it with both on the page and in Story Editor, so you can see that I have applied the paragraph style to that paragraph and got the numbering I wanted:
(If you look closely, you’ll see that I also changed the first-level heads in the image above… I removed the “.0″ from the end so they’d just show 1 and 2. But then I decided to change it back for the rest of the images.)
[s2If is_user_logged_in()]If you want, you can download my file here in IDML format to play with it yourself.[/s2If]
[s2If !is_user_logged_in()]If you want, you can download my file here in IDML format to play with it yourself. (Sorry, you must be logged in as a free or paid member to download this file.) [/s2If]
The Invisible Reset Hack
Here’s a second way to achieve this effect. It also involves making a paragraph style, but this time it’s going to be an “invisible” style that forces the reset. It’s a bit of a hack, but I think it’s interesting that it works, so I wanted to share it with you.
Let’s make a numbered paragraph style that that is set to Level 2, but has nothing in the Number field… it’s just blank:
Now let’s apply it to a blank paragraph before the one we want to reset:
This is weird, but because there is no ^# value in the Number field definition, InDesign resets the numbering to zero! Now we will also change the leading for this paragraph style definition to zero. That makes the paragraph effectively disappear.
And the result is what we want:
I think I like the first method more because I’m not fond of having blank paragraphs in the middle of my list, even if you can’t see them on the page. But it’s fascinating that it works, no?!