| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2015 by Robin Schneider <[email protected]> |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 7 |
% of this license or (at your option) any later version. |
| 8 |
% The latest version of this license is in |
| 9 |
% http://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 11 |
% version 2005/12/01 or later. |
| 12 |
% |
| 13 |
% This work has the LPPL maintenance status `maintained'. |
| 14 |
% |
| 15 |
% The Current Maintainer of this work is Robin Schneider. |
| 16 |
% |
| 17 |
% This work consists of the files romanbarpagenumber.dtx and romanbarpagenumber.ins |
| 18 |
% and the derived files romanbarpagenumber.sty and romanbarpagenumber.pdf. |
| 19 |
% |
| 20 |
% \fi |
| 21 |
% |
| 22 |
% \iffalse |
| 23 |
%<*driver> |
| 24 |
\ProvidesFile{romanbarpagenumber.dtx} |
| 25 |
%</driver> |
| 26 |
%<package>%% See file 'romanbarpagenumber.dtx' for copyright and license. |
| 27 |
%<package>\NeedsTeXFormat{LaTeX2e}[1998/12/01] |
| 28 |
%<package>\ProvidesPackage{romanbarpagenumber} |
| 29 |
%<*package> |
| 30 |
[2015/02/06 v1.0 Use romanbar for Roman pagenumbers] |
| 31 |
%</package> |
| 32 |
% |
| 33 |
%<*driver> |
| 34 |
\documentclass[english]{ltxdoc} |
| 35 |
\newcommand{\PackageURL}{https://github.com/ypid/latex-packages/tree/master/romanbarpagenumber} |
| 36 |
\newcommand{\PackageCTANURL}{https://www.ctan.org/pkg/romanbarpagenumber} |
| 37 |
\newcommand{\PackageAuthor}{Robin Schneider} |
| 38 |
\newcommand{\PackageAuthorEmail}{[email protected]} |
| 39 |
\newcommand{\PackageName}{\PrintPackage{romanbarpagenumber}\xspace} |
| 40 |
\newcommand{\PrintPackage}[1]{\textsf{#1}} |
| 41 |
\newcommand{\PrintOptionF}[1]{\emph{#1}} %% ^^A This macro is used for |
| 42 |
%% ^^A explaining any parameter when they first come up in the documentation. |
| 43 |
\newcommand{\DescribePara}[1]{\marginpar{\raggedleft\strut\MacroFont\string#1}} |
| 44 |
\usepackage{romanbarpagenumber} |
| 45 |
\usepackage{ |
| 46 |
babel, |
| 47 |
csquotes, |
| 48 |
xcolor, |
| 49 |
url, |
| 50 |
hypdoc, |
| 51 |
nameref, |
| 52 |
xspace, |
| 53 |
} |
| 54 |
\GetFileInfo{romanbarpagenumber.dtx} |
| 55 |
\hypersetup{ |
| 56 |
pdftitle={A manual for \PackageName}, |
| 57 |
pdfauthor={\PackageAuthor{} <\PackageAuthorEmail>}, |
| 58 |
pdfsubject={\fileinfo}, |
| 59 |
baseurl={\PackageURL}, |
| 60 |
pdfkeywords={This document corresponds to \PackageName~\fileversion, |
| 61 |
dated \filedate} |
| 62 |
} |
| 63 |
|
| 64 |
\title{The \PackageName{} package\thanks{This document |
| 65 |
corresponds to \PackageName~\fileversion, dated \filedate.}} |
| 66 |
\author{\PackageAuthor\\ |
| 67 |
\texttt{\href{mailto:\PackageAuthorEmail?subject=LaTeX package romanbarpagenumber% |
| 68 |
\&body=Dear Robin Schneider,}% |
| 69 |
{\PackageAuthorEmail}% |
| 70 |
}% |
| 71 |
} |
| 72 |
|
| 73 |
\EnableCrossrefs% |
| 74 |
\CodelineIndex% |
| 75 |
\RecordChanges% |
| 76 |
\begin{document} |
| 77 |
\DocInput{romanbarpagenumber.dtx} |
| 78 |
\PrintChanges% |
| 79 |
\PrintIndex% |
| 80 |
\end{document} |
| 81 |
%</driver> |
| 82 |
% \fi |
| 83 |
% |
| 84 |
% ^^A \CheckSum{0} |
| 85 |
% ^^A I use version control and so on which has much better checksums :) |
| 86 |
% |
| 87 |
% \CharacterTable |
| 88 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 89 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 90 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 91 |
% Exclamation \! Double quote \" Hash (number) \# |
| 92 |
% Dollar \$ Percent \% Ampersand \& |
| 93 |
% Acute accent \' Left paren \( Right paren \) |
| 94 |
% Asterisk \* Plus \+ Comma \, |
| 95 |
% Minus \- Point \. Solidus \/ |
| 96 |
% Colon \: Semicolon \; Less than \< |
| 97 |
% Equals \= Greater than \> Question mark \? |
| 98 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 99 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 100 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 101 |
% Right brace \} Tilde \~} |
| 102 |
% |
| 103 |
% \changes{1.0}{2015/02/06}{Initial version} |
| 104 |
% |
| 105 |
% \DoNotIndex{\RequirePackage, \DeclareOption, \ProcessOptions} |
| 106 |
% \DoNotIndex{\PackageWarning, \MessageBreak} |
| 107 |
% \DoNotIndex{\DeclareRobustCommand, \newcommand, \renewcommand, \def, \edef} |
| 108 |
% \DoNotIndex{\DeclareStringOption, \ProcessLocalKeyvalOptions} |
| 109 |
% \DoNotIndex{\ProcessKeyvalOptions, \SetupKeyvalOptions, \DeclareBoolOption} |
| 110 |
% \DoNotIndex{\newenvironment} |
| 111 |
% \DoNotIndex{\if, \else, \fi, \ifcase, \or, \ifthenelse, \AND, \OR, \value, \relax} |
| 112 |
% \DoNotIndex{\loop, \repeat, \the, \ifnum} |
| 113 |
% \DoNotIndex{\equal, \boolean, \@currname, \newcounter, \setcounter} |
| 114 |
% \DoNotIndex{\stepcounter, \addtocounter} |
| 115 |
% \DoNotIndex{\endinput, \begin, \end} |
| 116 |
% \DoNotIndex{\not} |
| 117 |
% |
| 118 |
% \maketitle |
| 119 |
% |
| 120 |
% \pagenumbering{Roman} |
| 121 |
% |
| 122 |
% \phantomsection |
| 123 |
% \addcontentsline{toc}{section}{\abstractname} |
| 124 |
% \begin{abstract} |
| 125 |
% Use the package \PrintPackage{romanbar} for roman page numbers. \\ |
| 126 |
% Information site on CTAN: \url{\PackageCTANURL} \\ |
| 127 |
% Question on Stackexchange: \url{http://tex.stackexchange.com/q/120066/32320} \\ |
| 128 |
% Fork me on GitHub: \url{\PackageURL} \end{abstract} |
| 129 |
% |
| 130 |
% \tableofcontents |
| 131 |
% |
| 132 |
% \section{Introduction} |
| 133 |
% The package \PrintPackage{romanbar} allows to typeset roman numbers with |
| 134 |
% bars. The \PrintPackage{romanbarpagenumber} package allows you to use those |
| 135 |
% \enquote{correct} roman numbers as page number. |
| 136 |
% |
| 137 |
% \section{Usage} |
| 138 |
% Just load the package placing |
| 139 |
% \begin{quote} |
| 140 |
% |\usepackage{romanbarpagenumber}| |
| 141 |
% \end{quote} |
| 142 |
% in the preamble of your \LaTeXe{} source file. |
| 143 |
% |
| 144 |
% When you now set your page numbering to Roman, it will use the |
| 145 |
% \PrintPackage{romanbar} package to typeset the roman number. |
| 146 |
% You can set the page numbering to Roman with the following macro. |
| 147 |
% |
| 148 |
% \begin{quote} |
| 149 |
% |\pagenumbering{Roman}| |
| 150 |
% \end{quote} |
| 151 |
% |
| 152 |
% \section{Contributing} |
| 153 |
% \label{sec:contributing} |
| 154 |
% This package is being developed on GitHub: \url{\PackageURL}. When you want |
| 155 |
% to modify the .sty file, make sure that you make your changes in the .dtx |
| 156 |
% file instead, as the .sty file is automatically generated. |
| 157 |
% |
| 158 |
% \StopEventually{} |
| 159 |
% |
| 160 |
% \newpage |
| 161 |
% \section{Implementation} |
| 162 |
% \iffalse |
| 163 |
%<*package> |
| 164 |
% \fi |
| 165 |
% This package depends on these packages. |
| 166 |
% \begin{macrocode} |
| 167 |
|
| 168 |
\RequirePackage{kvoptions} |
| 169 |
\RequirePackage{xifthen} |
| 170 |
\RequirePackage{romanbar} |
| 171 |
\AtBeginDocument{% |
| 172 |
\@ifpackageloaded{hyperref}{% |
| 173 |
\pdfstringdefDisableCommands{\let\Roman@bar\@firstofone} |
| 174 |
}{} |
| 175 |
} |
| 176 |
% \end{macrocode} |
| 177 |
% \subsection{Redefining pagenumbering} |
| 178 |
% \begin{macrocode} |
| 179 |
\let\romanbarpagenumber@pagenumbering\pagenumbering\relax% |
| 180 |
\renewcommand{\pagenumbering}[1]{% |
| 181 |
\romanbarpagenumber@pagenumbering{#1} |
| 182 |
\ifthenelse{\equal{#1}{Roman}}{% |
| 183 |
\renewcommand*{\thepage}{\Roman@bar{\Roman{page}}} |
| 184 |
}{} |
| 185 |
} |
| 186 |
% \end{macrocode} |
| 187 |
% That's it. |
| 188 |
% \begin{macrocode} |
| 189 |
\endinput |
| 190 |
% \end{macrocode} |
| 191 |
% |
| 192 |
% \iffalse |
| 193 |
%</package> |
| 194 |
% \fi |
| 195 |
% |
| 196 |
% \Finale |
| 197 |
\endinput |