## LaTeX forum ⇒ Text Formatting ⇒ Header Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Georg
Posts: 27
Joined: Mon Jan 29, 2018 4:25 pm

Hi all,
How to move \chead position to the left side for 1-3 cm?
Thank you

Stefan Kottwitz
Posts: 8666
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Quick hack:

\chead{\hspace{-3cm}Text}

Stefan

Georg
Posts: 27
Joined: Mon Jan 29, 2018 4:25 pm
Thanks, how to move \chead itself?

Stefan Kottwitz
Posts: 8666
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Well, the content is starting shifted to the right, that is moving...

Another way would be using a box of a certain width: the box is centered by \chead (as that's the purpose of it) but the box can be wider than the content, left-aligned, so all is shifted to the left:

\chead{\makebox[6cm][l]{Text}}

Stefan

Georg
Posts: 27
Joined: Mon Jan 29, 2018 4:25 pm
Can you please combine makebox with hspace?

Stefan Kottwitz
Posts: 8666
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
It can be done either this way, moving the whole box:

\chead{\hspace{-3cm}\makebox[6cm][l]{Text}}

or that way, moving the content in the box:

\chead{\makebox[6cm][l]{\hspace{-3cm}Text}}

The 3cm and 6cm are of course just samples, adjust as needed.

Stefan