Skip to main content
Inspiring
July 27, 2023
Question

How to link multilevel list to figure caption in InDesign?

  • July 27, 2023
  • 7 replies
  • 3789 views

Hi All,

I'm managing a suite of technical publications that feature multilevel section headings as shown in the screenshot. At present the figure numbering is manually typed and i wish to automate it so that when figures are added or removed the figure numbering updates.

In a nutshell, i wish to pick up the first part of the figure number from the preceeding section heading and add -1, -2 etc. and have that update on editing the document. Adding the word "figure" and the "-1" i know how to do but how can i pick up the section heading? Bear in mind that figures and/or sections maybe added or removed during the editing process.

I hope i've made it clear enough what i'm trying to do, thanks in advance for any assistance.

 

<Title renamed by moderator>

 

This topic has been closed for replies.

7 replies

Barb Binder
Community Expert
Community Expert
August 1, 2023

Ugh. I managed to forget about the incremental caption numbers, 1.1-1, 1.1-2, from the original question. 🤦‍

 

Before you consider an application switch, take a look at Robert's scripting idea. He may be able to get you there within InDesign. I'm not teaching tomorrow, so will have a chance to think this all the way through one more time.

 

But again, how were you doing this in PageMaker?

 

~Barb

~Barb at Rocky Mountain Training
Robert at ID-Tasker
Legend
August 1, 2023

I've got example file - and it will be piece of cake.

Scrpt just would need to check for the last Heading ParaStyle used in the text - before the Table / Figure - and apply pre-defined ParaStyle with correct numbering level....

 

But ... I'll do it as a free Rule for the free version of the ID-Tasker.

 

Thanks to the way ID-Tasker works - Story Editor on steroids - it will be A LOT easier than writing it from scratch in JS or VB.

I don't have to analyse if caption is above or below of the Table / Figure, if Table / Figure and its caption is part of the MainStory or as an anchored TextFrame / Group or outside of the MainStory, how many TextColumns, what Layer, etc.

It can even run on different Languages in the same file - and those Languages don't have to be on a separate layers - can be mixed in the MainStory - as long as Language is set to the Paragraph... and should also work for multiple Languages at the same time - e.g. when EN is "restarting" numbering but user wants to renumber only FR Tables.

 

And then - it can be run on any number of files automatically - even whole server can be processed overnight - with extra PDF export.

 

Barb Binder
Community Expert
Community Expert
August 1, 2023

One last thing @Jospeh Isherwood., unless you have further questions from me. 

 

I made one more quick video to demo that you can add the en dash and space to the heads so that they will be picked up by the x-ref, but hidden the in heads (with a GREP style).

 

I have a question for you though. I was a very long time PageMaker user—I don't recall either cross references or numbered list in PageMaker. Now it's been 23 years since I've used it and maybe I've just forgotten, but how were you handling this in PageMaker? I'm guessing everything was done manually?

 

~Barb

~Barb at Rocky Mountain Training
Inspiring
August 2, 2023

Barb,

Yes it was all manually done in pagemaker as far as i recall. All the lists etc have been added by me during the conversion from PM to ID. I've never had any training on any of it, just a lot of tutorials and trial and error, with some help from the likes of yourself, which i appreciate.

I've been dragged off this for the time being too so i'll have to pick it up again down the line.

Thanks.

Barb Binder
Community Expert
Community Expert
August 2, 2023

Got it. Well, bookmark this page so that you can pick up where you are leaving off with Robert's script. It sounds like the best option to automate this so far.

 

~Barb

~Barb at Rocky Mountain Training
Barb Binder
Community Expert
Community Expert
August 1, 2023

To be clear, I'm not suggesting updating to FrameMaker now. I'm just pointing out that InDesign wasn't designed for the rigorous layout requirements of technical documents, so you may run into additional unexpected difficulties. I just wanted to give you a heads up.

 

That said, cross-references can address this issue. They can be updated after you add, remove or renumber headings. This video shows me removing the heading above the one referenced and then updating the references. 

 

 

~Barb

~Barb at Rocky Mountain Training
Inspiring
August 1, 2023

Barb,

Do you think that switching to FrameMaker would have sufficient benefit to warrant it? i could make a suggestion to IT.

Either i'm missing something or this would not produce the desired result. For example, if i wanted to add another figure to that section and reference the section heading number would i not just get another figure caption saying "Figure 1.1.1 - Flight Deck Earthing Points"? How would this increment the figure number (Figure 1.1.1-1, -2 etc) and would the captions not have the same title as the section heading? this would not be correct as there can be multiple figures in a section, all with different captions, the fact that the figure shown in the example has the same title as the section heading is coincidental.

I get how this method could be used to reflect changing heading numbers or words but would not any figure captions in a section generated using it all have the same number and the same words? This is why i made an ealier comment about using cross-references being too inflexible to achieve the desired result.

My brain hurts 😉

Barb Binder
Community Expert
Community Expert
July 28, 2023

Ok. Keep the ^H.

 

The lowest level heading is at level 5 (1.1.1.1.1) for the books, although there isnt a heading of that level in this chapter.

This seems like a stumbling block that I don't see an answer for. If some chapters have a level 5 head and some don't, then InDesign is going to call in the number when it is there, and use a zero when it isn't. Is there any chance you can simplify the figure and table numbers and perhaps just call in the top two levels? Figure 1.1-1 and Table 1.1-1 instead of Figure 1.1.1.1.1-1 and Figure 1.1.1.1.0-1? If not, we are now looking at manual workarounds, which require human proofing because they can go awry after edits.

 

~Barb 

~Barb at Rocky Mountain Training
Inspiring
July 31, 2023

Hi Barb,

Unfortunately, the standard demanded by these publications requires the figures and tables to be numbered according to the section they appear in.

I suppose a workaround would be to create paragraph styles for each figure level but this kind of defeats the objective of automating the figure numbers somewhat.

i must admit i'm a bit disappointed with how difficult it is to achieve what i want in ID. All i really need is an option to link the figure/table numbers to the preceeding heading level number.

I'd like to hear your suggestions but if the result doesnt save any time/effort savings i may as well continue to do it all manually and save the upheaval in the suite of books as theres a lot of them.

Thanks.

 

Robert at ID-Tasker
Legend
July 31, 2023

If you can "introduce" some specific separator - Em/En Space /Tab or anything else that could be used as a unique separator between numbers and the caption - it would be extremely easy to automate through scripting. 

 

Barb Binder
Community Expert
Community Expert
July 28, 2023

Hi @Jospeh Isherwood.:

 

So you've made a change from yesterday that necessitates clarification: is your tech doc a series of chapters pulled together in an InDesign book (.indb file) or is it all contained in one .indd file?

 

You want to start with  ^H for book documents and ^1 for a single file. If the document you are showing us below is just the first chapter of what's going to be a multi-chapter book then you want to leave the ^H. Otherwise, you will want to restore the ^1.

 

The extra zero is because you seem to have added two levels instead of one (which you might need but I can't see why from what you are showing us). Let's make Figure title a Level 5 and change the number format to "Figure ^H or ^1.^2.^3.^4–^5". Does that do it?

 

~Barb

 

~Barb at Rocky Mountain Training
Inspiring
July 28, 2023

Hi Barb,

The document shown is Section 1 in an .indb book file (you can see the rest top right of the screen shot) so "H" would be the correct usage i believe.

I think we are at cross-purposes for the rest of your reply. The lowest level heading is at level 5 (1.1.1.1.1) for the books, although there isnt a heading of that level in this chapter. So, following your tutorial, i created a further two heading levels and made figure numbers level 6 and table numbers level 7 in the same numbered list.

As you can see in the screenshot of a later page in the document things arent well. The table number should be 1.4-1 and the figure number should also be 1.4-1 but not only are the table/figure numbers showing lower levels not wanted but the figure number has not restarted (the table shown is the first occurrence in the book but they arent restarting either, i checked).

I think part of the problem may be that your tutorial mentions about only requiring figure numbers "after sub-head 2" where as i require them at all levels so maybe i'm missing something there.

Once again, thanks for your help, i'm sure i'm close to the solution now!

Barb Binder
Community Expert
Community Expert
July 27, 2023

Hi @Jospeh Isherwood. 

 

This is just a level 5 in your list. Create a new style for the caption based on  Heading Style 4 and set it as Level 5 with the Number format ^1.^2.^3^4 – ^5. This will product Figure 1.2.2.6-1, 1.2.2.6-2, 1.2.2.6-3, etc.

 

And remember to use cross-references to the Paragraph number <paraNum /> in those two final paragraphs in the left column, so that they will update when you add or remove figures. 

 

~Barb

 

~Barb at Rocky Mountain Training
Inspiring
July 28, 2023

Hi and thanks for your reply.

Following your excellent tutorial on this which i came across after posting i've almost got it.

The documents i'm working on have an additional 2 sub-levels to the one featured so i've manged to add the extra levels, which all seems to work ok.

Problem now is with the figure numbers. there is no level 5 paragraph in the test document but when i apply the figure style to the above figure i get 1.2.2.6.0-01 so it seems to adding a zero for level 5 where i dont want it. Also, the second following page has a sub-heading of 1.3 yet the associated figure number is given as 1.3.2.6.0-2 so its picking up level i dont want it to i think.

I'm just a self-taught noob trying to figure this stuff out.

Thanks for the help.

Robert at ID-Tasker
Legend
July 27, 2023

I don't think there is an option to do it - you can only add Chapter Number placeholder - and no option for any kind of variables...

 

But it could be scripted... Script would've to create new ParaStyle - for each section - and add static text from this Section.