summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-02 22:14:35 +0000
committerKarl Berry <karl@freefriends.org>2021-02-02 22:14:35 +0000
commit83e3c5a13a4c8cb02f356cab59eb8e13064a33d3 (patch)
tree25ce85986e5a41d86c81522cc866cd300f033ccb /Master/texmf-dist/tex/latex
parentdff87f690111f82e4e367b08248cb0a31d3bdbbf (diff)
asmejour (2feb21)
git-svn-id: svn://tug.org/texlive/trunk@57598 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/asmejour/asmejour.cls672
1 files changed, 376 insertions, 296 deletions
diff --git a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
index f7bcc1b2158..e5a6b6bdc12 100644
--- a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
+++ b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
@@ -1,40 +1,48 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% This file provides the asmejour class for formatting papers in a layout similar to
-%% ASME Journal papers.
-%%
+%% This file provides the asmejour class for formatting papers in a layout similar to ASME Journal papers.
+%%
%% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex.
%%
%%
-%% This file is version 1.14 dated 2020/08/12.
- \def\versionno{1.14}
- \def\versiondate{2020/08/12\space}
+%% This file's version and date are:
+ \def\versionno{1.15}
+ \def\versiondate{2021/02/01\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
%% Massachusetts Institute of Technology
%% Cambridge, MA 02139-4307 USA
%%
-%% This class is compatible with either pdfLaTeX or LuaLaTeX. The class calls a number of packages,
-%% many of which are part of the standard LaTeX distribution, and all of which are in TeXLive and
-%% CTAN (https://ctan.org/).
+%% This class was designed to approach the following aims:
%%
-%% 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.
+%% 1. Match ASME's current layout and font specifications
+%% 2. With amsejour.bst, match ASME's reference formats and support DOI & URL fields
+%% 3. Provide hyperref compatibility for hyperlinks, pdf bookmarks, and metadata
+%% 4. Support citations, footnotes, and bold face math in section headings
+%% 5. Provide optional line numbers for editing and review
+%% 6. Support balancing height of columns on the last page
+%% 7. Support the archival PDF/A standards 1b, 2b, 2u, 3b, and 3u
+%% 8. Provide copyright notices for government employees and government contractors
+%% 9. Enable various math and text features from the newtxmath, mathalfa, and newtxtext packages
+%% 10. Support inclusion of passages in languages other than English
%%
-%% Options for the class are described on lines 61-216.
+%% This class is compatible with either pdfLaTeX or LuaLaTeX. All packages required by the class
+%% are in standard distributions, such as TeXLive, and are also available at CTAN (https://ctan.org/).
%%
-%% The class defines an environment for nomenclature. LaTeX must be run twice to align those columns.
-%%
-%% The title block is set by a specific group of commands which are described in the asmejour-template.tex file.
-%%
-%% The \section[]{} command's optional argument is changed to provide pdf bookmarks when necessary.
+%% The title block is set by specific commands that are described in the asmejour-template.tex file.
%%
+%% The \section[]{} command's optional argument has been changed to better support pdf bookmarks, and
+%% \section*[]{} is similarly modified.
+%%
+%% The class defines abstract environment (with optional keywords) and a nomenclature environment.
+%% (LaTeX must be run twice to align the columns in the nomenclature list).
+%%
%=========================================================
%%
%% LICENSE:
%%
-%% Copyright (c) 2020 John H. Lienhard
+%% Copyright (c) 2021 John H. Lienhard
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
%% associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -58,31 +66,14 @@
\LoadClass[twoside,9pt,twocolumn]{extarticle}
-%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+\RequirePackage{xparse}% \entry{} command uses deprecated g argument; will drop this eventually
+\RequirePackage{etoolbox}% dropped xpatch 28/02/20
\RequirePackage{ifthen}
-\RequirePackage{iftex} % check whether pdftex or another engine is used
-
-\newboolean{DefaultSups}
-\setboolean{DefaultSups}{true}
-
-\newboolean{lineno}
-\setboolean{lineno}{false}
-
-\newboolean{balance}
-\setboolean{balance}{false}
-
-\newboolean{lists}
-\setboolean{lists}{true}
-
-\newboolean{setpdfa}
-\setboolean{setpdfa}{false}
-\newboolean{pdfaone}
-\setboolean{pdfaone}{false}
+\RequirePackage{iftex}% check whether pdftex or another engine is used
+%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage{kvoptions}
-%\RequirePackage{kvsetkeys} %<== this package is called by kvoptions
+\RequirePackage{kvoptions}% this package calls kvsetkeys
\SetupKeyvalOptions{
family=asmejour,
prefix=asmejour@,
@@ -91,67 +82,89 @@
setkeys=\kvsetkeys,
}
-%%% for mathalfa, so we may pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
+%% for mathalfa, so we may pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
\define@key{asmejour}{mathalfa}{%
\PassOptionsToPackage{#1}{mathalfa}%
}
-%%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
+%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
+\newboolean{DefaultSups}\setboolean{DefaultSups}{true}
\define@key{asmejour}{nodefaultsups}[false]{%
\setboolean{DefaultSups}{#1}
}
-%%% set barcolor= to a value defined by xcolor package
+%% set barcolor= to a color name defined by xcolor package
\newcommand\@ColorName{black} % default
-\define@key{asmejour}{barcolor}[Red4]{%
+\define@key{asmejour}{barcolor}[Goldenrod3]{%
\renewcommand\@ColorName{#1}
}
-%%% set key [lineno] to obtain linenumbers.
-\define@key{asmejour}{lineno}[true]{%
- \setboolean{lineno}{#1}
-}
+%% the key main= passes the choice of main language to babel
-%%% set key [balance] to activate final column balancing.
-\define@key{asmejour}{balance}[true]{%
- \setboolean{balance}{#1}
+\newif\ifaj@mainset\aj@mainsetfalse
+\define@key{asmejour}{main}[english]{%
+ \PassOptionsToPackage{main=#1,#1}{babel}% added #1 resolves conflicts between certain .ldf files under "main=".
+ \aj@mainsettrue
+ \ifthenelse{\equal{#1}{english}}{%
+ \PassOptionsToPackage{pdflang=en}{hyperref}}{%
+ \ClassWarningNoLine{asmejour}{Selecting #1 as the primary language}%
+ }%
}
-%%% set key [lang,lang-second,lang-third] to pass languages to babel.
-
-%% In case language options are dropped during editing, include this. Subsequent choice of lang= will override it.
-\PassOptionsToPackage{english}{babel}
-
-\define@key{asmejour}{lang}[english]{%
- \PassOptionsToPackage{main=#1}{babel}%
+%% only main= is actually needed, but keeping these three legacy commands for backward compatibility
+\define@key{asmejour}{lang}[english]{% deprecated option
+ \PassOptionsToPackage{main=#1,#1}{babel}%
+ \PassOptionsToPackage{pdflang=en}{hyperref}
+ \aj@mainsettrue%
+ \ifthenelse{\equal{#1}{english}}{%
+ \relax}{%
+ \ClassWarningNoLine{asmeconf}{Selecting #1 as the primary language}%
+ }%
}
-\define@key{asmejour}{lang-second}[english]{%
+\define@key{asmejour}{lang-second}[english]{% deprecated option
\PassOptionsToPackage{#1}{babel}%
}
-\define@key{asmejour}{lang-third}[english]{%
+\define@key{asmejour}{lang-third}[english]{% deprecated option
\PassOptionsToPackage{#1}{babel}%
}
-%%% set key [nolists] to suppress lists of figures and tables
-\define@key{asmejour}{nolists}[false]{%
- \setboolean{lists}{#1}
-}
+%% if main language was not chosen explicitly, default to English
+\ifaj@mainset\relax\else
+ \PassOptionsToPackage{main=english}{babel}%
+ \PassOptionsToPackage{pdflang=en}{hyperref}
+ %\ClassWarningNoLine{asmejour}{Selecting English as the primary language, since main= not set}%
+\fi
\ProcessKeyvalOptions{asmejour}
+%% Turn off these keys now that we're done with them
+\def\@KeyFamily{asmejour}
+\NewDocumentCommand\aj@DisableOption{m}{%
+ \DisableKeyvalOption[%
+ action=ignore,%
+ class=asmejour%
+ ]{#1}{\@KeyFamily}%
+}
+\NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@DisableOption}}
+\@DisableKeys{nodefaultsups;mathalfa;barcolor;main;lang;lang-second;lang-third}
+
+
+%%%%%%% PDF/A Compliance Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifaj@setpdfa\aj@setpdfafalse
+\newif\ifaj@pdfaone\aj@pdfaonefalse
\ifpdftex %% PDF/A compliance has only been configured for pdflatex
%
%%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
\define@key{pdfaopt}{pdf-a}[true]{%
- \setboolean{setpdfa}{#1}%
+ \aj@setpdfatrue
\PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}%
}
%%% to select part 1, 2 or 3
\define@key{pdfaopt}{pdfapart}[3]{%
\PassOptionsToPackage{pdfapart=#1}{hyperref}%
- \ifthenelse{\equal{#1}{1}}{\setboolean{pdfaone}{true}}{\relax}%
+ \ifthenelse{\equal{#1}{1}}{\aj@pdfaonetrue}{\relax}%
}
%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
\define@key{pdfaopt}{pdfaconformance}[u]{%
@@ -159,13 +172,28 @@
}
\ProcessKeyvalOptions{pdfaopt}
\else
- \ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}%
+ \ifaj@pdfaone\ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}\fi%
\fi
+%% Done with these keys, so we can now disable them
+\def\@KeyFamily{pdfaopt}
+\@DisableKeys{pdf-a;pdfapart;pdfaconformance}
+
+%%%%%%%%%% Further class options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% Option to obtain line numbers [lineno]
+\newif\ifaj@lineno\aj@linenofalse
+\DeclareOption{lineno}{\aj@linenotrue}
+
+%%% Option to balance column height on last page [balance]
+\newif\ifaj@balance\aj@balancefalse
+\DeclareOption{balance}{\aj@balancetrue}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Option to omit lists of figures and tables
+\newif\ifaj@lists\aj@liststrue
+\DeclareOption{nolists}{\aj@listsfalse}
-%% option to omit ASME footer
+%% Option to omit ASME footer
\DeclareOption{nofoot}{%
\AtBeginDocument{\pagestyle{plain}%
\fancypagestyle{title}{%
@@ -174,8 +202,7 @@
}
}
}
-
-%% option to omit ASME copyright
+%% Option to omit ASME copyright
\DeclareOption{nocopyright}{%
\AtBeginDocument{\fancypagestyle{title}{%
\fancyhf{}
@@ -186,55 +213,78 @@
}
}
-%% Access many options from newtxmath. See newtxmath documentation for details.
-\DeclareOption{upint,smallerops,varvw,varg,slantedGreek,frenchmath,varbb,cmbraces}{\PassOptionsToPackage{}{newtxmath}}
+%% Option for copyright notice if all authors are government employees [govt]
+\newif\ifaj@govt\aj@govtfalse
+\DeclareOption{govt}{\aj@govttrue}
+
+%% Option for copyright notice if some (not all) authors are government employees [govtsome]
+\newif\ifaj@govtsome\aj@govtsomefalse
+\DeclareOption{govtsome}{\aj@govtsometrue}
+
+%% Option for government contractor copyright notice [contractor]
+\newif\ifaj@contractor\aj@contractorfalse
+\DeclareOption{contractor}{\aj@contractortrue}
-%% Option for slightly larger small capitals font [largesc] or to loosen word spacing [looser]
-\DeclareOption{largesc}{\PassOptionsToPackage{}{newtxtext}}
+%% Option for slightly larger small capitals font [largesc], corrected 29 Jan 2021
+\DeclareOption{largesc}{\PassOptionsToPackage{largesc=true}{newtxtext}}% largesc is a boolean key in newtxtext
%% ASME word separation is greater than newtxtext defaults so change these parameters.
-\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.08em}{newtxtext}
+\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.10em}{newtxtext}% increased shrink from 0.08, 30 Jan 21
%% Option not to use latex default superscripts, instead using the newtxtext superiors font [nodefaultsups]
\ifthenelse{\boolean{DefaultSups}}{\PassOptionsToPackage{defaultsups}{newtxtext}}{\relax}
+%% Disable newtxtext osf option, which is not appropriate for documents in this class
+\DeclareOption{osf}{%
+ \PassOptionsToPackage{lining}{newtxtext}%
+}
+
%% Option to hyphenate the typewriter font [hyphenate]
\DeclareOption{hyphenate}{%
\PassOptionsToPackage{hyphenate}{inconsolata}%
\ClassWarningNoLine{asmejour}{Allowing hyphenation of typewriter font}%
}
-
-%%% Option to activate pdf/a-3u compliance [pdfa] (requires hyperxmp package)
-%\ifthenelse{\boolean{setpdfa}}{%
-% \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}}{\relax}%
+%% Option to enforce monospacing of words the typewriter font [mono]
+\DeclareOption{mono}{%
+ \PassOptionsToPackage{mono}{inconsolata}%
+}
+%% Option for unslashed zero typewriter font [var0].
+\DeclareOption{var0}{%
+ \PassOptionsToPackage{var0}{inconsolata}% var0 is a key via xkeyval in inconsolata
+}
%% Suppress warnings about mathalfa keys as unused global options
\DeclareOption*{}
\ProcessOptions \relax
-%%%%%%%%%%%%% end options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% Page size, bibliography, graphics, color, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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.
+%% ASME's pdf pages are 11.25 in. tall, not 11.00 in.
\RequirePackage[sort&compress,numbers]{natbib}
-\AtBeginDocument{\def\NAT@space{\relax}} % ASME puts no space between numerical references (4/5/20)
-\setlength\bibsep{0pt plus 1pt minus 0pt} % ASME keeps this tight
+\AtBeginDocument{\def\NAT@space{\relax}}% ASME puts no space between numerical references (4/5/20)
+\setlength\bibsep{0pt plus 1pt minus 0pt}% ASME keeps this tight
\renewcommand*{\bibfont}{\footnotesize}
\RequirePackage{graphicx}
-\RequirePackage[hyperref,fixpdftex,dvipsnames,svgnames,x11names]{xcolor}
-\RequirePackage{xparse}
-\RequirePackage{metalogo,hologo} % Access various LaTeX logos if needed
+\ifpdf\def\MyColorOption{fixpdftex}\else\ifluatex\def\MyColorOption{luatex}\else\def\MyColorOption{}\fi\fi
+\RequirePackage[hyperref,\MyColorOption,dvipsnames,svgnames,x11names]{xcolor}
+
+% Nice solution from DPC to prevent aux file errors when switching from pdflatex to lualatex
+\ifx\directlua\undefined
+ \AtBeginDocument{\immediate\write\@auxout{\detokenize{%
+ \ifx\directlua\undefined\else\endinput\fi}}}
+\fi
-%%%%%%%%%%%%%%%% Table related %%%%%%%%
+%%%%%%%%%%%%% Table related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{array}
-\RequirePackage{dcolumn} %% alignment on decimal places
+\RequirePackage{dcolumn}% column alignment on decimal places
\newcolumntype{d}[1]{D{.}{.}{#1}}
%% make \hline in tables heavier than default 0.4pt
@@ -245,34 +295,35 @@
\renewcommand*{\midrule}{\specialrule{0.5pt}{2pt}{3pt}}
\renewcommand*{\bottomrule}{\specialrule{0.5pt}{1pt}{\doublerulesep}\specialrule{0.5pt}{0pt}{0pt}}
-%%%%%%%% FONT related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\RequirePackage[T1]{fontenc}
+%%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdftex
- \ifthenelse{\boolean{pdfaone}}{
- \pdfminorversion=4}{% for pdf/a-1 need version 4, not 7
- \pdfminorversion=7 % this selection is not really required.
- }
- \RequirePackage[utf8]{inputenc} % for backward compatibility with pre-2018 distributions
+ \ifaj@setpdfa
+ \pdfminorversion=4 % for pdf/a-1 need version 4, not 7
+ \else
+ \pdfminorversion=7 % this selection is not required
+ \fi
+ \RequirePackage[T1]{fontenc}
+ \RequirePackage[utf8]{inputenc}% for backward compatibility with pre-2018 LaTeX distributions
\else
- \relax
+ \relax % will lose some accented characters this way... better to use fontspec... if the systems fonts exist...
\fi
-\RequirePackage{mathtools} % extends amsmath
+\RequirePackage{mathtools}% loads and extends amsmath
\RequirePackage[]{babel}
+
\RequirePackage[]{newtxtext}
-\RequirePackage[varl,varqu]{inconsolata} % sans typewriter font; restored varl, varqu 2020/08/10
+\RequirePackage[varl,varqu]{inconsolata}% sans typewriter font; restored varl, varqu 2020/08/10
\RequirePackage[]{newtxmath}
%% override \textsu if using default superiors
\ifthenelse{\boolean{DefaultSups}}{\let\textsu\textsuperscript}{\relax}
-\RequirePackage[]{mathalfa} % load optional fonts for Calligraphy, Script, etc.
+\RequirePackage[]{mathalfa}% load optional fonts for Calligraphy, Script, etc.
-\RequirePackage{bm} % load after all math to give access to bold math
+\RequirePackage{bm}% load after all math for expanded access to bold math
-%% In addition to the word spacing options declared in line 163...
+%% In addition to the word spacing options declared in line 235...
%% Relative to size9.clo: leading reduced to 10 pt; displayskips made greater
\renewcommand\normalsize{%
\@setfontsize\normalsize\@ixpt{10\p@}% % <== was \@xipt
@@ -283,47 +334,74 @@
\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.
+%% 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
-\setlength{\jot}{10pt} %<== default is 3pt
+%% multline has an "extra line" above it, so subtract from \abovedisplayskip to remove imbalance
+\BeforeBeginEnvironment{multline}{\addtolength\abovedisplayskip{-7pt}}
+\AfterEndEnvironment{multline}{\addtolength\abovedisplayskip{+7pt}}
-\allowdisplaybreaks % ASME allows these breaks
+\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.
+%% It's intended for use in the figure and table captions.
%% Fonts are from newtxsf package.
\DeclareMathVersion{sansbold}
-\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}
\SetSymbolFont{letters}{sansbold}{OML}{ntxsfmi}{b}{it}
\SetSymbolFont{lettersA}{sansbold}{U}{ntxsfmia}{b}{it}
\SetSymbolFont{symbols}{sansbold}{LMS}{ntxsy}{b}{n}
+\SetSymbolFont{largesymbols}{sansbold}{LMX}{ntxexx}{b}{n}% added 26 Jan 2021
+\SetSymbolFont{largesymbolsTXA}{sansbold}{U}{ntxexa}{b}{n}% added 26 Jan 2021
\SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n}
-
-%% Text Gyre Heros Condensed is qhvc (regular is qhv).
+\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% \mathsf is upright
+
+%% These lines are to provide math accents for the sans and sansbold math versions.
+%% The accents from ntxsfmi work normally with regular times fonts. Added 27 Jan 2021
+\DeclareSymbolFont{lettersAB}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{normal}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{bold}{U}{ntxsfmia}{b}{it}
+\SetSymbolFont{lettersAB}{sansbold}{U}{ntxsfmia}{b}{it}
+\DeclareFontSubstitution{U}{ntxsfmia}{m}{it}
+%
+\DeclareMathAccent{\grave}{\mathord}{lettersAB}{254}
+\DeclareMathAccent{\acute}{\mathord}{lettersAB}{255}
+\DeclareMathAccent{\check}{\mathord}{lettersAB}{186}
+\DeclareMathAccent{\breve}{\mathord}{lettersAB}{187}
+\DeclareMathAccent{\bar}{\mathord}{lettersAB}{221}
+\DeclareMathAccent{\mathring}{\mathord}{lettersAB}{222}
+\DeclareMathAccent{\hat}{\mathord}{lettersAB}{223}
+\DeclareMathAccent{\dot}{\mathord}{lettersAB}{224}
+\DeclareMathAccent{\tilde}{\mathord}{lettersAB}{219}
+
+%%% sans math version, potential value with PGFPlots, and provisionally called in subfigure captions.
+%%% this is experimental, still needs stress testing. 30/01/2021
+\DeclareMathVersion{sans}
+\SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it}
+\SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{sans}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{symbols}{sans}{LMS}{ntxsy}{m}{n}
+\SetSymbolFont{largesymbols}{sans}{LMX}{ntxexx}{m}{n}
+\SetSymbolFont{largesymbolsTXA}{sans}{U}{ntxexa}{m}{n}
+\SetSymbolFont{operators}{sans}{\encodingdefault}{\sfdefault}{m}{n}
+\SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n}
+
+%% TeX Gyre Heros Condensed is qhvc (regular is qhv).
\newcommand*{\CondSans}{\selectfont\fontfamily{qhvc}\selectfont}
\renewcommand\huge{\@setfontsize\huge{14}{14}} %... for author names only
\newcommand*{\CondSansBold}{\renewcommand\bfdefault{b}\selectfont\fontfamily{qhvc}\selectfont\bfseries}
\renewcommand\Huge{\@setfontsize\Huge{26.5}{26.5}} %... for title font only
+
+\RequirePackage{metalogo,hologo}% Access to various LaTeX logos (for use in the documentation)
-\addto{\captionsenglish}{%
- \renewcommand{\figurename}{Fig.}
- \renewcommand{\tablename}{Table}
-}
- \providecommand{\nomname}{Nomenclature}
- \providecommand{\keywordname}{Keywords}
- \providecommand{\appendicesname}{Appendices}
- \providecommand{\CAwords}{Corresponding Author}
-
-%%%%%%%%%%%%%%%%% EQUATION AND LINE NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% Equation and Line Numbering %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ASME puts equation tags in blue
-\RequirePackage{etoolbox} % dropped xpatch 28/02/20
\patchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath
@@ -331,47 +409,51 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{lineno}}{%
- \RequirePackage[switch,mathlines]{lineno}
- \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
- \AtBeginDocument{\linenumbers}
- \ClassWarningNoLine{asmejour}{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}
-
- }{%
- \ProvideDocumentEnvironment{linenomath}{}{}{}
- \ifthenelse{\boolean{balance}}{% balancing through flushend can produce weird errors
- \RequirePackage{flushend} % flushend package is NOT compatible with lineno
- \AtEndDocument{\flushcolsend}
- }{\relax}
-}
-\providecommand{\@LN@col}[1]{\relax}
+\ifaj@lineno
+ \RequirePackage[switch,mathlines]{lineno}%
+ \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}%
+ \AtBeginDocument{\linenumbers}%
+ \ifaj@balance
+ \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing will be disabled}%
+ \fi
+ %%% 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{\aj@losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}}%
+%
+ \NewDocumentCommand{\aj@FixAMSMath}{m}{%
+ \AtBeginEnvironment{#1}{\aj@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1}{\endlinenomath}%
+ \AtBeginEnvironment{#1*}{\aj@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1*}{\endlinenomath}%
+ }%
+%
+ \NewDocumentCommand{\aj@FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@FixAMSMath}}%
+ \aj@FixAll{align;alignat;gather;flalign;multline}%
+%
+\else
+ \ProvideDocumentEnvironment{linenomath}{}{}{}%
+ \ifaj@balance % balancing through flushend can produce weird errors
+ \RequirePackage{flushend}% flushend package is NOT compatible with lineno
+ \AtEndDocument{\flushcolsend}%
+ \ClassWarningNoLine{asmejour}{Calling flushend package to balance column height on last page}%
+ \fi%
+\fi
+
+\providecommand{\@LN@col}[1]{\relax}% avoid errors in the aux file when lineno is dropped
\providecommand{\@LN}[2]{\relax}
-%% ASME page proofs seem to align the number at top of the line, 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.
-%%%%%%%%%%%%%%%%% FOOTER SET UP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% Footer Set Up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\JourName}[1]{\gdef\@JourName{#1}}
\providecommand\@JourName{\hbox{ }}
-\DeclareDocumentCommand{\PaperYear}{G{\the\year}}{%
+\NewDocumentCommand{\PaperYear}{m}{%
\gdef\@PaperYear{#1}%
}
\providecommand\@PaperYear{\the\year}
@@ -384,20 +466,20 @@
\gdef\@PreprintStringL{#1}%
\gdef\@PreprintStringR{#1}%
}{%
- \ifx R#2{\gdef\@PreprintStringR{#1}}\else\relax\fi
- \ifx L#2{\gdef\@PreprintStringL{#1}}\else\relax\fi
+ \ifx R#2{\gdef\@PreprintStringR{#1}}\fi
+ \ifx L#2{\gdef\@PreprintStringL{#1}}\fi
}
}
\newcommand{\PaperNumber}[1]{\gdef\@PaperNumber{#1-}}
\providecommand\@PaperNumber{\relax}
-%%%%%%
+%%%%%% Fancyhdr %%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\pagestyle{fancy}
-\fancyhf{} % clear all header and footer fields
+\fancyhf{}% clear all header and footer fields
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[RE]{\large\bfseries\sffamily Transactions of the ASME}
@@ -405,18 +487,16 @@
\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 \@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}
+ \fancyhf{}% clear all header and footer fields
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}
+ \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 %%%%%%%
+%%%%%% Footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fnpos}
\makeFNbottom
@@ -432,15 +512,15 @@
%% reduce indentation of footnotes
\renewcommand\@makefntext[1]{%
- \noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1} %<== suppress hyphenation
+ \noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1}% <== suppress hyphenation
%% Produces an unmarked footnote about the revision date.
%% This command is invoked by \date as part of \MakeTitlePage below.
%% Text can be anything given as the argument to \date{..}.
-\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{#1}\end{NoHyper}}
+\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{\hspace{-3pt}#1}\end{NoHyper}}
-% Previous is modified to eliminate missing anchor warning from hyperref that following would cause
-%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
+%% The above has been offset per style and modified to eliminate missing anchor warning from hyperref that following causes
+%%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
%% include a comma for sequential footnotes
@@ -455,29 +535,31 @@
\fi%
}
+%%%%%%%%% Caption Related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%% CAPTION RELATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\addto{\captionsenglish}{%
+ \renewcommand{\figurename}{Fig.}
+ \renewcommand{\tablename}{Table}
+}
\RequirePackage[labelfont={sf,bf},hypcap=false]{caption}
\RequirePackage[hypcap=false,list=true]{subcaption}
\DeclareCaptionTextFormat{boldmath}{\mathversion{sansbold}#1}
+\DeclareCaptionTextFormat{sansmath}{\mathversion{sans}#1}% strictly speaking, this is unnecessary.
\captionsetup[figure]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad}
\captionsetup[table]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad,skip=0.5\baselineskip}
-%% 4 April 2020. ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face.
-%% Could set labelfont={sf},textfont={sf}, and normal math version needed; but would need sans math...
-
-\captionsetup[subfigure]{labelformat=simple} % default: =parens
+%% 30 January 2021. ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face.
+\captionsetup[subfigure]{labelfont={sf},textfont={sf},textformat=sansmath,labelformat=simple}% default: =parens
\renewcommand\thesubfigure{(\textit{\alph{subfigure}})}
-\captionsetup[subtable]{labelformat=simple}
+\captionsetup[subtable]{labelfont={sf},textfont={sf},textformat=sansmath,labelformat=simple}
\renewcommand\thesubtable{(\textit{\alph{subtable}})}
-%%%%%%%%%%%% SECTION HEADINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% wish to accommodate hyperref
+%%%%%%%%%%%% Section Headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[raggedright,indentafter]{titlesec}
@@ -494,8 +576,11 @@
\titleformat{\paragraph}[runin]{\itshape}{\thesubsubsection}{0.5em}{}[.]
\titlespacing{\paragraph}{\parindent}{14pt plus 3pt minus 2pt}{0.5em}
-%% Special handling of the appendices
-%% Assumes that appendices are the last technical content in paper
+%% Special handling of the appendices
+%% Assumes that appendices are the last technical content in paper
+
+\providecommand{\appendicesname}{Appendices}
+
\RenewDocumentCommand{\appendix}{}{%
\pdfbookmark[1]{\appendicesname}{appendices}
\setcounter{section}{0}
@@ -505,7 +590,7 @@
\titleformat{\section}[block]{\mathversion{bold}\bfseries\large\raggedright}{\appendixname\ \thesection:}{0.5em}{}[\setcounter{equation}{0}]
}
-% natbib's \bibsection controls section heading for References.
+%% natbib's \bibsection controls section heading for References.
%%%%%%%%%%%%%%%%% List environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -518,7 +603,7 @@
%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{setpdfa}}{%
+\ifaj@setpdfa
%
%%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in newtx documentation.
\pdfgentounicode=1 %% enable CMaps
@@ -538,8 +623,8 @@
/Info (sRGB)
>>
]
-}%
-}{\relax}
+}
+\fi
\RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf
@@ -564,11 +649,12 @@
pdfdisplaydoctitle=true%
]{hyperref}
-\urlstyle{same} % don't switch to typewriter font
-
+\urlstyle{same} % don't switch to typewriter font
\RequirePackage{doi} % supports nasty characters in some doi's
\renewcommand{\doitext}{doi:~} % change the default, {doi:}, to this for ASME specification
+\RequirePackage{bookmark} % improves handling of pdf bookmarks
+%%%%%% Adjustments to accommodate hyperref bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Since \bm is useful in headings, this fix will reduce frequency with which
%% alternate pdfstrings must be given in section command as \section[pdfstring]{texstring}
@@ -618,13 +704,18 @@
}
-%%%%%%%%%%%%% define Nomenclature environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%% Define some section and other names for special environments %%%%%%%
+
+\providecommand{\nomname}{Nomenclature}
+\providecommand{\keywordname}{Keywords}
+\providecommand{\CAwords}{Corresponding Author.}
-%% Nomenclature environment in ASME Journal Style
+%%%%%%%%%%%%% Nomenclature Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Nomenclature environment in ASME Journal Style.
%% Run twice to get proper label width.
-%% Set first optional argument (a dimension) to override automatic label width (e.g., if one label is excessive)
+%% Set first optional argument (a dimension) to override automatic label width (e.g., if one label too wide)
%% Second argument can be used to rename the section, e.g., to List of Symbols.
-%%
\newlength\widest
\newlength\@widest
@@ -632,17 +723,23 @@
\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}{%
+\NewDocumentCommand{\entry}{m g}{%
+ \IfNoValueTF{#2}{%
+ \itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip
+ \goodbreak\item[\bfseries#1\hfill]\itemsep3\p@ plus 1\p@ minus 1\p@\@itempenalty=1000%
+ }{%
+ \item[\hfill#1${} = {}$]#2%
+ \@itempenalty=-\@lowpenalty%
+ \setlength\itemsep\savitemsep%
+ \settowidth\@widest{#1${} = {}$}%
+ \ifdim\@widest>\widest \global\setlength\widest\@widest\fi%
+ }
+}
+
+%% A separate command command for nomenclature subheadings (xparse "g" argument used in \entry is deprecated)
+\NewDocumentCommand\EntryHeading{m}{%
\itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip
\goodbreak\item[\bfseries#1\hfill]\itemsep3\p@ plus 1\p@ minus 1\p@\@itempenalty=1000%
- }{%
- \item[\hfill#1${} = {}$]#2%
- \@itempenalty=-\@lowpenalty%
- \setlength\itemsep\savitemsep%
- \settowidth\@widest{#1${} = {}$}%
- \ifdim\@widest>\widest \global\setlength\widest\@widest\fi%
- }
}
\RequirePackage{totcount}
@@ -652,7 +749,7 @@
\AtBeginDocument{\setlength{\nomenwidth}{\totvalue{savedlength}sp}}
% value is the length in scaled points (sp)
-\DeclareDocumentEnvironment{nomenclature}{O{\nomenwidth} O{\nomname}}{%
+\NewDocumentEnvironment{nomenclature}{O{\nomenwidth} O{\nomname}}{%
\setlength{\widest}{0em}
\section*{#2}
\raggedright
@@ -672,9 +769,10 @@
\end{list}%
}
-%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{lists}}{% ASME requires these lists for production.
+%% ASME requires these lists for production.
+\ifaj@lists
\AtEndDocument{%
\clearpage
\twocolumn[%
@@ -683,26 +781,13 @@
\listoftables
\end{@twocolumnfalse}
]%
- }
- }{%
+ }%
+\else
\ClassWarningNoLine{asmejour}{Omitting lists of figures and tables}%
-}
+\fi
%%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\papertitle}[1]{\gdef\@papertitle{#1}}
-\providecommand\@papertitle{\hbox{ }}
-
-\newcommand{\PaperTitle}{%
-\par\vspace*{6mm}%
-\parbox{\linewidth}{\centering{\bfseries\Large%
-\MakeTextUppercase{\@papertitle}%
-\thispagestyle{title}\par} %% <=== \par gets the font leading to stick.
- }%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%
-
\RequirePackage{xcoffins}
\NewCoffin{\authorblock}
@@ -713,7 +798,7 @@
\NewCoffin{\firstrowauthorblock}
\SetHorizontalCoffin\firstrowauthorblock{}
-\newlength{\coffinsep} %%% space between coffins
+\newlength{\coffinsep}%%% space between coffins
\setlength{\coffinsep}{4.5mm}
\newcounter{authorno}
@@ -724,7 +809,7 @@
\newlength{\rulecofheight}
\newlength{\Titleheight}
-\DeclareDocumentCommand\SetAuthorBlock{m m}{%
+\NewDocumentCommand\SetAuthorBlock{m m}{%
\addtocounter{authorno}{1}%
\SetVerticalCoffin{\authorblock}{48.2mm}{%
\raggedleft\sffamily%
@@ -733,100 +818,95 @@
}
\ifnum\value{authorno}=1
\JoinCoffins\firstrowauthorblock\authorblock
- \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
+ \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
\else
\JoinCoffins\firstrowauthorblock[hc,b]\authorblock[hc,t](0pt,-\coffinsep)
- \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
+ \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
\fi
}
-\DeclareDocumentCommand\SetTitle{m}{%
+\NewDocumentCommand\SetTitle{m}{%
\SetVerticalCoffin{\Title}{114mm}{%
- \vspace*{0.5mm}% <== ASME doesn't align bar and text
- \noindent\Huge\CondSansBold\raggedright%
- #1%
- \par
+ \vspace*{0.5mm}% <== ASME doesn't align bar and text
+ \noindent\Huge\CondSansBold\raggedright%
+ #1%
+ \par
}
}
\providecommand{\@keywords}{\relax}
-\DeclareDocumentCommand{\keywords}{g}{%
- \IfNoValueTF{#1}{%
- \relax}{%
- \long\def\@keywords{\par\vskip\baselineskip\noindent{\keywordname:} #1}%
- }
+\NewDocumentCommand{\keywords}{m}{% changed to remove g option, 30/01/21
+ \long\def\@keywords{\par\vskip\baselineskip\noindent{\keywordname:} #1}%
}
-\DeclareDocumentCommand\SetAbstract{m}{%
+\NewDocumentCommand\@SetAbstract{+m}{% add + to enable blank lines, etc. 31/01/2021
\SetVerticalCoffin{\Abstract}{114mm}{%
- \noindent\itshape%
- #1
- \@keywords\par%
- \vspace*{4mm}% <== at bottom of abstract to extend rule
-}
+ \noindent\itshape%
+ #1
+ \@keywords\par%
+ \vspace*{4mm}% <== at bottom of abstract to extend rule
+ }
}
-\DeclareDocumentCommand{\ConstructAuthorBlock}{}{%
-\JoinCoffins\Title[l,b]\Abstract[l,t](0pt,-1.5\coffinsep)
-\setlength{\Titleheight}{\CoffinTotalHeight\Title}
-\ifdim\Titleheight>\rulecofheight
- \setlength{\rulecofheight}{\Titleheight}
-\else
- \addtolength{\rulecofheight}{7.0mm}
-\fi
-\SetHorizontalCoffin \ruleblock {\color{\@ColorName}\rule{2.1mm}{\rulecofheight}}
-\JoinCoffins\firstrowauthorblock[vc,r]\ruleblock[vc,l](\coffinsep,0pt)
-\JoinCoffins\firstrowauthorblock[vc,r]\Title[vc,l](\coffinsep,0pt)
-\centerline{\TypesetCoffin\firstrowauthorblock} %% in this instance, \centerline is better than \centering
+\NewDocumentCommand{\@ConstructAuthorBlock}{}{%
+ \JoinCoffins\Title[l,b]\Abstract[l,t](0pt,-1.5\coffinsep)
+ \setlength{\Titleheight}{\CoffinTotalHeight\Title}
+ \ifdim\Titleheight>\rulecofheight
+ \setlength{\rulecofheight}{\Titleheight}
+ \else
+ \addtolength{\rulecofheight}{7.0mm}
+ \fi
+ \SetHorizontalCoffin \ruleblock {\color{\@ColorName}\rule{2.1mm}{\rulecofheight}}
+ \JoinCoffins\firstrowauthorblock[vc,r]\ruleblock[vc,l](\coffinsep,0pt)
+ \JoinCoffins\firstrowauthorblock[vc,r]\Title[vc,l](\coffinsep,0pt)
+ \centerline{\TypesetCoffin\firstrowauthorblock} %% in this instance, \centerline is better than \centering
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Corresponding author gets footnote #1 and subsequent notes are 2, 3, ....
-%%% ASME apparently does not recognize joint first authors...so I have not coded that functionality
-
-%%%% Flag for corresponding author (just one expected, although this code supports more than one)
-%%%% for more than one CA, if including email addresses in the footnote, place them in final the command
-\newif\ifCA\CAfalse
-\newcommand{\CAemail}[1]{\gdef\@CAemail{#1}}
-
-
-% Allow for NO email address to be given by omitting second argument
-% ASME prefers email to be in address block, not CA footnote, although code can support the latter.
-\DeclareDocumentCommand{\CorrespondingAuthor}{g}{%
-\global\CAtrue%
- \IfNoValueTF{#1}{%
- \gdef\@CAsep{\relax}%
- \gdef\@CAemail{\relax}%
- }{%
- \gdef\@CAsep{:\space}%
- \gdef\@CAemail{#1}%
- }%
-\def\@makefnmark{\hbox{\@textsuperscript{\sffamily\@thefnmark}}}%
-\footnotemark%
-\addtocounter{footnote}{-1} % in case of more than one CA
-}
+%% Corresponding author gets footnote #1 and subsequent notes are 2, 3, ....
+%% ASME apparently does not recognize joint first authors...so I have not coded that functionality
+
+%% Flag for corresponding author (only one expected, although this code supports more than one)
+\newif\ifaj@CA\aj@CAfalse
+\newcommand{\CAemail}[1]{\gdef\@CAemail{#1}}% legacy code, drop eventually
+
+%% ASME prefers email to be in address block, not CA footnote; removed option 30/01/21
+\NewDocumentCommand{\CorrespondingAuthor}{}{%
+ \global\aj@CAtrue%
+ \gdef\@CAsep{\relax}% legacy code, drop eventually
+ \gdef\@CAemail{\relax}% legacy code, drop eventually
+ \def\@makefnmark{\hbox{\@textsuperscript{\sffamily\@thefnmark}}}%
+ \footnotemark%
+ \addtocounter{footnote}{-1}% in case of more than one CA
+}
%%%%%%%%%%
-\newlength{\@AbstractSep} %% <== separation of author/abstract coffin from main two-column text.
+\newlength{\@AbstractSep}%% <== separation of author/abstract coffin from main two-column text.
\setlength{\@AbstractSep}{12.5mm}
\NewDocumentCommand\AbstractSep{m}{\setlength{\@AbstractSep}{#1}}
-\DeclareDocumentCommand{\MakeTitlePage}{}{%
-\thispagestyle{title}%
-\twocolumn[
- \begin{@twocolumnfalse}
-\ConstructAuthorBlock
- \vspace*{\@AbstractSep}
- \end{@twocolumnfalse}
-]
-\ifCA
- \addtocounter{footnote}{1}
- \footnotetext{\CAwords\@CAsep \@CAemail}
-\fi
-\ifDate\revfootnote{\@Date} \else\relax \fi
+\NewDocumentCommand{\MakeTitlePage}{}{%
+ \thispagestyle{title}%
+ \twocolumn[
+ \begin{@twocolumnfalse}
+ \@ConstructAuthorBlock
+ \vspace*{\@AbstractSep}
+ \end{@twocolumnfalse}
+ ]
+ \ifaj@CA
+ \addtocounter{footnote}{1}
+ \footnotetext{\CAwords\@CAsep \@CAemail}% includes legacy code, remove \@CA commands eventually
+ \fi
+ \ifaj@Date\revfootnote{\@Date}\else\relax\fi
+ \ifaj@contractor\revfootnote{The United States Government retains, and by accepting the article for publication, the publisher acknowledges that the United States Government retains, a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this work, or allow others to do so, for United States Government purposes.}%
+ \fi
+ \ifaj@govt\revfootnote{This material is declared a work of the U.S. Government and is not subject to copyright protection in the United States. Approved for public release; distribution is unlimited.}%
+ \fi
+ \ifaj@govtsome\revfootnote{This work was authored in part by a U.\ S.\ Government employee in the scope of his/her employment. ASME disclaims all interest in the U.\ S.\ Government's contribution.}%
+ \fi
}
%%%%%%%%%%
@@ -836,23 +916,23 @@
\RenewDocumentCommand{\maketitle}{}{\MakeTitlePage}
\RenewDocumentCommand{\title}{}{\SetTitle}
-\RenewDocumentEnvironment{abstract}{+b}{\gdef\tmp{\SetAbstract{#1}}\aftergroup\tmp}{}
+\RenewDocumentEnvironment{abstract}{+b}{\gdef\tmp{\@SetAbstract{#1}}\aftergroup\tmp}{\ignorespaces}
%% Thanks to DPC for the suggestion of \gdef\tmp{...
%% Put date as an unnumbered footnote at bottom of first column
-\newif\ifDate\Datetrue % If true, print a date.
+\newif\ifaj@Date\aj@Datetrue% If true, print a date.
\ExplSyntaxOn
\RenewDocumentCommand{\date}{m}
{%
- \tl_if_empty:nTF {#1}{\global\Datefalse}{\gdef\@Date{#1}}%
+ \tl_if_empty:nTF {#1}{\global\aj@Datefalse}{\gdef\@Date{#1}}%
}
\providecommand\@Date{\today}
\ExplSyntaxOff
-\RenewDocumentCommand{\thanks}{m}{\relax} %% disabling this standard command, as it is inconsistent with the format
+\RenewDocumentCommand{\thanks}{m}{\relax}%% disabling this standard command, as it is inconsistent with this format
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%