Page 1 of 1

I would like to eliminate the Chapter 1 from the chapter title

Posted: Tue Apr 12, 2016 9:54 pm
by BogdanM777
Hi,

I have the following problem of formatting.
The chapter first page is very nicely formatted with the "Chapter" the number and then underneath is again the number and the title of the chapter.
I find it a little bit redundant to have the numbers twice on the same page, so I was wondering if it would be possible to eliminate the "Chapter" and the number and have the number and the title instead.
E.g:
- right now I have:
Chapter
1
---------
1 chapter title
--------------
Topics:

- I would like to have just:
1 chapter title
-------------
Topics

Thank you

Re: I would like to eliminate the Chapter 1 from the chapter title

Posted: Tue Apr 12, 2016 9:56 pm
by BogdanM777
I forgot to specify that I would like also the above to be reflected in the TOC:
- right now I have:
Chapter 1: 1 chapter title
- I would like to have:
1 chapter title

Thank you

Re: I would like to eliminate the Chapter 1 from the chapter title

Posted: Wed Apr 13, 2016 12:00 pm
by Radu
Hi Bogdan,

In the XSLT stylesheet:

DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl

there is an XSLT template:

Code: Select all

 <xsl:template name="insertChapterFirstpageStaticContent">
in which you could consider making some changes to change the layout of the chapter in the PDF content.

About the TOC, the XSLT stylesheet:

DITA-OT\plugins\org.dita.pdf2\xsl\fo\toc.xsl

has a template:

Code: Select all

    <xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' boookmap/bookmap ')]/opentopic:map/*[contains(@class, ' map/topicref ')]" mode="tocPrefix" priority="-1">
which you could also look into.

Regards,
Radu

Re: I would like to eliminate the Chapter 1 from the chapter title

Posted: Wed Apr 13, 2016 2:53 pm
by BogdanM777
Thank you so much Radu.
I will give it a shot and let you know how it goes, OK?

Thank you again

Re: I would like to eliminate the Chapter 1 from the chapter title

Posted: Wed Apr 13, 2016 3:37 pm
by BogdanM777
Hi Radu,

I looked into the templates that you suggested me, however I am afraid that my level of xsl knowledge is, because I do not do DITA documentation day by day, but now and then, at the "noobe" level, and I do not quite understand too much as what it is in this templates.
Therefore I do not know where to do what change in order to get the formatting I was specifying at the beginning.
If you would give me some suggestions as what to insert/comment/change and where, I would greatly appreciate it, otherwise, as I do not have quite the time to go through the "trial and error" type of approach, I think I will let the formatting as it is.

Thank you