Writer :: Book ::: chapter titles in headers: is a "replace" action possible?

hi,

You set up your document so that in the right header the current (latest)
HEADING 1 title appears.

Question:
Can you add some automatic modifications to this field?

for example: replace?

A find-replace action… ?
imagine that your titles look like: “★★ title_text”…
and you would like to see only the title text in the header?

thanks in advance!

Peter

Please click on the icon below your question, then on the “pencil” tool to enter edit mode to provide more details.


How do you build presently your headers? Do they result from field insertion so that they are automatically set to the current heading? This implies that your headings are styled with Heaging n.

Fields offer several possibilities: complete heading with number and text, number only, text only.

If this is not what you want/need, describe more precisely your goal. I assume this is related to “* *” in your question. If this is the case, I’m thinking of “fake numbering” with “separators”. This may be a solution but needs more consideration if you create a TOC.

Don’t forget to mention OS name, LO version and save format (my first-thought idea will work only in .odt).

Oops! made a mistake: I wanted a comment but did not check!

Solution

Your star prefix is a “decorator” which is not part of heading significance. Then, don’t type it on every heading. Add it through Tools>Heading Numbering

In Numbering tab (for each relevant level), enter your prefix either in Separator Before or After (it does not matter since you have Number None; in case you have a number, play with Before and After to achieve your preferred visual effect).

The prefix is then automatically added whenever you style Heading 1.

You can discard the decorative prefix in the TOC. In the TOC creation or edit dialog, go to Entries tab and remove the N# descriptor. N# is a request to insert the heading number with its separators.

1 Like

hi!

Thank you…

I’m using the field method… automatically…
“This implies that your headings are styled with Heaging n.”
yes

the ★★ is added to the chapter titles… as a decorative prefix
but I’d like them off in the heading…

thank you for giving it a thought…

OS =LInux Mint Debian, Libreoffice is 24.2.6.2…

Peter

very clever, and practical!

thanks very much!!

Peter