Forced returns in autonumbering

Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Has this been added to FM? I see some old posts that it isn't possible to do this (and experimentation with using either \n and \r seems to bear this out), but it would be really useful if I could figure out a way to do this. Mostly so that when I generate a PDF, the bookmarks include the section numbering automatically as part of the heading instead of having to add them in after the fact.

Views

156

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Community Professional , Apr 06, 2022 Apr 06, 2022
I created an Acrobat Javascript to do this. Here is the before screenshot of the bookmarks panel: And here is the after: The script is invoked by a simple toolbar button in Acrobat Pro: If you are interested in this script, please contact me offlist.

Likes

Translate

Translate
Adobe Community Professional , Apr 06, 2022 Apr 06, 2022
Rick turned this around in about half an hour, and I couldn't be happier with the result. Not only does the script fix my bookmarks, but he taught me in about 5 minutes how to set up an Action that would reset my display settings and run the script automatically after invoking it. I may have to play with more actions. I bet I could get it to automatically add watermarks, too, for when I'm issuing drafts for reviews. [rubs hands gleefully]

Likes

Translate

Translate
Participant ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

I don't understand why your bookmarks don't include the section numbering nor why that is connected to forced returns. I don't have that problem.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

The style here (set before I came on board), is to have the section number on the first line and the heading text on the second line. They use different tags and are formatted differently.

 

If I generate a PDF and include both tags, the bookmark for the section number is a different bookmark from the bookmark for the heading text, which just looks stupid in the bookmark pane.

 

If I generate a PDF and only include the tag for the heading text, I have to manually add the Section number before the text in each bookmark. This is the option I've been using, but it's a PITA.

 

In short, I want to have one paragraph tag with autonumbering that will look like the following in the book, but will show up as "Section 2: This is how it should look" in the PDF bookmark panel.

autonumber-section-heading.jpg

 

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Hi Lin,

 

And when you move the paragraph format of the heading text one level down?

Then you would have something like

Section number

-- Heading tet

Section number

-- Heading text

 

I have this in my catalogue, and there it looks good, more tidied up, as only the order numbers can be seen, and when the reader is curious, he/she can open the bookmark.

But this is probably a different need.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Sorry, Winfried, I'm not certain what you're asking. Unless ... this is the only heading that needs a number, because it is effectively the chapter title. (I know, but it was in place before I got here and I was overruled on changing it.)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

I don't have time to try it at the moment, but I'd be tempted to use hidden text to hack this. Perhaps 3 ¶tags:

Section.Number (your blue example line)
Section.Text (your section title text)
Section.PDF (an Xref expression of Section.Number: Section.Text, which is located in an anchored frame just right of Section.Text, and is in a text color hidden by ColorViews)

Generate the PDF bookmarks from Section.PDF. I haven't worked out how to ensure that the PDF BM's would be visible when their targets are not, but I've used similar schemes to work around FM's lack of spot Xrefs.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

I actually have the section number as an autonumber for the heading 1 tag for xref purposes, but it's in 2 pt. text and white in color so it doesn't show up in the book. I haven't been able to figure out how to move it to the front without introducing a big gap before the text starts or how to get the bookmarks to do it for me. 

 

I might try the anchored frame hack, although it's a bloody nuisance to have to add it. Is it a text frame inside the anchored frame, or just the anchored frame? The only real problem I can see here is that I'd have to remember it existed and update it if I changed the title of the chapter.

 

ETA: Another reason I'd like it is so that the actual heading text shows up in the FM book file panel when I switch it to headings from path/filename. "Section 2" doesn't tell me anything at all, whereas "Section 2: How to connect X to Y" is moderately informative.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

I sometimes deal with this at the PDF level with an Acrobat Javascript. I will take the "Section #" from the bookmark and append it to the front of the following bookmark (with a space), and then delete the "Section #" bookmark. If you have Acrobat Pro, it is as simple as opening the PDF, and clicking an icon that invokes the script. It's an extra step, but you are likely opening the PDF to look it over anyway and it eliminates the need for troublesome FrameMaker hacks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Does Acrobat do record as you go macros?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

They are not recorded but written in Javascript code and installed in a special "Javascript" folder. They show up as Add-on tools and in the Javascript debugger as you can see in the screenshot.

image.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Drat. Thank you for the information. I suppose I need a way to write the Javascript to begin with, and also need to know how to write a Javascript. That might happen in my copious spare time.

 

Oh, well.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Lin, please send me a PDF off list so I can see what you are trying to do. A script might not be that complicated. Thanks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Done, and thank you for the offer.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

I created an Acrobat Javascript to do this. Here is the before screenshot of the bookmarks panel:

image.png

And here is the after:

image.png

The script is invoked by a simple toolbar button in Acrobat Pro:

image.png

If you are interested in this script, please contact me offlist.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

re: Is it a text frame inside the anchored frame, …

Yep, with frame sizing & text pt.sz. set small enough that the whole thing fits inside one line height to right of your AN para. In addition to ColorViews & Conditions, this text could also be hidden behind a white rectangle.

re: The only real problem I can see here is that I'd have to remember it existed and update it if I changed the title of the chapter.

Nope, its content is Xrefs to your real paras, so it auto-updates.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

FWIW, I've added a request to enable using either an \r or \n to the autonumbering in a comment to an earlier bug report/feature request created by Klaus Daube, which asks Adobe to add the ability to have leading zeros and to have decrementing autonumbering, both of which I think would be wonderfully useful features. So go vote for it!

 

https://tracker.adobe.com/#/view/FRMAKER-10999

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

LATEST

Rick turned this around in about half an hour, and I couldn't be happier with the result. Not only does the script fix my bookmarks, but he taught me in about 5 minutes how to set up an Action that would reset my display settings and run the script automatically after invoking it.

 

I may have to play with more actions. I bet I could get it to automatically add watermarks, too, for when I'm issuing drafts for reviews.

 

[rubs hands gleefully]

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines