Hi all:
I am trying to repeat some text (or even an image) in the left and right margins of every page. I am new to LaTeX. Is there any package that will let me do this? I am aware of fancyhdr, but as far as I could see it affects only headers and footers on each page.
Thanks for your help.
Regards,
Bala.
Page Layout ⇒ How to add text/image in the left/right margin on every page
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
How to add text/image in the left/right margin on every page
Hi Bala,
welcome to the board!
You could use atbegshi or everyshi.
As you mentioned fancyhdr: it would be possible using fancyhdr or scrpage2 as well, for example together with TikZ and the current page node. Here are examples: Fancy chapter headings with TikZ.
Stefan
welcome to the board!
You could use atbegshi or everyshi.
As you mentioned fancyhdr: it would be possible using fancyhdr or scrpage2 as well, for example together with TikZ and the current page node. Here are examples: Fancy chapter headings with TikZ.
Stefan
LaTeX.org admin
How to add text/image in the left/right margin on every page
Hi Stefan,
Thanks a lot for your pointers. I am able to get *almost* what I am looking for with atbegshi. Here is the code:
I can see the text in the margins starting from page 2. Why is that? What am I missing? Why not starting from page 1? Also, there is an extra empty page number 4 where at the bottom right corner it says 4/3, which is not correct.
Thanks for your help.
Regards,
Bala.
Thanks a lot for your pointers. I am able to get *almost* what I am looking for with atbegshi. Here is the code:
Code: Select all
\documentclass[12pt]{exam}
\usepackage[latin1]{inputenc}
\usepackage{atbegshi}
\usepackage{textpos}
\usepackage{shadow}
\usepackage{draftwatermark}
\usepackage{rotating}
\usepackage[english]{babel}
\usepackage{blindtext}
\TPGrid{8}{11}
\AtBeginShipout{%
\begin{textblock}{3}(-0.5,4)
\begin{turn}{-90}
Text on the left margin
\end{turn}
\end{textblock}
\begin{textblock}{3}(6,4)
\begin{turn}{-90}
Text on the right margin
\end{turn}
\end{textblock}%
}
\begin{document}
\pagestyle{headandfoot}
\header{\bfseries Txt 1}{\bfseries Txt 2}{\bfseries Txt 3}
\headrule
\footrule
\footer{}{\copyright whatever}{\thepage/\numpages}
\hfill
\shabox{\parbox[l]{2in}{X1: \\X2: August 21, 2009\\X3: }}
\blinddocument
\end{document}
Thanks for your help.
Regards,
Bala.