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 usually do the following to remove 1 inch padding.

\documentclass{minimal}
\usepackage{pstricks}
\paperwidth=72.27pt
\paperheight=72.27pt
\voffset=-72.27pt
\hoffset=-72.27pt
\parindent=0sp
\special{papersize=\the\paperwidth,\the\paperheight}
\begin{document}
\begin{pspicture}(\paperwidth,\paperheight)
\psframe[linecolor=red](\paperwidth,\paperheight)
\end{pspicture}
\end{document}

How to remove 1 inch paddings without using \hoffset and \voffset?

share|improve this question
    
I will tidy up the question above after migrating Herbert's answer. –  xport Jul 17 '11 at 20:01
    
The answer is already in Herbert's and mine answers to the other question. Use geometry and be happy: why reinvent the wheel? :) Performance time in loading geometry? –  egreg Jul 17 '11 at 20:13
    
@egreg: For creating a single graphics, I don't need geometry.sty. I want to take a full control. :-) –  xport Jul 17 '11 at 20:18
    
@egreg: If I used geometry.sty, I will not know whether or not there are rounding errors in the author's calculation. –  xport Jul 17 '11 at 20:22
    
@xport: If you are that worried about having ultimate control, then LaTeX is a bad choice: use plain TeX and define only what you want. –  Joseph Wright Jul 17 '11 at 20:42
show 1 more comment

2 Answers

up vote 3 down vote accepted

sets the left and top margin to 0pt

\documentclass[a4paper]{article}
\oddsidemargin=-1in
\topmargin=-1in
\headheight=0pt
\headsep=0pt
\parindent=0pt
\usepackage{layout}
\begin{document}

\rule{\textwidth}{\textheight}

\layout

\end{document}
share|improve this answer
    
I prefer using 72.27 to get the exact value. :-) –  xport Jul 17 '11 at 20:53
add comment
\oddsidemargin=-1in
\headsep=0pt
\headheight=0pt
\topmargin=-1in
\pagestyle{empty}
share|improve this answer
    
I prefer using 72.27pt because using 1in causes rounding error. –  xport Jul 17 '11 at 20:38
2  
There's a difference of 1sp. About 5nm. –  egreg Jul 17 '11 at 20:54
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.