Page 1 of 1

Show/Hide Title and Subtitle in pdf target

Posted: Tue Oct 04, 2022 3:49 am
by IsleofGough
I have a reasonable pdf output from a DITA Bookmap file using custom HTML/CSS now, but would like to display the subtitle (but not the title) on the title page (since the cover image already has title and author). I imagine this requires modifying some xpath rule, but I don't really know where to start with this. How can one hide or display the Title, Alt-Title (subtitle), and Author on the front-cover page using a CSS rule? Thanks.

Re: Show/Hide Title and Subtitle in pdf target

Posted: Mon Oct 17, 2022 2:42 pm
by susannecm
Hi,
just an idea: you could define a CSS rule for the main title that includes the property {display: none;}.

Re: Show/Hide Title and Subtitle in pdf target

Posted: Tue Oct 18, 2022 9:24 am
by julien_lacour
Hello,

As susannecm mentioned, you just need to use the display: none CSS property, like this:

Code: Select all

*[class ~= "bookmap/mainbooktitle"] {
  display: none !important;
}
Regards,
Julien

Re: Show/Hide Title and Subtitle in pdf target

Posted: Wed Oct 19, 2022 6:33 am
by IsleofGough
Perfect! Thanks