Ask Your Question
0

table of contents font sizes not matching

asked 2019-01-15 15:35:11 +0200

Dawud gravatar image

updated 2019-01-16 15:29:22 +0200

In a table of contents that I have made, some of the fonts are not in accordance to the styles that I have used throughout the document. For example

Chapter 1 (is heading 1 and is 26 font size and blue) it shows up larger than the others, blue and further to the left than the other listings. I am happy with that.

I would like my TOC to be like this

Chapter 1 (font 20 set from style Heading 1)........................................................pg 1 Section 1 (font 16 set from style Heading 2)....................................................pg 1 Subsection 1 (font 14 set from style heading 3)..........................................pg 1 Chapter 2 (font 26 set from style Heading 1)........................................................pg 2 Section 1 (font 16 set from style Heading 2)....................................................pg 2 Subsection 1 (font 14 set from style heading 3)..........................................pg 2

The problem is that the TOC is not pulling the formatting from the sources. the section and subsection titles are all 14 font whereas in the document, and the styles themselves are set to font 18 and 16 respectively.

All I really want is that from Chapter to subsection they be larger to smaller fonts.

Is there a way to set the formatting for the TOC separately?

To further complicate things, the book and TOC has Arabic and English. For whatever reason, all of the Arabic shows up in the TOC as font 12 and the English as 14.

I tried to clear direct formatting but that changed the layout of my entire nearly 200 page document. Is that something I can avoid?

Thank you in advance

edit retag flag offensive close merge delete

Comments

1

Please reword your question (through editing not answer) to better explain what you expect and what you get. It is difficult to understand "they are sometimes x, sometimes y".

Are your heading consistently styled Heading n? Have you inadvertently added direct formatting (in which case Format>Clear direct formatting after selection coulf partially cure the problem)?

Finally, are you talking of the headings in your text or of the TOC, or of both? They are controlled by different style families, with independent settings.

ajlittoz gravatar imageajlittoz ( 2019-01-15 18:33:18 +0200 )edit

@ajlittoz: please move your excellent suggestions to an Answer because direct formatting seems to be the problem here.

floris v gravatar imagefloris v ( 2019-01-16 01:16:57 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2019-01-16 18:20:31 +0200

ajlittoz gravatar image

Headings & TOC

Headings and TOC entries are controlled by two independent style families. Consequently, TOC entries don't "pull the format from the sources".

Heading are identified as such where the are styles Heading 1 to Heading 10 (I'll use Heading n for short from now on). When the TOC is generated, text from Heading n is extracted to build a level-n entry which is styled Content n (n from 1 to 10, parallel to the heading level).

All you have to do to format your TOC is to customise Contents n styles.

Default font size

Since your text mixes Arabic and English, you have enabled Complex text layout in Tools>Options, Language Settings>Settings. Doing so gives access to a more complex Font tab in styles definitions. You can now define different default sizes for Western and CTL languages. If you want new defaults to apply everywhere, change Default Style. If you want your default to apply only to "common" text (i.e. excluding headings, indexes and TOC, headers, footers and other special-interest styles), customise only Text Body.

Unless you already have a very rigourous and consistent use of styles, change Default Style.

Document formatting

As Clear direct formatting messed up your present layout, this demonstrates that you manually formatted the whole document with buttons in the toolbar. This is the wrong way of doing it, all the more since your document is 200+ pages. As soon as a document has more than 5 pages and will be edited and revised before getting a "polished" version, usage of styles becomes mandatory (in my opinion). This is the only way to separate content from appearance.

Styles are kind-of semantic markup. You type your text without consideration for aspect, apart from giving paragraph the right style (and words or runs of characters a relevant character style). Then (or beforehand if you plan smartly your styles), you give styles distinctive attributes (font, size, weight, spacing, colour, indents, list decoration, breaks, etc.).

In a long, important, carefully written documents, only styles can facilitate the editing task; No direct formatting can be tolerated, otherwise style modifications won't propagate to text (direct formatting overrides style attributes and hides the underlying style!).

Even if you're in the last editing step of your document, it is still worth "styling" it all over. This can even uncover formatting mistakes. Once this is done, reformatting the whole document is only a matter of seconds, without the need to browse over all the text.

edit flag offensive delete link more

Comments

I appreciate the response.

I'm still relatively new to word processing at this level. During this project I have attempted to learn how styles work.

When I mentioned the clear direct formatting option messed up my document, I just meant the spacing more or less. I actually have been very vigilant in keeping everything set as a specific style. I dont know why the spacing got messed up, maybe because I wasn't consistent in setting page breaks? That is something I regret deeply. The clear direct formatting option didn't seem to resolve the TOC issue anyway.

"All you have to do to format your TOC is to customise Contents n styles." I will try this and see what happens.

Once again, I appreciate the answer and not making me feel stupid in doing so!

Dawud gravatar imageDawud ( 2019-01-17 15:27:16 +0200 )edit
1

You can do very complex things with LO Writer. The main difficulty is to understand how styles work and which parameters they control. The second thing is how LO Writer marks up (with styles) self-generated data such as TOC and indexes. But data source needs to be marked up according to some conventions (e.g. using Heading n to identify headings to be included in TOC).

LO Writer has the ambition to address the basic needs of quick and dirty one page letter and polished elaborate sophisticated documents. I think it is quite successful in being able to answer both needs.

Nevertheless, it is complex and mastering it goes through reading its documentation (built-in help is not bad at all) and, most important, practicing on various types of documents.

ajlittoz gravatar imageajlittoz ( 2019-01-17 15:52:59 +0200 )edit

I agree. After seeing just a few of the benefits styles can offer, I am very keen on learning more.

As far as my current problem, I still cannot figure it out. I think it is due to my lack of understanding.

Let me see if I am on the same page. I seemed to have figured out how the styles work in the document itself (after the TOC). It will auto-format my chapter headings, sections and subsections and text body the way I want once I set the styles and apply them. When I created a TOC, it did in fact put the different headings in their correct order, but the font sizes are not matching the styles. I have read your comments multiple times but I am still a bit unsure.

"But data source needs to be marked up according to some conventions (e.g. using Heading n ...(more)

Dawud gravatar imageDawud ( 2019-01-18 14:25:08 +0200 )edit

I couldn't seem to find any way to set the formatting for the TOC specifically (if that is even possible). So, my styles are set and working in the document. But, the TOC is not pulling that data the way it is set by the styles. If it is not supposed to work that way then where do I find the settings to format the TOC data that is being generated. I hope my confusion is clear.

Dawud gravatar imageDawud ( 2019-01-18 14:27:16 +0200 )edit
1
  1. Creating the TOC: LO collects in the TOC all paragraphs styled Heading n and keeps them in order. Once you master paragraph styles, you can add more but this is another story.

  2. Formatting the TOC: 2 things must be considered

2.1. What is in a TOC entry: this is controlled by Insert>TOC & Index>TOC & Index, Entries tab where you can select chapter number, chapter title, page number and others and tell in which order they'll appear inside the line. This is also where you define the leading for tab (the "fill character"). Every entry element can even receive a specific character style. Ignore this for the moment.

2.2. How the TOC entry is displayed (font face, font size, spacings, indents, background, …): this is the job of Contents n paragraph styles. Note that "formatting" a TOC entry is fully disconnected from the headings ...(more)

ajlittoz gravatar imageajlittoz ( 2019-01-18 14:55:06 +0200 )edit
1

answered 2019-01-16 16:33:06 +0200

floris v gravatar image

Direct formatting is great when you are in sandbox mode, with dummy text. You can then easily and quickly adjust the formatting, see if it's any good and undo if not. Once you are satisfied, you should start a new document, then modify the styles that you need or make new ones. Then you won't need direct formatting, which, as you have now found, can totally mess up your document. Just apply the appropriate paragraph or character styles and you will get a clean, consistently formatted document. If you later decide to change the body text font size, all you have to do is modify the style. The different font sizes for English and Arabic text may be the resultbof the default settings in Tools Options Languages.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-15 15:35:11 +0200

Seen: 308 times

Last updated: Jan 16