TOC Page Numbers Not Showing

Hello! I’m working (paid job!) on book formatting and I"m having trouble with my TOC.

I have discovered that the page numbers will always hang over the right margin, whatever I might try, so I just set my margin to be narrower than I need. That works within Writer.

However, when I export as PDF, I’m getting strange numbering problems. Within Writer, I can see all the correct numbers. But in the PDF, not only are all the single digit numbers not shown, but the chapter page numbers are also not shown. Yes, all Headings are set the same. All chapter headings are Heading 1, all next level are Heading 2, etc.

What can I change, and WHY does it all appear fine within Writer and only has a problem with export?

Screen shots show NORMAL numbering within Writer editing, and within Writer print preview, and MISSING numbers in Adobe.

(apparently I can only upload 1 photo because I’m a new user. See pdf example)

This is inside Writer/editing

This is the Print Preview within Writer

I messed around with the tab stops within TOC, and got back my single digits (although they are now no longer aligned to the right digit) but my chapter numbers are still missing ONLY in the


PDF!

Your question lack elementary information: OS name, LO version and save format (so please, edit initial question, don’t add a comment for that). The latter is particularly important because formatting stability can only be guaranteed with *.odt. Also, screenshots have poor value when trying to diagnose issues, notably when you don’t enable View>Formatting Marks. It is better to provide an anonymised version of your document (limited to 2-3 pages).

Just a guess (without sample file to pinpoint the cause) about the TOC page number in the right margin. Entries in TOC are laid out according to the Structure line in Entries tab of the creation dialog (or right-click Edit Index). The page number descriptor # is preceded by a tab character T. Click on T and check that box Align right is ticked.

This setting normally overrides any tab in the Contents n paragraph style family but, if the setting is correct, check the styles to see if you changes tab alignment from right to left.

Yet another guess without a sample file to check for the hypothesis: once again look at your Structure line. If there is no E# descriptor, you won’t get any chapter number in the TOC.

Your response lacks elementary observation and reading skills - I do have formatting marks turned on, I’m sorry you failed to notice them. It’s great to get all hung up on everything I didn’t do, however the problem is not in Writer, it’s with the export. Everything is just peachy in Writer. I can see everything, and everything is set correctly. Is there a known issue with export?

Apologies for not noticing the marks. It’s beginning to be late here.

Your page numbers are aligned left in your 3rd comment where you tell you “messed around with the tab stops”. So check again the setting.

For the chapter number issue, attach a sample file (5 pages should be enough) because I see no chapter number in the first screenshot.

1 Like

Is there a known issue with export?

No!


I have just created from this ODT file

WG7103-Benutzen von Formularen in Writer.odt (681,1 KB)

exported a PDF file

WG7103-Benutzen von Formularen in Writer.pdf (921,9 KB)


With me:

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

When I right justify, all the single digit page numbers disappear off the right side. I have to manually set them to be shorter than the margins. That’s how I got them back.

Also, I don’t want chapter numbers - only page numbers, The page numbers aren’t showing up in export.

OK, here is my original file and pdf export - no page numbers for chapters
Pages to Fix TOC.docx (150.9 KB)
Pages to Fix TOC.pdf (270.1 KB)

Sorry, I auto save a docx to work with my employer. here’s my .odt
Pages to Fix TOC.odt (153.2 KB)

I replied to the commenter below, sorry. This is my first time using this ask forum (but I’m sure you already figured that out :slight_smile: )

I added 3 files - my .docx (accidentally) my .odt and the exported pdf.

https://wiki.documentfoundation.org/Faq/General/118#Edit_different_file_formats_in_LibreOffice

I can’t guess what happened to your document. I assume you’ve received it from the author, likely originally as DOCX according to the usual “signature” in the style dictionary (styles WWWNumx).

The document is an awful mess of styling and direct formatting. The first symptom is vertical spacing through empty paragraphs , manual page breaks which should be included in paragraph styles and the faulty usage of Default Paragraph Style, not speaking of Normal (Web) instead of Text Body.

I don’t know how you damaged Heading 1 as an example where indents are both set to zero in the style, no direct formatting (I cleared it to be sure) and despite that the ruler shows paragraph limits inside the margins. The same holds in the TOC where the Contents n styles have their indents not positioned on the margins and, aggravating factor, a tab stop is set way beyond the right limit inside the right margin.

I could fix part of the TOC structure by removing direct formatting (but how could it be applied on an index protected against manual changes?) but the numbers still set in the margin.

You should inquire about the editing history of the book. As it is, it is damaged beyond repair. IMHO, the only present workaround is to start from fresh in a blank document and paste the whole contents as unformatted text. Since you are on the formatting job, the first prerequisite is to have a book fully styled before you can begin to think about the shadow of tuning the layout. The present state doesn’t allow that. From my point of view, styling is author’s responsibility because it adds significance metadata about author’s meaning. Only the author can tell what is important, example, explanation, … Also, layout tuning is impossible when vertical spacing is made manually with empty paragraphs and manual page breaks instead of being a property of styles.

From what I see, there are too few paragraph styles and too many character styles (among which ListLabelx whose use I can’t guess but probably not inspired by significance, rather appearance).

You’re heading into a real nightmare if the document structure is not cleared before you start your job. If you don’t, you’re doomed into a manual procedure on every paragraph. This will be boring, error-prone and time-consuming.

Sorry for such harsh comments, this is not your fault but the publishing company.