How to do this header bar

To reproduce a very common printing style I want to have a header
line (on every page) in my document with the page number on the right
or left depending on whether it's a right or left page, and also
centred text (on the same line).

I think the first bit isn't too hard (is it?), but I can't work out
how to have centred text and not centred text on the same line.

Anyone know how?

Mark

Do tab settings not work in header lines? Is there not a "center on me" tab?

You need to use the page styles for this.

See
http://wiki.services.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Writer_Guide/Working_with_page_styles
http://help.libreoffice.org/Writer/Defining_Different_Headers_and_Footers

Simos

To reproduce a very common printing style I want to have a header line (on every page) in my document with the page number on the right or left depending on whether it's a right or left page, and also centred text (on the same line).

I think the first bit isn't too hard (is it?), but I can't work out how to have centred text and not centred text on the same line.

Anyone know how?

Yup. You'll have worked out that you need separate page styles for right and left pages, with the Next Style of each set to the other - so that they alternate through your document. In both headers you need a centre tab at the centre and in the right page style you also need a right tab at the right text margin. (You will probably find these already set for you in the default Right Page and Left Page page styles.) The left page header content is then easy: <page number field><tab character><centred text>. What may not be quite as obvious is that your right page header needs to contain <tab

<centred text><tab character><page number field>.

I trust this helps.

Brian Barker

Thanks, helped me. Its so simple and I had never thought of it. I'd be embarrassed to explain how I was doing it.

________________________________
From: Steve Edmonds <steve.edmonds@ptglobal.com>
To: users@global.libreoffice.org
Sent: Sun, 19 June, 2011 19:27:53
Subject: Re: [libreoffice-users] How to do this header bar

On 20/06/11 4:11 AM, Brian Barker wrote:

At 10:19 15/06/2011 +0100, Mark Stanton wrote:

To reproduce a very common printing style I want to have a header line (on
every page) in my document with the page number on the right or left depending
on whether it's a right or left page, and also centred text (on the same line).

I think the first bit isn't too hard (is it?), but I can't work out how to have
centred text and not centred text on the same line.

Anyone know how?

Yup. You'll have worked out that you need separate page styles for right and
left pages, with the Next Style of each set to the other - so that they
alternate through your document. In both headers you need a centre tab at the
centre and in the right page style you also need a right tab at the right text
margin. (You will probably find these already set for you in the default Right
Page and Left Page page styles.) The left page header content is then easy:
<page number field><tab character><centred text>. What may not be quite as
obvious is that your right page header needs to contain <tab character><centred

<tab character><page number field>.

I trust this helps.

Brian Barker

Thanks, helped me. Its so simple and I had never thought of it. I'd be
embarrassed to explain how I was doing it.

Hi :slight_smile:
For years and years i was doing this by making a 3 column, 1 row table in the
header and footer, same technique as i use for addresses at the top of letters.
The whole thing became a lot more sophisticated about a decade ago. Different
types of tab-stops helped too.

Regards from
Tom :slight_smile:

Hi,

I'm new with Libre Office base and there is my actual problem...

(excuse my english, I speak french)

I have a base with a lot of tables.
Tables for Prefix, first name (prenoms) and Family names (Noms)

In another table, I have PERSONS table: build from the 3 previous table.

So on the Form, I see names, first name etc. but in the table only numbers are presents.

I don't know if it is clear....

The problem is in Propriety list zone on the data tab, for list content, on the form, to concatenate PREFIX FIRSTNAME FAMILY NAME, I have this:

SELECT "PREFIX"."Prefix" || ' ' || "PRENOMS"."Prenom" || ' ' || "NOMS"."Nom", "PERS"."Idpp" FROM "PERS"
  LEFT JOIN "PREFIX" ON "PREFIX"."Cprefix" = "PERS"."PREFIXC"
  LEFT JOIN "PRENOMS" ON "PRENOMS"."Cpr" = "PERS"."PRENOMC"
  LEFT JOIN "NOMS" ON "NOMS"."Idnom" = "PERS"."NOMC"
ORDER BY "NOMS"."Nom"

It's work but each time I quit this base and reopen it, Base keep only the first line of this sql things...

Any help would be appreciate.

Thx

Denis

Mark,

To reproduce a very common printing style I want to have a header line (on
every page) in my document with the page number on the right or left depending
on whether it's a right or left page, and also centred text (on the same line).

I think the first bit isn't too hard (is it?), but I can't work out how to
have centred text and not centred text on the same line.

How about placing an invisible frame to hold the text of your header? This would
assume it's going to be printed on white paper, of course, but I make the 'line'
and 'area' both white and usually set transparency to 100% if it's close to
something else. The alternating-side-of-the-page thingy is something I've never
attempted, although I feel sure it could be done. I personally just center the
page number in a footer, rather than placing it with my header. Others who are
more experienced may have better suggestions.

Hi :slight_smile:
I think using different types of tabs in the header section is the best answer.
I still haven't worked out how to get Word to respect Writer's greater level of
finesse about placing text-boxes and other boxes. Tabs neatly avoids the
issue.

Regards from
Tom :slight_smile:

Sorry, but I wrote none of that - as you can see from the complete copy you included below. Do please be careful when quoting not to misattribute things.

Brian Barker

I haven't had to do this in quite some time. Also, don't know for sure if just tabs
will work or not. What I did in the past with Word 2000 (I think, could have been
earlier) was insert a 1 X 2 table in the header. The page number would go in on cell
and the text in the other cell. I don't remember just exactly what I did with double
sided pages, but somehow got that to work. And then several years before that, when I
was doing document control for procedures and training material, we had a multiple
row/column table in the header. On those all the cell lines were printed, but on the
first example they were not.
Roxy

Do tab settings not work in header lines? Is there not a "center on me" tab?

Boy, that makes it pretty simple from the way I "used" to do it many years ago in
Word. I keep forgetting about this "Styles" thing.
Roxy

To reproduce a very common printing style I want to have a header
line (on every page) in my document with the page number on the
right or left depending on whether it's a right or left page, and
also centred text (on the same line).

I think the first bit isn't too hard (is it?), but I can't work out
how to have centred text and not centred text on the same line.

Anyone know how?

Yup. You'll have worked out that you need separate page styles for
right and left pages, with the Next Style of each set to the other -
so that they alternate through your document. In both headers you
need a centre tab at the centre and in the right page style you also
need a right tab at the right text margin. (You will probably find
these already set for you in the default Right Page and Left Page
page styles.) The left page header content is then easy: <page
number field><tab character><centred text>. What may not be quite as
obvious is that your right page header needs to contain <tab

<centred text><tab character><page number field>.

I trust this helps.

Brian Barker

Brian,

From: Brian Barker

Sorry, but I wrote none of that - as you can see from the complete copy you
included below. Do please be careful when quoting not to misattribute things.

I'm truly sorry for misattributing. I was trying to trim the post and keep only
what was needed, then forgot to delete all the "complete copy" at the bottom. I
looked at the one in my Sent folder and, at least I addressed it to Mark. Will
try to do better in the future, though.

Hi Tom,

<snip> how to get Word to respect Writer's greater level of
finesse about placing text-boxes and other boxes.

Ah, music to mine ears :slight_smile:

Mark Stanton
One small step for mankind...

Many thanks to everyone,

The "center (sic) tab" concept had completely passed me by, what a
fantastic idea! And I've already started styles a little bit, looks
like I'm going to have to delve deeper into that bit too.

Thanks again
Mark Stanton
One small step for mankind...

You can do it with just one style:

Go to Format -> Page

1. Make sure the document has odd and even pages: in the "Page" tab, in
the "Layout settings" group, pick "Page layout" "Right and left" or
"Mirrored".

2. Either for header or for footer, go to its tab in the same dialog,
and
  a) Enable it, by checking the "Header on"/"Footer on" checkbox
  b) Enable different header/footer for odd and even pages by unchecking
  "Same content left/right"

Now you will have headers on your pages, and editing the header of an
odd page only changes odd pages, same for even pages.

For mixing and centering, I suggest tabs too. It seems headers already
have two tab stops defined (at least here with the default template):
exactly the ones you need to have left, centered and right text in one
like.

Ah yes, that was simple.

It looks a bit odd to me that, when I put in the centre tab, I have
to pick a position for it, surely it should just centre itself
depending on the page settings?
And then, it clears all the tabs to its left, but leaves the ones to
its right, isn't that a bit weird too? I can make that (both of them
in fact) do what I want, but it just seems a little
counter-intuitive.

Many thanx
Mark Stanton
One small step for mankind...

Ah yes, that was simple.

It looks a bit odd to me that, when I put in the centre tab, I have
to pick a position for it, surely it should just centre itself
depending on the page settings?

The "centered" in "centered tab" is about how text is aligned at the
tab, not about the tab position in the page -- you can have a centered
tab 2cm from the left margin.

But yes, it'd be useful to have something like a button to set the
position to the middle. (Suggested workaround: deduce text width from
the page margins and divide by two. :slight_smile: )

And then, it clears all the tabs to its left, but leaves the ones to
its right, isn't that a bit weird too? I can make that (both of them
in fact) do what I want, but it just seems a little
counter-intuitive.

The ones that disappear are the default tabs, which are used when you
insert tab characters and there is no tab defined. As you defined a tab,
now default tabulations are only needed right to[*] the tab you just
added.

Think of it as a way to define the "undefined behavior" of what happens
when you insert a tab character and there are no (more) tabulations set.

[*] or "left to", when writing right-to-left text.

One small step for mankind...

... a giant leap for [a] man?

The "centered" in "centered tab" is about how text is aligned at the
tab, not about the tab position in the page -- you can have a centered
tab 2cm from the left margin.

I'm sorry, I still don't really understand that. Do you mean that text
"at" that tab stop ought to be positioned so that the tab is in the centre
of it? That doesn't look like what's happening for me, but I don't know
what else it could be

Best regards
Mark Stanton
One small step for mankind...

Hi :slight_smile:
Yes, the tab stops justify text on their own line and that line has nothing to
do with the page as a whole. You could have a left justified tab-stop at 3/4
across the page to put your own address at the top of a letter neatly (i use a
2col, 1row table but it could be done with a tab-stop).

If you click the backward P on the toolbar then you might see that some spaces
are messing things up slightly?
Regards from
Tom :slight_smile: