2

I have been benefits from the post Center figure that is wider than \textwidth and the post Flushright or left of a long Table .

I try to use this \makebox[\textwidth][c] or \makebox[\textwidth][l] or \makebox[\textwidth][r].

But it turns out that [l] is shifting the table far to right. and [r] is shifting the table far to left. And [c] is very close to what I wish, but needs some few mm adjustment to shift to a bit more left.

Q1: Is there any function like \makebox[\textwidth][c]{3mm} with {3mm} shifting?

-

Q2: Is there anyway to adjust the position locate the table somehow between \makebox[\textwidth][c] and \makebox[\textwidth][l]?

Thank you for the comments from the experts!

4
\hspace*{3mm}\makebox[...]{.....}\hspace*{-3mm}
2

I think the cause of your slightly off spacing might be a missing \noindent.

As paragraphs are usually indented, when you use \makebox on its own line a indent is added. See below for a comparison with and without \noindent:

enter image description here

Notes:

  • I adjusted the \textwidth, and added the showframe option to the geometry package so that the effect would be easier to see.

Code:

\documentclass{article}
\usepackage[textwidth=5cm,showframe]{geometry}
\usepackage{xcolor}
\begin{document}
Some text

\makebox[\textwidth][c]{\textcolor{red}{CENTER}}

\makebox[\textwidth][l]{\textcolor{red}{LEFT}}


\bigskip
\noindent
But with \verb|\noindent|:
\medskip

\noindent
\makebox[\textwidth][c]{\textcolor{blue}{CENTER}}

\noindent
\makebox[\textwidth][l]{\textcolor{blue}{LEFT}}

\end{document}
  • @Idear: That is one reason it is recommended to always compose a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem, no matter how trivial it may seem. – Peter Grill May 5 '14 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.