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.

Hi in the linked question I asked how best to use AtBegShi to put titles on to of a page as a title. I'm using these as the equivalent of an MS Word textbox at the top of each page that carries the title of the document. Using AtBegShi for labels

  1. I can't figure out how to set the fontseries to \bfseries\scshape and
  2. I can't figure out how to have the watermark print on top of the text rather than behind the graphic image that is the letterhead graphic.

Following @egregs comment below what I want is:

In the final document, the page is a corporate letterhead using wallpaper to set the graphic as the background and covers the first vertical inch of the page. The title will be overlaid on top of the graphic but offset in 0.35 inches and halfway down the graphic. I'm trying to produce the title in \scshape\bfseries. For the first five pages it will be title of the memo followed by a further five pages of specific titles underlying appendices.

The context is a slightly quixotic quest to use latex as my "daily driver production environment" in a corporate environment.

Any help appreciated

MWE that doesn't work and just hangs below. (xwatermark is hanging a lot for me, am I doing something wrong?)

\documentclass[10pt]{article}
\usepackage[printwatermark]{xwatermark}

\begin{document}
\newwatermark[pages=1-1,scale=0.6,fontseries=b,textcolor=red,xpos=0,ypos=0]{Rhubarb Rhubarb}

\put(0,0){custard custard\\custard custard}

\end{document}
share|improve this question
1  
I don't think that xwatermark is the right way; you seem to want a fixed header for your page and fancyhdr may be a better choice. –  egreg Feb 17 '13 at 10:13
    
thanks @egreg. I'd looked at fancyhdr as an option but I need to have the header in a very specific place due to the size of the header graphic, and it isn't where fancyhdr would put it. I've been trying to use textpos with atbegshi and eso-pic with mixed results and xwatermark wih the problems above. Have I missed something and is this possible with fancyhdr? That would solve a lot of my problems. The only other consideration is that the title changes midway through the document to label appendices, but I think fancyhdr can manage that from what I recollect. –  Tahnoon Pasha Feb 17 '13 at 10:36
    
Can you add some more information about what you want? –  egreg Feb 17 '13 at 10:41
1  
What about background package? Also you have tikz with remember picture facility. –  Harish Kumar Feb 17 '13 at 11:38

2 Answers 2

up vote 3 down vote accepted

The best solution for what you describing is to use the fancyhdr package. Here is an example, where we place four ornaments at the corners of the page. (Can also be done with TikZ)

\documentclass{book}
\usepackage{fancyhdr}

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
    \wb{#2}{#2}#3\end{center}\vspace*{#1}}

\fancyhf{}
\lhead{\setlength{\unitlength}{1bp}%
  \begin{picture}(0,0)
    \put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp}A}}
    \end{picture}}
\rhead{\setlength{\unitlength}{1bp}%
  \begin{picture}(0,0)
    \put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp}B}}
    \end{picture}}
\lfoot{\setlength{\unitlength}{1bp}%
  \begin{picture}(0,0)
    \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
    \end{picture}}
\rfoot{\setlength{\unitlength}{1bp}%
  \begin{picture}(0,0)
    \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
    \end{picture}}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}

\usepackage{lipsum}
\begin{document}

\lipsum[1-5]

\end{document}

enter image description here

The command \put is from LaTeX's picture environment and helps to position the text or a picture. (TikZ will probably be a better choice, if you are going to draw anything fancy). In the example I just used a font with an ornamament.

share|improve this answer
    
Thanks @YiannisLazarides I used a simplified version of this, using the picture environment and the put but defining the font series on the fly and it did the job perfectly. –  Tahnoon Pasha Feb 17 '13 at 13:06

xwatermark isn't the one "hanging" your run. You haven't loaded xcolor package and your \put is wrongly placed.

The key to get graphic watermark on top of text is picture-on-top-text. But in your case you need to use the star (*) form of \newwatermark to get all watermarks on top of your page text.

\documentclass[10pt]{article}
\usepackage[printwatermark]{xwatermark}
\usepackage{xcolor}
\usepackage{lipsum}

\begin{document}
\newwatermark*[pages=1,textcolor=red,xpos=50,ypos=90,fontseries=b,
  fontfamily=put,fontsize=1.5cm,scale=1,picture-on-top-text
]{\fcolorbox{red}{blue}{xwatermark}}

\lipsum[1-5]
\end{document} 

enter image description here

See more examples at Watermark on pictures only.

Here is Yiannis Lazarides' example with xwatermark. Using the key pages, you can select the pages that should receive the ornaments. Note also that, using xpos and ypos (as arguments of \ornaments), you can change the positions of the individual ornaments as you wish.

\documentclass{book}
\usepackage{xwatermark,loops}
\usepackage{xcolor}
\usepackage{lipsum}
\def\ornaments#1{%
  \foreachfox[arg=##1/##2/##3]{#1}{%
    \newwatermark[coord-unit=cm,pages=1,color=red,xpos=##1,ypos=##2]{%
      \unitlength=1bp\relax
      \begin{picture}(0,0)%
      \put(0,0){\makebox(0,0){\fontsize{36bp}{36bp}\usefont{U}{webo}{xl}{n}##3}}%
      \end{picture}%
    }%
  }%
}
\thispagestyle{empty}
\ornaments{-8/11/A,6/11/B,-8/-9/C,6/-9/D}
\begin{document}
\lipsum[1-5]
\end{document} 

enter image description here

Note that xwatermark often requires at least 2 runs.

share|improve this answer

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.