ToC page numbers out in the margin, then not in the pdf generated

Hi,

I insert the Table of Content, and the page number are out in the margin. I don’t understand how I can get them in the margin ?
My problem is when I generate the pdf, they don’t show up (I bet it’s because they are in the margin).

Anybody to help me ?
Thanks

Please upload an ODF type sample file here.

You can check the indent value of the paragraph styles of the TOC: maybe it is a negative number…
What is the file format? .odt? .doc? .docx?

1 Like

tdf#156078 is fixed in 7.6.

1 Like

Thanks for the reply.
Here is a sample.

I’m lost with the way to do ToC in LibreOffice. I haven’t found a HowTo on how it works. And it is the same to make a clickable ToC for KDP ebook.

Sample.docx (20.4 KB)

Thanks.

I’ll will install it. Here is the version I’m using:
Version: 7.5.7.1 (X86_64) / LibreOffice Community
Environment: CPU threads: 8; OS: Linux 6.2
Ul render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); Ul: en-US
Calc: threaded
Ubuntu package version: 4:7.5.7-0ubuntu0.23.04.1

There are many problems in your document:

  • it is a .docx one, i.e. it is not Writer native format and all advices which could be given are stable and valid only for .odt
  • it is exclusively direct formatted, i.e. it does not use the high-level formatting features called styles which disconnect contents from appearance (for your defence, M$ Word is rather poor on this matter because it only offers paragraph styles)
    Oh, yes, you structured your headings with Heading n styles but this is only a very minor aspect of the general problem.
  • sending TOC page number into the margin is a Word specificity which does not exist in Writer
    To be rigorous, this is not what you’ve done. In your document, you modified the indents of the TOC paragraph styles. So, technically, your page number are not “in the margins”; they are inside the paragraph bounding box. Consequently, they should display “normally” in the PDF.

Globally, your document structure has been damaged beyond repair by the cumulative conversions to/from DOCX.

Your formatting is inconsistent. You should try and look for some clipping between your user-defined page size and PDF destination page. In such a long book, it is mandatory to follow a strict formatting method based on styles and to refrain from using direct formatting. The commonly agreed threshold between direct formatting and styling is around 5 pages!

2 Likes

Great.
I didn’t know that some direct formatting could have a huge impact. I clear it all and create a style for every different situation or pages. Also I revert to odt and I’ll save as docx when it is finished.

Thanks all for the heads up :slight_smile:

It worked with current version.
I cleared all direct formatting, paste unformatted text, and setup all the styles.

In the present state of your document, trying to save it as .odt won’t fix the base problem because the DOCX idiosyncrasies have already damaged the structure beyond repair. The only approach is to paste the whole text as unformatted text and to style it from scratch. You’ll lose foot/end notes if you have any, but you can also paste their text as unformatted one by one (tedious and not user-friendly but only way to correctly reconstruct the structure).

Cross-post with your last comment :wink: !

Thanks.
Now it work like a charm :slight_smile: