Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

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:

Numberwithzero1

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”:

Numberwithzero2

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:

Numberwithzero3

(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.)

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.) 

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:

Numberwithzero4

Now let’s apply it to a blank paragraph before the one we want to reset:

Numberwithzero5

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:

Numberwithzero6

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?!

Tags
Related Articles
Comments

4 Comments on “Multilevel Numbering With a Zero (like 2.0.1)

  1. Thanks David, for a quick remedy. Both the options are quite good and can be used easily. Although one has to duplicate styles for each level either with option 1 or with option 2.

    But as Ena Harvey feels in her post #68013, that it will create numerous problems.
    http://indesignsecrets.com/topic/numbers-dont-restart-after-any-previous-level-only-the-immediately-previous-one.

    Can’t this be avoided and made simple with the help of some script or plugin or perhaps in the next adobe version.

  2. Is it possible to have a multilevel page numbering with a zero(like 1.0, 2.0, 3.0? I m currently using a section marker (since section prefix cannot include the value 0) to indicate the section (1.0) but the page number shows up as 1.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>