Table of Contents in Single Column in section deleting added text when updating

Following on from a closed question, “Table of Contents in Single Column in section” I’ve created a page with a ToC in the manner shown but when I update the contents I loose the text that I’ve added before and after the ToC and it just gives me a ToC in two columns.
How do I stop it deleting the added text on update?
My workaround at the moment is to have the text saved in a burner section at the end of the file that I add back in after every update which I’ll delete before saving as a pdf for distribution.
I can provide an example if needed but the example that is on the closed question does the same thing - when you update it, it loses the added text and the column break. I’m creating an odt file using Win 10 with Writer 7.6.6.3.
My thanks for your help in this!
Regards
K

Please provide a link: querying the provided “title” returns a dozen hits. The most likely one dates back 2013, 13 years ago, i.e. eternity in computer science and may not still be relevant.

A TOC is internally generated. Additions inside it are removed on update. Consequently the location of “before” and “after” are extremely important: are yours really outside the TOC? To make sure, attach a sample file.


PS: 7.6.6.3 is outdated; it is at least four semestrial releases behind. Consider upgrading.

Thank you for your prompt answer. That sounds like the one I saw here…

…I agree it’s very old but I can’t find anything else that actually addresses my issue. If you know of any other answers I would be in your debt if you could link me to it.
I’ll update to the latest version as suggested. and get back to you if this resolves my issue.
Regards
K

I don’t think it’ll fix it. Your problem is rather in the exact location of your additions to the TOC. Attach a sample file, this will be faster.

My upgrade warning is rather a general advice to stay abreast with LO development. You automatically benefit from bug fixes and feature enhancements.

This is a link to an example of this zine to show what I’m trying to do and my workaround.
I created the ToC of my masthead page, p.2, then made it two columns with the ToC in the right hand column. I have added some text to show where the editorial will go in the LH column and added the standard footer at the bottom of the RH column.
When I update the ToC the editorial and footer disappear.
My workaround is to have a copy of the editorial and footer in the burner section at the end of the draft (p.9) and add them back in after updating. This section gets deleted before exporting as a pdf. THIS is a link to a zine I did using this method last year.
I think your comment, “A TOC is internally generated. Additions inside it are removed on update” probably covers it but it’s worth asking experts. The workaround isn’t too onerous.
Regards
K

An Index (TOC) is created automatically from the indicated titles and/or styles.
It is created in its own section

  • When you refresh the index, the content of that section is deleted and recreated (any formatting applied after the index was created is removed).
  • To edit the index, you must use the tabs in the index dialog and the relative paragraph styles.
    Basically the edition of the index only considers the format.

If you want to add text before or after the table of contents, you must do so outside the table of contents section. (Or you can add it in the same section of the index but never update the index.)

  • To exit the index section you have to place the cursor at the end or beginning of the index and press Ctrl+enter twice

You have inserted your additions inside the TOC; this is why they are erased on updates.

The main difficulty comes from your layout. If I understand it correctly, you want to constrain the TOC in a single column of the 2-column page. As is clearlt stated somewhere else, a TOC is a section by itself and all the rules for TOC apply. The most important of which is the “nesting” one: sections are never “geometrically” nested inside another one; they are always laid out in the basic “container” disposition. A container is either a page or a frame. Sections are always rendered in a column of a container.

In your case, this means your 2-culumn TOC will be set in a page column, resulting in a visual 4-column display (which is not what you want).

Considering your “editorial” should appear first, followed by a column break for the TOC, followed your copyright declaration. The solution is to put your own text outside the TOC which should be isolated. This is only possible if it is jailed inside a frame. I then assume that your TOC is short enough so that it does not overflow to next page (otherwise you’ll have to manage it manually with a linked frame).

I created a TOC Frame frame style with a width equal to the column, right aligned to right margin, anchored to paragraph at top of it. Spacing above the frame is set in teh Wrap tab.

I removed the TOC title paragraph to keep only the paragraph forcing the column break and I attached a frame to it and applied TOC Frame. Inside the frame, I inserted the TOC. Note that I did not format at all the paragraph below the TOC (there is always at least one paragraph in any text flow; I leave it to you to make it appear nearly invisible).

I modified your TOC configuration to have “In this issue” heading generated by the TOC. I customised the Styles tab to use your styles but did not completely do it.

This is the result: ToC_eg-260706a-ajl.odt (30.9 KB)

I removed the image to fall below the file size limit. You scaled it to 5% but this is only a display operation keeping the original size (~12 MB). Don’t proceed like this. Resize, crop, scale, rotate in a dedicated image processing program and insert into Writer the result, so that Writer uses the image “as is”. This is more efficient and reduces drastically file size.

Your document structure is way too complicated. I agree that full-width heading in 2-column documents require use of sections but try to minimise their number and don’t nest them (whenever possible). The simplest way is to have a single-column page style and insert sections where you need 2 columns.

Also your style collection is badly organised: you have too many styles and their usage seems to be ambiguous (for example you mix heading semantics with header or TOC). You should start from built-in ones and customise them.

As an example, you wiped out styles from Tools->``Heading Numberingwhich forced you to configure a long collection in TOCStyles` tab. I didn’t notice at first and I reconfigured partially the outline level in paragraph styles but because of your not fully consistent use of styles, it created some formatting issues.

Also, you don’t use character styles, bringing all intra-paragraph variations with direct formatting. I suppose this is “muscle memory” from M$ Word whic has no such styles (apparently your document has been edited some time in the past by M$ Word according to the “fossils” found in the style dictionary).

Your document is pagued by direct formatting DF. Since you seem to release regularly new issues of your fanzine, DF is your worst enemy. It hampers your productivity and poisons your capacity to comfortably edit and tune both formatting and layout. Apart from already mentioned intra-paragraph variations, you practice empty paragraph vertical spacing.

One last word: you decorated your headers and footers with gradient images sent in the background. You have a better solution: configure gradient area in the Header and Footer of the page style. See my sample. If you’re worried about margin to margin width, header and footers can have different margins from the page itself: set negative indents in their definitions (not in the paragraph style as you did, because it impacts the “universality” of the paragraph style which then can only be used in specific compatible contexts).

1 Like

There’s a lot to unpack with your reply but I can see what needs to be done in principle, I just need to apply that to my work now. I was stumped on this because I simply don’t use frames and was unaware that a ToC could be inserted into one. My knowledge of Writer is increased today and my output will be a much easier thanks to your work.
I appreciate your other feedback and I’ll work through it methodically as I get the opportunity.

  • You’re right, I use properties to scale graphics to size when I have them on file where they’ve usually been sized for use on Substack or Facebook. An exception is a major work I did on Lemair sewing machines which had dozens of thumbnails of models, I scaled these to be exactly the right size for the Writer file for standardisation and economy.
  • You’re right I use odt files as templates and I should use ott templates, it’s a habit that I’m not sure why I do and one that I should work on changing. The odt templates I have are basically as you say, set up with cover, endpapers, title page, contents, index… I’m so set in my ways that I haven’t overwritten anything in while although using an .ott template would mean I could dispence with the stylesheet page perhaps.
  • “try to minimise [the number of sections] and don’t nest them (whenever possible). The simplest way is to have a single-column page style and insert sections where you need 2 columns” Excellent idea. I stopped even looking at the sections formatting because, as you say, I had a massive number of them
  • There is a reason for the styles that I’ve made, if I’ve wiped out any styles it’s been by accident. I might have caused confusion with my naming of different styles.
  • “you don’t use character styles” Correct. I use paragraph styles exclusively. I’m not sure what that has to do with M$ Word, I haven’t used it since I retired nine years ago - that would be very old muscle memory, LOL!
  • “bringing all intra-paragraph variations with direct formatting” I don’t follow you there. The only times I can recall deviating from my paragraph styles is when I use the occassional bold italic for emphasis and bold italic underline for graphics references (eg “Shown Right”) in the text. Is that wrong?
  • “you practice empty paragraph vertical spacing.” If I have in my example files it’s by accident. I really make a concerted effort to use paragraph styles that work
  • That’s another excellent idea with regards to the gradient headers and footers, it will save me having to fiddle with wrap!

Once again thank you for the valuable feedback, as a self-taught user my knowledge and experience of Writer can be passable in most areas but lacking in many others.
Regards
K

My wording is perhaps not clear. Making words italic or bold is what I call “intra-paragraph variations” because this decoration is not the same as what is offered by the paragraph style configuration. You press Ctrl+I for it, making a single occurrence anonymous formatting exception.

Instead, apply Emphasis character style. Thus, all your emphasised words are formatted the same and modifying the character style will change immediately all occurrences (e.g. you want to alter the italics default to red colour).

Character styles are provided to format differently words inside a paragraph. Character styles don’t exist in Word. Consequently, people tend to neglect them, though they bring a tremendous boost in formatting power and versatility.

I am self-taught too. While active, I faced several deadlines which compelled me to try and use the tool in an efficient way. I succeeded in developing a mental model for Writer and a formatting strategy. The mental model is based on formatting layers with a precedence rule: direct formatting overrides character styles which override paragraph styles. The strategy is what I call semantic styling: styles don’t describe typographical attributes; they are a kind of markup giving an insight on significance or semantics from the author’s point of view. How this translates visually is side-step. This makes the meaning of the text independent from its visual appearance.