| 1 |
% \iffalse |
| 2 |
% Copyright (C) 2004 TeX Users Group. |
| 3 |
% |
| 4 |
% This program is free software; you can redistribute it and/or modify |
| 5 |
% it under the terms of the GNU General Public License as published by |
| 6 |
% the Free Software Foundation; either version 2 of the License, or |
| 7 |
% (at your option) any later version. |
| 8 |
% |
| 9 |
% This program is distributed in the hope that it will be useful, |
| 10 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
% GNU General Public License for more details. |
| 13 |
% |
| 14 |
% You should have received a copy of the GNU General Public License |
| 15 |
% along with this program; if not, write to the Free Software |
| 16 |
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 |
% |
| 18 |
%<*driver> |
| 19 |
\ProvidesFile{pracjourn.dtx} |
| 20 |
%</driver> |
| 21 |
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 22 |
%<class>\ProvidesClass{pracjourn} |
| 23 |
%<*class> |
| 24 |
[2007/08/25 v0.4n PracTeX Journal Class] |
| 25 |
%</class> |
| 26 |
% |
| 27 |
%<*driver> |
| 28 |
\documentclass{ltxdoc} |
| 29 |
\usepackage{hyperref,multicol} |
| 30 |
\EnableCrossrefs |
| 31 |
\CodelineIndex |
| 32 |
\RecordChanges |
| 33 |
|
| 34 |
\makeatletter |
| 35 |
\usepackage{amsmath,amssymb,array,calc,graphicx,hyperref,ifpdf,ifthen,varioref} |
| 36 |
\usepackage[osf]{mathpazo} |
| 37 |
\renewcommand\sfdefault{lmss} |
| 38 |
\renewcommand\ttdefault{lmtt} |
| 39 |
\usepackage[T1]{fontenc} |
| 40 |
\ifpdf\IfFileExists{microtype.sty}{\usepackage[protrusion=true,expansion=false]{microtype}}{}\fi |
| 41 |
\linespread{1.069} % Palatino needs more space between lines |
| 42 |
\frenchspacing % Remove ugly extra space after punctuation |
| 43 |
\hypersetup{colorlinks, breaklinks, linktocpage, |
| 44 |
linkcolor=red, citecolor=red, filecolor=blue, urlcolor=blue} |
| 45 |
\setlength\extrarowheight{2pt} % Make tables bearable |
| 46 |
% Crude referencing commands: |
| 47 |
\newcommand\tabref[1]{Table~\vref{tab:#1}} |
| 48 |
\newcommand\figref[1]{Figure~\vref{fig:#1}} |
| 49 |
\newcommand\secref[1]{Section~\vref{sec:#1}} |
| 50 |
% Various labelling commands: |
| 51 |
\newcommand*\name[1]{\textsc{#1}} |
| 52 |
\newcommand*\pkg[2][]{\relax |
| 53 |
\edef\@tempa{#1}\relax |
| 54 |
\ifx\@tempa\@empty |
| 55 |
\textsf{#2}\else |
| 56 |
\href{#1}{\textsf{#2}}\fi} |
| 57 |
\newcommand*\env[1]{\textsf{#1}} |
| 58 |
\let\latin\textit |
| 59 |
\def\eg{\latin{e.g.}} |
| 60 |
\def\ie{\latin{i.e.}} |
| 61 |
\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} |
| 62 |
% Better float parameters: (from the TeX FAQ) |
| 63 |
\renewcommand{\topfraction}{.85} |
| 64 |
\renewcommand{\bottomfraction}{.7} |
| 65 |
\renewcommand{\textfraction}{.15} |
| 66 |
\renewcommand{\floatpagefraction}{.66} |
| 67 |
\renewcommand{\dbltopfraction}{.66} |
| 68 |
\renewcommand{\dblfloatpagefraction}{.66} |
| 69 |
\setcounter{topnumber}{9} |
| 70 |
\setcounter{bottomnumber}{9} |
| 71 |
\setcounter{totalnumber}{20} |
| 72 |
\setcounter{dbltopnumber}{9} |
| 73 |
% Section heading customisation: |
| 74 |
\renewcommand\section{\@startsection {section}{1}{\z@}% |
| 75 |
{-3ex \@plus -1ex \@minus -.2ex}% |
| 76 |
{2ex \@plus 0.2ex}% |
| 77 |
{\centering\normalsize\scshape}} |
| 78 |
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% |
| 79 |
{-2.5ex\@plus -1ex \@minus -.2ex}% |
| 80 |
{1.5ex \@plus 0.2ex}% |
| 81 |
{\centering\normalsize\itshape}} |
| 82 |
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% |
| 83 |
{-2ex\@plus -1ex \@minus -.2ex}% |
| 84 |
{1.5ex \@plus 0.2ex}% |
| 85 |
{\centering\normalfont\normalsize}} |
| 86 |
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% |
| 87 |
{3.25ex \@plus1ex \@minus.2ex}% |
| 88 |
{-1em}% |
| 89 |
{\normalfont\normalsize\itshape}} |
| 90 |
\let\subparagraph\undefined |
| 91 |
\def\@maketitle{% |
| 92 |
\newpage |
| 93 |
{\centering |
| 94 |
{\large\@title\par}\vskip1em |
| 95 |
\textsc\@author\par\vskip1em |
| 96 |
\@date\par}\vskip2em} |
| 97 |
% Abstract customisation: |
| 98 |
\renewenvironment{abstract}{% |
| 99 |
\begin{trivlist}\item[] |
| 100 |
\setlength\leftskip{0.15\textwidth} |
| 101 |
\setlength\rightskip{0.15\textwidth} |
| 102 |
\small\textit{Abstract}\quad}{\end{trivlist}} |
| 103 |
% TOC customisation: Make it two-column to save space; |
| 104 |
% Remove leaders in the TOC, replace with \quad. |
| 105 |
\setcounter{tocdepth}{2} |
| 106 |
\renewcommand\tableofcontents{% |
| 107 |
\section*{\contentsname} |
| 108 |
\begin{trivlist}\item[] |
| 109 |
\begin{multicols}{2} |
| 110 |
\setlength\parskip{0pt} |
| 111 |
\small |
| 112 |
\@starttoc{toc}% |
| 113 |
\end{multicols} |
| 114 |
\end{trivlist}} |
| 115 |
\renewcommand*\l@section[2]{% |
| 116 |
\ifnum \c@tocdepth >\z@ |
| 117 |
\addpenalty\@secpenalty |
| 118 |
\addvspace{1.0em \@plus\p@}% |
| 119 |
\setlength\@tempdima{1.5em}% |
| 120 |
\begingroup |
| 121 |
\raggedright |
| 122 |
\parindent \z@ |
| 123 |
\rightskip \z@ |
| 124 |
\parfillskip \@flushglue |
| 125 |
\leavevmode |
| 126 |
\advance\leftskip\@tempdima |
| 127 |
\hskip -\leftskip |
| 128 |
#1\quad\nobreak#2\hfil\par |
| 129 |
\endgroup |
| 130 |
\fi} |
| 131 |
\def\@dottedtocline#1#2#3#4#5{% |
| 132 |
\ifnum #1>\c@tocdepth \else |
| 133 |
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip \@flushglue |
| 134 |
\parindent #2\relax\@afterindenttrue |
| 135 |
\interlinepenalty\@M |
| 136 |
\leavevmode |
| 137 |
\raggedright |
| 138 |
\@tempdima #3\relax |
| 139 |
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip |
| 140 |
{#4}\quad\nobreak#5\hfil\par}% |
| 141 |
\fi} |
| 142 |
% Better footnotes: |
| 143 |
\let\old@makefntext\@makefntext |
| 144 |
\renewcommand\@makefntext[1]{% |
| 145 |
\vspace{2pt}% |
| 146 |
\setlength\parindent{-1.8em}% |
| 147 |
\setlength\leftskip{1.8em}% |
| 148 |
\makebox[1.8em][l]{\normalfont\small\@thefnmark.}#1} |
| 149 |
% LOGOS, tuned for Palatino: |
| 150 |
\def\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} |
| 151 |
|
| 152 |
\newcommand\TODO[1]{\marginpar{\raggedright\itshape\color{red}TODO: #1}} |
| 153 |
|
| 154 |
\begin{document} |
| 155 |
\DocInput{pracjourn.dtx} |
| 156 |
\end{document} |
| 157 |
%</driver> |
| 158 |
% |
| 159 |
% \fi |
| 160 |
% |
| 161 |
% \CheckSum{0} |
| 162 |
% |
| 163 |
% |
| 164 |
% \changes{v0.0}{2004/10/03}{KB: Initial version} |
| 165 |
% \changes{v0.2}{2004/11/13}{KB: Palatino, no date printing} |
| 166 |
% \changes{v0.3}{2005/01/03}{AO: Add \cmd\TPJissue, \cmd\TPJrevision, \cmd\TPJcopyright} |
| 167 |
% \changes{v0.3}{2005/01/03}{AO: Rewrite using \LaTeXe{} idioms} |
| 168 |
% \changes{v0.3a}{2005/01/03}{AO: changes to \cmd\TPJissue, \cmd\TPJrevision, \cmd\TPJcopyright} |
| 169 |
% \changes{v0.3b}{2005/01/07}{AO: change \cmd\evensidemargin} |
| 170 |
% |
| 171 |
% |
| 172 |
% \GetFileInfo{pracjourn.dtx} |
| 173 |
% |
| 174 |
% \DoNotIndex{\if} |
| 175 |
% |
| 176 |
% \title{The \textsf{pracjourn} class} |
| 177 |
% \author{% |
| 178 |
% Karl Berry \\ |
| 179 |
% Arthur Ogawa\\ |
| 180 |
% Will Robertson\\ |
| 181 |
% Correspondence to: \texttt{[email protected]}} |
| 182 |
% \date{\filedate\qquad\fileversion} |
| 183 |
% |
| 184 |
% \maketitle |
| 185 |
% |
| 186 |
% \begin{abstract} |
| 187 |
% \noindent\textsf{pracjourn} is a class based on \texttt{article.cls}, |
| 188 |
% to be used for typesetting articles in The Prac\TeX\ Journal, |
| 189 |
% \url{http://tug.org/pracjourn}. |
| 190 |
% \end{abstract} |
| 191 |
% |
| 192 |
% \tableofcontents |
| 193 |
% |
| 194 |
% \section{Introduction} |
| 195 |
% |
| 196 |
% The \pkg{pracjourn} \LaTeX{} document class is to be used for |
| 197 |
% articles written for the The Prac\TeX\ Journal, |
| 198 |
% \url{http://tug.org/pracjourn}. The source for the document class |
| 199 |
% resides at \url{http://tug.org/pracjourn/dtx}, and is also |
| 200 |
% available at CTAN. |
| 201 |
% |
| 202 |
% \section{Usage} |
| 203 |
% |
| 204 |
% Refer to the sample document, \url{www.tug.org/pracjourn/dtx/pjsample.tex}, |
| 205 |
% for context. Issue a |\documentclass{pracjourn}| command at |
| 206 |
% the beginning of your document as usual. No class options are necessary. |
| 207 |
% |
| 208 |
% This document class automatically loads the packages |
| 209 |
% \pkg{color}, \pkg{graphicx}, \pkg{hyperref}, and \pkg{textcomp}. |
| 210 |
% These are all standard packages in every \TeX\ distribution. |
| 211 |
% |
| 212 |
% \subsection{Formatting} |
| 213 |
% |
| 214 |
% Page metrics are appropriate for printing on either A4 or |
| 215 |
% letter size paper. The type size is 12/15.5 Palatino. |
| 216 |
% Except in exceptional circumstances, please refrain from |
| 217 |
% using typefaces other than those defined by this class. |
| 218 |
% |
| 219 |
% Hyperlinks are inserted automatically in the relevant locations in |
| 220 |
% a dark blue colour. If you wish to adjust this colour to suit your |
| 221 |
% own colour requirements, simply redefine the \texttt{linkcolour}. E.g., |
| 222 |
% to change it to dark red,\\ |
| 223 |
% \indent|\definecolor{linkcolour}{rgb}{0.7,0.2,0.2}|. |
| 224 |
% |
| 225 |
% \subsection{Author/article metadata} |
| 226 |
% |
| 227 |
% All author and article information must be defined before \cmd\maketitle, which |
| 228 |
% should probably be the first thing after |\begin{document}|. |
| 229 |
% |
| 230 |
% \DescribeMacro{\author} |
| 231 |
% \DescribeMacro{\title} |
| 232 |
% \DescribeMacro{\abstract} |
| 233 |
% The \cmd\author, \cmd\title, and \cmd\abstract\ commands are used to |
| 234 |
% define those pieces of metadata about the article, and are mandatory. |
| 235 |
% Note that the \cmd\abstract\ is a plain old command, \emph{not} an environment. |
| 236 |
% |
| 237 |
% \DescribeMacro{\noabstract} |
| 238 |
% Should you have a reason for not having an abstract, |
| 239 |
% this may be signified by declaring \cmd\noabstract\ instead. |
| 240 |
% |
| 241 |
% \DescribeMacro{\license} |
| 242 |
% It is optional to specify a copyright and/or license declaration, |
| 243 |
% to be typeset in the footer of the first page, with the \cmd\license\ |
| 244 |
% command.\footnote{The \cmd\TPJcopyright\ command, which used to provide this |
| 245 |
% functionality is still provided for backwards compatibility.} |
| 246 |
% |
| 247 |
% \DescribeMacro{\email} |
| 248 |
% \DescribeMacro{\website} |
| 249 |
% \DescribeMacro{\address} |
| 250 |
% Additional author information may be specified, to be typeset appropriately, |
| 251 |
% with the following commands: \cmd\email, \cmd\website, and \cmd\address. |
| 252 |
% |
| 253 |
% If the \pkg{switcheml} package is installed somewhere that |
| 254 |
% \TeX\ will find it, it is loaded for the purpose of obfuscating |
| 255 |
% the typeset email address. This is done to prevent harvesting by |
| 256 |
% spammers, but if the package cannot be found the email address |
| 257 |
% will by typeset as a hyperlink. |
| 258 |
% |
| 259 |
% \DescribeMacro{\hyperlinkemail} |
| 260 |
% Should you wish to typeset your |
| 261 |
% email address as a hyperlink (that is, theoretically harvestable |
| 262 |
% by spammers) despite having \pkg{switcheml} installed, you may |
| 263 |
% simply include the command \cmd\hyperlinkemail\ anywhere before |
| 264 |
% \verb|\begin{document}|. |
| 265 |
% |
| 266 |
% \subsubsection{Adding more author/article information} |
| 267 |
% |
| 268 |
% As previously |
| 269 |
% mentioned, this class provides the \cmd\email, \cmd\website, and \cmd\address\ |
| 270 |
% macros for typesetting that information in the header block. These commands are defined |
| 271 |
% in the source code of the class file with (something like) the following:\footnote{\cmd\typesetemail\ is an internal command defined by either \cmd\hyperlinkemail\ or \cmd\obfuscateemail.} |
| 272 |
% \begin{quote} |
| 273 |
% |\addinfo[\typesetemail]{Email}|\\ |
| 274 |
% |\addinfo[\url]{Website}|\\ |
| 275 |
% |\addinfo{Address}| |
| 276 |
% \end{quote} |
| 277 |
% Additional blocks my be added on a per-article basis in the same manner. |
| 278 |
% |
| 279 |
% \DescribeMacro{\addinfo} |
| 280 |
% To be specific, the \cmd\addinfo\ command takes one mandatory argument, |
| 281 |
% which is the title of the item to be added to the list, and one optional |
| 282 |
% argument, which is used to define the formatting of the block. |
| 283 |
% |
| 284 |
% This command will then define the macro used to input the additional information |
| 285 |
% by taking the lowercase of the title of the information and turning it into |
| 286 |
% a \TeX\ macro. |
| 287 |
% |
| 288 |
% \DescribeMacro{\newinfo} |
| 289 |
% If lowercasing the heading to create the macro name is impractical |
| 290 |
% (due to accents, for example), then this command can be used instead: |
| 291 |
% \begin{quote} |
| 292 |
% |\newinfo\resume[\color{red}]{R\'esum\'e}| |
| 293 |
% \end{quote} |
| 294 |
% |
| 295 |
% The names used in the article metadata (`Email', `R\'esum\'e', etc.) can be redefined as follows: |
| 296 |
% \begin{quote} |
| 297 |
% |\renewcommand\emailname{Email}|\\ |
| 298 |
% |\renewcommand\resumename{Resume}| |
| 299 |
% \end{quote} |
| 300 |
% These macros are defined automatically by \cmd\addinfo/\cmd\newinfo. |
| 301 |
% |
| 302 |
% \DescribeMacro{\addinfospace} |
| 303 |
% If you wish to add some vertical space after the previous item in the front matter, |
| 304 |
% the \cmd\addinfospace\marg{height} command will insert some. This may be necessary |
| 305 |
% after multi-line blocks, which require some breathing room. |
| 306 |
% |
| 307 |
% \DescribeMacro{\clearinfo} |
| 308 |
% If you don't like the ordering of the information blocks or you wish to edit |
| 309 |
% the formatting of the current setup, the \cmd\clearinfo\ command allows you to start |
| 310 |
% fresh and redefine the info blocks however you may wish. |
| 311 |
% |
| 312 |
% \subsection{Additional user commands} |
| 313 |
% \DescribeMacro{\dash} For `smart' dashes in text. Thinly spaced from the text, it ignores surrounding spaces, and permits only succeeding line breaks. |
| 314 |
% \begin{quote} |
| 315 |
% |use like this \dash for consistent dashes| |
| 316 |
% \end{quote} |
| 317 |
% produces `use like this \unskip\thinspace\nobreak\textemdash\thinspace for consistent dashes'. |
| 318 |
% |
| 319 |
% |
| 320 |
% \DescribeMacro{\note} For easier footnotes. This command ignores preceding space, so linebreaks before the footnote text in the source will not give the wrong spacing. |
| 321 |
% \begin{quote} |
| 322 |
% |And here's an example.|\\ |
| 323 |
% | \note{Albeit a trivial one.}|\\ |
| 324 |
% |And continuing| |
| 325 |
% \end{quote} |
| 326 |
% produces `And here's an example. |
| 327 |
% \unskip\footnote{Albeit a trivial one.} |
| 328 |
% And continuing'. |
| 329 |
% |
| 330 |
% \DescribeEnv{itemise} For non-US writers, it is probably more natural |
| 331 |
% to use |\begin{itemise}| over what \LaTeX\ provides by default. |
| 332 |
% |
| 333 |
% \DescribeMacro{\ctanfile} |
| 334 |
% \changes{v0.4j}{2006/02/09}{Implemented.} |
| 335 |
% \DescribeMacro{\ctanloc} |
| 336 |
% \changes{v0.4j}{2006/02/09}{Implemented.} |
| 337 |
% These commands are used to refer to online locations and documentation within the Comprehensive \TeX\ Archive Network. Usage is as follows: |
| 338 |
% \begin{quote} |
| 339 |
% |\ctanfile{macros/latex/contrib/titlesec/titlesec.pdf}|\\ |
| 340 |
% |\ctanloc{macros/latex/contrib/titlesec/}| |
| 341 |
% \end{quote} |
| 342 |
% It will print the input prefixed with `CTAN:' and provide a hyperlink to the location. |
| 343 |
% |
| 344 |
% \subsection{TPJ internal commands} |
| 345 |
% |
| 346 |
% Two commands are to be used at the direction of the Prac\TeX\ |
| 347 |
% production team: \cmd\TPJrevision\ and \cmd\TPJissue. These |
| 348 |
% commands typeset information in the header of the first page |
| 349 |
% relating to the revision number (or date) of the article and the |
| 350 |
% issue number of the journal. |
| 351 |
% |
| 352 |
% This document class creates a file \verb+_rev.tex+ in the |
| 353 |
% current directory (if a \cmd\TPJrevision{} statement is present) |
| 354 |
% and reads a file \verb+_iss.tex+, if present. Please keep a |
| 355 |
% separate directory for each article you develop for TPJ. |
| 356 |
% |
| 357 |
% \subsection{Logos} |
| 358 |
% |
| 359 |
% \begingroup |
| 360 |
% |
| 361 |
% \DeclareRobustCommand\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} |
| 362 |
% \DeclareRobustCommand\LaTeX{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} |
| 363 |
% \DeclareRobustCommand\LaTeXe{\LaTeX2$_{\textstyle\varepsilon}$} |
| 364 |
% \DeclareRobustCommand\BibTeX{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} |
| 365 |
% \DeclareRobustCommand\logofamily{% |
| 366 |
% \not@math@alphabet\logofamily\relax |
| 367 |
% \fontencoding{U}\fontfamily{logo}\selectfont} |
| 368 |
% \def\textlogo#1{{\logofamily#1}} |
| 369 |
% \DeclareRobustCommand\MF{\textlogo{METAFONT}\@} |
| 370 |
% \DeclareRobustCommand\MP{\textlogo{METAPOST}\@} |
| 371 |
% \DeclareRobustCommand\ConTeXt{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% |
| 372 |
% \DeclareRobustCommand\pdfTeX{pdf\/\TeX} |
| 373 |
% \DeclareRobustCommand\pdfLaTeX{pdf\/\LaTeX} |
| 374 |
% \DeclareRobustCommand\PS{PostScript} |
| 375 |
% \DeclareRobustCommand\PracTeX{Prac\kern-0.07em\TeX} |
| 376 |
% \DeclareRobustCommand\TPJ{The \PracTeX\ Journal} |
| 377 |
% \DeclareRobustCommand\XeTeX{\relax |
| 378 |
% X\lower.5ex\hbox{\kern-.07em\reflectbox{E}}\relax |
| 379 |
% \kern-.15em\TeX} |
| 380 |
% \DeclareRobustCommand\ExTeX{\textrm{\relax |
| 381 |
% \ensuremath{\textstyle\varepsilon\sb{\kern-0.15em\mathcal{X}}}\relax |
| 382 |
% \kern-.15em\TeX}} |
| 383 |
% The following logos and abbreviations are defined for your |
| 384 |
% convenience: |
| 385 |
% \begin{multicols}{2}\everypar{\parindent0pt\parskip0pt} |
| 386 |
% \def\showlogo#1{\@for\@ii:=#1\do{\expandafter\cmd\@ii:\hfill\@ii\endgraf}} |
| 387 |
% \noindent\showlogo{\noexpand\TeX,\LaTeX,\LaTeXe,\BibTeX,\MF,\MP, |
| 388 |
% \ConTeXt,\pdfTeX,\pdfLaTeX,\XeTeX,\ExTeX,\PracTeX,\TPJ,\PS} |
| 389 |
% \end{multicols} |
| 390 |
% \endgroup |
| 391 |
% |
| 392 |
% \StopEventually{\clearpage\PrintChanges\clearpage\PrintIndex} |
| 393 |
% |
| 394 |
% \section{History} |
| 395 |
% |
| 396 |
% The first revision of this class was written by Karl Berry. |
| 397 |
% KB: Gratefully based on the \texttt{dtxtut} skeleton. |
| 398 |
% |
| 399 |
% Revised by Arthur Ogawa, 2004/01/03, to include new features, per |
| 400 |
% Lance Carnes, as follows: |
| 401 |
% |
| 402 |
% \begin{enumerate} |
| 403 |
% \item Define an \cmd\articleID{} macro which typesets the article |
| 404 |
% identification in a block somewhere on the first page of the |
| 405 |
% article, and which can be used to identify the article/revision |
| 406 |
% date for reader comments. E.g. if this appears in the article |
| 407 |
% source file: |
| 408 |
% \begin{verbatim} |
| 409 |
% \author{A.U. Thor} |
| 410 |
% \title{Pracjourn Sample} |
| 411 |
% \TPJissue{TPJ Vol 1 No 1, 2005-1-15} |
| 412 |
% \TPJrevision{2005-2-12}% |
| 413 |
% \TPJcopyright{\textcopyright\ 2005 TeX Users Group} |
| 414 |
% \end{verbatim} |
| 415 |
% it will become a block of text typeset on the first page of the |
| 416 |
% article. See |
| 417 |
% e.g. \href{http://www.ams.org/bull/2004-41-04/S0273-0979-04-01032-8/S0273-0979-04-01032-8.pdf}{this example PDF}. |
| 418 |
% |
| 419 |
% \item Write the information from the argument of the |
| 420 |
% \cmd\articleID{} macro into a file called \verb+_id.tex+. Put |
| 421 |
% this file in the same directory as the source file, and overwrite |
| 422 |
% any previous files of the same name. |
| 423 |
% |
| 424 |
% \item Define a \cmd\TPJcopyright{} macro which will print a |
| 425 |
% copyright notice at the bottom of the first page. |
| 426 |
% E.g. \cmd\TPJcopyright\verb+{2005 TeX Users Group}+ will produce |
| 427 |
% ``\copyright2005 TeX Users Group'' in the page footer of the title |
| 428 |
% page. |
| 429 |
% |
| 430 |
% \item The page measures should work with both Letter and A4 paper |
| 431 |
% sizes. |
| 432 |
% \end{enumerate} |
| 433 |
% |
| 434 |
% Revised again by Will Robertson, mid-2005, to implement some |
| 435 |
% extra things. This snow-balled into the current version, a description |
| 436 |
% of which here would be redundant. |
| 437 |
% |
| 438 |
% \clearpage |
| 439 |
% \section{Implementation} |
| 440 |
% |
| 441 |
% The is fairly poorly documented, and the |
| 442 |
% class has undergone a multitude of small changes over the TPJ issues |
| 443 |
% 2005-4, 2006-1. It should now be fairly stable, and over time it's |
| 444 |
% conceivable (but unlikely) that the descriptions herein will be improved. |
| 445 |
% |
| 446 |
% \subsection{Base class and options} |
| 447 |
% |
| 448 |
% Use \LaTeX's \pkg{article} class, but at a bigger default type size. |
| 449 |
% |
| 450 |
% KB: 12pt seems a little too big, 11pt seems a little too small. |
| 451 |
% Implementing 11.5pt is not obvious. |
| 452 |
% |
| 453 |
% \changes{v0.3}{2004/01/03}{AO: Override the default option list of |
| 454 |
% \pkg{article.cls}} |
| 455 |
% |
| 456 |
% If the document instance calls for options that conflict with the |
| 457 |
% following choices, then the document wins. However our default |
| 458 |
% option list is not the same as those of \pkg{article.cls}. |
| 459 |
% \begin{macrocode} |
| 460 |
\let\ExecuteOptions@ltx\ExecuteOptions |
| 461 |
\def\ExecuteOptions#1{% |
| 462 |
\ExecuteOptions@ltx{letterpaper,12pt,oneside,onecolumn,final}% |
| 463 |
}% |
| 464 |
\LoadClassWithOptions{article} |
| 465 |
\let\ExecuteOptions\ExecuteOptions@ltx |
| 466 |
% \end{macrocode} |
| 467 |
% |
| 468 |
% \subsection{Metrics} |
| 469 |
% |
| 470 |
% Default leading (from \texttt{classes.dtx}) for 11pt is 13.6pt |
| 471 |
% leading, for 12pt is 14.5pt. We want more---this factor gives us |
| 472 |
% 12pt type on 15.5pt leading. |
| 473 |
% \begin{macrocode} |
| 474 |
\linespread{1.069} |
| 475 |
% \end{macrocode} |
| 476 |
% |
| 477 |
% Change the text width to something that works for both A4 and |
| 478 |
% Letter paper, as well as possible. |
| 479 |
% |
| 480 |
% xx The vertical dimensions need to be changed as well, perhaps |
| 481 |
% for a 9in text height, taking account of the headline and |
| 482 |
% footline. |
| 483 |
% \begin{macrocode} |
| 484 |
\setlength\textwidth{432pt} |
| 485 |
\setlength\oddsidemargin{18pt}% xx depend on letter/a4 |
| 486 |
\setlength\evensidemargin{18pt} |
| 487 |
% \end{macrocode} |
| 488 |
% |
| 489 |
% \subsection{Package loading} |
| 490 |
% |
| 491 |
% Palatino, including math (sc option for true small caps, not in TL |
| 492 |
% 2003). Try for \pkg{mathpazo}; if not available use \pkg{palatino}. |
| 493 |
% |
| 494 |
% Enable pdf\TeX's margin kerning, if available, but \emph{not} font expansion, |
| 495 |
% which increases the size and complexity of the resultant PDF. This side-effect |
| 496 |
% may be deemed negligible in the future. |
| 497 |
% |
| 498 |
% \changes{v0.3}{2004/01/03}{AO: rewrite using \cs{IfFileExists} idiom.} |
| 499 |
% \changes{v0.4e}{2005/08/22}{WR: requires the textcomp package} |
| 500 |
% \changes{v0.4g}{2005/11/04}{WR: use \pkg{microtype}, if available} |
| 501 |
% \changes{v0.4l}{2006/08/14}{WR: use LM fonts if available, with T1 encoding} |
| 502 |
% |
| 503 |
% The \pkg{textcomp} package is loaded in order to provide a nice looking copyright logo, amongst other things. |
| 504 |
% |
| 505 |
% \begin{macrocode} |
| 506 |
\IfFileExists{lmodern.sty}{% |
| 507 |
\RequirePackage{lmodern} |
| 508 |
\usepackage[T1]{fontenc}}{} |
| 509 |
\IfFileExists{mathpazo.sty} |
| 510 |
{\RequirePackage[sc]{mathpazo}} |
| 511 |
{\renewcommand\rmdefault{ppl}} |
| 512 |
\IfFileExists{microtype.sty}{% |
| 513 |
\RequirePackage[protrusion=true,expansion=false]{microtype}}{} |
| 514 |
\RequirePackage{textcomp} |
| 515 |
% \end{macrocode} |
| 516 |
% \pkg{hyperref} is used for creating live hyperlinks, as well as |
| 517 |
% providing \cmd\url\ for typesetting URLs easily. All hyperlinks |
| 518 |
% are coloured in a dark shade of blue. |
| 519 |
% \begin{macrocode} |
| 520 |
\RequirePackage{color,hyperref,graphicx} |
| 521 |
\definecolor{linkcolour}{rgb}{0,0.2,0.6} |
| 522 |
\hypersetup{colorlinks,breaklinks, |
| 523 |
linkcolor=linkcolour,citecolor=linkcolour, |
| 524 |
filecolor=linkcolour, urlcolor=linkcolour} |
| 525 |
% \end{macrocode} |
| 526 |
% \TODO{update this to use the successor to the switcheml package} |
| 527 |
% If the \pkg{switcheml} package is installed in the author's |
| 528 |
% system, use it to obfuscate their email address by default. Otherwise, just |
| 529 |
% use a hyperlink. The commands to do this are defined in a later section. |
| 530 |
% |
| 531 |
% |
| 532 |
% An author may specify \cmd\hyperlinkemail\ explicitly |
| 533 |
% should they not care to obfuscate their email address even with the \pkg{switcheml} |
| 534 |
% package installed. |
| 535 |
% \begin{macrocode} |
| 536 |
\IfFileExists{switcheml.sty} |
| 537 |
{\RequirePackage{switcheml} |
| 538 |
\AtBeginDocument{\@ifx@undefined{\typesetemail}{\obfuscateemail}{}}} |
| 539 |
{\AtBeginDocument{\@ifx@undefined{\typesetemail}{\hyperlinkemail}{}}} |
| 540 |
% \end{macrocode} |
| 541 |
% |
| 542 |
% |
| 543 |
% \subsection{Amendments from \pkg{article}} |
| 544 |
% |
| 545 |
% \begin{macro}{\maketitle} |
| 546 |
% Printing the date of the last \TeX\ run in the title block does |
| 547 |
% not seem warranted---if someone reprocesses the document with no |
| 548 |
% changes, we wouldn't want the date to change. |
| 549 |
% |
| 550 |
% xx use rcs.sty or something? |
| 551 |
% |
| 552 |
% xx include bibtex id? |
| 553 |
% |
| 554 |
% \changes{v0.3}{2004/01/03}{AO: reproduce entire definition from |
| 555 |
% \texttt{article.cls}, with modifications.} |
| 556 |
% \changes{v0.3}{2004/01/03}{AO: \cmd\thispagestyle{titlepage}. Do |
| 557 |
% not empty out \cmd\@author, \cmd\@title, etc.} |
| 558 |
% \changes{v0.4b}{2005/06/26}{WR: removed some twocolumn conditional code.} |
| 559 |
% \changes{v0.4b}{2005/06/26}{WR: added check for an abstract} |
| 560 |
% \begin{macrocode} |
| 561 |
\renewcommand\maketitle{\par |
| 562 |
\iftpj@noabstract\else |
| 563 |
\@ifx@undefined{\tpj@info@\string\abstract} |
| 564 |
{\ClassError{pracjourn} |
| 565 |
{Please specify an \string\abstract\space before \string\maketitle} |
| 566 |
{It is a PracTeX Journal requirement to include an abstract. \MessageBreak |
| 567 |
\MessageBreak |
| 568 |
If you have exceptional reasons for not having one in this \MessageBreak |
| 569 |
article, write \string\noabstract\space somewhere before \string\maketitle.}}{} |
| 570 |
\fi |
| 571 |
\begingroup |
| 572 |
\renewcommand\thefootnote{\@fnsymbol\c@footnote}% |
| 573 |
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% |
| 574 |
\long\def\@makefntext##1{\parindent 1em\noindent |
| 575 |
\hb@[email protected]{% |
| 576 |
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% |
| 577 |
\newpage |
| 578 |
\global\@topnum\z@ % Prevents figures from going at top of page. |
| 579 |
\@maketitle |
| 580 |
\thispagestyle{titlepage}\@thanks |
| 581 |
\endgroup |
| 582 |
\setcounter{footnote}{0}% |
| 583 |
\global\let\thanks\relax |
| 584 |
\global\let\maketitle\relax |
| 585 |
\global\let\@maketitle\relax |
| 586 |
\global\let\title\relax |
| 587 |
\global\let\author\relax |
| 588 |
\global\let\date\relax |
| 589 |
\global\let\and\relax |
| 590 |
}% |
| 591 |
% \end{macrocode} |
| 592 |
% \end{macro} |
| 593 |
% |
| 594 |
% |
| 595 |
% |
| 596 |
% \begin{macro}{\@maketitle} |
| 597 |
% |
| 598 |
% \changes{v0.4a}{2005/06/13}{WR: various changes to accommodate extras.} |
| 599 |
% \begin{macrocode} |
| 600 |
\def\@maketitle{% |
| 601 |
\newpage |
| 602 |
\null |
| 603 |
\write@ID@aux\read@issue |
| 604 |
\begin{flushleft} |
| 605 |
\let\footnote\thanks |
| 606 |
\begingroup\LARGE \@title \par\endgroup |
| 607 |
\vspace{2ex}% |
| 608 |
\begingroup\large \@author \par\endgroup |
| 609 |
\end{flushleft} |
| 610 |
% \end{macrocode} |
| 611 |
% This is where the extra author information is typeset. As various |
| 612 |
% pieces of information are defined, they fill up the \cmd{\tpj@optional@author@info} |
| 613 |
% macro, which is subsequently used here as per the definition of the author. |
| 614 |
% \begin{macrocode} |
| 615 |
\tpj@optional@author@info |
| 616 |
\iftpj@noabstract\else |
| 617 |
\vspace{2ex}% |
| 618 |
\tpj@info@container{\abstractname}{\abstract} |
| 619 |
\fi} |
| 620 |
% \end{macrocode} |
| 621 |
% \end{macro} |
| 622 |
% |
| 623 |
% |
| 624 |
% \subsubsection{Formatting changes} |
| 625 |
% \begin{macro}{\section} |
| 626 |
% \begin{macro}{\subsection} |
| 627 |
% \begin{macro}{\subsubsection} |
| 628 |
% \begin{macro}{\paragraph} |
| 629 |
% \begin{macro}{\subparagraph} |
| 630 |
% Remove bold from the all the section headings, just for something a |
| 631 |
% little different. This is verbatim from \texttt{article.cls} with a |
| 632 |
% bunch of \cmd\bfseries's omitted. \TODO{just use titlesec instead} |
| 633 |
% \begin{macrocode} |
| 634 |
\renewcommand\section{\@startsection {section}{1}{\z@}% |
| 635 |
{-3.5ex \@plus -1ex \@minus -.2ex}% |
| 636 |
{2.3ex \@plus.2ex}% |
| 637 |
{\normalfont\Large\raggedright}} |
| 638 |
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% |
| 639 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 640 |
{1.5ex \@plus .2ex}% |
| 641 |
{\normalfont\large\raggedright}} |
| 642 |
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% |
| 643 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 644 |
{1.5ex \@plus .2ex}% |
| 645 |
{\normalfont\normalsize\raggedright}} |
| 646 |
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% |
| 647 |
{3.25ex \@plus1ex \@minus.2ex}% |
| 648 |
{-1em}% |
| 649 |
{\normalfont\normalsize\itshape}} |
| 650 |
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% |
| 651 |
{3.25ex \@plus1ex \@minus .2ex}% |
| 652 |
{-1em}% |
| 653 |
{\normalfont\normalsize\itshape}} |
| 654 |
% \end{macrocode} |
| 655 |
% \end{macro}\end{macro}\end{macro}\end{macro} |
| 656 |
% \changes{v0.4i}{2006/01/19}{Added \cs{raggedright} to section headings.} |
| 657 |
% \end{macro} |
| 658 |
% |
| 659 |
% \paragraph{Lists} |
| 660 |
% \begin{environment}{itemize} |
| 661 |
% \begin{environment}{enumerate} |
| 662 |
% \begin{environment}{description} |
| 663 |
% \TODO{just use enumitem instead} |
| 664 |
% Decrease the amount of vertical space between items in the list environments. To do this, save the old environment macros under new names, and then change the `real' environments to call the originals plus some space-adjusting parameters. |
| 665 |
% |
| 666 |
% |
| 667 |
% Note that description lists shouldn't contain more than on paragraph. |
| 668 |
% \begin{macrocode} |
| 669 |
\let\tpj@itemize\itemize |
| 670 |
\let\tpj@enditemize\enditemize |
| 671 |
\let\tpj@enum\enumerate |
| 672 |
\let\tpj@endenum\endenumerate |
| 673 |
\let\tpj@desc\description |
| 674 |
\let\tpj@enddesc\enddescription |
| 675 |
\renewenvironment{itemize} |
| 676 |
{\tpj@itemize\parskip0pt}{\tpj@enditemize} |
| 677 |
\renewenvironment{enumerate} |
| 678 |
{\tpj@enum\parskip0pt}{\tpj@endenum} |
| 679 |
\renewenvironment{description} |
| 680 |
{\tpj@desc\parskip0pt\parindent1.8em}{\tpj@enddesc} |
| 681 |
% \end{macrocode} |
| 682 |
% \changes{v0.4g}{2006/01/05}{Space removed between list items.} |
| 683 |
% \end{environment} |
| 684 |
% \end{environment} |
| 685 |
% \end{environment} |
| 686 |
% \begin{environment}{itemise} |
| 687 |
% Provide an environment with the correct spelling of `itemize'. |
| 688 |
% \begin{macrocode} |
| 689 |
\let\itemise\itemize |
| 690 |
\let\enditemise\enditemize |
| 691 |
% \end{macrocode} |
| 692 |
% \end{environment} |
| 693 |
% |
| 694 |
% \begin{macro}{\labelitemi(...)} |
| 695 |
% Get rid of the nasty blob that is the \cmd\textbullet, and replace |
| 696 |
% it with more unobtrusive dashes. |
| 697 |
% \begin{macrocode} |
| 698 |
\renewcommand\labelitemi{\normalfont\bfseries\textendash} |
| 699 |
\renewcommand\labelitemii{\normalfont\bfseries\textperiodcentered} |
| 700 |
% \end{macrocode} |
| 701 |
% \changes{v0.4g}{2006/01/05}{Itemise bullets changed.} |
| 702 |
% \end{macro} |
| 703 |
% |
| 704 |
% \begin{macro}{\descriptionlabel} |
| 705 |
% Change the description label to italics instead of bold. |
| 706 |
% \begin{macrocode} |
| 707 |
\renewcommand*\descriptionlabel[1]{\hspace\labelsep |
| 708 |
\normalfont\itshape #1} |
| 709 |
% \end{macrocode} |
| 710 |
% \end{macro} |
| 711 |
% |
| 712 |
% \paragraph{Footnotes} |
| 713 |
% Here we change the footnote formatting a little bit from the default. |
| 714 |
% \begin{macro}{\@makefntext} |
| 715 |
% Make the footnote number at the bottom of the page not a superscript (recommended by Bringhurst, if you're curious---the superscript is there originally to get the number out of the way, but that's no longer needed when you're labelling the note with the number). |
| 716 |
% \begin{macrocode} |
| 717 |
\def\@makefntext#1{% |
| 718 |
\parindent 0em\relax |
| 719 |
\makebox[1.5em][l]{\normalfont\footnotesize\@thefnmark.}#1} |
| 720 |
% \end{macrocode} |
| 721 |
% \changes{v0.4f}{2005/10/06}{WR: Removed the footnote superscript.} |
| 722 |
% \changes{v0.4g}{2005/11/01}{WR: Added a period after the footnote number.} |
| 723 |
% \changes{v0.4l}{2006/08/05}{WR: Fixed number \& text size difference. Oops. Removed \cmd\strut\ to allow \textsf{bigfoot} compatibility.} |
| 724 |
% \end{macro} |
| 725 |
% |
| 726 |
% \subsection{TPJ additions} |
| 727 |
% |
| 728 |
% \subsubsection{Boolean logic} |
| 729 |
% |
| 730 |
% \begin{macro}{\@ifx@empty} |
| 731 |
% \begin{macro}{\@ifx@undefined} |
| 732 |
% \begin{macro}{\@ifeof} |
| 733 |
% The following three procedures implement part of the boolean logic |
| 734 |
% facility, an expansion-only calculating engine. |
| 735 |
% \begin{macrocode} |
| 736 |
\def\@ifx@empty#1{% Implicit #2#3 |
| 737 |
\ifx#1\@empty |
| 738 |
\expandafter\@firstoftwo |
| 739 |
\else |
| 740 |
\expandafter\@secondoftwo |
| 741 |
\fi}% |
| 742 |
\def\@ifx@undefined#1{% Implicit #2#3 |
| 743 |
\ifx#1\@undefined |
| 744 |
\expandafter\@firstoftwo |
| 745 |
\else |
| 746 |
\expandafter\@secondoftwo |
| 747 |
\fi}% |
| 748 |
\def\@ifeof#1{% Implicit #2#3 |
| 749 |
\ifeof#1 |
| 750 |
\expandafter\@firstoftwo |
| 751 |
\else |
| 752 |
\expandafter\@secondoftwo |
| 753 |
\fi}% |
| 754 |
\def\boolean@true#1{\let#1\@firstoftwo}% |
| 755 |
\def\boolean@false#1{\let#1\@secondoftwo}% |
| 756 |
% \end{macrocode} |
| 757 |
% \end{macro} |
| 758 |
% \end{macro} |
| 759 |
% \end{macro} |
| 760 |
% |
| 761 |
% |
| 762 |
% \subsubsection{Titlepage pagestyle} |
| 763 |
% |
| 764 |
% \begin{macro}{\ps@titlepage} |
| 765 |
% The \cmd{\ps@titlepage} procedure effects a page style |
| 766 |
% called \texttt{titlepage}, which applies only to the title page. |
| 767 |
% The \cmd{\titlepage@head} procedure sets type in the page header, |
| 768 |
% \cmd{\titlepage@foot} in the page footer. |
| 769 |
% |
| 770 |
% \changes{v0.3}{2004/01/03}{AO: add page header and footer to title page} |
| 771 |
% \begin{macrocode} |
| 772 |
\def\ps@titlepage{% |
| 773 |
\def\@oddhead{\titlepage@head\hfil}% |
| 774 |
\let\@evenhead\@oddhead |
| 775 |
\def\@oddfoot{\hfil\titlepage@foot}% |
| 776 |
\let\@evenfoot\@oddfoot}% |
| 777 |
% \end{macrocode} |
| 778 |
% \end{macro} |
| 779 |
% |
| 780 |
% \begin{macro}{\titlepage@head} |
| 781 |
% |
| 782 |
% This is the text block before the article title. Changes depending |
| 783 |
% on the production stage. |
| 784 |
% |
| 785 |
% \changes{v0.4b}{2005/06/26}{WR: More conditional text.} |
| 786 |
% \changes{v0.4b}{2005/06/26}{WR: Added hyperref link to email article |
| 787 |
% comments for both reviewers and readers.} |
| 788 |
% \changes{v0.4c}{2005/06/27}{WR: Tweaked conditionals; revision date is important even after publication!} |
| 789 |
% \changes{v0.4c}{2005/06/27}{WR: Added error check for \cmd\TPJrevision\ defined without \cmd\TPJissue.} |
| 790 |
% \changes{v0.4d}{2005/07/17}{WR: Make the header \cmd\small.} |
| 791 |
% \changes{v0.4e}{2005/07/17}{WR: Removed email comments links.} |
| 792 |
% \changes{v0.4k}{2006/02/20}{WR: Simplified \& made smaller.} |
| 793 |
% \begin{macrocode} |
| 794 |
\def\titlepage@head{\footnotesize |
| 795 |
\parbox{\linewidth}{% |
| 796 |
\@ifx@empty\@TPJissue{For submission to \TPJ}{\@TPJissue}\par |
| 797 |
\@ifx@empty\@TPJissue |
| 798 |
{\@ifx@empty\@TPJrevision{Draft of \today}{Article revision \@TPJrevision}}% |
| 799 |
{\@ifx@empty\@TPJrevision |
| 800 |
{\ClassError{pracjourn} |
| 801 |
{\string\TPJrevision\space must be defined if |
| 802 |
\string\TPJissue\space is also} |
| 803 |
{It is a requirement for PracTeX Journal articles to contain\MessageBreak |
| 804 |
revision information for version tracking. Please input this\MessageBreak |
| 805 |
information, or omit \protect\TPJissue.}} |
| 806 |
{Article revision \@TPJrevision}}}}% |
| 807 |
% \end{macrocode} |
| 808 |
% \end{macro} |
| 809 |
% |
| 810 |
% \begin{macro}{\titlepage@foot} |
| 811 |
% To typeset the optional copyright declaration by the author. |
| 812 |
% |
| 813 |
% \changes{v0.4d}{2005/07/17}{WR: Removed \cmd\copyright\ from the copyright |
| 814 |
% notice and put the whole thing in a lowered \cmd\vbox\ to allow multi-line declarations.} |
| 815 |
% \changes{v0.4k}{2006/02/20}{WR: Made smaller.} |
| 816 |
% \begin{macrocode} |
| 817 |
\def\titlepage@foot{% |
| 818 |
\vtop{\raggedleft\footnotesize\@TPJcopyright}}% |
| 819 |
% \end{macrocode} |
| 820 |
% \end{macro} |
| 821 |
% |
| 822 |
% \begin{macrocode} |
| 823 |
% Better float parameters: (from the TeX FAQ) |
| 824 |
\renewcommand{\topfraction}{.85} |
| 825 |
\renewcommand{\bottomfraction}{.7} |
| 826 |
\renewcommand{\textfraction}{.15} |
| 827 |
\renewcommand{\floatpagefraction}{.66} |
| 828 |
\renewcommand{\dbltopfraction}{.66} |
| 829 |
\renewcommand{\dblfloatpagefraction}{.66} |
| 830 |
\setcounter{topnumber}{9} |
| 831 |
\setcounter{bottomnumber}{9} |
| 832 |
\setcounter{totalnumber}{20} |
| 833 |
\setcounter{dbltopnumber}{9} |
| 834 |
% \end{macrocode} |
| 835 |
% |
| 836 |
% \subsubsection{Additional author/article information} |
| 837 |
% |
| 838 |
% \begin{macro}{\addinfo} |
| 839 |
% |
| 840 |
% This command defines a new block of information to be typeset |
| 841 |
% in the title block of the document. For every new item, a new |
| 842 |
% \cmd{\tpj@info@container} is appended to \cmd{\tpj@optional@author@info}, which |
| 843 |
% is called in \cmd{\@maketitle}. |
| 844 |
% |
| 845 |
% \begin{macrocode} |
| 846 |
\newcommand\addinfo[2][]{% |
| 847 |
\def\@tempa{\new@addinfo{#1}{#2}}% |
| 848 |
\lowercase{\expandafter\@tempa\expandafter{\csname#2\endcsname}}} |
| 849 |
\newcommand\new@addinfo[3]{% |
| 850 |
\tpj@define@info@block{#3}% |
| 851 |
\expandafter\newcommand |
| 852 |
\csname\expandafter\@gobble\string#3name\endcsname{#2}% |
| 853 |
\g@addto@macro\tpj@optional@author@info{% |
| 854 |
\tpj@info@container[#1]{\csname\expandafter\@gobble\string#3name\endcsname}{#3}}} |
| 855 |
% \end{macrocode} |
| 856 |
% \changes{v0.4d}{2005/07/30}{WR: Name change to user-space.} |
| 857 |
% \end{macro} |
| 858 |
% |
| 859 |
% \begin{macro}{\newinfo} |
| 860 |
% E.g., |\newinfo\resume[\resfont]{R\'esum\'e}| |
| 861 |
% \begin{macrocode} |
| 862 |
\newcommand\newinfo[1]{% |
| 863 |
\@ifnextchar[{\@newinfo{#1}}{\@newinfo{#1}[]}} |
| 864 |
\def\@newinfo#1[#2]#3{% |
| 865 |
\tpj@define@info@block{#1}% |
| 866 |
\expandafter\newcommand |
| 867 |
\csname\expandafter\@gobble\string#1name\endcsname{#3}% |
| 868 |
\g@addto@macro\tpj@optional@author@info{% |
| 869 |
\tpj@info@container[#2]{% |
| 870 |
\csname\expandafter\@gobble\string#1name\endcsname}{#1}}} |
| 871 |
% \end{macrocode} |
| 872 |
% \changes{v0.4n}{2007/08/13}{WR: A better \cmd\addinfo} |
| 873 |
% \end{macro} |
| 874 |
% |
| 875 |
% \begin{macro}{\addinfospace} |
| 876 |
% Adds some space after the previous item in the frontmatter. |
| 877 |
% \begin{macrocode} |
| 878 |
\newcommand\addinfospace[1]{\g@addto@macro\tpj@optional@author@info{\vspace{#1}}} |
| 879 |
% \end{macrocode} |
| 880 |
% \end{macro} |
| 881 |
% |
| 882 |
% \begin{macro}{\tpj@define@info@block} |
| 883 |
% \changes{v0.4a}{2005/06/13}{WR: Implemented for new \cmd{\@maketitle}.} |
| 884 |
% This macro actually does the work of \cmd\addinfo. |
| 885 |
% It takes the name of a piece of info to be typeset in the |
| 886 |
% title block of the article. |
| 887 |
% |
| 888 |
% This is much easier (but uglier, in hindsight |:(| ) than |
| 889 |
% |\begin{abstract}...\end{abstract}| contortions |
| 890 |
% (cf. \texttt{ltugboat.cls}). |
| 891 |
% \begin{macrocode} |
| 892 |
\newcommand\tpj@define@info@block[1]{% |
| 893 |
\newcommand#1[1]{\expandafter\def\csname tpj@info@\string#1\endcsname{##1}}} |
| 894 |
% \end{macrocode} |
| 895 |
% \changes{v0.4n}{2007/08/13}{Change for better info blocks} |
| 896 |
% \end{macro} |
| 897 |
% |
| 898 |
% \begin{macro}{\clearinfo} |
| 899 |
% If the \cmd{\tpj@optional@author@info} macro needs to be cleared for some reason,\footnotemark |
| 900 |
% the \cmd\clearinfo\ command will come quite in handy. This command is also used to |
| 901 |
% initialise the macro in question. |
| 902 |
% \footnotetext{The only reason I can think of to do this is to re-arrange the order of |
| 903 |
% the items in the title block of the article.} |
| 904 |
% \changes{v0.4d}{2005/07/30}{WR: Implemented to allow for re-definition of standard information blocks.} |
| 905 |
% \begin{macrocode} |
| 906 |
\newcommand\clearinfo{\let\tpj@optional@author@info\@empty} |
| 907 |
\clearinfo |
| 908 |
% \end{macrocode} |
| 909 |
% \end{macro} |
| 910 |
% |
| 911 |
% \paragraph{Optional fields} |
| 912 |
% |
| 913 |
% These are the default information blocks. |
| 914 |
% \cmd\typesetemail\ is defined by one of either \cmd\hyperlinkemail\ or \cmd\obfuscateemail. |
| 915 |
% |
| 916 |
% \begin{macrocode} |
| 917 |
\addinfo[\typesetemail]{Email} |
| 918 |
\addinfo[\url]{Website} |
| 919 |
\addinfo[\linespread{0.9}\selectfont]{Address} |
| 920 |
% \end{macrocode} |
| 921 |
% |
| 922 |
% \paragraph{Abstract} We bypass \cmd\addinfo\ |
| 923 |
% so that the abstract info block is not added |
| 924 |
% to the \cmd{\tpj@optional@author@info} macro. |
| 925 |
% |
| 926 |
% The abstract block itself is called directly in \cmd{\@maketitle}. |
| 927 |
% |
| 928 |
% \begin{macrocode} |
| 929 |
\let\abstract\relax |
| 930 |
\tpj@define@info@block\abstract |
| 931 |
\def\abstractname{Abstract} |
| 932 |
% \end{macrocode} |
| 933 |
% |
| 934 |
% \begin{macro}{\noabstract} |
| 935 |
% However, the abstract may indeed be suppressed if that is the author's wish. |
| 936 |
% \changes{v0.4d}{2005/07/25}{WR: Implemented to turn off the abstract.} |
| 937 |
% \begin{macrocode} |
| 938 |
\newif\iftpj@noabstract |
| 939 |
\newcommand\noabstract{\tpj@noabstracttrue} |
| 940 |
% \end{macrocode} |
| 941 |
% \end{macro} |
| 942 |
% |
| 943 |
% \begin{macro}{\endabstract} |
| 944 |
% If an abstract environment is used, give an error. Maybe I should |
| 945 |
% just support the environment, instead. |
| 946 |
% \begin{macrocode} |
| 947 |
\def\endabstract{% |
| 948 |
\ClassError{pracjourn} |
| 949 |
{Please input the abstract with \string\abstract{...}, before \string\begin{document}} |
| 950 |
{Instead of the \string\begin{abstract}...\string\end{abstract} \MessageBreak |
| 951 |
environment, use \string\abstract{...}. Paragraphs are allowed!\MessageBreak |
| 952 |
\MessageBreak |
| 953 |
Because the abstract is typeset with the title block, \MessageBreak |
| 954 |
it must be input before the \string\begin{document}\space command.}} |
| 955 |
% \end{macrocode} |
| 956 |
% \end{macro} |
| 957 |
% |
| 958 |
% \begin{macro}{\TPJissue} |
| 959 |
% \changes{v0.4k}{2006/02/20}{WR: More user-friendly.} |
| 960 |
% \begin{macro}{\TPJrevision} |
| 961 |
% \changes{v0.4k}{2006/02/20}{WR: More user-friendly.} |
| 962 |
% \begin{macro}{\TPJcopyright} |
| 963 |
% |
| 964 |
% \changes{v0.3}{2004/01/03}{AO: add commands specifying issue, |
| 965 |
% revision, copyright.} |
| 966 |
% |
| 967 |
% The three user-level commands |
| 968 |
% \cmd\TPJissue, \cmd\TPJrevision, and \cmd\TPJcopyright{} specify |
| 969 |
% the issue, the revision, and the copyright information of the |
| 970 |
% document. |
| 971 |
% |
| 972 |
% Since these commands are like \cmd\author{} and \cmd\title, one |
| 973 |
% might wish to disable them upon executing the \cmd\titlepage{} |
| 974 |
% procedure. But we do not. |
| 975 |
% |
| 976 |
% If the document has a \cmd\TPJrevision{} statement, the title page |
| 977 |
% header contains words to that effect, otherwise it bears the current |
| 978 |
% date. |
| 979 |
% |
| 980 |
% If the document lacks a \cmd\TPJcopyright{} statement, the title |
| 981 |
% page footer contains nothing. |
| 982 |
% \begin{macrocode} |
| 983 |
\newcommand{\TPJissue}[2]{\gdef\@TPJissue{\TPJ, #1, No.\,#2}}% |
| 984 |
\newcommand{\TPJrevision}[3]{\gdef\@TPJrevision{#1/#2/#3}}% |
| 985 |
\newcommand{\TPJcopyright}[1]{\gdef\@TPJcopyright{#1}}% |
| 986 |
\let\@TPJissue\@empty |
| 987 |
\let\@TPJrevision\@empty |
| 988 |
\let\@TPJcopyright\@empty |
| 989 |
% \end{macrocode} |
| 990 |
% \end{macro} |
| 991 |
% \end{macro} |
| 992 |
% \end{macro} |
| 993 |
% |
| 994 |
% \begin{macro}{\license} |
| 995 |
% |
| 996 |
% For consistency with the other user commands of this class, \cmd\license\ |
| 997 |
% is defined as an alias of \cmd\TPJcopyright. |
| 998 |
% |
| 999 |
% \changes{v0.4d}{2005/07/30}{WR: name change from \cmd\TPJcopyright\ |
| 1000 |
% for consistency with other commands.} |
| 1001 |
% |
| 1002 |
% \begin{macrocode} |
| 1003 |
\let\license\TPJcopyright |
| 1004 |
% \end{macrocode} |
| 1005 |
% |
| 1006 |
% \end{macro} |
| 1007 |
% |
| 1008 |
% \begin{macro}{\tpj@info@container} |
| 1009 |
% This is the macro that typesets the optional author info for |
| 1010 |
% fields defined as above. It splits it all up in minipages, in a |
| 1011 |
% smaller font and with more compressed leading than the main |
| 1012 |
% document text.\footnote{\LaTeX's \cmd\@hangfrom\ (or whatever it is) could well |
| 1013 |
% have been much easier.} It takes the name of the info as a mandatory |
| 1014 |
% argument, which is used to typeset the info label as well as |
| 1015 |
% retrieve the actual data from the |\tpj@info@#3| macro (see |
| 1016 |
% \cmd{\addinfo}). |
| 1017 |
% |
| 1018 |
% An optional argument is used as a hook to typeset the info data in |
| 1019 |
% the equivalent form |#1{#2}|. |
| 1020 |
% |
| 1021 |
% For example, to typeset the info defined by the author in the |
| 1022 |
% \cmd\abstract\ (recall, this is set up due to a corresponding |
| 1023 |
% |\addinfo{Abstract}{\abstract}|---see above), input |
| 1024 |
% |\tpj@info@container{Abstract}|. To typeset it, say, in italics, |
| 1025 |
% it would be possible to write |
| 1026 |
% |\tpj@info@container[\textit]{Abstract}|. |
| 1027 |
% |
| 1028 |
% \changes{v0.4a}{2005/06/13}{WR: Implemented for new \cmd\@maketitle.} |
| 1029 |
% \changes{v0.4d}{2005/06/29}{WR: Warn if a title block command is used after \cmd\maketitle.} |
| 1030 |
% |
| 1031 |
% \begin{macrocode} |
| 1032 |
\newcommand\tpj@info@container[3][]{% |
| 1033 |
% \end{macrocode} |
| 1034 |
% After \cmd\maketitle, redefine the info command to return an error. |
| 1035 |
% \begin{macrocode} |
| 1036 |
\gdef#3{\ClassError{pracjourn}{#2 must be defined BEFORE \string\maketitle}{}} |
| 1037 |
% \end{macrocode} |
| 1038 |
% Now, we typeset the info block, but only if the info has actually been specified by the author. |
| 1039 |
% \begin{macrocode} |
| 1040 |
\expandafter\ifx\csname tpj@info@\string#3\endcsname\relax\else |
| 1041 |
\noindent\small |
| 1042 |
% \end{macrocode} |
| 1043 |
% On the left, right-aligned sans serif item label, e.g., `Abstract': |
| 1044 |
% \begin{macrocode} |
| 1045 |
\begin{minipage}[t]{0.15\textwidth} |
| 1046 |
\noindent\hfill\sffamily#2 |
| 1047 |
\end{minipage}\hfill |
| 1048 |
% \end{macrocode} |
| 1049 |
% On the right, the content, defined by, e.g., \cmd\abstract: |
| 1050 |
% \begin{macrocode} |
| 1051 |
\begin{minipage}[t]{0.825\textwidth} |
| 1052 |
\linespread{1.0}\selectfont |
| 1053 |
\setlength\parindent{1.5em}% |
| 1054 |
\noindent\ignorespaces |
| 1055 |
\expandafter#1\expandafter{\csname tpj@info@\string#3\endcsname} |
| 1056 |
\end{minipage}\par |
| 1057 |
\fi} |
| 1058 |
% \end{macrocode} |
| 1059 |
% \end{macro} |
| 1060 |
% |
| 1061 |
% \subsubsection{Email \& hyperlink macros} |
| 1062 |
% |
| 1063 |
% \begin{macro}{\typesetemail} |
| 1064 |
% |
| 1065 |
% We define the macro \cmd\typesetemail\ to be used for self-explanatory purposes. |
| 1066 |
% The class contains methods to define it in one of two ways. |
| 1067 |
% |
| 1068 |
% \begin{macro}{\hyperlinkemail} |
| 1069 |
% |
| 1070 |
% The \cmd\hyperlinkemail\ command defines \cmd\typesetemail\ to use the \pkg{hyperref} |
| 1071 |
% package's facilities to create a hyperlink email address in the output document. |
| 1072 |
% |
| 1073 |
% \begin{macro}{\obfuscateemail} |
| 1074 |
% |
| 1075 |
% The \cmd\obfuscateemail\ command defines \cmd\typesetemail\ to use the \pkg{switcheml} |
| 1076 |
% package's facilities to create a machine-obfuscated email address in the output |
| 1077 |
% document.\footnote{The \pkg{switcheml} package defines, among a couple of other things, a macro for |
| 1078 |
% typesetting email addresses that obfuscates their representation in the PDF file, |
| 1079 |
% ensuring protection against harvesting email addresses from web-public |
| 1080 |
% PDF documents.} |
| 1081 |
% |
| 1082 |
% \begin{macrocode} |
| 1083 |
\newcommand\obfuscateemail{% |
| 1084 |
\def\typesetemail##1{\ttfamily\switchemail{##1}}} |
| 1085 |
\newcommand\hyperlinkemail{% |
| 1086 |
\def\typesetemail##1{\ttfamily\tpj@compose@mailto{##1}{Re: PracTeX Journal article}{##1}}} |
| 1087 |
% \end{macrocode} |
| 1088 |
% \end{macro}\end{macro}\end{macro} |
| 1089 |
% |
| 1090 |
% \begin{macro}{\tpj@compose@mailto} |
| 1091 |
% |
| 1092 |
% This macro takes three arguments to typeset a mailto email |
| 1093 |
% hyperlink. The |#1| takes the email address, |#2| takes the |
| 1094 |
% default subject of the email, and |#3| is the text to appear in |
| 1095 |
% the output as the hyperlink. |
| 1096 |
% |
| 1097 |
% All spaces in the hyperlink source are converted to |%20| to |
| 1098 |
% accommodate Mac~OS~X's PDF reader; this isn't necessary for Adobe |
| 1099 |
% Reader. Oh well. |
| 1100 |
% |
| 1101 |
% \changes{v0.4b}{2005/06/26}{WR: Implemented; creates a workable mailto |
| 1102 |
% hyperlink.} |
| 1103 |
% |
| 1104 |
% \begin{macrocode} |
| 1105 |
\newcommand\tpj@compose@mailto[3]{% |
| 1106 |
\edef\@tempa{mailto:#1?subject=#2 }% |
| 1107 |
\edef\@tempb{\expandafter\html@spaces\@tempa\@empty}% |
| 1108 |
\href{\@tempb}{#3}} |
| 1109 |
% \end{macrocode} |
| 1110 |
% \end{macro} |
| 1111 |
% |
| 1112 |
% \begin{macro}{\html@spaces} |
| 1113 |
% \changes{v0.4b}{2005/06/25}{WR: Implemented to overcome the mailto |
| 1114 |
% problems in Mac~OS~X's PDF reader.} |
| 1115 |
|
| 1116 |
% This macro takes a string and (hopefully) converts all spaces (or |
| 1117 |
% is it all whitespace?) to `\%20', creating a string that can be |
| 1118 |
% used for encoding the subject of the email comments hyperlink in |
| 1119 |
% \cmd{\titlepage@head}. Using \cmd\catcode, we remove the comment |
| 1120 |
% ability of the \verb|%| character, making it a normal letter. |
| 1121 |
% (This code was heavily influenced by the \LaTeX\ kernel's |
| 1122 |
% \cmd{\zap@space} command.) |
| 1123 |
% \begin{macrocode} |
| 1124 |
\catcode`\%=11 |
| 1125 |
\def\html@spaces#1 #2{#1%20\ifx#2\@empty\else\expandafter\html@spaces\fi#2} |
| 1126 |
\catcode`\%=14 |
| 1127 |
% \end{macrocode} |
| 1128 |
% \end{macro} |
| 1129 |
% |
| 1130 |
% \subsubsection{User commands} |
| 1131 |
% |
| 1132 |
% \begin{macro}{\note} |
| 1133 |
% \begin{macro}{\dash} |
| 1134 |
% \begin{macro}{\ctanfile} |
| 1135 |
% \begin{macro}{\ctanloc} |
| 1136 |
% Fairly straightforward. |
| 1137 |
% \begin{macrocode} |
| 1138 |
\newcommand\note[1]{\unskip\footnote{#1}} |
| 1139 |
\DeclareRobustCommand\dash{% |
| 1140 |
\unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces} |
| 1141 |
\pdfstringdefDisableCommands{\renewcommand{\dash}{ - }} |
| 1142 |
\newcommand\ctanfile[1]{% |
| 1143 |
\href{http://www.ctan.org/get?fn=/#1} |
| 1144 |
{\path{CTAN:#1}}} |
| 1145 |
\newcommand\ctanloc[1]{% |
| 1146 |
\href{http://www.ctan.org/tex-archive/#1} |
| 1147 |
{\path{CTAN:#1}}} |
| 1148 |
% \end{macrocode} |
| 1149 |
% \end{macro} |
| 1150 |
% \end{macro} |
| 1151 |
% \end{macro} |
| 1152 |
% \end{macro} |
| 1153 |
% |
| 1154 |
% \subsubsection{Logos} |
| 1155 |
% |
| 1156 |
% \begin{macro}{\tpf@deflogo} |
| 1157 |
% Wrapper for both \cmd\DeclareRobustCommand\ and \cmd\pdfstringdefDisableCommand. |
| 1158 |
% \begin{macrocode} |
| 1159 |
\newcommand\tpj@deflogo{\@dblarg\tpj@@deflogo} |
| 1160 |
\newcommand\tpj@@deflogo[3][\@nil]{% |
| 1161 |
\expandafter\DeclareRobustCommand\csname#2\endcsname{#3}% |
| 1162 |
\pdfstringdefDisableCommands{% |
| 1163 |
\expandafter\def\csname#2\endcsname{#1}}} |
| 1164 |
% \end{macrocode} |
| 1165 |
% \changes{v0.4m}{2006/11/19}{WR: Implemented to improve logo/hyperref handling.} |
| 1166 |
% \end{macro} |
| 1167 |
% |
| 1168 |
% \changes{v0.4a}{2005/06/05}{WR: Incorporated code from \pkg{texnames} |
| 1169 |
% and \pkg{mflogo}.} |
| 1170 |
% |
| 1171 |
% The \pkg{texnames} and \pkg{mflogo} packages have been incorporated |
| 1172 |
% into the class in order to remove the dependence on external |
| 1173 |
% packages and to tune the logos for Palatino. First, here are the |
| 1174 |
% relevant parts\footnote{No-one still refers to AMSTeX and SLITeX and |
| 1175 |
% so on, right?} of \texttt{texnames.sty}, v1.10, tuned for Palatino |
| 1176 |
% and adapted to use \cs{textsc} where appropriate: |
| 1177 |
% \begin{macrocode} |
| 1178 |
\tpj@deflogo{TeX}{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} |
| 1179 |
\tpj@deflogo{LaTeX}{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} |
| 1180 |
\tpj@deflogo{LaTeXe}{\LaTeX2$_{\textstyle\varepsilon}$} |
| 1181 |
\tpj@deflogo{BibTeX}{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} |
| 1182 |
% \end{macrocode} |
| 1183 |
% And now \texttt{mflogo.sty}, unchanged in its entirety: |
| 1184 |
% \begin{macrocode} |
| 1185 |
\DeclareRobustCommand\logofamily{% |
| 1186 |
\not@math@alphabet\logofamily\relax |
| 1187 |
\fontencoding{U}\fontfamily{logo}\selectfont} |
| 1188 |
\DeclareTextFontCommand{\textlogo}{\logofamily} |
| 1189 |
\tpj@deflogo[MetaFont]{MF}{\textlogo{META}\@dischyph\textlogo{FONT}\@} |
| 1190 |
\tpj@deflogo[MetaPost]{MP}{\textlogo{META}\@dischyph\textlogo{POST}\@} |
| 1191 |
% \end{macrocode} |
| 1192 |
% Now some new definitions. Despite the fact that it makes no |
| 1193 |
% difference with the main font used for this class, I define |
| 1194 |
% \cs{pdfTeX} with some italic correction to set a good |
| 1195 |
% precedent. Compare Computer Modern with and without: |
| 1196 |
% {\usefont{OT1}{cmr}{m}{n}pdf\/\TeX} |
| 1197 |
% vs.~{\usefont{OT1}{cmr}{m}{n}pdf\TeX}; I find the former more |
| 1198 |
% attractive because the ascender of the `f' doesn't collide. |
| 1199 |
% \begin{macrocode} |
| 1200 |
\tpj@deflogo{ConTeXt}{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% |
| 1201 |
\tpj@deflogo{pdfTeX}{pdf\/\TeX} |
| 1202 |
\tpj@deflogo{pdfLaTeX}{pdf\/\LaTeX} |
| 1203 |
\newcommand\PS{PostScript} |
| 1204 |
\tpj@deflogo{PracTeX}{Prac\kern-0.07em\TeX} |
| 1205 |
\newcommand\TPJ{The \PracTeX\ Journal} |
| 1206 |
\tpj@deflogo{XeTeX}{% |
| 1207 |
X\lower.5ex\hbox{\kern-.07em\reflectbox{E}}% |
| 1208 |
\kern-.15em\TeX} |
| 1209 |
\tpj@deflogo{ExTeX}{\textrm{\relax |
| 1210 |
\ensuremath{\textstyle\varepsilon_{\kern-0.15em\mathcal{X}}}\relax |
| 1211 |
\kern-.15em\TeX}} |
| 1212 |
% \end{macrocode} |
| 1213 |
% \changes{v0.4j}{2006/02/09}{Added \cmd\XeTeX\ logo.} |
| 1214 |
% \changes{v0.4k}{2006/02/09}{Added \cmd\ExTeX\ logo.} |
| 1215 |
% |
| 1216 |
% \subsubsection{Version tracking} |
| 1217 |
% |
| 1218 |
% \begin{macro}{\write@ID@aux} |
| 1219 |
% \changes{v0.3}{2004/01/03}{AO: add ID file} |
| 1220 |
% Establish an auxiliary file, \verb+_id.tex+, for TPJ tracking information. |
| 1221 |
% |
| 1222 |
% \begin{macrocode} |
| 1223 |
\def\write@ID@aux{% |
| 1224 |
\@ifx@empty\@TPJrevision{}{% |
| 1225 |
\begingroup |
| 1226 |
\let\thanks\@gobble |
| 1227 |
\immediate\openout\ID@aux _rev.tex |
| 1228 |
% \immediate\write\ID@aux{\@percentchar\space |
| 1229 |
% This file generated by the pracjourn document class}% |
| 1230 |
\immediate\write\ID@aux{\@TPJrevision}% |
| 1231 |
\immediate\closeout\ID@aux |
| 1232 |
\endgroup |
| 1233 |
}% |
| 1234 |
}% |
| 1235 |
\newwrite\ID@aux |
| 1236 |
% \end{macrocode} |
| 1237 |
% \end{macro} |
| 1238 |
% |
| 1239 |
% \begin{macro}{\read@iss@aux} |
| 1240 |
% \begin{macrocode} |
| 1241 |
\def\read@issue{% |
| 1242 |
\openin\@inputcheck _iss.tex |
| 1243 |
\@ifeof\@inputcheck{} |
| 1244 |
{\ifx\@TPJissue\@empty\else |
| 1245 |
\typeout{---------^^J |
| 1246 |
pracjourn: \protect\TPJissue\space info overwritten due to _iss.tex file^^J |
| 1247 |
---------} |
| 1248 |
\fi |
| 1249 |
\read\@inputcheck to\@TPJissue |
| 1250 |
\closein\@inputcheck |
| 1251 |
\expandafter\parse@iss\@TPJissue\@nil}} |
| 1252 |
% \end{macrocode} |
| 1253 |
% \changes{v0.3}{2004/01/03}{AO: read the "issue" file.} |
| 1254 |
% \changes{v0.4i}{2006/02/02}{WR: {\ttfamily\char`\_iss.tex} behaviour finally sorted out.} |
| 1255 |
% \end{macro} |
| 1256 |
% |
| 1257 |
% \begin{macro}{\parse@iss} |
| 1258 |
% \changes{v0.4k}{2006/02/20}{WR: Implemented for better article headers.} |
| 1259 |
% \begin{macrocode} |
| 1260 |
\def\parse@iss TPJ #1 No #2, #3-#4-#5\@nil{% |
| 1261 |
\@tempcnta#2\relax |
| 1262 |
\protected@xdef\@TPJissue{\TPJ, #1, No.\,\the\@tempcnta}} |
| 1263 |
% \end{macrocode} |
| 1264 |
% \end{macro} |
| 1265 |
% |
| 1266 |
% \subsubsection{Miscellaneous} |
| 1267 |
% |
| 1268 |
% \begin{macro}{\set@pdfpage} |
| 1269 |
% \changes{v0.3}{2004/01/03}{AO: add commands setting pdftex's page |
| 1270 |
% metrics from LaTeX's} |
| 1271 |
% |
| 1272 |
% The PDF\TeX{} parameters \cmd\pdfpagewidth\ and |
| 1273 |
% \cmd\pdfpageheight\ determine the |
| 1274 |
% CropBox/BleedBox/TrimBox/ArtBox. The procedure \cmd\setpdfpage{} |
| 1275 |
% sets them to the values of the \LaTeX{} \cmd\paperwidth{} and |
| 1276 |
% \cmd\paperheight. If PDF\TeX{} is not the engine, nothing is |
| 1277 |
% done. |
| 1278 |
% |
| 1279 |
% We arrange for the procedure to be executed at Begin Document |
| 1280 |
% time. |
| 1281 |
% \begin{macrocode} |
| 1282 |
\def\set@pdfpage{% |
| 1283 |
\@ifx@undefined\pdfoutput{}{% |
| 1284 |
\pdfpagewidth =\paperwidth |
| 1285 |
\pdfpageheight=\paperheight |
| 1286 |
\relax}} |
| 1287 |
\AtBeginDocument{\set@pdfpage} |
| 1288 |
% \end{macrocode} |
| 1289 |
% \end{macro} |
| 1290 |
% |
| 1291 |
% \makeatother |
| 1292 |
% \CharacterTable |
| 1293 |
% {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 |
| 1294 |
% 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 |
| 1295 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 1296 |
% Exclamation \! Double quote \" Hash (number) \# |
| 1297 |
% Dollar \$ Percent \% Ampersand \& |
| 1298 |
% Acute accent \' Left paren \( Right paren \) |
| 1299 |
% Asterisk \* Plus \+ Comma \, |
| 1300 |
% Minus \- Point \. Solidus \/ |
| 1301 |
% Colon \: Semicolon \; Less than \< |
| 1302 |
% Equals \= Greater than \> Question mark \? |
| 1303 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 1304 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 1305 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 1306 |
% Right brace \} Tilde \~} |
| 1307 |
% |
| 1308 |
% \Finale |
| 1309 |
\endinput |