Text FormattingHeader

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Georg

Header

Post by Georg »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Header

Post by Stefan Kottwitz »

Quick hack:

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

Stefan
LaTeX.org admin
Georg

Header

Post by Georg »

Thanks, how to move \chead itself?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Header

Post by Stefan Kottwitz »

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
LaTeX.org admin
Georg

Header

Post by Georg »

Can you please combine makebox with hspace?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Header

Post by Stefan Kottwitz »

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
LaTeX.org admin
Georg

Header

Post by Georg »

Thank you very much Stefan.
reyaz
Posts: 12
Joined: Sun Apr 22, 2018 6:05 am

Header

Post by reyaz »

How to add footer line and text below it in MasterDoctorialThesis template Please reply if anybody know
Last edited by reyaz on Wed Apr 25, 2018 7:02 am, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Header

Post by Johannes_B »

https://github.com/johannesbottcher/MDT-Quick-Manual
https://en.wikibooks.org/wiki/LaTeX/Cus ... er-scrpage

Global option footsepline, and \cfoot{Your name} in the preamble.

I can only guess, as your questions are not very clear and lack a minimal working example. See How to get help
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply