diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-17 21:49:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-17 21:49:47 +0000 |
commit | 2d45bbc3808e2279c0692dbc1d9fabd5df78aa9b (patch) | |
tree | c582f9781651679cb6007b70db8d0fa15287bafc /Master/texmf-dist/tex | |
parent | dda9c46d07ac6ba3d9b27ed0093379975e66282d (diff) |
asmejour (17aug19)
git-svn-id: svn://tug.org/texlive/trunk@51892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/asmejour/asmejour.cls | 102 |
1 files changed, 75 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls index ba356403733..72087ac48de 100644 --- a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls +++ b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls @@ -6,7 +6,7 @@ %% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex. %% %% -%% This file is version 1.04 dated 2019/07/05. +%% This file is version 1.05 dated 2019/08/17. %% %% Author: John H. Lienhard V %% Department of Mechanical Engineering @@ -20,7 +20,7 @@ %% The Times/Helvetica style fonts are from Michael Sharpe's excellent newtxtext and newtxmath packages. %% This class is not designed for unicode-math or fontspec. %% -%% Options for the class are described on lines 63-145. +%% Options for the class are described on lines 63-157. %% %% The class defines an environment for nomenclature. LaTeX must be run twice to align those columns. %% @@ -52,7 +52,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{asmejour}[2019/07/05 asmejour paper format] +\ProvidesClass{asmejour}[2019/08/17 asmejour paper format] \LoadClass[twoside,9pt,twocolumn]{extarticle} @@ -66,6 +66,9 @@ \newboolean{lineno} \setboolean{lineno}{false} +\newboolean{lists} +\setboolean{lists}{true} + \RequirePackage{kvoptions} \RequirePackage{kvsetkeys} \SetupKeyvalOptions{ @@ -106,6 +109,11 @@ \PassOptionsToPackage{#1}{babel}% } +%%% set key [nolists] to suppress lists of figures and tables +\define@key{asmejour}{nolists}[false]{% + \setboolean{lists}{#1} +} + \ProcessKeyvalOptions* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -124,14 +132,13 @@ \DeclareOption{nocopyright}{% \AtBeginDocument{\fancypagestyle{title}{% \fancyhf{} - \fancyfoot[RO]{\large\sffamily \@PreprintString\ \bfseries / \@PaperNumber\thepage} + \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} \fancyfoot[CO]{} } } } - %% Access many options from newtxmath. See newtxmath documentation for details. \DeclareOption{upint,smallerops,varvw,varg,slantedGreek,frenchmath,varbb,cmbraces}{\PassOptionsToPackage{}{newtxmath}} @@ -144,15 +151,20 @@ %% Option not to use latex default superscripts, instead using the newtxtext superiors font [nodefaultsups] \ifthenelse{\boolean{DefaultSups}}{\PassOptionsToPackage{defaultsups}{newtxtext}}{\relax} +%% Option to hyphenate the typewriter font [hyphenate] +\DeclareOption{hyphenate}{% + \PassOptionsToPackage{hyphenate}{inconsolata}% + \ClassWarningNoLine{asmejour}{Allowing hyphenation of typewriter font}% +} + %% Suppress warnings about mathalfa keys as unused global options \DeclareOption*{} \ProcessOptions \relax - %%%%%%%%%%%%% end options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\RequirePackage[paperheight=285.7mm, paperwidth=215.9mm, left=21.1mm, right=21.1mm, top=15.9mm, bottom = 24mm, footskip=8mm]{geometry} +\RequirePackage[paperheight=285.7mm, paperwidth=215.900mm, left=21.100mm, right=21.100mm, top=15.9mm, bottom = 24mm, footskip=8mm]{geometry} \setlength\columnsep{4.5mm} \setlength\parindent{3.5mm} % ASME's pdf pages are 11.25 in. tall, not 11.00 in. @@ -193,18 +205,26 @@ %% In addition to the word spacing options declared in line 121... %% Relative to size9.clo: leading reduced to 10 pt; displayskips made greater \renewcommand\normalsize{% - \@setfontsize\normalsize\@ixpt{10\p@} % <== was \@xipt - \abovedisplayskip 10\p@ \@plus5\p@ \@minus4\p@ % <== was 8\p@ 4,4... - \abovedisplayshortskip 3\p@ \@plus1\p@ \@minus1\p@ % <== was \z@ \@plus3\p@ (3pt stretch) - \belowdisplayshortskip 10\p@ \@plus5\p@ \@minus4\p@ % <== was 5\p@ 3, 3 - \belowdisplayskip \abovedisplayskip + \@setfontsize\normalsize\@ixpt{10\p@}% % <== was \@xipt + \abovedisplayskip 10\p@ \@plus5\p@ \@minus4\p@% % <== was 8\p@ 4,4... + \abovedisplayshortskip 3\p@ \@plus1\p@ \@minus1\p@% % <== was \z@ \@plus3\p@ (3pt stretch) + \belowdisplayshortskip 10\p@ \@plus5\p@ \@minus4\p@% % <== was 5\p@ 3, 3 + \belowdisplayskip \abovedisplayskip% \let\@listi\@listI} \normalsize +% The article class calls \sloppy in two-column mode (\tolerance 9999, \emergencystretch 3em) +% These adjustments affect line breaking; the values below are intended to produce +% fewer lines with large spaces, without creating the problems of using \fussy in two-column mode. +\tolerance 2500 +\emergencystretch 3em + + \setlength{\jot}{10pt} %<== default is 3pt \allowdisplaybreaks % ASME allows these breaks + %% This provides sans serif italic and sans serif bold italic math. %% It's intended only for use in the figure and table captions. %% Fonts are from newtxsf package. @@ -229,21 +249,20 @@ \providecommand{\keywordname}{Keywords} - %%%%%%%%%%%%%%%%% LINE AND EQUATION NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifthenelse{\boolean{lineno}}{% \RequirePackage[switch]{lineno} \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}} \AtBeginDocument{\linenumbers} - \ClassWarningNoLine{asmejour}{Package lineno loaded, so \protect\balance\space will be disabled} + \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing is disabled} }{% - \RequirePackage{balance}% balance is NOT compatible with lineno + \RequirePackage{flushend} % flushend package is NOT compatible with lineno + \AtEndDocument{\flushcolsend} } \providecommand{\@LN@col}[1]{\relax} \providecommand{\@LN}[2]{\relax} -\providecommand{\balance}{\relax}% balance is NOT compatible with lineno -%% ASME page proofs seem to align these at top of baseline, rather than bottom as done here. +%% ASME page proofs seem to align the number at top of the line, rather than bottom as done here. %% ASME puts equation tags in blue @@ -263,8 +282,18 @@ } \providecommand\@PaperYear{\the\year} -\def\@PreprintString{PREPRINT FOR REVIEW} -\newcommand{\PreprintString}[1]{\gdef\@PreprintString{#1}} +\def\@PreprintStringL{PREPRINT FOR REVIEW} +\def\@PreprintStringR{PREPRINT FOR REVIEW} + +\NewDocumentCommand{\PreprintString}{m o}{% + \IfNoValueTF{#2}{% + \gdef\@PreprintStringL{#1}% + \gdef\@PreprintStringR{#1}% + }{% + \ifx R#2{\gdef\@PreprintStringR{#1}}\else\relax\fi + \ifx L#2{\gdef\@PreprintStringL{#1}}\else\relax\fi + } +} \newcommand{\PaperNumber}[1]{\gdef\@PaperNumber{#1-}} \providecommand\@PaperNumber{\relax} @@ -279,19 +308,20 @@ \renewcommand{\footrulewidth}{0pt} \fancyfoot[RE]{\large\bfseries\sffamily Transactions of the ASME} \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} -\fancyfoot[RO]{\large\sffamily \@PreprintString\ \bfseries / \@PaperNumber\thepage} -\fancyfoot[LE]{\large\sffamily {\bfseries \@PaperNumber\thepage\ /} \@PreprintString\ } +\fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} +\fancyfoot[LE]{\large\sffamily {\bfseries \@PaperNumber\thepage\space\space/}\space\space\@PreprintStringL\ } \fancypagestyle{title}{% \fancyhf{} % clear all header and footer fields \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} -\fancyfoot[RO]{\large\sffamily \@PreprintString\ \bfseries / \thepage} +\fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} \fancyfoot[CO]{\large\bfseries\sffamily Copyright \textcopyright\ \@PaperYear\ by ASME} } + %%%%%% Footnotes %%%%%%% \RequirePackage{fnpos} @@ -363,7 +393,7 @@ \setlist[enumerate,1]{label = (\arabic*), ref = (\arabic*),labelindent=3mm, leftmargin=*,noitemsep} %% have no examples of sublists... -%%%%%%%%%%%%% hyperref %%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf @@ -443,14 +473,16 @@ \newlength\widest \newlength\@widest \newlength\nomenwidth +\newlength\savitemsep %% If the second argument of \entry is omitted, a bold section heading is produced, e.g. \entry{Greek Letters} \DeclareDocumentCommand{\entry}{m g}{% \IfNoValueTF{#2}{% - \bigskip - \item[\bfseries#1\hfill]\hphantom{x}\par\smallskip% % ASME is probably closer to \medskip here + \itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip + \goodbreak\item[\bfseries#1\hfill]\itemsep3\p@ plus 1\p@ minus 1\p@\nopagebreak% \smallskip, ASME closer to \medskip }{% \item[\hfill#1${} = {}$]#2% + \setlength\itemsep\savitemsep \settowidth\@widest{#1${} = {}$}% \ifdim\@widest>\widest \global\setlength\widest\@widest\fi% } @@ -464,7 +496,7 @@ % value is the length in scaled points (sp) \DeclareDocumentEnvironment{nomenclature}{O{\nomenwidth} O{\nomname}}{% - \setlength{\widest}{0em} + \setlength{\widest}{0em} \section*{#2} \raggedright \begin{list}{}{% @@ -476,12 +508,28 @@ \setlength{\labelwidth}{#1} \setlength{\leftmargin}{\labelwidth} \addtolength{\leftmargin}{\labelsep} - }% + \setlength\savitemsep\itemsep + }% }{% \setcounter{savedlength}{\widest}% \end{list}% } +%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ifthenelse{\boolean{lists}}{% ASME requires these lists for production. + \AtEndDocument{% + \clearpage + \twocolumn[% + \begin{@twocolumnfalse} + \listoffigures + \listoftables + \end{@twocolumnfalse} + ]% + } + }{% + \ClassWarningNoLine{asmejour}{Omitting lists of figures and tables}% +} %%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |