From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/underlin/underlin.dtx | 118 +++++++++++++++++++++++++++++ macros/latex/contrib/underlin/underlin.ins | 4 + macros/latex/contrib/underlin/underlin.pdf | Bin 0 -> 83139 bytes 3 files changed, 122 insertions(+) create mode 100644 macros/latex/contrib/underlin/underlin.dtx create mode 100644 macros/latex/contrib/underlin/underlin.ins create mode 100644 macros/latex/contrib/underlin/underlin.pdf (limited to 'macros/latex/contrib/underlin') diff --git a/macros/latex/contrib/underlin/underlin.dtx b/macros/latex/contrib/underlin/underlin.dtx new file mode 100644 index 0000000000..663aedf14a --- /dev/null +++ b/macros/latex/contrib/underlin/underlin.dtx @@ -0,0 +1,118 @@ +% \iffalse +%% File: underlin.dtx Copyright (C) 1987-1997 Rainer Sch"opf +% +% It may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{underlin} +% [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} +\date{\filedate} +\maketitle +\DocInput{underlin.dtx} +\end{document} +% +% \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/macros/latex/contrib/underlin/underlin.ins b/macros/latex/contrib/underlin/underlin.ins new file mode 100644 index 0000000000..6e5c0c4fbf --- /dev/null +++ b/macros/latex/contrib/underlin/underlin.ins @@ -0,0 +1,4 @@ +\def\batchfile{underlin.ins} +\input docstrip.tex +\generate{\file{underlin.sty}{\from{underlin.dtx}{package}}} + diff --git a/macros/latex/contrib/underlin/underlin.pdf b/macros/latex/contrib/underlin/underlin.pdf new file mode 100644 index 0000000000..5ae585a067 Binary files /dev/null and b/macros/latex/contrib/underlin/underlin.pdf differ -- cgit v1.2.3