diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-03 21:08:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-03 21:08:39 +0000 |
commit | 43b91fc7f03dcced7fa810f86519578f62aaeaf2 (patch) | |
tree | 665209cd38387784193b6f5707074ad6f4e07a1e /Master/texmf-dist/tex | |
parent | c42f3f5e3986181a8b0825a33d93d4c022504a84 (diff) |
asmeconf (3oct19)
git-svn-id: svn://tug.org/texlive/trunk@52270 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls | 102 |
1 files changed, 93 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls b/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls index 0453465e485..66554fa3842 100644 --- a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls +++ b/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls @@ -1,11 +1,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% This file provides the asmeconf class for formatting conference papers according to -%% ASME conference requirements as represented on ASME's conference web pages in March 2019. +%% ASME conference requirements as represented on ASME's conference web pages in mid-2019. %% %% Please note that ASME's journals follow specifications different from ASME conference papers. %% -%% This file is version 1.11 dated 2019/07/08. +%% This file is version 1.12 dated 2019/10/02. %% %% Author: John H. Lienhard V %% Department of Mechanical Engineering @@ -31,7 +31,7 @@ %% This class is not designed for unicode-math or fontspec, given that the ASME conference style is %% specific with respect to the font selections. %% -%% Options for the class are described on lines 79-126. +%% Options for the class are configured on lines 79-153. %% %% The class defines two environments: abstract and nomenclature. The latter has an optional argument to %% control the space between the entries and the definitions. @@ -39,7 +39,7 @@ %% New commands are described in the asmeconf-template.tex file. The \section[]{} command's optional %% argument is changed to better support pdf bookmarks, and \section* is modified similarly. %% -%% Commands for entering conference headers, title, abstract, and author names are specific to this class. +%% Commands for entering conference headers and author names are specific to this class. %% See asmeconf-template.tex for details. %% %% @@ -67,7 +67,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{asmeconf}[2019/07/08 ASME Conference Paper Format] +\ProvidesClass{asmeconf}[2019/10/02 ASME Conference Paper Format] \LoadClass[twoside,twocolumn,10pt]{article} % Two-sided layout not used in ASME's specs, although that's how the papers are printed @@ -80,6 +80,10 @@ \setboolean{DefaultSups}{true} \newboolean{Oldauthors} \setboolean{Oldauthors}{false} +\newboolean{Balance} +\setboolean{Balance}{false} +\newboolean{lineno} +\setboolean{lineno}{false} \RequirePackage{kvoptions} @@ -100,6 +104,22 @@ \setboolean{DefaultSups}{#1} } +%%% set key [nodefaultsups] to obtain newtx superiors font for footnotes. +\define@key{asmeconf}{nodefaultsups}[false]{% + \setboolean{DefaultSups}{#1} +} + +%%% set key [balance] to balance column height on last page. +\define@key{asmeconf}{balance}[true]{% + \setboolean{Balance}{#1} + \ClassWarningNoLine{asmeconf}{Loading flushend package to balance column height on last page}% +} + +%%% set key [lineno] to obtain linenumbers. +\define@key{asmeconf}{lineno}[true]{% + \setboolean{lineno}{#1} +} + \ProcessKeyvalOptions* %% option to have colored hyperlinks @@ -124,8 +144,15 @@ %% option to use old authors \DeclareOption{oldauthors}{% \setboolean{Oldauthors}{true}% + \ClassWarningNoLine{asmeconf}{Selected option for a grid of author blocks}% } +%% Option to hyphenate the typewriter font [hyphenate] +\DeclareOption{hyphenate}{% + \PassOptionsToPackage{hyphenate}{inconsolata}% + \ClassWarningNoLine{asmeconf}{Allowing hyphenation of typewriter font}% +} + %% Suppress warnings about mathalfa keys as unused global options \DeclareOption*{} @@ -174,6 +201,15 @@ \RequirePackage{bm} % load after all math to give access to bold math +%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath +\def\maketag@@@#1{\hbox{\m@th#1}} + +% 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 + %%%% font size selection %%%%%%%% %%%% ASME's specs differ slightly from latex standard article-10 class %%% @@ -209,7 +245,7 @@ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} -%%%%%% foonotes %%%%%%% +%%%%%% footnotes %%%%%%% \RequirePackage{fnpos} \makeFNbottom @@ -328,9 +364,10 @@ %% Let's also add \footnote to the \TextUppercase exception list, so that footnote text won't be capitalized -%% if given in section headings +%% if given in section headings. Ditto for \eqref \RequirePackage{xpatch} \xpatchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\footnote}{}{} +\xpatchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\eqref\@nonchangecase\footnote}{}{} %%% Create an optional argument for unnumbered sections and set pdf bookmark (thru \addcontentsline). @@ -352,6 +389,35 @@ } } +%%%%%%%%%%%%% Line numbering and balancing columns on last page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ifthenelse{\boolean{lineno}}{% + \RequirePackage[switch,mathlines]{lineno} + \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}} + \AtBeginDocument{\linenumbers} + \ClassWarningNoLine{asmeconf}{Package lineno loaded, so final column balancing is disabled} +%%% Allow line numbering in AMS math environments. +%%% postdisplaypenalty adjusted to avoid extra line number at end, see discussion here: https://tex.stackexchange.com/a/461192/ +%%% multline has some problem that puts an extra line number above it. +%%% Requires xparse and etoolbox +\NewDocumentCommand{\losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}} + +\NewDocumentCommand{\FixAMSMath}{m}{% + \AtBeginEnvironment{#1}{\losepostpenalty\linenomath}% + \AtEndEnvironment{#1}{\endlinenomath}% + \AtBeginEnvironment{#1*}{\losepostpenalty\linenomath}% + \AtEndEnvironment{#1*}{\endlinenomath}% +} + +\NewDocumentCommand{\FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\FixAMSMath}} +\FixAll{align;alignat;gather;flalign;multline} + + }{% + \ifthenelse{\boolean{Balance}}{\RequirePackage{flushend}}{\relax} % flushend is NOT compatible with lineno +} +\providecommand{\@LN@col}[1]{\relax} +\providecommand{\@LN}[2]{\relax} + %%%%%%%%%%%%% Define special environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -380,18 +446,19 @@ %% \newlength\nomenwidth +\newlength\savitemsep %% If second argument of \entry is omitted, will produce an italicized heading (e.g. "Greek letters") %% \DeclareDocumentCommand{\entry}{m g}{% \IfNoValueTF{#2}{% - \item[\itshape#1\hfill]\par\smallskip% + \itemsep3\p@ plus 1\p@ minus 1\p@% + \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\nopagebreak% \smallskip }{% \item[#1\hfill]#2% } } - \DeclareDocumentEnvironment{nomenclature}{O{2em} O{Nomenclature}}{% \setlength\columnsep{2em} \setlength{\nomenwidth}{#1} @@ -404,6 +471,7 @@ \setlength{\labelwidth}{\nomenwidth}% \setlength{\leftmargin}{\labelwidth}% \addtolength{\leftmargin}{\labelsep}% + \setlength\savitemsep\itemsep }% }{\end{list}} @@ -703,6 +771,22 @@ \let\thefootnote\savethefootnote } +%%%%%%%%%% + +%% Provide compatibility with titling commands from standard LaTeX article class + +\RenewDocumentCommand{\maketitle}{}{\MakeTitlePage} +\RenewDocumentCommand{\title}{}{\PaperTitle} + +\RenewDocumentCommand{\thanks}{m}{\relax} %% disabling this standard command, as it is inconsistent with the format + +%% Produces an unmarked footnote about the version date, to replace "date" +%% This is for editing and should note be used in the final draft +\NewDocumentCommand{\versionfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{#1}\end{NoHyper}} + +\RenewDocumentCommand{\date}{m}{\versionfootnote} %% in case someone wants to use \date this way. + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Provide sans serif upright Greek letters, following a suggestion |