Skip to main content
Jason Burnett
Inspiring
August 16, 2023
Question

Dynamic Image Captions from Image Filename?

  • August 16, 2023
  • 2 replies
  • 1686 views

Thanks again for all the help with my last project. It still has some bugs, but I am about to finish my ULTIMATE TEMPLATE with highly organized and uniformly applied Object, Paragraph, and Character Styles.. I just have a couple of questions before I am ready to use it.

 

Currently, I have a scanned image of a handwritten recipe that I place (with caption) in my content pages. Why on earth does InDesign have you manually place the caption after the image? I like my captions grouped with my images and was hoping they would just honor the caption style when you placed a new image. (I know put it in feedback).

 

I click the caption and then apply the appropriate Object Style to both the image and the caption, then group the two. I then have to edit the caption since, by default, it is the filename of the image (including the file extension). Is there any way to get it to drop the extension automatically? The Caption created when placing an image is a static caption. Is there a way to define a text variable that knows the filename without the file extension, so I could just create dynamic captions automatically?

 

After I get the recipe image and caption situated, I need to hide the caption. Since the layer information is not included in the Object Style (which seems really stupid) and since visibility is not a configurable option in Object Styles, I have to manuyally manage hiding the layer with the caption. Is there any better way to make the recipe name (image document name minus file extension) dynamically appear when an object sttyle is applied?

 

Also, do the caption settings pertain to each image or all images? If I setup a caption one way for one catagory of images (say photos) where I want the text centered and visible, can I setup the caption differently for other images using the Caption setup menu? How is that inormation stored/retreieved since its not listed in Object Styles.

 

And the final question...when generating a TOC, if you apply a Paragraph Style to the Title through your book (one TOC with title in every section), shouldn't you be able to use that Paragraph Style to create a TOC at the beginning?  So if I have 5 chapters that all have TOC (for their chapter) and the TOC is styled as chapterTitle, shouldn't I be able to then create a new TOC for the entire book that looks up all of the chapterTitle entries and provide a TOC based on their page numbers?

 

To solve the problem (unsatisfyingly), I manually set the chapter titles to generate tje TOC or the book. I was hoping it would do it all for me.

I'm excited to be wrapping this up so I can share it. Thanks again for all the help.

P.S. Just wrapping up the tenth printed copy of the latest version of the book. 
Can't wait to try it with my new template  Here are some pictures. Thanks again for all your help.


.

 

For some reason, the colors look terribly washed out in these pics. They are not in real life. The color is vivid.

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
August 16, 2023

"Because InDesign's caption feature is a wonky, tech-bro system suited to fully managed publication environments and not much else."

 

There you have it.

James Gifford—NitroPress
Legend
August 16, 2023

Not sure what your issue with the TOC is. You can assign a style to each individual level of the TOC, with granular control of both the page number and the leader tab using Character Styles. You can even do 'phantom' variations of the same level by using different source paragraph styles. What more is it you seek?

Jason Burnett
Inspiring
August 17, 2023

Basically, I was hoping to have the Section TOC (which lists hidden "Recipe Title" paragraph styles (see figure 1) where I would set the title of the section in the title of the TOC file (styled with "Section Title").

 

Then, when all 10 sections had their own TOC styles that just indexed recipes in their section, I could go to the front of the book and generate a new TOC for the entire book. This table of contents would reference the "Section Title" paragraph styles just created for each section when I setup each section's TOC. (figure 2)

Then I also index the recipe names alphabetically for the entire book at the end in the Recipe Index TOC. (figure 3)

 

The problem is that I could not reference the automatically created paragraphs using the "Section Title" paragraph style that the TOC function creates. Instead, I had to leave the titles for each TOC blank and manually add a separate frame with the manually entered name of the section to apply the "Section Title" style for the book TOC. I  wondered why the TOC generator can't reference the Section Titles created by the TOC generators for each section.


Thanks for your help again. 

Robert at ID-Tasker
Legend
August 16, 2023

The part with captions - can be easily scripted. 

 

The TOC - it's generated from the ParaStyle - not sure why it's not working for you?

 

Congrats on the printed version.