Text FormattingPlace text in center of page

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ohsure85
Posts: 1
Joined: Tue May 11, 2010 8:26 am

Place text in center of page

Post by ohsure85 »

Hi,

So i'm trying to create a custom title page, and I want to place text in various locations of the page, using spacing units such as 1 in, 2 in ... For some reason, this is proving to be more difficult than expected. Anyone have a suggestion on how to do this. Thanks!

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Place text in center of page

Post by meho_r »

Just to give you the idea...

Code: Select all

\documentclass{book}

\begin{document}
\vspace*{1cm}% starred version ensures space applies everywhere; without the star, spaces on certain places will be ignored; remove the star to see the effect

\noindent The top left\hfill The top right

\vfill

\begin{center}
\Huge The center
\end{center}

\noindent\hfill Another centered line\hfill\null% \null is just to get an "invisible" sign so the alignment is applied as expected

\noindent\hfill A \hfill B \hfill C\hfill\null

\vfill\vfill\vspace*{-2cm}

\noindent The bottom

\vspace*{.5cm}
\hspace*{4cm}
\noindent The bottom

\vspace*{.5cm}
\hspace*{9cm}
\noindent The bottom

\end{document}
Post Reply