## LaTeX forum ⇒ General ⇒ How to make a header with a predetermined image? Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

### How to make a header with a predetermined image?

Hi, everybody.

I'm writing a book in LaTeX and I need to do the headers with the publisher's stye. That styles uses an image in every header but with two different texts: the even pages contain the title of the book and the odd pages contain the title of the chapter. It's something like this

Captura de pantalla de 2017-07-17 10-41-21.png (22.04 KiB) Viewed 1546 times

Captura de pantalla de 2017-07-17 10-41-26.png (28.05 KiB) Viewed 1546 times

And this is what I have for now.

Captura de pantalla de 2017-07-17 10-43-31.png (25.21 KiB) Viewed 1546 times

Captura de pantalla de 2017-07-17 10-43-42.png (28.65 KiB) Viewed 1546 times

How can I make the headers with an predertmined image but with different texts depending on the chapter?

This is a MWE of my book.

Tags:

rais
Posts: 151
Joined: Sun Nov 16, 2014 8:51 pm
fabioonier wrote:How can I make the headers with an predertmined image but with different texts depending on the chapter?

Do you have those images?
Then you could put it into a \makebox[0pt][l]{\includegraphics{...}} construct, the following text will overwrite it.
Or do you want to recreate those images? Should be possible with pstricks...

fabioonier wrote:This is a MWE of my book.

No, it's not. A real MWE doesn't include files no one but yourself has. Nor does it use packages that are not related to the issue at hand.

KR
Rainer

fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am
Hello, rais.

I have the gray box (as a PNG image) where the text of the header is written on. I need to place that box (image) and then to write the headers: the title of the book in even pages and the title of the each chapter in the odd pages.

I'm going to search about the \makebox command.

rais
Posts: 151
Joined: Sun Nov 16, 2014 8:51 pm
In that case you can try to adapt this:

Replace foo-p1 with the shorter image and foo-p2 with the longer one (assuming there are two image files)

KR
Rainer

fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am
Hello, rais.

I did what you suggested and after several changes... it worked!!!!!!!!

I guess that this topic is solved.

Thanks to everyone for your help.

Johannes_B
Site Moderator
Posts: 3639
Joined: Thu Nov 01, 2012 4:08 pm
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Marcus Bettin
Posts: 2
Joined: Tue Oct 03, 2017 11:07 am