[texhax] Running heads that aren't properly justified
Elizabeth Dearborn
webmaster at edearborn.net
Sat Feb 12 15:35:03 CET 2005
Use the fancyhdr package (I use a few others too), as follows:
\documentclass{book}
\def\enl{\filbreak\small\textbf}
\def\ene{\filbreak\textbf}
\def\enn{\normalsize}
\usepackage{fancyhdr}
\usepackage[papersize={6.14in,9.21in},margin={0.5in},top={1in},bottom={0.75in},headheight={23.101pt},centering,verbose=false]{geometry}
\usepackage[none]{hyphenat}
\usepackage{multicol}
\newcommand{\imark}[1]{#1\markboth{#1}{#1}}
\fontsize{10}{12.5}\selectfont
\begin{document}
\frontmatter
\mainmatter
% COPY THIS CODE WHEN CHANGING HEADERS
% \end{multicols}
% \eject
\pagestyle{fancy}\fancyhead{}
\fancyhead[LE,RO]{\textsf{\rightmark\\\leftmark}}
\fancyhead[C]{\textbf{Abbreviations}}
\fancyhead[RE,LO]{\small\textsl{Also see Studies, Chemotherapy\\Regimens, and Vocabulary}}
\renewcommand{\headrulewidth}{0.2pt}
\fancyfoot[LE,RO]{\textit{MeDiCaLeSe~2005}}
\fancyfoot[RE,LO]{\textsf{www.medicalese.org}}
\renewcommand{\footrulewidth}{0.2pt}
\raggedright
\begin{multicols}{2}
% END OF CODE TO COPY WHEN CHANGING HEADERS
\small \textbf{\imark{3D-SLS}}\enn: three-dimensional superficial liposculpture.\ene
... and so on.
You can see a page of output at http://www.edearborn.net/6book.pdf . Hope this helps,
Elizabeth Dearborn
webmaster at edearborn.net
---------------------------------
All outgoing mail is checked with Panda Titanium Antivirus 2004.
----- Original Message -----
From: Mark S Cipolone
To: support at tug.org
Sent: Thursday, February 10, 2005 4:17 PM
Subject: [texhax] Running heads that aren't properly justified
[I posted this question to comp.text.tex; is there
anyone here who can answer it or who can forward it to
another forum?]
I am working on a paper whose style sets up running
heads using the following commands:
\def\ps at headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@evenhead{{\rule[-5pt]{\textwidth}{1pt}}\hspace*{-\textwidth}\sffamily\thepage\hfil\leftmark}%
\def\@oddhead{{\rule[-5pt]{\textwidth}{1pt}}\hspace*{-\textwidth}\sffamily{\rightmark}\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {{%%%%%was \MakeUppercase
\ifnum \c at secnumdepth >\m at ne
\if at mainmatter
\@chapapp\ \thechapter. \ %
\fi
\fi
##1}}{}}%
\def\sectionmark##1{%
\markright {{%%%%%was \MakeUppercase
\ifnum \c at secnumdepth >\z@
\thesection. \ %
\fi
##1}}}}
In other words, all pages have a rule at the top;
even-numbered pages have the page number on the left
and the chapter title on the right; and odd-numbered
pages have the section title on the left and the page
number on the right.
My problem is that the text placed on the right edge
of the running head does not come out flush with the
right margin; i.e., there is a small amount of space
between the rightmost character of the text and the
right margin. The amount of space seems to vary
depending on the length of the text on the left edge
of the running head. Does anyone know what could be
causing this?
--
MSC
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20050212/c3efb3cc/attachment.htm
More information about the texhax
mailing list