diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:58:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:58:46 +0000 |
commit | a73332f25045587a2f469755bcaff1cd0fef2deb (patch) | |
tree | 6c5a9f676a7c0ca044584adbf11b99d44194239b | |
parent | 7bfbc9c1bf5365013609f5c3e3c776d3ccb4a150 (diff) |
trunk/Master/texmf-dist/source/latex/underlin
git-svn-id: svn://tug.org/texlive/trunk@573 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/source/latex/underlin/underlin.dtx | 111 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/underlin/underlin.ins | 4 |
2 files changed, 115 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/underlin/underlin.dtx b/Master/texmf-dist/source/latex/underlin/underlin.dtx new file mode 100644 index 00000000000..746513b096b --- /dev/null +++ b/Master/texmf-dist/source/latex/underlin/underlin.dtx @@ -0,0 +1,111 @@ +% \iffalse +%% File: histogr.dtx Copyright (C) 1987-1997 Rainer Sch\"opf +% +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{underlin} +%<package> [1997/02/16 v1.01 underlined running head (RmS)] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{underlin} +\pagestyle{underline} +\GetFileInfo{underlin.sty} +\begin{document} +\title{Two {\sf pagestyles} for underlining headers\thanks{This file + has version number \fileversion, last revised \filedate.}} +\author{Rainer Sch\"opf\\ + schoepf@uni-mainz.de} +\date{\filedate} +\maketitle +\DocInput{underlin.dtx} +\end{document} +%</driver> +% \fi +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \CheckSum{47} +% +% \changes{1.01}{1997/02/16}{Version 1.0a converted to \LaTeXe +% documentation format.} +% +% \begin{abstract} +% This package implements two new {\sf pagestyles} +% {\tt underline} and {\tt myunderline} that are similar +% to the standard {\tt headings} and {\tt myheadings} +% {\sf pagestyles} but provide a horizontal line just below +% the head line. +% \end{abstract} +% +% The purpose of this package file is to provide a way to +% underline a running head. +% This is done by redefining the \verb+\@evenhead+ and \verb+\@oddhead+ +% macros. +% To understand this you must know that whenever a given pagestyle +% (say `xxx') is selected by a \verb+\pagestyle{xxx}+ command the +% macro \verb+\ps@xxx+ is executed. +% Therefore we define a macro \verb+\ps@underline+ which is called +% when you say \verb+\pagestyle{underline}+. +% To provide for a rule with user-defined headings we also define +% the pagestyle `myunderline' , i.e.\ the macro \verb+\ps@myunderline+. +% +% \StopEventually{} +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macro}{\ps@underline} +% The first thing the macro \verb+\ps@underline+ +% does is to call +% \verb+\ps@headings+ to set up everything like the `headings' +% pagestyle does. +% Here we do not need to distinguish onesided and twosided +% printing since this is already done correctly by +% \verb+\ps@headings+. +% \begin{macrocode} +\def\ps@underline{\ps@headings +% \end{macrocode} +% Then we redefine \verb+\@evenhead+. The first part is a copy of +% the definition in \verb+\ps@headings+. +% This has the advantage that this style option works with +% document styles `article', `report', and `book'. +% \begin{macrocode} + \def\@evenhead{\thepage\hfil\slshape\leftmark\null +% \end{macrocode} +% \verb|\null| is defined to be \verb|\hbox{}| in the \LaTeX{} +% kernel file \texttt{ltplain.dtx}. +% Additionally we include a \verb+\vadjust+ primitive. The effect of +% this primitive is to add its argument after the current +% \verb+\hbox+ to the enclosing vertical list. +% \begin{macrocode} + \vadjust{\vskip .3ex\hrule}}% +% \end{macrocode} +% The \verb+\@oddhead+ macro is constructed +% analogously. +% \begin{macrocode} + \def\@oddhead{\null{\slshape \rightmark}\hfil\thepage + \vadjust{\vskip .3ex\hrule}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ps@myunderline} +% The macro \verb+\ps@myunderline+ for underlining user defined +% running heads is constructed analogously. +% \begin{macrocode} +\def\ps@myunderline{\ps@myheadings + \def\@oddhead{\null{\slshape\rightmark}\hfil + \rm\thepage\vadjust{\vskip .3ex\hrule}}% + \def\@evenhead{\thepage\hfil\slshape \leftmark \null + \vadjust{\vskip .3ex\hrule}}} +% \end{macrocode} +% \end{macro} +% +% +% Well, that's all. Use it and enjoy. +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/latex/underlin/underlin.ins b/Master/texmf-dist/source/latex/underlin/underlin.ins new file mode 100644 index 00000000000..6e5c0c4fbf4 --- /dev/null +++ b/Master/texmf-dist/source/latex/underlin/underlin.ins @@ -0,0 +1,4 @@ +\def\batchfile{underlin.ins} +\input docstrip.tex +\generate{\file{underlin.sty}{\from{underlin.dtx}{package}}} + |