[texhax] Centering text on page with uneven margins

Tue Sep 21 00:02:27 CEST 2010

Joel C. Salomon wrote:
> have the section headings ("Objective", "Education", "Skills", etc.) in
> the left margin, so I have the left margin wider than the right.  I want
> the heading text to be centered, so I have code that looks like this
> minimal version:
>
> 	\documentclass[article, letterpaper]{memoir}
>
> 	\setlrmarginsandblock{1.75 in}{1.25 in}{*}
> 	\checkandfixthelayout
> 	\newcommand{\fixcentering}{\kern 0.5 in}	% (l-r)
>
> 	\begin{document}
> 	\begin{center}
> 		{\bfseries\Large Joel Salomon}\fixcentering\\
> 		(999) 999-9876\quad me at email.com\fixcentering
> 	\end{center}
> 	Off-center text goes here, illustrating the way my r\'esum\'e
> 	looks.  Some more text for line-wrap.
> 	\end{document}
>
> In the actual document the \begin{center}...\end{center} is wrapped by a
> customized \maketitle.
>
> Is there a cleaner way to do this?  I mainly ask because I'd like to
> typeset a second page with a list of references, with different margins.
>
> I'd even go for a version that requires keeping the \fixcentering hack,
> if I can automatically choose the difference in length between the left
> & right margins.
>
> Thanks,
> --Joel

see memoirs \calccentering

(I assume you want it to be centered against the paper not the text block)