Skip to main content
Almtuna
Inspiring
January 24, 2020
Answered

Show/hide conditional text dependning on target format?

  • January 24, 2020
  • 1 reply
  • 498 views

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.)

This topic has been closed for replies.
Correct answer Hezy A

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

1 reply

Hezy A
Hezy ACorrect answer
Inspiring
January 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

Almtuna
AlmtunaAuthor
Inspiring
January 27, 2020

So simple! Thanks!!!