summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/asmejour
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-23 21:32:49 +0000
committerKarl Berry <karl@freefriends.org>2021-12-23 21:32:49 +0000
commit2805a50c9f05126b7b1fafdd8e0e27b7a1d86112 (patch)
treecbb6fc15589af8ddfd84f31a9bd2c825047091e6 /Master/texmf-dist/tex/latex/asmejour
parent9da3d535952b004f6e351fb647ff49839fb410a0 (diff)
asmejour (23dec21)
git-svn-id: svn://tug.org/texlive/trunk@61388 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/asmejour')
-rw-r--r--Master/texmf-dist/tex/latex/asmejour/asmejour.cls344
1 files changed, 243 insertions, 101 deletions
diff --git a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
index e5a6b6bdc12..48c33b0ed88 100644
--- a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
+++ b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls
@@ -6,8 +6,8 @@
%%
%%
%% This file's version and date are:
- \def\versionno{1.15}
- \def\versiondate{2021/02/01\space}
+ \def\versionno{1.16}
+ \def\versiondate{2021/12/23\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -28,7 +28,8 @@
%% 10. Support inclusion of passages in languages other than English
%%
%% 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/).
+%% are in standard distributions, such as TeXLive, and are also available at CTAN (https://ctan.org/).
+%% The use of an up-to-date, complete distribution is strongly recommended.
%%
%% The title block is set by specific commands that are described in the asmejour-template.tex file.
%%
@@ -66,11 +67,24 @@
\LoadClass[twoside,9pt,twocolumn]{extarticle}
-\RequirePackage{xparse}% \entry{} command uses deprecated g argument; will drop this eventually
-\RequirePackage{etoolbox}% dropped xpatch 28/02/20
+\ifdefined\NewDocumentCommand\else
+ \RequirePackage{xparse}
+\fi
+
+\RequirePackage{etoolbox}% dropped xpatch 2020/02/28
\RequirePackage{ifthen}
\RequirePackage{iftex}% check whether pdftex or another engine is used
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% backward compatibility (Thanks Ulrike Fischer)
+
+\DeclareDocumentCommand\LogNote{m}{%
+ \IfFormatAtLeastTF{2021/11/15}{%
+ \ClassNoteNoLine{asmejour}{#1}% New with this recent format
+ }{%
+ \ClassWarningNoLine{asmejour}{#1}%
+ }
+}
+
%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{kvoptions}% this package calls kvsetkeys
@@ -107,7 +121,7 @@
\aj@mainsettrue
\ifthenelse{\equal{#1}{english}}{%
\PassOptionsToPackage{pdflang=en}{hyperref}}{%
- \ClassWarningNoLine{asmejour}{Selecting #1 as the primary language}%
+ \LogNote{Selecting #1 as the primary language}
}%
}
@@ -118,7 +132,7 @@
\aj@mainsettrue%
\ifthenelse{\equal{#1}{english}}{%
\relax}{%
- \ClassWarningNoLine{asmeconf}{Selecting #1 as the primary language}%
+ \LogNote{Selecting #1 as the primary language}%
}%
}
\define@key{asmejour}{lang-second}[english]{% deprecated option
@@ -132,9 +146,12 @@
\ifaj@mainset\relax\else
\PassOptionsToPackage{main=english}{babel}%
\PassOptionsToPackage{pdflang=en}{hyperref}
- %\ClassWarningNoLine{asmejour}{Selecting English as the primary language, since main= not set}%
+ \ClassInfo{Selecting English as the primary language, since main= not set}%
\fi
+%% Suppress warnings about unused global options, 2021/12/01
+\DeclareDefaultOption{}% suppress warning about unused mathalfa and barcolor options
+
\ProcessKeyvalOptions{asmejour}
%% Turn off these keys now that we're done with them
@@ -149,36 +166,40 @@
\@DisableKeys{nodefaultsups;mathalfa;barcolor;main;lang;lang-second;lang-third}
-%%%%%%% PDF/A Compliance Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%% PDF/A Compliance Keys %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifaj@setpdfa\aj@setpdfafalse
\newif\ifaj@pdfaone\aj@pdfaonefalse
-\ifpdftex %% PDF/A compliance has only been configured for pdflatex
+\ifpdftex %% pdf/a compliance has only been configured for pdflatex
%
-%%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
+ %%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
\define@key{pdfaopt}{pdf-a}[true]{%
\aj@setpdfatrue
\PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}%
-}
-%%% to select part 1, 2 or 3
+ }
+ %%% to select part 1, 2 or 3
\define@key{pdfaopt}{pdfapart}[3]{%
\PassOptionsToPackage{pdfapart=#1}{hyperref}%
\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.
+ }
+ %% 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]{%
\PassOptionsToPackage{pdfaconformance=#1}{hyperref}%
-}
- \ProcessKeyvalOptions{pdfaopt}
+ }
\else
- \ifaj@pdfaone\ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}\fi%
+ \define@key{pdfaopt}{pdf-a}[true]{%
+ \aj@setpdfatrue
+ }
\fi
+\ProcessKeyvalOptions{pdfaopt}
+
%% 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]
@@ -225,11 +246,11 @@
\newif\ifaj@contractor\aj@contractorfalse
\DeclareOption{contractor}{\aj@contractortrue}
-%% Option for slightly larger small capitals font [largesc], corrected 29 Jan 2021
+%% Option for slightly larger small capitals font [largesc], corrected 2021/01/29
\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.10em}{newtxtext}% increased shrink from 0.08, 30 Jan 21
+\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.10em}{newtxtext}% increased shrink from 0.08, 2021/01/30
%% Option not to use latex default superscripts, instead using the newtxtext superiors font [nodefaultsups]
\ifthenelse{\boolean{DefaultSups}}{\PassOptionsToPackage{defaultsups}{newtxtext}}{\relax}
@@ -242,7 +263,7 @@
%% Option to hyphenate the typewriter font [hyphenate]
\DeclareOption{hyphenate}{%
\PassOptionsToPackage{hyphenate}{inconsolata}%
- \ClassWarningNoLine{asmejour}{Allowing hyphenation of typewriter font}%
+ \LogNote{Allowing hyphenation of typewriter font}%
}
%% Option to enforce monospacing of words the typewriter font [mono]
\DeclareOption{mono}{%
@@ -253,7 +274,7 @@
\PassOptionsToPackage{var0}{inconsolata}% var0 is a key via xkeyval in inconsolata
}
-%% Suppress warnings about mathalfa keys as unused global options
+%% Suppress warnings about keys as unused global options
\DeclareOption*{}
\ProcessOptions \relax
@@ -266,7 +287,7 @@
%% 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)
+\AtBeginDocument{\def\NAT@space{\relax}}% ASME puts no space between numerical references (2020/04/05)
\setlength\bibsep{0pt plus 1pt minus 0pt}% ASME keeps this tight
\renewcommand*{\bibfont}{\footnotesize}
@@ -295,10 +316,9 @@
\renewcommand*{\midrule}{\specialrule{0.5pt}{2pt}{3pt}}
\renewcommand*{\bottomrule}{\specialrule{0.5pt}{1pt}{\doublerulesep}\specialrule{0.5pt}{0pt}{0pt}}
-%%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+%%%%%%%%%%%%% PDF/A related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdftex
- \ifaj@setpdfa
+ \ifaj@pdfaone
\pdfminorversion=4 % for pdf/a-1 need version 4, not 7
\else
\pdfminorversion=7 % this selection is not required
@@ -306,9 +326,25 @@
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}% for backward compatibility with pre-2018 LaTeX distributions
\else
- \relax % will lose some accented characters this way... better to use fontspec... if the systems fonts exist...
+ \ifaj@setpdfa\ClassWarningNoLine{asmejour}{pdf-a option requires pdfLaTeX engine. Under LuaLaTeX, use %
+ \protect\DeclareDocumentMetadata{pdfstandard=A-3b} before \protect\begin{document}}\fi%
+ \ifluatex
+ \directlua{
+ if pdf.getminorversion() \string~= 7 then
+ if (status.pdf_gone and status.pdf_gone > 0)
+ or (status.pdf_ptr and status.pdf_ptr > 0) then
+ tex.error("PDF version cannot be changed anymore")
+ else
+ pdf.setminorversion(7)
+ end
+ end
+ \fi
+ }% will lose some accented characters this way... better to use fontspec, if the systems fonts exist.
\fi
+
+%%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\RequirePackage{mathtools}% loads and extends amsmath
\RequirePackage[]{babel}
@@ -340,14 +376,13 @@
\tolerance 2500
\emergencystretch 3em
-\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
-
+%% 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)
%% This provides sans serif italic and sans serif bold italic math.
%% It's intended for use in the figure and table captions.
@@ -356,13 +391,13 @@
\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{largesymbols}{sansbold}{LMX}{ntxexx}{b}{n}% added 2021/01/26
+\SetSymbolFont{largesymbolsTXA}{sansbold}{U}{ntxexa}{b}{n}% added 2021/01/26
\SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n}
\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
+%% The accents from ntxsfmi work normally with regular times fonts. Added 2021/01/27
\DeclareSymbolFont{lettersAB}{U}{ntxsfmia}{m}{it}
\SetSymbolFont{lettersAB}{normal}{U}{ntxsfmia}{m}{it}
\SetSymbolFont{lettersAB}{bold}{U}{ntxsfmia}{b}{it}
@@ -379,8 +414,66 @@
\DeclareMathAccent{\dot}{\mathord}{lettersAB}{224}
\DeclareMathAccent{\tilde}{\mathord}{lettersAB}{219}
+%% Provide sans-serif *upright* Greek letters, following a suggestion by Michael Sharpe. 2021/12/22
+%% Following Sharpe's newtxsf implementation of the STIX fonts, under the LaTeX Project Public License.
+%% (Note that \mathversion{sansbold} provides sans-serif *italic* Greek letters.)
+
+\DeclareMathSymbol{\sfGamma}{\mathalpha}{lettersAB}{0}% adjust to avoid overwriting newtxmath commands,
+\DeclareMathSymbol{\sfDelta}{\mathalpha}{lettersAB}{1}
+\DeclareMathSymbol{\sfTheta}{\mathalpha}{lettersAB}{2}
+\DeclareMathSymbol{\sfLambda}{\mathalpha}{lettersAB}{3}
+\DeclareMathSymbol{\sfXi}{\mathalpha}{lettersAB}{4}
+\DeclareMathSymbol{\sfPi}{\mathalpha}{lettersAB}{5}
+
+\DeclareMathSymbol{\sfSigma}{\mathalpha}{lettersAB}{6}
+\DeclareMathSymbol{\sfUpsilon}{\mathalpha}{lettersAB}{7}
+\DeclareMathSymbol{\sfPhi}{\mathalpha}{lettersAB}{8}
+\DeclareMathSymbol{\sfPsi}{\mathalpha}{lettersAB}{9}
+\DeclareMathSymbol{\sfOmega}{\mathalpha}{lettersAB}{10}
+
+\DeclareMathSymbol{\sfalpha}{\mathalpha}{lettersAB}{11}
+\DeclareMathSymbol{\sfbeta}{\mathalpha}{lettersAB}{12}
+\DeclareMathSymbol{\sfgamma}{\mathalpha}{lettersAB}{13}
+\DeclareMathSymbol{\sfdelta}{\mathalpha}{lettersAB}{14}
+\DeclareMathSymbol{\sfepsilon}{\mathalpha}{lettersAB}{15}
+
+\DeclareMathSymbol{\sfzeta}{\mathalpha}{lettersAB}{16}
+\DeclareMathSymbol{\sfeta}{\mathalpha}{lettersAB}{17}
+\DeclareMathSymbol{\sftheta}{\mathalpha}{lettersAB}{18}
+\DeclareMathSymbol{\sfiota}{\mathalpha}{lettersAB}{19}
+\DeclareMathSymbol{\sfkappa}{\mathalpha}{lettersAB}{20}
+
+\DeclareMathSymbol{\sflambda}{\mathalpha}{lettersAB}{21}
+\DeclareMathSymbol{\sfmu}{\mathalpha}{lettersAB}{22}
+\DeclareMathSymbol{\sfnu}{\mathalpha}{lettersAB}{23}
+\DeclareMathSymbol{\sfxi}{\mathalpha}{lettersAB}{24}
+\DeclareMathSymbol{\sfpi}{\mathalpha}{lettersAB}{25}
+
+\DeclareMathSymbol{\sfrho}{\mathalpha}{lettersAB}{26}
+\DeclareMathSymbol{\sfsigma}{\mathalpha}{lettersAB}{27}
+\DeclareMathSymbol{\sftau}{\mathalpha}{lettersAB}{28}
+\DeclareMathSymbol{\sfUpsilon}{\mathalpha}{lettersAB}{29}
+\DeclareMathSymbol{\sfphi}{\mathalpha}{lettersAB}{30}
+
+\DeclareMathSymbol{\sfchi}{\mathalpha}{lettersAB}{31}
+\DeclareMathSymbol{\sfpsi}{\mathalpha}{lettersAB}{32}
+\DeclareMathSymbol{\sfomega}{\mathalpha}{lettersAB}{33}
+\DeclareMathSymbol{\sfvarepsilon}{\mathalpha}{lettersAB}{34}
+\DeclareMathSymbol{\sfvartheta}{\mathalpha}{lettersAB}{35}
+
+\DeclareMathSymbol{\sfvarpi}{\mathord}{lettersAB}{36}
+\DeclareMathSymbol{\sfvarrho}{\mathord}{lettersAB}{37}
+\DeclareMathSymbol{\sfvarsigma}{\mathord}{lettersAB}{38}
+\DeclareMathSymbol{\sfvarphi}{\mathord}{lettersAB}{39}
+\DeclareMathSymbol{\sfitvarkappa}{\mathalpha}{lettersAB}{40}
+\DeclareMathSymbol{\sfvarkappa}{\mathalpha}{lettersAB}{40}
+\DeclareMathSymbol{\sfitnabla}{\mathalpha}{lettersAB}{42}
+\DeclareMathSymbol{\sfnabla}{\mathalpha}{lettersAB}{43}
+\DeclareMathSymbol{\sfhslash}{\mathalpha}{lettersAB}{52}% this is not upright
+\DeclareMathSymbol{\sfhbar}{\mathalpha}{lettersAB}{53}% this is not upright
+
%%% sans math version, potential value with PGFPlots, and provisionally called in subfigure captions.
-%%% this is experimental, still needs stress testing. 30/01/2021
+%%% this is experimental, still needs stress testing. 2021/01/30
\DeclareMathVersion{sans}
\SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it}
\SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it}
@@ -391,13 +484,17 @@
\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)
+
+%%%%%%%%%%%%%%%%% Some adjustments to math layout %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\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
+
%%%%%%%%%%%%%%%%% Equation and Line Numbering %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -414,7 +511,7 @@
\renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}%
\AtBeginDocument{\linenumbers}%
\ifaj@balance
- \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing will be disabled}%
+ \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/
@@ -437,7 +534,7 @@
\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}%
+ \LogNote{Calling flushend package to balance column height on last page}%
\fi%
\fi
@@ -517,9 +614,9 @@
%% 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{\hspace{-3pt}#1}\end{NoHyper}}
+\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\def\@thefnmark{}\@footnotetext{\hspace{-3pt}#1}\end{NoHyper}}% \gdef -->\def 2021/12/23
-%% The above has been offset per style and modified to eliminate missing anchor warning from hyperref that following causes
+%% The above has been offset per style and modified to eliminate missing anchor warning from hyperref that the following version causes
%%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
@@ -603,36 +700,61 @@
%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifaj@setpdfa
-%
- %%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in newtx documentation.
- \pdfgentounicode=1 %% enable CMaps
- \input glyphtounicode.tex %% lists of mappings
- \InputIfFileExists{glyphtounicode-cmr.tex}{}{} %% additional mappings
- \InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings
-%
-%%% a fairly generic RGB color profile, aimed at on-screen rendering (not print production)
-\immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
-\pdfcatalog{%
- /OutputIntents [
- <<
- /Type /OutputIntent
- /S /GTS_PDFA1
- /DestOutputProfile \the\pdflastobj\space 0 R
- /OutputConditionIdentifier (sRGB)
- /Info (sRGB)
- >>
- ]
-}
+\newif\if@asme@pdfmanagement% Thanks to Ulrike Fischer
+\ExplSyntaxOn
+\bool_if:nTF
+ {
+ \bool_lazy_and_p:nn
+ {\cs_if_exist_p:N \pdfmanagement_if_active_p:}
+ { \pdfmanagement_if_active_p: }
+ }
+ {
+ \@asme@pdfmanagementtrue
+ }
+ {
+ \@asme@pdfmanagementfalse
+ }
+\ExplSyntaxOff
+
+\ifpdftex
+ %%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in the newtx documentation.
+ \IfFormatAtLeastTF{2020/10/01}{\relax}{%
+ \pdfgentounicode=1 %% enable CMaps; has moved into the latex kernel Oct 2020
+ \input glyphtounicode.tex %% lists of mappings; has moved into the latex kernel Oct 2020
+ }
+ \InputIfFileExists{glyphtounicode-cmr.tex}{}{} %% additional mappings
+ \InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings
+
+ \ifaj@setpdfa
+ %%%% the pdfmanagement options are experimental, from Ulrike Fischer 2021/06/12
+ \if@asme@pdfmanagement
+ \ClassInfo{asmejour}{pdfmanagement is defined. Class file will not load a color profile}
+ \else
+ \ClassInfo{asmejour}{pdfmanagement not defined. Class file will load a color profile}%
+ %%% a fairly generic RGB color profile, aimed at on-screen rendering (not print production)
+ \immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
+ \pdfcatalog{%
+ /OutputIntents [
+ <<
+ /Type /OutputIntent
+ /S /GTS_PDFA1
+ /DestOutputProfile \the\pdflastobj\space 0 R
+ /OutputConditionIdentifier (sRGB)
+ /Info (sRGB)
+ >>
+ ]
+ }
+ \fi
+ \fi
\fi
\RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf
-\RequirePackage[%
+\RequirePackage[psdextra]{hyperref} % recent kernel transition suggests providing most hyperref options via \hypersetup,
+ % but setting psdextra here (for additional math support in bookmarks) 2021/12/23
+\hypersetup{%
unicode, % Unicode encoded PDF strings
- psdextra, % additional support for math in pdf bookmarks
pdfborder={0 0 0},%
- bookmarks=true, %
bookmarksnumbered=true,%
bookmarksopen=true,%
bookmarksopenlevel=1,%
@@ -640,29 +762,32 @@
linkcolor=blue, %
citecolor=blue, %
urlcolor=blue, %
- breaklinks=true,%
- pdftitle={}, % <=== add in .tex file
- pdfkeywords={}, % <=== add in .tex file
+ filecolor=red, % added 2021/12/23, to make certain broken links more apparent
pdfnewwindow=true,%
- pdfpagelayout=SinglePage, %TwoPageRight,% changed 12/08/2020
- pdfauthor={}, % <=== add in .tex file
+ pdfpagelayout=SinglePage, %TwoPageRight,% changed 2020/08/12
pdfdisplaydoctitle=true%
- ]{hyperref}
+}
\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
+\providecommand\hrefurl[2]{\href{#1}{#2}}% to address certain issues around URL recognition with new pdf management code, 2021/12/22
+%% This alias is also incorporated into asmejour.bst
+
%%%%%% Adjustments to accommodate hyperref bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% ==> recent and evolving development of \pdfstring removes all robust commands from bookmarks, so
+%%% the following interventions may become unnecessary over time (2021/12/23).
+
%% 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}
\pdfstringdefDisableCommands{%
\def\bm#1#{\relax}%
}
-%% Let's disable \( and \) in pdf bookmarks, 28/2/20
+%% Let's disable \( and \) in pdf bookmarks, 2020/02/28
\pdfstringdefDisableCommands{%
\def\({\relax}%
\def\){\relax}%
@@ -673,7 +798,7 @@
\def\cite{\@gobble}%
}
-%% Ensure that tag color does not follow \eqref into bookmarks, 28/2/20
+%% Ensure that tag color does not follow \eqref into bookmarks, 2020/02/28
\pdfstringdefDisableCommands{%
\def\eqref#1{(\ref{#1})}%
}
@@ -694,7 +819,7 @@
{\svsection*{#3}\phantomsection%
{\IfNoValueTF {#2}
{\addcontentsline{toc}{section}{#3}}
- {\addcontentsline{toc}{section}{#2}}% remove trailing space 28/2/20
+ {\addcontentsline{toc}{section}{#2}}% remove trailing space 2020/02/28
}%
}
{\IfNoValueTF {#2}
@@ -722,21 +847,36 @@
\newlength\nomenwidth
\newlength\savitemsep
+%% ==> xparse "g" argument used in this version of \entry is deprecated; so have phased out this version, 2021/12/22
%% If the second argument of \entry is omitted, a bold section heading is produced, e.g. \entry{Greek Letters}
-\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%
- }
+%\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%
+% }
+%}
+
+\NewDocumentCommand{\entry}{m m}{%
+\ifblank{#2}{%
+ \ClassWarningNoLine{asmejour}{The command \protect\entry should have two arguments. For subheadings, \protect\EntryHeading is preferred}
+ \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)
+%% A separate command command for nomenclature subheadings
\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%
@@ -783,7 +923,7 @@
]%
}%
\else
- \ClassWarningNoLine{asmejour}{Omitting lists of figures and tables}%
+ \LogNote{Omitting lists of figures and tables}%
\fi
%%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -796,7 +936,9 @@
\NewCoffin{\Title}
\NewCoffin{\firstrowauthorblock}
-\SetHorizontalCoffin\firstrowauthorblock{}
+\AtBeginDocument{%
+ \SetHorizontalCoffin\firstrowauthorblock{}%
+}% corrected 2021/12/22
\newlength{\coffinsep}%%% space between coffins
\setlength{\coffinsep}{4.5mm}
@@ -836,11 +978,11 @@
}
\providecommand{\@keywords}{\relax}
-\NewDocumentCommand{\keywords}{m}{% changed to remove g option, 30/01/21
+\NewDocumentCommand{\keywords}{m}{% changed to remove g option, 2021/01/30
\long\def\@keywords{\par\vskip\baselineskip\noindent{\keywordname:} #1}%
}
-\NewDocumentCommand\@SetAbstract{+m}{% add + to enable blank lines, etc. 31/01/2021
+\NewDocumentCommand\@SetAbstract{+m}{% add + to enable blank lines, etc. 2021/01/31
\SetVerticalCoffin{\Abstract}{114mm}{%
\noindent\itshape%
#1
@@ -872,7 +1014,7 @@
\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
+%% ASME prefers email to be in address block, not CA footnote; removed option 2021/01/30
\NewDocumentCommand{\CorrespondingAuthor}{}{%
\global\aj@CAtrue%
\gdef\@CAsep{\relax}% legacy code, drop eventually
@@ -898,7 +1040,7 @@
]
\ifaj@CA
\addtocounter{footnote}{1}
- \footnotetext{\CAwords\@CAsep \@CAemail}% includes legacy code, remove \@CA commands eventually
+ \footnotetext{\CAwords\@CAsep \@CAemail}% includes legacy code, will 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.}%