The display of topics in the publishing to PDF.

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Svetlana Akulova
Posts: 58
Joined: Tue Dec 02, 2014 12:12 pm
Location: Russia

The display of topics in the publishing to PDF.

Unread post by Svetlana Akulova »

Hello!
Tell me, please, whether it is possible to make something in this situation. I am publishing a file to pdf and I need to not display a number of items in the table of contents. But the template for publishing to pdf takes these topics and inserts, for example, in my case, on the 4th level of the table of contents. In total, the table of contents displays 6 levels of nesting. If I delete a topic from the "Table of contents", but leave it in "Topic files", then in the table of contents there is no this topic, but it is not in the text, references to it throughout the text disappear. Is there a way to prevent item titles from appearing in the table of contents?
Or the only option is to change the pdf template?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: The display of topics in the publishing to PDF.

Unread post by Tim Green »

Hi Svetlana,
Is there a way to prevent item titles from appearing in the table of contents?
Or the only option is to change the pdf template?
That is what "conditional content" is for in Help+Manual and it is one of the main reasons that Help+Manual exists. :) Help & Manual is specifically designed to allow you to manage and export multiple variants of your project content for different purposes and output formats, all from the same project. You can include and exclude project content and add alternative content with any level of granularity, from entire chapters and even project modules (when you are working with modular projects) all the way down to specific content inside individual topics -- even a single letter if you need to.

The following description shows you how to do this with a condition that you define yourself. However, you can also do the same thing for "output conditions" -- you can include topics and chapters in WebHelp but exclude them in PDF, for example. Those conditions are already defined so you can skip the definition steps.

For example, to include different chapters for two different clients you just need to tag the chapters you want to include/exclude with "build options" that you can then select when you are publishing your variants. Build options can either be on the basis of output format (for example "include this content in PDF and that content in WebHelp"), or of user-defined conditions ("include this content for CLIENTA and this content for CLIENTB"). If you want to create different variants of the same output format (PDF) you need a user-defined build condition:

1) Open your project in Help & Manual and in the Project Explorer on the left scroll down and expand to Configuration > Common Properties > Custom Builds

2) Select the Add button on the right and create two build tags for your two clients, for example CLIENTA and CLIENTB. The "Display Text" is the text that will be displayed later to allow you to select the tags. (If you want you can just use any of the standard custom options and change its display text option)

3) In the table of contents, select the topic or chapter that you only want to include for Client A. Right-click on it and in the Include in Builds sub-menu select the CLIENTA option. DEselect ALL other options (this is actually automatic, but it's good to get into the habit of checking it).

4) Repeat Step 3 for the other topic, using the other build option and save your project.

5) Now select Publish and select PDF as the output format. You will see an "Include Options" box at the bottom of the dialog. In the version for ClientA SELECT the Client A option and DEselect ALL other options. Do the same for the Client B version with the include option for that client.

Notes:

*) Include options must be applied to ALL the topics you want to control with them. Applying an option to a chapter does not automatically exclude the topics of that chapter in all output formats, it only excludes the topics' TOC entries. You have to explicitly apply the options to all the topics (you can select multiple topics with Ctrl+click and Shift+click). In PDF this doesn't matter so much because only topics that have TOC entries can be included. In HTML-based formats topics without TOC entries, the associated topic files can be included "invisibly" and will still be found by the search and keyword index.

*) Include options use OR logic. This means that the tagged content will be included if ANY ONE of its include options evaluates to TRUE. For example, if a topic is tagged with both CLIENTA and PDF, then it will always be included in PDF output, no matter what, but it will only be included in other output formats if CLIENTA is selected in the publish page.

You can also include and exclude content inside topics using the same build options. For that you use the Conditional Text tool in Write > Insert Object. You select the content you want to include or exclude, select the tool and then choose IF or IFNOT and then the include option you want to apply.

In addition to this, you can define "publishing tasks" that combine all your publishing jobs, with all their options, variables, output names and paths etc. predefined, into a single "task". You can then select that task to publish all the versions in a single fast operation. See this chapter in the help for details.

For full details see this chapter in the help:

https://www.helpandmanual.com/help/inde ... itions.htm
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Re: The display of topics in the publishing to PDF.

Unread post by jabramoff »

I was wondering whether the following from the More Advanced Procedures > Conditions and Customized Output > Topic include options topic in the Help+Manual 7 Online Help applied to PDF outputs:
Include options you apply to a chapter are not automatically applied to sub-topics. You must use multi select (Shift+Click and Ctrl+Click) to apply include options to multiple topics and chapters. If you exclude a chapter without excluding its subtopics the TOC entries for the sub-topics will not be included (they have nowhere to go) but the topic files will, and it will be possible for users to find them with Search and in the Index.
And, Tim, your answer above and my own test PDF indicates that it does not apply to PDF outputs.

I've got a followup question: At the chapter or topic level, is it only possible to include build options? It looks I will have a project - published exclusively to PDF - in which I want to exclude a chapter from only one of the build options we expect to create. In the near-term, we'll have three or four build options, but that could increase over time to six or even more. To exclude a chapter from just one of the build options, we have to include the chapter in all of the other build options, correct?

Thanks (again).

Jay
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: The display of topics in the publishing to PDF.

Unread post by Tim Green »

Hi Jay,
I was wondering whether the following from the More Advanced Procedures > Conditions and Customized Output > Topic include options topic in the Help+Manual 7 Online Help applied to PDF outputs:
No, that doesn't apply to PDF, DOCX or Kindle and ePub eBooks (eWriter is different!) because those formats cannot contain any topics that are not included in the TOC. This is because these formats are really a 1:1 representation of a printed document, like one long roll of paper. Effectively, they are a single page.

HTML-based formats (WebHelp, CHM and eWriter) are different: Each topic is a separate HTML file that can be loaded into the browser window on demand. So there it is quite possible to have a topic that isn't in the TOC.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply