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 a LaTeX document that contains proprietary information. I need to print a version of the document that has a box around the text with a disclaimer (something to the effect of "Proprietary information of company XYZ, do not redistribute without express consent'). How can I do this?

If it matters, I'm using MacTex.

share|improve this question
    
possible duplicate of Add logo on each page. –  Werner Oct 15 '12 at 22:34
    
@Werner This is not only adding a logo, but also a frame, which requires considerably more than the answers in the linked question. –  egreg Oct 15 '12 at 22:48
    
@egreg: I had assumed that the required box should be around the disclaimer text, not the text block. It wasn't clear, but could be interpreted that way as well. –  Werner Oct 15 '12 at 22:51
    
As there are some difficulties in understanding your wish, could you please make it clearer? –  egreg Oct 15 '12 at 22:53
    
@egreg-- no logos necessary (other than whatever may be inside the box). The idea is to just say 'everything inside this area is XYZ's stuff, don't reveal it.' Gonzalo Medina gave me the perfect answer. –  mmr Oct 16 '12 at 0:29
add comment

3 Answers

up vote 8 down vote accepted

One option is to use the background package; a little example in which I placed the text in italics below the upper rule of the frame (of course, you can easily change the position and attributes of the elements according to your needs):

\documentclass{article}
\usepackage{background}
\usepackage{lipsum}

\backgroundsetup{
scale=1,
angle=0,
opacity=1,
color=black,
contents={\begin{tikzpicture}[remember picture,overlay]
\draw ([xshift=1in,yshift=1in]current page.south west) rectangle ([xshift=-1in,yshift=-1in]current page.north east);
\node at ([yshift=-1.2in]current page.north) 
{\itshape Proprietary information of company XYZ, do not redistribute without express consent};
\end{tikzpicture}}
}
\begin{document}

\lipsum[1-20]

\end{document}

An image of the first two pages:

enter image description here

and a zommed image of the topportin of one of the pages:

enter image description here

Using the old syntax of the package (if the newest version is not available), one has to say

\SetBgScale{1}
\SetBgAngle{0}
\SetBgOpacity{1}
\SetBgColor{black}
\SetBgContents{\begin{tikzpicture}[remember picture,overlay]
\draw ([xshift=1in,yshift=1in]current page.south west) rectangle ([xshift=-1in,yshift=-1in]current page.north east);
\node at ([yshift=-1.2in]current page.north) 
    {\itshape Proprietary information of company XYZ, do not redistribute without express consent};    \end{tikzpicture}}

Replacing

\node at ([yshift=-1.2in]current page.north) 
{\itshape Proprietary information of company XYZ, do not redistribute without express consent};

with

\node at ([yshift=0.5in]current page.south) 
{\itshape Proprietary information of company XYZ, do not redistribute without express consent};

one gets the legend at the bottom, outside the frame, as the following image shows:

enter image description here

share|improve this answer
2  
Works very well, thanks! I would add that the margins of the document need to be brought in a bit, if they are already defined, as in: \usepackage[top=1.5in, bottom=2.0in, left=1.25in, right=1.25in]{geometry} –  mmr Oct 15 '12 at 23:05
    
Note that you can use my tikzpagenodes package to get TikZ nodes for the text area, so that you don't have to subtract the borders yourself. –  Martin Scharrer Oct 16 '12 at 16:06
add comment

Here is a variation of Gonzalo's answer using my tikzpagenodes package. The benefit here is that it takes the official size of footer and header into account, so it will be adjusted if any page dimension changes.

Note that the empty header is still taken into account here. If no header is required simply replace current page header area with current page text area. Adjust the margins (here 1cm) to your liking.

\documentclass{article}
\usepackage{background}
\usepackage{tikzpagenodes}
\usepackage{lipsum}

\backgroundsetup{
scale=1,
angle=0,
opacity=1,
color=black,
contents={\begin{tikzpicture}[remember picture,overlay]
    \draw ([shift={(-1cm,1cm)}]current page header area.north west) rectangle ([shift={(1cm,-1cm)}]current page footer area.south east);
\node [below,outer ysep=5pt] at ([yshift=1cm]current page header area.north) 
{\itshape Proprietary information of company XYZ, do not redistribute without express consent};
\end{tikzpicture}}
}
\begin{document}

\lipsum[1-20]

\end{document}

Result

share|improve this answer
    
This package seems to facilitate one little problem I had in creating fancy headers and footers. I hope I can use it to manipulate headers and footers in even and odd pages. –  azetina Oct 16 '12 at 16:50
add comment

With package eso-pic text can be put on each page at a fixed location.

share|improve this answer
    
If so, could you provide a MWE? Could help the OP. –  azetina Oct 16 '12 at 0:08
    
@azetina Too many details are missing. –  Heiko Oberdiek Oct 16 '12 at 0:30
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.