Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trying to set page borders in LaTeX

2,155 views
Skip to first unread message

nescalona

unread,
Dec 3, 2007, 2:31:18 PM12/3/07
to
I've been crawling the web for about an hour trying to figure out how
to do this very simple thing. Usually, when I see people ask about
borders, they are directed to the fancybox package. Unfortunately, the
documentation for that package is terrible, and even guess-and-check
isn't working. This is what I want to do:

Set a plain box border for all pages in the document, stretching from
(0in,0in) to (5.5in,8.5in). And yes, I do mean that two of the sides
of this box are going to be on the exact edge of the paper, and
therefore not printed. I also want the box to have absolutely no
effect on the content of the page, and the margins to stay exactly the
same as they have been previously set with the geometry package.

The effect I'm trying to produce is to set all the pages in the US-
letter size document, but with significantly larger margins. The
border, which is 0.25 in away from the inside edge of the margins,
will be a line to cut along after printing.

Sorry if I seem a little emphatic, but this is my second day with
LaTeX, self-taught, and it gets frustrating when even Google fails you.

Martin Heller

unread,
Dec 3, 2007, 2:49:57 PM12/3/07
to
nescalona skrev:

> I've been crawling the web for about an hour trying to figure out how
> to do this very simple thing. Usually, when I see people ask about
> borders, they are directed to the fancybox package. Unfortunately, the
> documentation for that package is terrible, and even guess-and-check
> isn't working. This is what I want to do:
>
> Set a plain box border for all pages in the document, stretching from
> (0in,0in) to (5.5in,8.5in). And yes, I do mean that two of the sides
> of this box are going to be on the exact edge of the paper, and
> therefore not printed. I also want the box to have absolutely no
> effect on the content of the page, and the margins to stay exactly the
> same as they have been previously set with the geometry package.

\documentclass{article}
\usepackage{eso-pic,picture}

\AddToShipoutPicture{%
\setlength\fboxsep{0pt}%
\put(0,0){\framebox(5.5in,8.5in)[lb]{}}%
}

\begin{document}
~\newpage ~
\end{document}

nescalona

unread,
Dec 3, 2007, 3:03:40 PM12/3/07
to
Ah, excuse my mistake. I meant (0,0) as in the top left of the page.
But I just moved it 2.5in up, and it works fine. Thank you!

Tariq

unread,
Dec 3, 2007, 4:22:15 PM12/3/07
to
On Dec 3, 2:49 pm, Martin Heller <mr_hel...@yahoo.dk> wrote:

>
> \documentclass{article}
> \usepackage{eso-pic,picture}
>
> \AddToShipoutPicture{%
> \setlength\fboxsep{0pt}%
> \put(0,0){\framebox(5.5in,8.5in)[lb]{}}%
>
> }
>
> \begin{document}
> ~\newpage ~
> \end{document}

Hi Martin

I could not help trying the solution you gave. But, I could not find
the package picture.sty anywhere. I have searched the CTAN archive and
the closest thing I have come across is textpicture.sty. Is that what
you meant? Regards,

Tariq

Martin Heller

unread,
Dec 3, 2007, 4:34:43 PM12/3/07
to
Tariq skrev:

> I could not help trying the solution you gave. But, I could not find
> the package picture.sty anywhere. I have searched the CTAN archive and
> the closest thing I have come across is textpicture.sty. Is that what
> you meant? Regards,

No. The picture package is part of the Oberdiek bundle
<http://ctan.org/get/macros/latex/contrib/oberdiek/picture.pdf>.

The package enables you to use lengths in a picture environment.
You don't really need it here. Just set \unitlength to 1in and
remove the `in' in the argument to \framebox.

Tariq

unread,
Dec 3, 2007, 5:25:06 PM12/3/07
to
On Dec 3, 4:34 pm, Martin Heller <mr_hel...@yahoo.dk> wrote:


> No. The picture package is part of the Oberdiek bundle
> <http://ctan.org/get/macros/latex/contrib/oberdiek/picture.pdf>.
>
> The package enables you to use lengths in a picture environment.
> You don't really need it here. Just set \unitlength to 1in and
> remove the `in' in the argument to \framebox.

Martin

Thanks for your help. I would certainly like to get the package. I am
surprised that my teTeX distribution does not have it already.
Regards,

Tariq

Robin Fairbairns

unread,
Dec 3, 2007, 6:01:13 PM12/3/07
to

tetex was last updated several years ago, and won't ever be updated
again.

i think picture is one of heiko's 2006 packages; it's in texlive 2007.
--
Robin Fairbairns, Cambridge

Martin Heller

unread,
Dec 3, 2007, 6:06:37 PM12/3/07
to
Tariq skrev:


> Thanks for your help. I would certainly like to get the package. I am
> surprised that my teTeX distribution does not have it already.

There is no reason to be surprised. teTeX is not maintained
anymore <http://www.tug.org/tetex/>. The first release of
picture.sty was after support for teTeX had stopped.

Install an up-to-date distribution, e.g., TeX Live or MikTeX.

Heiko Oberdiek

unread,
Dec 3, 2007, 6:23:21 PM12/3/07
to
Tariq <tariq....@gmail.com> wrote:

> I could not help trying the solution you gave. But, I could not find
> the package picture.sty anywhere. I have searched the CTAN archive and
> the closest thing I have come across is textpicture.sty. Is that what
> you meant? Regards,

Wrong search strategy. Look for LaTeX packages *without* extension.
For example, package picture is provided as "picture.dtx"
or "picture.pdf".
The unpacked form is available in
CTAN:macros/latex/contrib/oberdiek/oberdiek-tds.zip

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Tariq

unread,
Dec 3, 2007, 8:31:07 PM12/3/07
to
Hi Martin, Robin and Heiko

I appreciate you all responding to my earlier post.

I do have TeXLive 2007 also installed. However, I had to install many
fonts manually on the teTeX distribution before MacTeX became
available and none of these fonts seem to be available natively on
TeXLive 2007. I had hoped that with upgrade of the distribution, my
local texmf tree will be preserved. To tell the truth, I was mildly
upset when I found out that TeXLive is installed differently and all
the work I had put into font installation on teTeX will be wasted. So
my solution has been to continue to use teTeX for as long as I can. It
turns out that adding a package here and there into the texmf tree is
a lot less work that adding font files.

I appreciate Heiko's advice on searching for package files. Obviously
I was doing it wrong. Regards,

Tariq

Robin Fairbairns

unread,
Dec 4, 2007, 4:46:28 AM12/4/07
to
Tariq <tariq....@gmail.com> writes:
>I do have TeXLive 2007 also installed. However, I had to install many
>fonts manually on the teTeX distribution before MacTeX became
>available and none of these fonts seem to be available natively on
>TeXLive 2007.

to first order, tex-live only offers support (out of the box) for free
fonts. i don't actually know mactex, but it may be that there are
fonts that it doesn't install by *default*, but which are in fact
available -- does mactex offer an "install extra things from the
distribution" option?

>I had hoped that with upgrade of the distribution, my
>local texmf tree will be preserved.

it obviously has, or you wouldn't have been able to continue to use tetex.

>To tell the truth, I was mildly
>upset when I found out that TeXLive is installed differently and all
>the work I had put into font installation on teTeX will be wasted. So
>my solution has been to continue to use teTeX for as long as I can. It
>turns out that adding a package here and there into the texmf tree is
>a lot less work that adding font files.

there's no reason you shouldn't just add your tetex local tree to your
mactex distribution ... unless it contains old versions of what's
available in more modern versions in the main tex-live tree -- you
would have to excise those.

perhaps the sensible thing would be to copy your font installations
across -- less of a hassle than you had originally, since you have the
directory structures.

you'll then need to do a bunch of "updmap -enable" operations. dunno
how those work on mactex.

>I appreciate Heiko's advice on searching for package files. Obviously
>I was doing it wrong. Regards,

there's text about finding files in the faq, too (which includes what
heiko said).

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=findfiles
--
Robin Fairbairns, Cambridge

Tariq

unread,
Dec 4, 2007, 12:16:07 PM12/4/07
to
Hi Robin

On Dec 4, 4:46 am, r...@cl.cam.ac.uk (Robin Fairbairns) wrote:

> -- does mactex offer an "install extra things from the
> distribution" option?
>

Unfortunately, I did not install MacTeX; my sys admin did. Usually, he
tries to install the fat version of things but I'll ask to see if such
option is available.


> >I had hoped that with upgrade of the distribution, my
> >local texmf tree will be preserved.
>
> it obviously has, or you wouldn't have been able to continue to use tetex.
>

What I meant was that the upgrade/new distribution will continue to
use my local texmf tree. The work around now is that I need to switch
between the two distributions from within the System Preferences panel
and that switches all the binaries (which is what is desired) and the
the main as well as the local texmf trees (not exactly desired, since
my older distribution has local texmf tree with additional stuff).


> there's no reason you shouldn't just add your tetex local tree to your
> mactex distribution ... unless it contains old versions of what's
> available in more modern versions in the main tex-live tree -- you
> would have to excise those.
>
> perhaps the sensible thing would be to copy your font installations
> across -- less of a hassle than you had originally, since you have the
> directory structures.
>
> you'll then need to do a bunch of "updmap -enable" operations. dunno
> how those work on mactex.
>

Ah, why did I not think of this solution? Thanks Robin. I think I
should be able to copy my font installations across the distribution
to MacTeX. Doing the updmap is no problem (on Mac, it works just as
you said).

Thanks for the detailed post and suggestion for a potential solution.
Regards,

Tariq

0 new messages