How to insert the names of the authors of the essays and the title of the essay in the page header?

For a report that I have prepared, I need to insert the names of the authors of the essays and the title of the essay in the page header. In practice: left header: author name; right header: name of the essay. This is for every author who has written an essay. I tried with the various suggestions found on the forum and online but, as soon as I insert a reference, upon entering the name it deletes the previous one. How can I solve it? Thank you.

1 Like

Your specification is not detailed enough to propose a definitive solution. Please, improve it (= modify it, don’t use a comment).

  • Is your document written by a single author and you have several documents (one per author)?
  • Have you a single document where each “chapter” is an essay by a single author? Each “chapter” then has a different essay title. Do essays start on right pages? (this latter constraint may facilitate some cross-references).
  • Is your document a collective work, i.e. a single essay with multiple co-authors?

Each of these cases has various solutions. Many of them can be elegantly solved with Custom Properties.

Since the solutions can be relatively sophisticated (using field insertion), they are guaranteed to be stable only if you save native, i.e. .odt. So please, mention OS name, LO version and save format.

1 Like

The most transparent solution is to apply different page styles for each author and to “separate” the headers’ contents (“Same content on left and right pages”).
For each author you will need another page style. If you name the page style in the same way as the author’s name it will be easy to handle the different parts of the document.

Another possibility could be to insert fields (containing author or topic) in the headers. See here:

# Inserting a Chapter Name and Number in a Header or a Footer

You could write the author’s name in the first line (i.e. as first paragraph) of the essay (paragraph style heading 1 - could also be another level, say heading 10) - then select the entire heading n and apply hidden character.
So the “heading n” is not printed in the text but in the header. Check this by making use of Toggle Print Preview. In this case you only need one page style.

To take full control of the layout you should switch the document’s view more often:
on/off: menu Tools | Options | LibreOffice Writer | View | Display Fields :: [x] Hidden text
Hide and unhide for better control…

You can use variable fields instead of hidden headings, and you will need only one page style.

Insert a variable field in the first paragraph of each article (that would be the title, Heading 1 style). Insert - Field - More fields..., select the Variables tab, select Set variable, enter a name at the bottom, like “author”, set Format to Text, tick Invisible. Repeat for each article.

Then put the cursor in the header where you want the author’s name to appear. Insert - Field - More fields..., select the Variables tab, select Show variable, select the variable “author”, click Insert.

I tried to use your advice but after the first insertion, relating to the first essay, when I move on to the second, instead of adding the new names, it replaces the previous ones. I need to indicate, within a small volume, all the authors and the titles of the essays in the headers. And from the first page. Now they start from the second one.

Here’s an example of such a document. It is important for everything in terms of fields with changing values that you want to appear correctly in a header that you enter them in the very first paragraph of the page.
variablesinheaders.odt (16,4 KB)

1 Like

Thank you for the example. It’s very interesting but it’s not for me. In fact, I need to insert the author’s name on the left page and the name of the essay on the right page. With this system it can happen that the references belong to two different strings.

esempio.odt (20.7 KB)

You do mess things up. Here’s another go. Mind you, all my uploads are examples of how to insert and use the variable fields, free for you to study to understand how they work. If you want the content of your headers to be different from my examples, no problem, you make the changes.
variablesinheaders.odt (16,5 KB)

1 Like


There are some misunderstandings/mistakes in your example file “esempio.odt”.
Your essays incoherently differ in page styles like “First page style” and “Default page style”.
Your “Third Essay” heading is not located on the first paragraph of the page.
The “Default page style’s” headers are common for right and left pages and not as separate.
Another point: Nearly 30 page styles are converted styles. Did you import from a Word template? If yes this may cause some unexpected results. Format conversion from Word to Writer and back often leads to confusion.
Study @anon87010807’s examples thoroughly.

Thank you for your availability. I can not make it. I tried every way. It works for two authors and then each new addition replaces the previous ones. Is there a way to insert simple text, page by page, with copy/paste so that each page header is autonomous and can contain the exact text it deserves?

In my above reply I told you:

You have to use as many page styles as authors or essays. There you can insert different texts into the headers…

For the reason that you want to start each author/essay on a left page you have to start with an empty right page in the very beginning of your book. Writer thinks that for every double sided page the right page starts…
For possibly empty right pages in the middle of the book you have to find special solutions (e.g. page style with no header)…

See attachment. Also this solution is not that easy but could solve your problems…
essays.odt (9.9 KB)

1 Like

I solved. You were right, it’s simpler than it might seem.