Caption Text to appear in Table of Contents?

Everything related to our flagship word processor.
Post Reply
archeolog
Posts: 3
Joined: 2013-01-29 14:00:06

Caption Text to appear in Table of Contents?

Post by archeolog »

Hi,
I'm probably missing some obvious step, but I have set up a separate table of contents for "Figures", a paragraph style for image captions and configured a list style which automatically numbers each figure. When I add in caption text for a figure (e.g. Figure 1. Map of Africa) in the normal text of the document (as a reminder to self), it automatically adds it to the Table of Contents as I would expect, but if I do the same in a caption attached to a figure, it doesn't work. Nor can I manually add the caption to my Table of Contents, as the options are greyed out on the drop-down menu.
Thanks for help with this!
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Caption Text to appear in Table of Contents?

Post by martin »

It sounds like your figure captions are inside floating text boxes, a text area where NWP does not allow marking text for TOC inclusion. Can you place your figures and their captions inline instead? ie: in the normal main body document text area.
archeolog
Posts: 3
Joined: 2013-01-29 14:00:06

Re: Caption Text to appear in Table of Contents?

Post by archeolog »

Thank you! That works for the moment. But placing it inline means that I can't lock an image with a particular caption, or wrap text around it which has already created some rather ugly blank spaces in my document. Is there some sort of work-around that might allow me to make the images floating, but have in-line captions which will show up in a TOC? I ask because I am working with a book-length manuscript with hundreds of images, and would really like to do the whole thing in Nisus.
User avatar
phspaelti
Posts: 1360
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Caption Text to appear in Table of Contents?

Post by phspaelti »

It wouldn't be the most elegant of solutions, but I think you could do the following. Put the text of the caption in a text box as before, but also put a copy in the text and set the colour of the inline copy to white (so it becomes hidden). I'd suggest using a specific style (either character or paragraph) for these hidden captions.
philip
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Caption Text to appear in Table of Contents?

Post by martin »

phspaelti wrote:It wouldn't be the most elegant of solutions, but I think you could do the following. Put the text of the caption in a text box as before, but also put a copy in the text and set the colour of the inline copy to white (so it becomes hidden).
This would work, but would be pretty inelegant because the figure numbers are list items, so they have to reside at the start of some paragraph. That means you'll either have to give them their own paragraph in the main document body (taking up space, even if they're hidden with a white color), or stuff them away at the start of an existing paragraph that has an indentation.

If you did this, it would look something like this attached test document. Note that the captions inside the floating text boxes use cross-references to the figure numbers in the document body.
test.zrtf
(6.09 KiB) Downloaded 379 times
Another workaround would be to use bookmarks and then just build a TOC manually using cross-references to those bookmarks, ie: place the figure number in the floating text box just as you have now, but also add a bookmark to it. Wherever you want the Figures TOC to appear, insert manual lines like:
[Cross Reference to Figure 1 text] [tab character] [Cross Reference to Figure 1 page number]
[Cross Reference to Figure 2 text] [tab character] [Cross Reference to Figure 2 page number]
I hope that makes some sense. I'll attach an example too:
bookmarks.zrtf
(6.18 KiB) Downloaded 388 times
You might notice one thing odd about that example file: there are two bookmarks per figure. That's because there seems to be a bug where cross-references to bookmarks in floating text boxes do not always display the correct page number. That might be why we have TOC inclusion disabled in text boxes. I'll have to file the bug and also have us review that decision.

Sorry we don't have any better solutions for you.
User avatar
phspaelti
Posts: 1360
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Caption Text to appear in Table of Contents?

Post by phspaelti »

martin wrote:
phspaelti wrote:It wouldn't be the most elegant of solutions, but I think you could do the following. Put the text of the caption in a text box as before, but also put a copy in the text and set the colour of the inline copy to white (so it becomes hidden).
This would work, but would be pretty inelegant because the figure numbers are list items, so they have to reside at the start of some paragraph. That means you'll either have to give them their own paragraph in the main document body (taking up space, even if they're hidden with a white color), or stuff them away at the start of an existing paragraph that has an indentation.

If you did this, it would look something like this attached test document. Note that the captions inside the floating text boxes use cross-references to the figure numbers in the document body.
You can improve the look of that solution by setting the "Figure Caption" paragraph style to a line height of fixed 1pt and with 0pt following. The line becomes so thin, that it is hardly noticeable.
philip
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Caption Text to appear in Table of Contents?

Post by martin »

phspaelti wrote:You can improve the look of that solution by setting the "Figure Caption" paragraph style to a line height of fixed 1pt and with 0pt following. The line becomes so thin, that it is hardly noticeable.
Ah that's much better. Still a bit ugly as far as workarounds go, but much more serviceable– thank you Philip! I'm attaching an updated example:
hidden.zrtf
(6.14 KiB) Downloaded 375 times
I set the fixed height of the hidden TOC paragraphs to 2pts, because that made them easier to select.

Also, if someone is going to use this workaround, it would probably be a very good idea to make sure that NWP's appearance preferences shade TOC paragraphs with some coloring, so you can spot these otherwise very tiny hidden paragraphs.
archeolog
Posts: 3
Joined: 2013-01-29 14:00:06

Re: Caption Text to appear in Table of Contents?

Post by archeolog »

Thanks very much for the tips and examples - that works well enough!
mikejt
Posts: 2
Joined: 2013-02-06 12:47:44

Re: Caption Text to appear in Table of Contents?

Post by mikejt »

Please add the capability to reference lists/bookmarks/whatever in a text box ... this is *very* useful!
-- Michael Johas Teener -- https://creativecommons.net/mikejt
Post Reply