Trying to get TOC numbers aligned in the PDF output

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Christine
Posts: 11
Joined: Mon Feb 01, 2016 8:39 pm

Trying to get TOC numbers aligned in the PDF output

Post by Christine »

Hello,

I would like to have the page numbers aligned on the PDF output and I tried many things in my XSL custom configuration file, but all failed.
Is there a specific parameter in "OXYGEN_INSTALL_DIR\frameworks\docbook\xsl\fo\toc.xsl" to mention to have numbers aligned in TOC ?

Many thanks for your help,
Christine
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Radu »

Hi Christine,

Maybe you could link to an image showing how the TOC looks like on your side and describe how it would need to look like.
We are not very familiar with Docbook customizations but maybe we can give you a hint...

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Christine
Posts: 11
Joined: Mon Feb 01, 2016 8:39 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Christine »

Hi Radu,

You will find below an example of the type of alignment I can get at the level of the numbers on the TOC on my PDF output.
Is it possible to have these numbers (o 2 and 3 digits) vertically aligned?

Many thanks for your help,Rregards,
Christine

Image
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Radu »

Hi Christine,

I do not understand. You are showing me a Word document and you are discussing about the PDF TOC.
For example in my tests with the default PDF output the PDF TOC looks like this:

files/toc.png

To me the numbers seem aligned on the right hand side.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Christine
Posts: 11
Joined: Mon Feb 01, 2016 8:39 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Christine »

Hi Radu,

Yes I am sorry for that but I was not able to upload the proper image using BBCode tags as my images are not on the internet and I do not run a webserver.
So this is the most representative image I found on the internet to show the problem I encounter for each PDF output.
The numbers on the TOC seem to be "floating" and they are not aligned on the right as they are on your image.

Regards,
Christine
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Radu »

Hi Christine,

I obtained my PDF just by applying the default Docbook to PDF output without any customization.
It might be possible that your problems are derived from using a certain font for the TOC. Possibly when the used font is not monospaced, each figure has a different width and they may not look nice when placed one under the other.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Christine
Posts: 11
Joined: Mon Feb 01, 2016 8:39 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Christine »

Hi Radu,

Thanks for great help : there was a "sans-serif" font type for the TOC in the pdf output custom configuration file. Using a monospaced font involves a better alignment for the figures.

Regards,
Christine
Rushina
Posts: 8
Joined: Wed Nov 08, 2017 5:11 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Rushina »

Hi Radu,

In the ToC you shared, I need the sections under chapter numbered. Although, I have set the values of section.label.includes.component.label and
section.autolabel parameters to 1, the numbering does not appear in the ToC of generated PDF or HTML.

Here is the sample of what I need. Please help
1. Chapter
1.1 section one
1.2 section two
1.3 section three
1.4 section four
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Radu »

Hi,

Your reply does not seem to be related to this particular forum thread.
I see you also added a reply here:

topic10067.html

so I will try to answer you there.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Rushina
Posts: 8
Joined: Wed Nov 08, 2017 5:11 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Rushina »

Well, self-help is the best help. I found the solution that you need to edit the Param files at two places to resolve this issue and it's done. :)
Rushina
Posts: 8
Joined: Wed Nov 08, 2017 5:11 pm

Re: Trying to get TOC numbers aligned in the PDF output

Post by Rushina »

Thank you, Radu. My first time on these forums and the struggle to correct stuff lead to double queries. Incidentally, the struggle also helped me find the answer where I need to change the params values in the parameters list and also in the fo folder. It was simple! Thank you for the support, nevertheless.
Post Reply