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 am trying to place a table in my Latex document and margin it down and left and right. I can use the page margins \voffset and \hoffset but as you can see by my code below I am using a wallpaper image, so that messes the image up.

Is there a way to set horizontal and vertical placement of a table using actual in x and y placements?

Here is my current code:

\documentclass[12pt,letterpaper]{letter}
\thispagestyle{empty}
\pagestyle{empty}
\hoffset = -0.23in
\voffset = 0.48in
\oddsidemargin = 0pt
\topmargin = 0pt
\headheight = 0pt
\headsep = 0pt
\marginparsep = 0pt
\marginparwidth = 0pt
\footskip = 0pt
\usepackage[paperwidth=6in,paperheight=2.75in]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{wallpaper}
\CenterWallPaper{1}{check53.png}
\begin{document}

\begin{tabular}{ p{4in} l }
\textbf{date} & \textbf{amount} \\ 
\multicolumn{2}{ l }{\rule{0pt}{0.15in}\textbf{to}} \\
\multicolumn{2}{ l }{\rule{-0.12in}{0.18in}\textbf{letters}} \\
\end{tabular} 

\end{document}

I want to set both h and v offset to 0 and position the table instead of the document.

share|improve this question
2  
Why are you setting the parameters manually without letting the job to geometry? I'd use \usepackage[paperwidth=6in, paperheight=2.75in, margin=0pt]{geometry}. Are those also the dimensions of the image? –  egreg Sep 7 '12 at 14:58
    
Yeah the image is the exact same size. –  jfreak53 Sep 7 '12 at 15:11
    
The margin thing worked, all good now :) Didn't know about that since I'm new to Latex. –  jfreak53 Sep 7 '12 at 15:17
add comment

1 Answer 1

up vote 4 down vote accepted

I wouldn't use the letter class, but prefer article. The best approach, in my opinion, is to let all the job to geometry:

\documentclass[12pt]{article}

\usepackage[paperwidth=6in,paperheight=2.75in,margin=0pt]{geometry}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{wallpaper}
\CenterWallPaper{1}{check53.png}

\pagestyle{empty}

\setlength{\parindent}{0pt}

\begin{document}

\begin{tabular}{ @{} p{4in} l @{} }
\textbf{date} & \textbf{amount} \\ 
\multicolumn{2}{ l }{\rule{0pt}{0.15in}\textbf{to}} \\
\multicolumn{2}{ l }{\rule{-0.12in}{0.18in}\textbf{letters}} \\
\end{tabular} 

\end{document}

I've introduced also a couple of things more which may require to recompute the shifts, but put the document in a more predictable state (the text starts exactly from the left margin).

share|improve this answer
add comment

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.