I got a document, comprising different headings. Some of them are formatted in the following style:

§1_____________Text

wherein the "_" is a tab and wherein §1 has nothing to do with chapter numbers, i.e. the first part (here §1) is randomly chosen.

With LO Version 5.0, the tab of the heading is taken with into the TOC, therefore, the respective entry in the TOC is similar to the heading as shown above.

Version 5.1 of LO as well as following versions of LO (currently 6.1.5.2) operates different, the tab is replaced by one space and the entry in the TOC reads as follows:

§1 Text

A similar question has bee asked in the German part of the forum, see: https://ask.libreoffice.org/de/questi...

Furthermore, this question might be somehow comparable with bug 30732, reported on bugzilla: https://bugs.documentfoundation.org/s...

Are there any hints or workaorunds to overcome this problem?

Thanks maguggi

edit retag close merge delete

Sort by » oldest newest most voted

There may be a workaround if your "§1" is not random, i.e. if all "§1___Text" paragraphs are numbered sequentially (I mean, "§1" numbers items in a list scattered throughout the document).

You need to define a dedicated paragraph style for this list. For my experiment, I used one derived from Body Text (I named it Insert_into_TOC). In Outline & Numbering tab, I associated it with Numbering 123 numbering styles (but you may need a dedicated one if this style is already used by another list so that you have no interaction between them) and I linked the paragraph to outline level Level 5.

I linked to outline level 5 because I didn't use it, but you may link with used levels like 1 or 2 if common formatting in the TOC fits your needs both for the outline and the inserted data.

• Modify the numbering style (found in the so-called list styles) Numbering 123 so that a HT (horizontal tab) is automatically added after the number and position it to the required location.

• Style all your "§1___Text" with Insert_into_TOC and remove the manual "§1" and ___ tab (they are now provided by the list engine).

Edit your TOC (right-click and Edit index).

• In the Entries tab, select level 5 (or the one you chose); click in the white space between E# and E and push the Tab stop button. Define the position in the text box below.

Now you have a tab in the TOC entry and you can play with it.

CAUTION: this tab position cannot be defined in the Contents 5 paragraph style dialog, but only here. That's important for post-definition tuning.

• Modify Contents 5 to sent indents, spacings, alignment and other attributes.

This is a bit tricky and will likely need several trials before being satisfying.

Sorry for late suggestion, but have bee away for some days

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

more

Showing tabs from headings in the ToC was a bug tdf#89505, present starting from version 4.4, and fixed in 5.0.6 and 5.1.2. What you see is the correct behavior.

more

Well, thank you for your answer, which is at least for me somehow unsatisfying...

Are there any possibilites to "unfix" this or other workarounds to end up with this wrong behaviour? Reason is that in my document, I've got a lot of articles of law of which some are only one-digit, some are two-digit but all of them have besides its number a catchword which chatchword i'd like to align in the TOC.

Thanks

( 2019-03-15 16:55:38 +0100 )edit