Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 3 down vote accepted
\hspace*{3mm}\makebox[...]{.....}\hspace*{-3mm}
share|improve this answer
    
+1. It may be a simple answer, but you may just solve my problem, let me try. Thanks! –  Idear May 5 at 0:27
    
Yes, I think yours really is brilliant. –  Idear May 5 at 1:05

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}
share|improve this answer
    
thanks +1, it is something to try. –  Idear May 5 at 1:05
    
@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 at 1:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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