Show/hide conditional text dependning on target format?

Participant ,
Jan 24, 2020

Copy link to clipboard

Copied

In my FM document each chapter starts with "Chapter" followed by its number, and on the next row the chapter title comes, e.g.:

Chapter 1

Introduction

 

This is something I keep when generating pdf documents. When it comes to html/html help etc, chapter numbers make no sense, so I skip the "Chapter #" part.

 

Currently I use a conditional text setting "ifPDF", which I manually switch show/hide depending on target format.

 

Can this be done automatically? So that I can generate to all formats at once. (Also, I wouldn't have to worry about having wrong show/hide settings.)

TOPICS
Formatting and numbering, PDF output

Views

189

Likes

Translate

Translate

Report

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

1 Correct Answer

Engaged , Jan 26, 2020
CarolineTa Engaged , Jan 26, 2020
You should be able to set this in the settings file for the style/Tag in the HTML 5 set up dialog box. You can set how each style appears in PDF output.So instead of using a condition in your source file, in the HTML output, set that the word "Chapter" will not appear. Or make this a condition called Print, and in the HTML output apply a Frame Template with the condition Print hidden. One of these ways will get you there

Likes

Translate

Translate
Jump to answer Jump to answer
Engaged ,
Jan 26, 2020

Copy link to clipboard

Copied

You should be able to set this in the settings file for the style/Tag in the HTML 5 set up dialog box.

 

You can set how each style appears in PDF output.

So instead of using a condition in your source file, in the HTML output, set that the word "Chapter" will not appear. Or make this a condition called Print, and in the HTML output apply a Frame Template with the condition Print hidden.

 

One of these ways will get you there

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
kungsgatan AUTHOR LATEST
Participant ,
Jan 27, 2020

Copy link to clipboard

Copied

So simple! Thanks!!!

 

Likes

Translate

Translate

Report

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