From 9cb91a45f0263cb69174b80b0a26258ef06a360a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 16 Nov 2007 10:44:38 +0000 Subject: update pracjourn v0.4n from ctan git-svn-id: svn://tug.org/texlive/trunk@5442 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/pracjourn/README | 40 +++++ Master/texmf-dist/doc/latex/pracjourn/README.txt | 39 ----- Master/texmf-dist/doc/latex/pracjourn/pjsample.ltx | 136 +++++++++++++++++ Master/texmf-dist/doc/latex/pracjourn/pjsample.pdf | Bin 86135 -> 122311 bytes Master/texmf-dist/doc/latex/pracjourn/pjsample.tex | 133 ----------------- .../texmf-dist/doc/latex/pracjourn/pracjourn.pdf | Bin 337793 -> 301180 bytes .../source/latex/pracjourn/pracjourn.dtx | 164 ++++++++++++++------- .../texmf-dist/tex/latex/pracjourn/pracjourn.cls | 95 +++++++----- 8 files changed, 344 insertions(+), 263 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/pracjourn/README delete mode 100644 Master/texmf-dist/doc/latex/pracjourn/README.txt create mode 100644 Master/texmf-dist/doc/latex/pracjourn/pjsample.ltx delete mode 100644 Master/texmf-dist/doc/latex/pracjourn/pjsample.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/pracjourn/README b/Master/texmf-dist/doc/latex/pracjourn/README new file mode 100644 index 00000000000..48d4957f5f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pracjourn/README @@ -0,0 +1,40 @@ +___________________ +The PRACJOURN class + +This class file is used for typesetting articles in the PracTeX Journal +(). It is based on the article class with +modifications to allow for more flexible front-matter and revision control, +among other small changes. + +It uses Palatino (12/15.5 pt) for the main text font, and Latin Modern Sans +and Typewriter for the companion fonts. It is not essential to have +the Latin Modern fonts installed, since the class file will fall back to +the older Computer Modern-based versions if necessary. + +_____ +USAGE + +No class options are necessary. \title, \author, and \abstract metadata is +required. Please see pracjourn.pdf for the full documentation. + +\documentclass{pracjourn} +\title{...} +\author{...} +\abstract{...} +\begin{document} +\maketitle +... +\end{document} + +_______ +LICENCE + +This class is distributed under the GNU General Public License. +Please see the documented source file pracjourn.dtx for further +information. + +Will Robertson +Art Ogawa +Karl Berry + +Copyright (C) 2005, 2006, 2007 TeX Users Group \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/pracjourn/README.txt b/Master/texmf-dist/doc/latex/pracjourn/README.txt deleted file mode 100644 index 54ecdf09b94..00000000000 --- a/Master/texmf-dist/doc/latex/pracjourn/README.txt +++ /dev/null @@ -1,39 +0,0 @@ -___________________ -The PRACJOURN class - -This class file is used for typesetting articles in the PracTeX Journal -(). It is based on the article class with -modifications to allow for more flexible front-matter and revision control, -among other small changes. - -It uses Palatino (12/15.5 pt) for the main text font, and Latin Modern Sans -and Typewriter for the companion fonts. It is not essential to have -the Latin Modern fonts installed, since the class file will fall back to -the older Computer Modern-based versions if necessary. - -_____ -USAGE - -No class options are necessary. \title, \author, and \abstract metadata is -required. Please see pracjourn.pdf for the full documentation. - -\documentclass{pracjourn} -\title{...} -\author{...} -\abstract{...} -\begin{document} -... -\end{document} - -_______ -LICENCE - -This class is distributed under the GNU General Public License. -Please see the documented source file pracjourn.dtx for further -information. - -Will Robertson -Art Ogawa -Karl Berry - -Copyright (C) 2005, 2006 TeX Users Group \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/pracjourn/pjsample.ltx b/Master/texmf-dist/doc/latex/pracjourn/pjsample.ltx new file mode 100644 index 00000000000..7f7b0f9b854 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pracjourn/pjsample.ltx @@ -0,0 +1,136 @@ +\documentclass{pracjourn}[2006/02/20] + +%%% Revision control +\TPJrevision{2006}{02}{20} +%%% + +%%% Mandatory article metadata %%% +\title{Example of a \PracTeX\ Journal article} +\author{Will Robertson} +\abstract{This is an example document created with the + \PracTeX\ Journal's class file. It is based on the article class, + using 12\,pt Palatino with 15.5\,pt leading. This new version + obviously has a modified layout, with a bunch of + optional extra author info commands. + + Some people have more than a single paragraph in their + abstract. In fact, it is quite common.} +%%% + +%%% Optional article metadata %%% +\email{will@guerilla.net.au} +%\hyperlinkemail +\website{http://www.mecheng.adelaide.edu.au/~will/} +\address{Adelaide, Australia} +% Please adjust the copyright statement to your needs: +\license{Copyright \textcopyright\ 2006 Will Roberton.\\ + Permission is granted to distribute verbatim or modified\\ + copies of this document provided this notice remains intact.} +%%% + +%%% Defining more metadata: +\addinfospace{1ex} +\addinfo[\color{blue}\scshape]{Hobby} +\hobby{Sleeping in.} +%%% + +%%% Changing the hyperlink colour: +\definecolor{linkcolour}{rgb}{0.7,0.2,0.2} +%%% + +\begin{document} +\maketitle + +\section{Introduction} +This is an example of the \texttt{pracjourn} document class. +Articles should always start with a section title, which will usually be `Introduction' or somesuch. + +This document demonstrates the features of the document class. +Here are some logos and abbreviations: + \note{Tuned for Palatino, but refinements welcomed.} +\TeX, \pdfTeX, \BibTeX, \MF, \MP, \LaTeX, \LaTeXe, +\mbox{\ConTeXt}, \pdfLaTeX, \XeTeX, \PracTeX, \TPJ, \PS. + +On the following pages are shown the document divisions and list environments. + +\newpage +\section{Section headings} +\itshape The fact is that his precocity in vice was awful. At five months of age he +used to get into such passions that he was unable to articulate. At six +months, I caught him gnawing a pack of cards. At seven months he was in +the constant habit of catching and kissing the female babies. At eight +months he peremptorily refused to put his signature to the Temperance +pledge. + \note{Text from Edgar Allen Poe's `Never bet the Devil your head'.} + +\subsection{Subsection} + +Poverty was another vice which the peculiar physical deficiency of +Dammit's mother had entailed upon her son. He was detestably poor, and +this was the reason, no doubt, that his expletive expressions about +betting, seldom took a pecuniary turn. I will not be bound to say that I +ever heard him make use of such a figure of speech as ``I'll bet you a +dollar.'' It was usually ``I'll bet you what you please,'' or ``I'll bet you +what you dare,'' or ``I'll bet you a trifle,'' or else, more significantly +still, \emph{``I'll bet the Devil my head.''} + +\subsubsection{Subsubsection} + +\begin{figure} +\centering test +\caption{test} +\end{figure} +\upshape Subsubsections are in the same font size as the body text, so I guess +it's possibly a little small. I doubt many people really will wish to +use a subsubsection in a journal article. But if they wish, there's +nothing stopping 'em. + \note{Another footnote test. + This one has to be really long to see what happens + when a footnote extends over more than one line. + I.e., two or more.} + +\paragraph{Paragraphs} Named paragraphs are very similar to description lists; however, these may be useful more \emph{multiple} paragraphs, whereas description lists work better with only a single paragraph per item. + +\subparagraph{Subparagraphs} For those who want them\dots. + +\newpage +\section{Lists} +An itemized list: +\begin{itemize} +\item one, +\item two, and +\item three. + A nested itemised list: + \begin{itemise} + \item one, + \item two, and + \item three. + \end{itemise} +\end{itemize} +An enumerated list: +\begin{enumerate} +\item one, +\item two, and +\item three. +\end{enumerate} +A description list: +\begin{description} +\item [one] the first, +\item [two] the second, and +\item [three] the third. A nested description list: + \begin{description} + \item [one] the first, + \item [two] the second, and + \item [three] the third. + \end{description} +\end{description} + +%Here is the content of the revision file, \verb+_rev.tex+: +%\begingroup\makeatletter\def\@tempa{\begin{verbatim}\@@input _rev.tex}% +%\expandafter\endgroup\@tempa\end{verbatim} + +%Here is the content of the issue file, \verb+_iss.tex+: +%\begingroup\makeatletter\def\@tempa{\begin{verbatim}\@@input _iss.tex}% +%\expandafter\endgroup\@tempa\end{verbatim} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/pracjourn/pjsample.pdf b/Master/texmf-dist/doc/latex/pracjourn/pjsample.pdf index deb815015f1..015ba1b7be2 100644 Binary files a/Master/texmf-dist/doc/latex/pracjourn/pjsample.pdf and b/Master/texmf-dist/doc/latex/pracjourn/pjsample.pdf differ diff --git a/Master/texmf-dist/doc/latex/pracjourn/pjsample.tex b/Master/texmf-dist/doc/latex/pracjourn/pjsample.tex deleted file mode 100644 index 7391d0c95bd..00000000000 --- a/Master/texmf-dist/doc/latex/pracjourn/pjsample.tex +++ /dev/null @@ -1,133 +0,0 @@ -\documentclass{pracjourn}[2006/02/20] - -%%% Revision control and journal issue -\TPJrevision{2006}{02}{20} -\TPJissue{2005}{2} -%%% - -%%% Mandatory article metadata %%% -\title{Example of a \PracTeX\ Journal article} -\author{Will Robertson} -\abstract{This is an example document created with the - \PracTeX\ Journal's class file. It is based on the article class, - using 12\,pt Palatino with 15.5\,pt leading. This new version - obviously has a modified layout, with a bunch of - optional extra author info commands. - - Some people have more than a single paragraph in their - abstract. In fact, it is quite common.} -%%% - -%%% Optional article metadata %%% -\email{will@guerilla.net.au} -%\hyperlinkemail -\website{http://www.mecheng.adelaide.edu.au/~will/} -\address{Adelaide, Australia} -% Please adjust the copyright statement to your needs: -\license{Copyright \textcopyright\ 2006 Will Roberton.\\ - Permission is granted to distribute verbatim or modified\\ - copies of this document provided this notice remains intact.} -%%% - -%%% Defining more metadata: -\addinfospace{1ex} -\addinfo[\color{blue}\scshape]{Hobby} -\hobby{Sleeping in.} -%%% - -%%% Changing the hyperlink colour: -\definecolor{linkcolour}{rgb}{0.7,0.2,0.2} -%%% - -\begin{document} -\maketitle - -\section{Introduction} -This is an example of the \texttt{pracjourn} document class. -Articles should always start with a section title, which will usually be `Introduction' or somesuch. - -This document demonstrates the features of the document class. -Here are some logos and abbreviations: - \note{Tuned for Palatino, but refinements welcomed.} -\TeX, \pdfTeX, \BibTeX, \MF, \MP, \LaTeX, \LaTeXe, -\mbox{\ConTeXt}, \pdfLaTeX, \XeTeX, \PracTeX, \TPJ, \PS. - -On the following pages are shown the document divisions and list environments. - -\newpage -\section{Section headings} -\itshape The fact is that his precocity in vice was awful. At five months of age he -used to get into such passions that he was unable to articulate. At six -months, I caught him gnawing a pack of cards. At seven months he was in -the constant habit of catching and kissing the female babies. At eight -months he peremptorily refused to put his signature to the Temperance -pledge. - \note{Text from Edgar Allen Poe's `Never bet the Devil your head'.} - -\subsection{Subsection} - -Poverty was another vice which the peculiar physical deficiency of -Dammit's mother had entailed upon her son. He was detestably poor, and -this was the reason, no doubt, that his expletive expressions about -betting, seldom took a pecuniary turn. I will not be bound to say that I -ever heard him make use of such a figure of speech as ``I'll bet you a -dollar.'' It was usually ``I'll bet you what you please,'' or ``I'll bet you -what you dare,'' or ``I'll bet you a trifle,'' or else, more significantly -still, \emph{``I'll bet the Devil my head.''} - -\subsubsection{Subsubsection} - -\upshape Subsubsections are in the same font size as the body text, so I guess -it's possibly a little small. I doubt many people really will wish to -use a subsubsection in a journal article. But if they wish, there's -nothing stopping 'em. - \note{Another footnote test. - This one has to be really long to see what happens - when a footnote extends over more than one line. - I.e., two or more.} - -\paragraph{Paragraphs} Named paragraphs are very similar to description lists; however, these may be useful more \emph{multiple} paragraphs, whereas description lists work better with only a single paragraph per item. - -\subparagraph{Subparagraphs} For those who want them\dots. - -\newpage -\section{Lists} -An itemized list: -\begin{itemize} -\item one, -\item two, and -\item three. - A nested itemised list: - \begin{itemise} - \item one, - \item two, and - \item three. - \end{itemise} -\end{itemize} -An enumerated list: -\begin{enumerate} -\item one, -\item two, and -\item three. -\end{enumerate} -A description list: -\begin{description} -\item [one] the first, -\item [two] the second, and -\item [three] the third. A nested description list: - \begin{description} - \item [one] the first, - \item [two] the second, and - \item [three] the third. - \end{description} -\end{description} - -%Here is the content of the revision file, \verb+_rev.tex+: -%\begingroup\makeatletter\def\@tempa{\begin{verbatim}\@@input _rev.tex}% -%\expandafter\endgroup\@tempa\end{verbatim} - -%Here is the content of the issue file, \verb+_iss.tex+: -%\begingroup\makeatletter\def\@tempa{\begin{verbatim}\@@input _iss.tex}% -%\expandafter\endgroup\@tempa\end{verbatim} - -\end{document} diff --git a/Master/texmf-dist/doc/latex/pracjourn/pracjourn.pdf b/Master/texmf-dist/doc/latex/pracjourn/pracjourn.pdf index 247c264f0bc..aae58c75376 100644 Binary files a/Master/texmf-dist/doc/latex/pracjourn/pracjourn.pdf and b/Master/texmf-dist/doc/latex/pracjourn/pracjourn.pdf differ diff --git a/Master/texmf-dist/source/latex/pracjourn/pracjourn.dtx b/Master/texmf-dist/source/latex/pracjourn/pracjourn.dtx index 99c5224bfb3..423db39c8a9 100644 --- a/Master/texmf-dist/source/latex/pracjourn/pracjourn.dtx +++ b/Master/texmf-dist/source/latex/pracjourn/pracjourn.dtx @@ -21,7 +21,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{pracjourn} %<*class> - [2006/02/20 v0.4k PracTeX Journal Class] + [2007/08/25 v0.4n PracTeX Journal Class] % % %<*driver> @@ -149,6 +149,8 @@ % LOGOS, tuned for Palatino: \def\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} +\newcommand\TODO[1]{\marginpar{\raggedright\itshape\color{red}TODO: #1}} + \begin{document} \DocInput{pracjourn.dtx} \end{document} @@ -156,7 +158,7 @@ % % \fi % -% \CheckSum{720} +% \CheckSum{0} % % % \changes{v0.0}{2004/10/03}{KB: Initial version} @@ -281,9 +283,21 @@ % % This command will then define the macro used to input the additional information % by taking the lowercase of the title of the information and turning it into -% a \TeX\ macro. This creates the obvious limitation on the name of the information -% blocks that only single words may be used to describe any additional metadata. This -% should not cause concern in practice. +% a \TeX\ macro. +% +% \DescribeMacro{\newinfo} +% If lowercasing the heading to create the macro name is impractical +% (due to accents, for example), then this command can be used instead: +% \begin{quote} +% |\newinfo\resume[\color{red}]{R\'esum\'e}| +% \end{quote} +% +% The names used in the article metadata (`Email', `R\'esum\'e', etc.) can be redefined as follows: +% \begin{quote} +% |\renewcommand\emailname{Email}|\\ +% |\renewcommand\resumename{Resume}| +% \end{quote} +% These macros are defined automatically by \cmd\addinfo/\cmd\newinfo. % % \DescribeMacro{\addinfospace} % If you wish to add some vertical space after the previous item in the front matter, @@ -293,7 +307,7 @@ % \DescribeMacro{\clearinfo} % If you don't like the ordering of the information blocks or you wish to edit % the formatting of the current setup, the \cmd\clearinfo\ command allows you to start -% fresh and redefine the address, email, and website information blocks however you may wish. +% fresh and redefine the info blocks however you may wish. % % \subsection{Additional user commands} % \DescribeMacro{\dash} For `smart' dashes in text. Thinly spaced from the text, it ignores surrounding spaces, and permits only succeeding line breaks. @@ -370,7 +384,7 @@ % convenience: % \begin{multicols}{2}\everypar{\parindent0pt\parskip0pt} % \def\showlogo#1{\@for\@ii:=#1\do{\expandafter\cmd\@ii:\hfill\@ii\endgraf}} -% \showlogo{\noexpand\TeX,\LaTeX,\LaTeXe,\BibTeX,\MF,\MP, +% \noindent\showlogo{\noexpand\TeX,\LaTeX,\LaTeXe,\BibTeX,\MF,\MP, % \ConTeXt,\pdfTeX,\pdfLaTeX,\XeTeX,\ExTeX,\PracTeX,\TPJ,\PS} % \end{multicols} % \endgroup @@ -482,16 +496,21 @@ % may be deemed negligible in the future. % % \changes{v0.3}{2004/01/03}{AO: rewrite using \cs{IfFileExists} idiom.} -% \changes{v0.4e}{2005/08/22}{WR: requires the textcomp package.} +% \changes{v0.4e}{2005/08/22}{WR: requires the textcomp package} % \changes{v0.4g}{2005/11/04}{WR: use \pkg{microtype}, if available} +% \changes{v0.4l}{2006/08/14}{WR: use LM fonts if available, with T1 encoding} % % The \pkg{textcomp} package is loaded in order to provide a nice looking copyright logo, amongst other things. % % \begin{macrocode} +\IfFileExists{lmodern.sty}{% + \RequirePackage{lmodern} + \usepackage[T1]{fontenc}}{} \IfFileExists{mathpazo.sty} {\RequirePackage[sc]{mathpazo}} {\renewcommand\rmdefault{ppl}} -\IfFileExists{microtype.sty}{\RequirePackage[protrusion=true,expansion=false]{microtype}}{} +\IfFileExists{microtype.sty}{% + \RequirePackage[protrusion=true,expansion=false]{microtype}}{} \RequirePackage{textcomp} % \end{macrocode} % \pkg{hyperref} is used for creating live hyperlinks, as well as @@ -504,10 +523,12 @@ linkcolor=linkcolour,citecolor=linkcolour, filecolor=linkcolour, urlcolor=linkcolour} % \end{macrocode} +% \TODO{update this to use the successor to the switcheml package} % If the \pkg{switcheml} package is installed in the author's % system, use it to obfuscate their email address by default. Otherwise, just % use a hyperlink. The commands to do this are defined in a later section. % +% % An author may specify \cmd\hyperlinkemail\ explicitly % should they not care to obfuscate their email address even with the \pkg{switcheml} % package installed. @@ -539,7 +560,7 @@ % \begin{macrocode} \renewcommand\maketitle{\par \iftpj@noabstract\else - \@ifx@undefined{\tpj@info@Abstract} + \@ifx@undefined{\tpj@info@\string\abstract} {\ClassError{pracjourn} {Please specify an \string\abstract\space before \string\maketitle} {It is a PracTeX Journal requirement to include an abstract. \MessageBreak @@ -594,7 +615,7 @@ \tpj@optional@author@info \iftpj@noabstract\else \vspace{2ex}% - \tpj@info@container{Abstract} + \tpj@info@container{\abstractname}{\abstract} \fi} % \end{macrocode} % \end{macro} @@ -608,7 +629,7 @@ % \begin{macro}{\subparagraph} % Remove bold from the all the section headings, just for something a % little different. This is verbatim from \texttt{article.cls} with a -% bunch of \cmd\bfseries's omitted. +% bunch of \cmd\bfseries's omitted. \TODO{just use titlesec instead} % \begin{macrocode} \renewcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% @@ -639,8 +660,10 @@ % \begin{environment}{itemize} % \begin{environment}{enumerate} % \begin{environment}{description} +% \TODO{just use enumitem instead} % 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. % +% % Note that description lists shouldn't contain more than on paragraph. % \begin{macrocode} \let\tpj@itemize\itemize @@ -689,15 +712,15 @@ % \paragraph{Footnotes} % Here we change the footnote formatting a little bit from the default. % \begin{macro}{\@makefntext} -% \changes{v0.4f}{2005/10/06}{WR: Removed the footnote superscript} -% \changes{v0.4g}{2005/11/01}{WR: Added a period after the footnote number} % 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). % \begin{macrocode} -\renewcommand\@makefntext[1]{% - \parindent 1.8em% - \noindent - \hb@xt@1.8em{\hbox{\strut\normalfont\small\@thefnmark.}\hss}#1} +\def\@makefntext#1{% + \parindent 0em\relax + \makebox[1.5em][l]{\normalfont\footnotesize\@thefnmark.}#1} % \end{macrocode} +% \changes{v0.4f}{2005/10/06}{WR: Removed the footnote superscript.} +% \changes{v0.4g}{2005/11/01}{WR: Added a period after the footnote number.} +% \changes{v0.4l}{2006/08/05}{WR: Fixed number \& text size difference. Oops. Removed \cmd\strut\ to allow \textsf{bigfoot} compatibility.} % \end{macro} % % \subsection{TPJ additions} @@ -819,12 +842,34 @@ % \cmd{\tpj@info@container} is appended to \cmd{\tpj@optional@author@info}, which % is called in \cmd{\@maketitle}. % -% \changes{v0.4d}{2005/07/30}{WR: Name change to user-space.} % \begin{macrocode} \newcommand\addinfo[2][]{% - \tpj@define@info@block[#1]{#2}% - \g@addto@macro\tpj@optional@author@info{\tpj@info@container[#1]{#2}}} + \def\@tempa{\new@addinfo{#1}{#2}}% + \lowercase{\expandafter\@tempa\expandafter{\csname#2\endcsname}}} +\newcommand\new@addinfo[3]{% + \tpj@define@info@block{#3}% + \expandafter\newcommand + \csname\expandafter\@gobble\string#3name\endcsname{#2}% + \g@addto@macro\tpj@optional@author@info{% + \tpj@info@container[#1]{\csname\expandafter\@gobble\string#3name\endcsname}{#3}}} +% \end{macrocode} +% \changes{v0.4d}{2005/07/30}{WR: Name change to user-space.} +% \end{macro} +% +% \begin{macro}{\newinfo} +% E.g., |\newinfo\resume[\resfont]{R\'esum\'e}| +% \begin{macrocode} +\newcommand\newinfo[1]{% + \@ifnextchar[{\@newinfo{#1}}{\@newinfo{#1}[]}} +\def\@newinfo#1[#2]#3{% + \tpj@define@info@block{#1}% + \expandafter\newcommand + \csname\expandafter\@gobble\string#1name\endcsname{#3}% + \g@addto@macro\tpj@optional@author@info{% + \tpj@info@container[#2]{% + \csname\expandafter\@gobble\string#1name\endcsname}{#1}}} % \end{macrocode} +% \changes{v0.4n}{2007/08/13}{WR: A better \cmd\addinfo} % \end{macro} % % \begin{macro}{\addinfospace} @@ -838,20 +883,16 @@ % \changes{v0.4a}{2005/06/13}{WR: Implemented for new \cmd{\@maketitle}.} % This macro actually does the work of \cmd\addinfo. % It takes the name of a piece of info to be typeset in the -% title block of the article. The name of the info is lowercased to -% create a control sequence for the user to input this data. E.g., -% \cs{addinfo{Abstract}} will create a control sequence -% \cmd\abstract\ which saves its argument inside \cmd{\tpj@info@Abstract}. +% title block of the article. % -% All commands are defined \cmd\long\ so that paragraphs are -% allowed. This is much easier than +% This is much easier (but uglier, in hindsight |:(| ) than % |\begin{abstract}...\end{abstract}| contortions % (cf. \texttt{ltugboat.cls}). % \begin{macrocode} -\newcommand\tpj@define@info@block[2][]{% - \lowercase{\expandafter\long\expandafter\def\csname#2\endcsname}% - ##1{\expandafter\def\csname tpj@info@#2\endcsname{##1}}} +\newcommand\tpj@define@info@block[1]{% + \newcommand#1[1]{\expandafter\def\csname tpj@info@\string#1\endcsname{##1}}} % \end{macrocode} +% \changes{v0.4n}{2007/08/13}{Change for better info blocks} % \end{macro} % % \begin{macro}{\clearinfo} @@ -885,7 +926,9 @@ % The abstract block itself is called directly in \cmd{\@maketitle}. % % \begin{macrocode} -\tpj@define@info@block{Abstract} +\let\abstract\relax +\tpj@define@info@block\abstract +\def\abstractname{Abstract} % \end{macrocode} % % \begin{macro}{\noabstract} @@ -969,7 +1012,7 @@ % document text.\footnote{\LaTeX's \cmd\@hangfrom\ (or whatever it is) could well % have been much easier.} It takes the name of the info as a mandatory % argument, which is used to typeset the info label as well as -% retrieve the actual data from the |\tpj@info@#1| macro (see +% retrieve the actual data from the |\tpj@info@#3| macro (see % \cmd{\addinfo}). % % An optional argument is used as a hook to typeset the info data in @@ -977,7 +1020,7 @@ % % For example, to typeset the info defined by the author in the % \cmd\abstract\ (recall, this is set up due to a corresponding -% |\addinfo{Abstract}|---see above), input +% |\addinfo{Abstract}{\abstract}|---see above), input % |\tpj@info@container{Abstract}|. To typeset it, say, in italics, % it would be possible to write % |\tpj@info@container[\textit]{Abstract}|. @@ -986,31 +1029,30 @@ % \changes{v0.4d}{2005/06/29}{WR: Warn if a title block command is used after \cmd\maketitle.} % % \begin{macrocode} -\newcommand\tpj@info@container[2][]{% +\newcommand\tpj@info@container[3][]{% % \end{macrocode} % After \cmd\maketitle, redefine the info command to return an error. % \begin{macrocode} - \lowercase{\expandafter\gdef\csname#2\endcsname}% - {\ClassError{pracjourn}{#2 must be defined BEFORE \string\maketitle}{}} + \gdef#3{\ClassError{pracjourn}{#2 must be defined BEFORE \string\maketitle}{}} % \end{macrocode} % Now, we typeset the info block, but only if the info has actually been specified by the author. % \begin{macrocode} - \expandafter\ifx\csname tpj@info@#2\endcsname\relax\else - \noindent\null\hfill\small + \expandafter\ifx\csname tpj@info@\string#3\endcsname\relax\else + \noindent\small % \end{macrocode} % On the left, right-aligned sans serif item label, e.g., `Abstract': % \begin{macrocode} - \begin{minipage}[t]{0.1\textwidth} + \begin{minipage}[t]{0.15\textwidth} \noindent\hfill\sffamily#2 \end{minipage}\hfill % \end{macrocode} % On the right, the content, defined by, e.g., \cmd\abstract: % \begin{macrocode} - \begin{minipage}[t]{0.85\textwidth} + \begin{minipage}[t]{0.825\textwidth} \linespread{1.0}\selectfont \setlength\parindent{1.5em}% \noindent\ignorespaces - \expandafter#1\expandafter{\csname tpj@info@#2\endcsname} + \expandafter#1\expandafter{\csname tpj@info@\string#3\endcsname} \end{minipage}\par \fi} % \end{macrocode} @@ -1111,6 +1153,18 @@ % % \subsubsection{Logos} % +% \begin{macro}{\tpf@deflogo} +% Wrapper for both \cmd\DeclareRobustCommand\ and \cmd\pdfstringdefDisableCommand. +% \begin{macrocode} +\newcommand\tpj@deflogo{\@dblarg\tpj@@deflogo} +\newcommand\tpj@@deflogo[3][\@nil]{% + \expandafter\DeclareRobustCommand\csname#2\endcsname{#3}% + \pdfstringdefDisableCommands{% + \expandafter\def\csname#2\endcsname{#1}}} +% \end{macrocode} +% \changes{v0.4m}{2006/11/19}{WR: Implemented to improve logo/hyperref handling.} +% \end{macro} +% % \changes{v0.4a}{2005/06/05}{WR: Incorporated code from \pkg{texnames} % and \pkg{mflogo}.} % @@ -1121,10 +1175,10 @@ % so on, right?} of \texttt{texnames.sty}, v1.10, tuned for Palatino % and adapted to use \cs{textsc} where appropriate: % \begin{macrocode} -\DeclareRobustCommand\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} -\DeclareRobustCommand\LaTeX{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} -\DeclareRobustCommand\LaTeXe{\LaTeX2$_{\textstyle\varepsilon}$} -\DeclareRobustCommand\BibTeX{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} +\tpj@deflogo{TeX}{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} +\tpj@deflogo{LaTeX}{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} +\tpj@deflogo{LaTeXe}{\LaTeX2$_{\textstyle\varepsilon}$} +\tpj@deflogo{BibTeX}{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} % \end{macrocode} % And now \texttt{mflogo.sty}, unchanged in its entirety: % \begin{macrocode} @@ -1132,8 +1186,8 @@ \not@math@alphabet\logofamily\relax \fontencoding{U}\fontfamily{logo}\selectfont} \DeclareTextFontCommand{\textlogo}{\logofamily} -\DeclareRobustCommand\MF{\textlogo{META}\@dischyph\textlogo{FONT}\@} -\DeclareRobustCommand\MP{\textlogo{META}\@dischyph\textlogo{POST}\@} +\tpj@deflogo[MetaFont]{MF}{\textlogo{META}\@dischyph\textlogo{FONT}\@} +\tpj@deflogo[MetaPost]{MP}{\textlogo{META}\@dischyph\textlogo{POST}\@} % \end{macrocode} % Now some new definitions. Despite the fact that it makes no % difference with the main font used for this class, I define @@ -1143,16 +1197,16 @@ % vs.~{\usefont{OT1}{cmr}{m}{n}pdf\TeX}; I find the former more % attractive because the ascender of the `f' doesn't collide. % \begin{macrocode} -\DeclareRobustCommand\ConTeXt{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% -\DeclareRobustCommand\pdfTeX{pdf\/\TeX} -\DeclareRobustCommand\pdfLaTeX{pdf\/\LaTeX} -\DeclareRobustCommand\PS{PostScript} -\DeclareRobustCommand\PracTeX{Prac\kern-0.07em\TeX} -\DeclareRobustCommand\TPJ{The \PracTeX\ Journal} -\DeclareRobustCommand\XeTeX{% +\tpj@deflogo{ConTeXt}{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% +\tpj@deflogo{pdfTeX}{pdf\/\TeX} +\tpj@deflogo{pdfLaTeX}{pdf\/\LaTeX} +\newcommand\PS{PostScript} +\tpj@deflogo{PracTeX}{Prac\kern-0.07em\TeX} +\newcommand\TPJ{The \PracTeX\ Journal} +\tpj@deflogo{XeTeX}{% X\lower.5ex\hbox{\kern-.07em\reflectbox{E}}% \kern-.15em\TeX} -\DeclareRobustCommand\ExTeX{\textrm{\relax +\tpj@deflogo{ExTeX}{\textrm{\relax \ensuremath{\textstyle\varepsilon_{\kern-0.15em\mathcal{X}}}\relax \kern-.15em\TeX}} % \end{macrocode} diff --git a/Master/texmf-dist/tex/latex/pracjourn/pracjourn.cls b/Master/texmf-dist/tex/latex/pracjourn/pracjourn.cls index 26a81adab1d..245cfa66bd1 100644 --- a/Master/texmf-dist/tex/latex/pracjourn/pracjourn.cls +++ b/Master/texmf-dist/tex/latex/pracjourn/pracjourn.cls @@ -26,7 +26,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{pracjourn} - [2006/02/20 v0.4k PracTeX Journal Class] + [2007/08/25 v0.4n PracTeX Journal Class] \let\ExecuteOptions@ltx\ExecuteOptions \def\ExecuteOptions#1{% \ExecuteOptions@ltx{letterpaper,12pt,oneside,onecolumn,final}% @@ -37,10 +37,14 @@ \setlength\textwidth{432pt} \setlength\oddsidemargin{18pt}% xx depend on letter/a4 \setlength\evensidemargin{18pt} +\IfFileExists{lmodern.sty}{% + \RequirePackage{lmodern} + \usepackage[T1]{fontenc}}{} \IfFileExists{mathpazo.sty} {\RequirePackage[sc]{mathpazo}} {\renewcommand\rmdefault{ppl}} -\IfFileExists{microtype.sty}{\RequirePackage[protrusion=true,expansion=false]{microtype}}{} +\IfFileExists{microtype.sty}{% + \RequirePackage[protrusion=true,expansion=false]{microtype}}{} \RequirePackage{textcomp} \RequirePackage{color,hyperref,graphicx} \definecolor{linkcolour}{rgb}{0,0.2,0.6} @@ -53,7 +57,7 @@ {\AtBeginDocument{\@ifx@undefined{\typesetemail}{\hyperlinkemail}{}}} \renewcommand\maketitle{\par \iftpj@noabstract\else - \@ifx@undefined{\tpj@info@Abstract} + \@ifx@undefined{\tpj@info@\string\abstract} {\ClassError{pracjourn} {Please specify an \string\abstract\space before \string\maketitle} {It is a PracTeX Journal requirement to include an abstract. \MessageBreak @@ -94,7 +98,7 @@ \tpj@optional@author@info \iftpj@noabstract\else \vspace{2ex}% - \tpj@info@container{Abstract} + \tpj@info@container{\abstractname}{\abstract} \fi} \renewcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% @@ -134,10 +138,9 @@ \renewcommand\labelitemii{\normalfont\bfseries\textperiodcentered} \renewcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\itshape #1} -\renewcommand\@makefntext[1]{% - \parindent 1.8em% - \noindent - \hb@xt@1.8em{\hbox{\strut\normalfont\small\@thefnmark.}\hss}#1} +\def\@makefntext#1{% + \parindent 0em\relax + \makebox[1.5em][l]{\normalfont\footnotesize\@thefnmark.}#1} \def\@ifx@empty#1{% Implicit #2#3 \ifx#1\@empty \expandafter\@firstoftwo @@ -189,18 +192,34 @@ \setcounter{totalnumber}{20} \setcounter{dbltopnumber}{9} \newcommand\addinfo[2][]{% - \tpj@define@info@block[#1]{#2}% - \g@addto@macro\tpj@optional@author@info{\tpj@info@container[#1]{#2}}} + \def\@tempa{\new@addinfo{#1}{#2}}% + \lowercase{\expandafter\@tempa\expandafter{\csname#2\endcsname}}} +\newcommand\new@addinfo[3]{% + \tpj@define@info@block{#3}% + \expandafter\newcommand + \csname\expandafter\@gobble\string#3name\endcsname{#2}% + \g@addto@macro\tpj@optional@author@info{% + \tpj@info@container[#1]{\csname\expandafter\@gobble\string#3name\endcsname}{#3}}} +\newcommand\newinfo[1]{% + \@ifnextchar[{\@newinfo{#1}}{\@newinfo{#1}[]}} +\def\@newinfo#1[#2]#3{% + \tpj@define@info@block{#1}% + \expandafter\newcommand + \csname\expandafter\@gobble\string#1name\endcsname{#3}% + \g@addto@macro\tpj@optional@author@info{% + \tpj@info@container[#2]{% + \csname\expandafter\@gobble\string#1name\endcsname}{#1}}} \newcommand\addinfospace[1]{\g@addto@macro\tpj@optional@author@info{\vspace{#1}}} -\newcommand\tpj@define@info@block[2][]{% - \lowercase{\expandafter\long\expandafter\def\csname#2\endcsname}% - ##1{\expandafter\def\csname tpj@info@#2\endcsname{##1}}} +\newcommand\tpj@define@info@block[1]{% + \newcommand#1[1]{\expandafter\def\csname tpj@info@\string#1\endcsname{##1}}} \newcommand\clearinfo{\let\tpj@optional@author@info\@empty} \clearinfo \addinfo[\typesetemail]{Email} \addinfo[\url]{Website} \addinfo[\linespread{0.9}\selectfont]{Address} -\tpj@define@info@block{Abstract} +\let\abstract\relax +\tpj@define@info@block\abstract +\def\abstractname{Abstract} \newif\iftpj@noabstract \newcommand\noabstract{\tpj@noabstracttrue} \def\endabstract{% @@ -218,19 +237,18 @@ \let\@TPJrevision\@empty \let\@TPJcopyright\@empty \let\license\TPJcopyright -\newcommand\tpj@info@container[2][]{% - \lowercase{\expandafter\gdef\csname#2\endcsname}% - {\ClassError{pracjourn}{#2 must be defined BEFORE \string\maketitle}{}} - \expandafter\ifx\csname tpj@info@#2\endcsname\relax\else - \noindent\null\hfill\small - \begin{minipage}[t]{0.1\textwidth} +\newcommand\tpj@info@container[3][]{% + \gdef#3{\ClassError{pracjourn}{#2 must be defined BEFORE \string\maketitle}{}} + \expandafter\ifx\csname tpj@info@\string#3\endcsname\relax\else + \noindent\small + \begin{minipage}[t]{0.15\textwidth} \noindent\hfill\sffamily#2 \end{minipage}\hfill - \begin{minipage}[t]{0.85\textwidth} + \begin{minipage}[t]{0.825\textwidth} \linespread{1.0}\selectfont \setlength\parindent{1.5em}% \noindent\ignorespaces - \expandafter#1\expandafter{\csname tpj@info@#2\endcsname} + \expandafter#1\expandafter{\csname tpj@info@\string#3\endcsname} \end{minipage}\par \fi} \newcommand\obfuscateemail{% @@ -255,26 +273,31 @@ \newcommand\ctanloc[1]{% \href{http://www.ctan.org/tex-archive/#1} {\path{CTAN:#1}}} -\DeclareRobustCommand\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} -\DeclareRobustCommand\LaTeX{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} -\DeclareRobustCommand\LaTeXe{\LaTeX2$_{\textstyle\varepsilon}$} -\DeclareRobustCommand\BibTeX{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} +\newcommand\tpj@deflogo{\@dblarg\tpj@@deflogo} +\newcommand\tpj@@deflogo[3][\@nil]{% + \expandafter\DeclareRobustCommand\csname#2\endcsname{#3}% + \pdfstringdefDisableCommands{% + \expandafter\def\csname#2\endcsname{#1}}} +\tpj@deflogo{TeX}{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax} +\tpj@deflogo{LaTeX}{L\kern-.32em\raise.37ex\hbox{\scalebox{0.76}{A}}\kern-.15em\TeX} +\tpj@deflogo{LaTeXe}{\LaTeX2$_{\textstyle\varepsilon}$} +\tpj@deflogo{BibTeX}{B{\textsc i\kern-.025em\textsc b}\kern-.08em\TeX} \DeclareRobustCommand\logofamily{% \not@math@alphabet\logofamily\relax \fontencoding{U}\fontfamily{logo}\selectfont} \DeclareTextFontCommand{\textlogo}{\logofamily} -\DeclareRobustCommand\MF{\textlogo{META}\@dischyph\textlogo{FONT}\@} -\DeclareRobustCommand\MP{\textlogo{META}\@dischyph\textlogo{POST}\@} -\DeclareRobustCommand\ConTeXt{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% -\DeclareRobustCommand\pdfTeX{pdf\/\TeX} -\DeclareRobustCommand\pdfLaTeX{pdf\/\LaTeX} -\DeclareRobustCommand\PS{PostScript} -\DeclareRobustCommand\PracTeX{Prac\kern-0.07em\TeX} -\DeclareRobustCommand\TPJ{The \PracTeX\ Journal} -\DeclareRobustCommand\XeTeX{% +\tpj@deflogo[MetaFont]{MF}{\textlogo{META}\@dischyph\textlogo{FONT}\@} +\tpj@deflogo[MetaPost]{MP}{\textlogo{META}\@dischyph\textlogo{POST}\@} +\tpj@deflogo{ConTeXt}{C\kern-.03em on\-\kern-.10em\TeX\kern-0.04em t}% +\tpj@deflogo{pdfTeX}{pdf\/\TeX} +\tpj@deflogo{pdfLaTeX}{pdf\/\LaTeX} +\newcommand\PS{PostScript} +\tpj@deflogo{PracTeX}{Prac\kern-0.07em\TeX} +\newcommand\TPJ{The \PracTeX\ Journal} +\tpj@deflogo{XeTeX}{% X\lower.5ex\hbox{\kern-.07em\reflectbox{E}}% \kern-.15em\TeX} -\DeclareRobustCommand\ExTeX{\textrm{\relax +\tpj@deflogo{ExTeX}{\textrm{\relax \ensuremath{\textstyle\varepsilon_{\kern-0.15em\mathcal{X}}}\relax \kern-.15em\TeX}} \def\write@ID@aux{% -- cgit v1.2.3