Hi to all of you! I'm writing something like a book and I need to put a
figure near the number of the page in the head of each page. I tried to
modify the following
\pagestyle{myheadings}
\markboth{ bla bla bla}{bla bla bla}
but I failed. I want the figure to appear left or right the "bla bla bla"
string in the pdf document: do you know how to solve the problem?
Thanks in advance.
Simone
Hi Simone,
first of all, I would use the package 'fancyheadings'
(\usepackage{fancyhdr}, the name of the package is different to the
name of the one you must put into 'usepackage'!)
Than I would define a box, with the picture in it, because it may be
difficult for LaTeX to determine the size of the
picture. Also, a box can be handled more easily.
To create a new box do the following:
\newbox{\boxname}
\savebox{\boxname}{picture}
To use the box:
\usebox{\boxname}
Than you can put the box in the header. I just tried it with my header
and it worked fine.
Probably it is easier to make the box and try to insert it in the header
without the package first, (if the header is already as you like.) and
if it doesn't work you can still use the package.
However if you do like use the package, here is an example of my header:
\documentclass[a4paper,openany]{book}
%%%%%%%%%%%---Packages - Anfang---%%%%%%%%%%%
\usepackage{amsmath,amssymb,amscd}
\usepackage{ngerman,bbm,fancyhdr} <- here is the package
\usepackage[ansinew]{inputenc}
\usepackage{fullpage,enumerate}
\usepackage{hyperref,makeidx,wasysym}
\usepackage{picins,graphicx,xcolor,fullpage}
\usepackage{pstricks,pst-lens,pst-text,pstricks-add,pst-eucl }
%%%%%%%%%%%%%%%%--Packages - Ende---%%%%%%%
%--------------------------------------------------------- Header
------------------------------------------------------
\title{\Huge Einführung in die theoretische Physik II}
\date{\Large Wintersemester 2006/2007}
\author{\huge Harald Engel\\
\Large Yannick Okonek (Skript)}
\pagestyle{fancy}
\parindent =0pt
\parskip=3pt
\headheight=25 pt
\headsep=20pt
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \;\thechapter.\
#1 }{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1 }}
\lhead[\bfseries Einführung in die Theoretische Physik \protect\\ Seite:
\thepage]{\bfseries\leftmark}
\rhead[\bfseries \rightmark] {\bfseries von Harald Engel \protect\\
Seite: \thepage}<- here you can insert your picture
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\VL}[1]{\cfoot{\bfseries (Vorlesung vom #1)}}
%--------------------------------------------------------- Header
------------------------------------------------------
Hope it will help you,
Yannick