RH2019: Chapter numbering, section references, and chapter name in header for PDF output

Contributor ,
Nov 12, 2019

Copy link to clipboard

Copied

2nd try... the original message I posted was marked as spam for some reason. If you see this message twice I apologize.
 
RH14.0.9
 
I'm trying to create a pdf output that looks something like the first reply to this post.

 

I'm running into the following problems:

 

  • Chapter and section numbering in the body:
    I cannot get chapter numbering at all. I've tried a before: counter for <h1> in the pdf CSS but then all chapters are numbered '1' (one). I haven't even tried section numbering yet until that is resolved.

  • Applying an automatic <h1>, <h2>, <h3> etc. depending on the place in the TOC:
    All my topics (also the subsections have their own separate topics) start with <h1>. The generated TOC shows the correct indentation but the topics themselves stay at <h1> for each heading. I would have hoped this was generated automatically, but currently I fear my only option is to use one topic for every complete chapter, and apply the H1, H2 myself. Is that correct, or is there another way? 

  • If the chapter and section numbering can be resolved, would it be possibe to refer to them with a dynamically generated section number (see 12.3) in the body, or otherwise with a dynamically generated page number (see p. xx)?

  • Chapter name reference in the header: I have found a post for RH2015 that talks about a <<PD>> something which I suspect is a field. However, I cannot find anything about chapter names in the field dialog, just project-wide fields such as the project name, or otherwise the file title, but in that case using a separate TOC with numbered headings (as Peter suggests) wouldn't work (I think?); I would need to add the numbers to the file title which will probably make it show up in other places as well (would it?).


I could generate to Word to solve many of these problems, but then the numbered section references (see 12.3) would still need to be added manually afterwards, I think? Which is just not an option.


Any post scripting that could solve this, or any other solutions (or pointers to them) very much appreciated.

Hi Erwin,

as for the chapter name reference in the header: you could create a masterpage for your PDF output and use the variable "Title" in the header part. Then, in your PDF, the header shows the title of the current chapter (topic title).

Regarding your other issues, just an idea more based on my experience with previous RH versions: as Peter already said, I would recommend to use the Word output, because it offers a lot more control. In Word, you could then add the chapter numbering, create a styled TOC, use paragraph control to not have headers or images alone on a page etc. Depending on your wishes, this is quite a lot of work every time, but you could use the Dev tools in Word to record a macro with all the adjustments you are making. Then, after you have done your adjustments once, you will only have to run the macro and check the result.

Regards

Karin

TOPICS
New UI, Single source layouts

Views

269

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

RH2019: Chapter numbering, section references, and chapter name in header for PDF output

Contributor ,
Nov 12, 2019

Copy link to clipboard

Copied

2nd try... the original message I posted was marked as spam for some reason. If you see this message twice I apologize.
 
RH14.0.9
 
I'm trying to create a pdf output that looks something like the first reply to this post.

 

I'm running into the following problems:

 

  • Chapter and section numbering in the body:
    I cannot get chapter numbering at all. I've tried a before: counter for <h1> in the pdf CSS but then all chapters are numbered '1' (one). I haven't even tried section numbering yet until that is resolved.

  • Applying an automatic <h1>, <h2>, <h3> etc. depending on the place in the TOC:
    All my topics (also the subsections have their own separate topics) start with <h1>. The generated TOC shows the correct indentation but the topics themselves stay at <h1> for each heading. I would have hoped this was generated automatically, but currently I fear my only option is to use one topic for every complete chapter, and apply the H1, H2 myself. Is that correct, or is there another way? 

  • If the chapter and section numbering can be resolved, would it be possibe to refer to them with a dynamically generated section number (see 12.3) in the body, or otherwise with a dynamically generated page number (see p. xx)?

  • Chapter name reference in the header: I have found a post for RH2015 that talks about a <<PD>> something which I suspect is a field. However, I cannot find anything about chapter names in the field dialog, just project-wide fields such as the project name, or otherwise the file title, but in that case using a separate TOC with numbered headings (as Peter suggests) wouldn't work (I think?); I would need to add the numbers to the file title which will probably make it show up in other places as well (would it?).


I could generate to Word to solve many of these problems, but then the numbered section references (see 12.3) would still need to be added manually afterwards, I think? Which is just not an option.


Any post scripting that could solve this, or any other solutions (or pointers to them) very much appreciated.

Hi Erwin,

as for the chapter name reference in the header: you could create a masterpage for your PDF output and use the variable "Title" in the header part. Then, in your PDF, the header shows the title of the current chapter (topic title).

Regarding your other issues, just an idea more based on my experience with previous RH versions: as Peter already said, I would recommend to use the Word output, because it offers a lot more control. In Word, you could then add the chapter numbering, create a styled TOC, use paragraph control to not have headers or images alone on a page etc. Depending on your wishes, this is quite a lot of work every time, but you could use the Dev tools in Word to record a macro with all the adjustments you are making. Then, after you have done your adjustments once, you will only have to run the macro and check the result.

Regards

Karin

TOPICS
New UI, Single source layouts

Views

270

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
Nov 12, 2019 0
Contributor ,
Nov 12, 2019

Copy link to clipboard

Copied

pdf_question1.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
Reply
Loading...
Nov 12, 2019 0
Adobe Community Professional ,
Nov 12, 2019

Copy link to clipboard

Copied

Finally your post has appeared on the forum and with a Reply box that works. I am sorry you have had so much trouble, the reasons are being looked into.

 

The first thing I would say is forget any ideas of doing this direct to PDF, there just isn't enough control.

 

Although not essential to the outcome, if your content folders are broadly similar to the outputs, I would prefix the folders and maybe the topics with numbers. That way the Contents panel will be sorted into the same order as the outputs, just makes life easier.

 

You can set up a CSS to apply numbering within a topic but not running across other topics without a little intervention. You add something to each topic that forces the first number in that topic to be what you want and then other instances of that style will flow from the number you set. It's described in a sample project I have attached. See the Method topic. That would also allow you to have numbers for print but not online if that is a requirement.

 

There is a relatively easy way to get your chapter numbering. Create a separate TOC for your print presets, it can be a duplicate of an existing TOC to avoid having to create it again or you could auto-create it. Just go to each book and prefix it with a manually entered chapter number. Topics will still show their Topic Title (Not topic heading) so they will not have numbering. The order of them would be what you set in the Print preset so would it be an issue they are not numbered within the chapter?

 

You also wanted cross references to include the numbering. I don't have a ready solution for that but I do if page numbers would be acceptable and I am thinking that would be better anyway. For anyone online, it doesn't matter as the link would take them so the section or page is not needed. For print users accessing hard copy page numbers are more specific. On my site is a Word macro adds the page number to the links in the Word output.

 

There is one other idea that might be worth a try. Map you print output to a Word template where the styles have numbering set up already. Not sure how that would work across topics but I have a hunch it might.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

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
Reply
Loading...
Nov 12, 2019 0
Engaged ,
Nov 12, 2019

Copy link to clipboard

Copied

Hi Erwin,

as for the chapter name reference in the header: you could create a masterpage for your PDF output and use the variable "Title" in the header part. Then, in your PDF, the header shows the title of the current chapter (topic title).

Regarding your other issues, just an idea more based on my experience with previous RH versions: as Peter already said, I would recommend to use the Word output, because it offers a lot more control. In Word, you could then add the chapter numbering, create a styled TOC, use paragraph control to not have headers or images alone on a page etc. Depending on your wishes, this is quite a lot of work every time, but you could use the Dev tools in Word to record a macro with all the adjustments you are making. Then, after you have done your adjustments once, you will only have to run the macro and check the result.

Regards

Karin

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
Reply
Loading...
Nov 12, 2019 0
Contributor ,
Nov 19, 2019

Copy link to clipboard

Copied

Exporting to Word probably works, I have used that some years ago with RH 10, where I mapped RH styles to Word styles, which worked perfectly at the time.

 

Currently I have some problems with exporting to Word, for one each style that isn't already in the Word template but is copied from RH gets a font size of 10x the original size, so I ended up with 110-pt fonts and 5,000-page documents 🙂 

 

Also, I would like to get everything I can out of the direct-to-pdf output before switching to Word, because it's just so much easier to hit Generate and be done with it. So I've accepted the limitations of direct pointers in print for now.

 

But When I do switch to Word (and I will at some point, if nothing else just for the fun of it), I will certainly be trying out the macro that generates page numbers. I will let you know how that goes.

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
Reply
Loading...
Nov 19, 2019 0
Adobe Community Professional ,
Nov 19, 2019

Copy link to clipboard

Copied

Each style that isn't already in the Word template but is copied from RH gets a font size of 10x the original size, so I ended up with 110-pt fonts and 5,000-page documents

 

I haven't encountered that or seen anyone else report it. Can you recreate that in a new project with just one or two topics? If you can, then see the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

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
Reply
Loading...
Nov 19, 2019 0