summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/asmeconf/asmeconf.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/asmeconf/asmeconf.cls')
-rw-r--r--macros/latex/contrib/asmeconf/asmeconf.cls1111
1 files changed, 461 insertions, 650 deletions
diff --git a/macros/latex/contrib/asmeconf/asmeconf.cls b/macros/latex/contrib/asmeconf/asmeconf.cls
index 31cb16cb71..186e5d4941 100644
--- a/macros/latex/contrib/asmeconf/asmeconf.cls
+++ b/macros/latex/contrib/asmeconf/asmeconf.cls
@@ -2,11 +2,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% This file provides the asmeconf LaTeX class for formatting conference papers according to
-%% ASME conference requirements as represented on ASME's conference web pages in 2022.
+%% ASME conference requirements as represented on ASME's conference web pages in 2024.
%%
%% This file's version and date:
- \def\versionno{1.36}
- \def\versiondate{2023/11/19\space}
+ \def\versionno{1.37}
+ \def\versiondate{2024/02/06\space}
%%
%% Author: John H. Lienhard, V
%% Department of Mechanical Engineering
@@ -27,19 +27,16 @@
%% 10. Enable various math and text features from the newtxmath and newtxtext packages
%% 11. Support inclusion of passages in languages other than English
%%
-%% This class is compatible with either pdfLaTeX or LuaLaTeX. FontSpec may be loaded as an option (to
-%% access language-specific fonts), but the class does not support unicode-math.
+%% This class is compatible with either pdfLaTeX or LuaLaTeX. Fontspec will load automatically with LuaLaTeX,
+%% but the class does not support unicode-math. To use LuaLaTeX without fontspec, call the [nofontspec] option.
%%
-%% Use an up-to-date LaTeX distribution: for pdfLaTeX, TeX Live 2016 or later; for LuaLaTeX, TeX Live 2021 or later.
+%% Use an up-to-date LaTeX distribution: for pdfLaTeX, TeX Live 2020 or later; for LuaLaTeX, TeX Live 2021 or later.
%% A complete LaTeX installation is also recommended: asmeconf loads ~30 packages, in addition to LaTeX core packages.
%% All packages required by the class are in TeXLive and CTAN (https://ctan.org/).
%%
%% Commands for entering conference headers and author names are specific to this class.
%% See asmeconf-template.tex for details.
%%
-%% The \section[]{} command's optional argument is changed to better support pdf bookmarks,
-%% and \section* is modified similarly.
-%%
%% The class defines abstract (with keywords), abstract* (no keywords), and nomenclature environments.
%% The latter has an optional argument to control the space between the entries and the definitions.
%%
@@ -47,7 +44,7 @@
%%
%% LICENSE:
%%
-%% Copyright (c) 2023 John H. Lienhard
+%% Copyright (c) 2024 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,
@@ -72,83 +69,100 @@
\LoadClass[twoside,twocolumn,10pt]{article}
% Even/odd page layout is not used in ASME's specs, although the papers are printed in two-sided format.
-\ifdefined\NewDocumentCommand\else
- \RequirePackage{xparse} % enable older installations to access features recently moved into LaTeX kernel
-\fi
+\RequirePackage{iftex}% provides \ifpdftex (many) & \ifluatex (once)
+\RequirePackage{ifthen}% ifthenelse (many) & \whiledo (once)
+\RequirePackage{etoolbox}% using patchcmd in 4 places
-\RequirePackage{etoolbox}
-\RequirePackage{ifthen}
%%%%%%%%%%%%% Test compatibility of older distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date; \If... added to latex 2020/10/01
+\providecommand\IfPackageAtLeastTF{\@ifpackagelater}% compare version to date; \If... added to latex 2020/10/01
+\providecommand\IfPackageLoadedTF{\@ifpackageloaded}% \If...added to latex 2021/11/15
-\IfFormatAtLeastTF{2017/04/15}{%
- \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions 2020 or later are strongly recommended for best results}
+\IfFormatAtLeastTF{2020/10/01}{%
+ \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions 2020/10/01 or later are strongly recommended for best results}
}{%
- \ClassIF{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2020 or later are recommended for the asmeconf class. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You can try to click past the errors for now.}%
+ \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2020/10/01 or later are recommended for the asmejour class. Older formats and packages may generate errors or fail entirely!}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You can try to click past the errors for now.}%
}
-
+
+\ifdefined\NewDocumentCommand\else
+ \RequirePackage{xparse}% enable older installations to access features in LaTeX kernel since 2020/10/01; but need at least 2018/04...
+\fi
+
\DeclareDocumentCommand\LogNote{m}{%
- \IfFormatAtLeastTF{2021/11/01}{%
- \ClassNoteNoLine{asmeconf}{#1}%
+ \IfFormatAtLeastTF{2021/11/15}{%
+ \ClassNoteNoLine{asmeconf}{#1}% Added to LaTeX in Nov. 2021
}{%
\ClassWarningNoLine{asmeconf}{#1}%
}
}
-%% provide iftex command \ifpdftex for those still running old distributions
-\IfFormatAtLeastTF{2019/11/07}{%
- \RequirePackage{iftex}[2019/11/07]% check whether pdftex or another engine is used
- }{%
- \LogNote{The asmeconf class requires the missing package iftex---trying a work-around.}
- % Code copied from iftex package written by the LaTeX3 Project (used under LPPL).
- \def\IFTEX@let#1#2{%
- \expandafter\let\csname if#1\expandafter\endcsname
- \csname if#2\endcsname}
- % pdftex (including in dvi mode)
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdftexversion\endcsname\relax
- \IFTEX@let{pdftex}{false}
- \else
- \IFTEX@let{pdftex}{true}
- \fi
- \IFTEX@let{PDFTeX}{pdftex}
+\IfPackageAtLeastTF{iftex}{2019/11/07}{\relax}{%
+ \ClassError{asemconf}{Package iftex is too old. Go to \string https://ctan.org and download an up-to-date version.}%
}
+%% Test whether \DocumentMetadata has been loaded (Thank you Ulrike Fischer)
+\newif\if@asme@pdfmanagement
+% \IfPDFManagementActiveTF{\@asme@pdfmanagementtrue}{\@asme@pdfmanagementfalse}% New 2021/07/23, don't implement yet
+\ExplSyntaxOn
+ \IfFormatAtLeastTF{2020/02/02}{%
+ \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
+ }
+ }{\@asme@pdfmanagementfalse}
+\ExplSyntaxOff
+
+
%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
- family=asmeconf,
- prefix=asmeconf@,
- family=pdfaopt,
- prefix=pdafopt@,
- setkeys=\kvsetkeys,
+ family=asmeconf,
+ prefix=asmeconf@,
+ setkeys=\kvsetkeys,
}
%%% set key [colorlinks] to have colored hyperlinks, rather than black links (use a key with new pdfmanagement, 2021/12/01)
\define@key{asmeconf}{colorlinks}[colorlinks]{%
- \PassOptionsToPackage{#1}{hyperref}%
+ \PassOptionsToPackage{#1}{hyperref}%
}
-%%% for mathalfa, we may now pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
-\define@key{asmeconf}{mathalfa}{%
- \PassOptionsToPackage{#1}{mathalfa}%
-}
+%% Option for caption text not to use boldface type [unboldcaption]
+\DeclareBoolOption{unboldcaption}
-%%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
-\newboolean{DefaultSups}\setboolean{DefaultSups}{true}
-\define@key{asmeconf}{nodefaultsups}[false]{%
- \setboolean{DefaultSups}{#1}
-}
+%% Option to obtain line numbers [lineno]
+\DeclareBoolOption{lineno}
-%%% set key [unboldcaption] for caption text not to use boldface type.
-\newif\ifac@unboldcaption\ac@unboldcaptionfalse
-\define@key{asmeconf}{unboldcaption}[false]{%
- \ac@unboldcaptiontrue
-}
-% (with two key families active, \DeclareBoolOption has problems..)
+%% Option to balance column height on last page [balance]
+\DeclareBoolOption{balance}
+
+%% Option to convert inline author data to a grid of authors
+\DeclareBoolOption{grid}
+
+%% Option for copyright notice if all authors are government employees [govt]
+\DeclareBoolOption{nofoot}
+
+%% Option for copyright notice if all authors are government employees [govt]
+\DeclareBoolOption{govt}
+
+%% Option for copyright notice if some (not all) authors are government employees [govtsome]
+\DeclareBoolOption{govtsome}
+
+%% Option for government contractor copyright notice [contractor]
+\DeclareBoolOption{contractor}
+
+%% Option NOT to use fontspec package under luaLaTeX [nofontspec]
+\DeclareBoolOption{nofontspec}
%%% Use these switches to load other alphabets for Cyrillic, Greek, Japanese, and Vietnamese text
\newif\ifac@cyrillic\ac@cyrillicfalse
@@ -189,29 +203,12 @@
}
\define@key{asmeconf}{vietnamese}[]{%
\RequirePackage[vietnamese=nohyphenation]{hyphsubst}% using key, not option, to allow loading package w/o babel warning.
- \PassOptionsToPackage{vietnamese}{babel}%
+ \PassOptionsToPackage{vietnamese.noencoding}{babel}% modified.noencoding suppresses unnecessary warning about inputenc
\ac@vietnamesetrue
\def\ac@Tfive{T5}%
}
-%%% only main= is actually needed, but keeping these legacy commands for backward compatibility
-\define@key{asmeconf}{lang}[english]{% deprecated option
- \PassOptionsToPackage{main=#1,#1}{babel}%
- \PassOptionsToPackage{pdflang=en}{hyperref}
- \ac@mainsettrue%
- \ifthenelse{\equal{#1}{english}}{%
- \relax}{%
- \LogNote{Selecting #1 as the primary language}%
- }%
-}
-\define@key{asmeconf}{lang-second}[english]{% deprecated option
- \PassOptionsToPackage{#1}{babel}%
-}
-\define@key{asmeconf}{lang-third}[english]{% deprecated option
- \PassOptionsToPackage{#1}{babel}%
-}
-
-\DeclareDefaultOption{}% suppress warning about unused mathalfa option, 2021/06/15
+\DeclareDefaultOption{}% suppress warnings about unused options
\ProcessKeyvalOptions{asmeconf}
%% if main language was not chosen explicitly, default to English
@@ -225,13 +222,155 @@
\def\@KeyFamily{asmeconf}
\NewDocumentCommand\ac@DisableOption{m}{%
\DisableKeyvalOption[%
- action=ignore,%
- class=asmeconf%
+ action=ignore,%
+ class=asmeconf%
]{#1}{\@KeyFamily}%
}
\NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\ac@DisableOption}}
-\@DisableKeys{main;lang;nodefaultsups;mathalfa;lang-second;lang-third;vietnamese}
+\@DisableKeys{colorlinks;unboldcaption;lineno;balance;grid;nofoot;govt;govtsome;contractor;nofontspec;main;vietnamese}
+
+
+%%%%%%%%% Various font-related options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\SetupKeyvalOptions{
+ family=acfonts,
+ prefix=acfonts@,
+ setkeys=\kvsetkeys,
+}
+
+%%% for mathalfa, we may now pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
+\define@key{acfonts}{mathalfa}{%
+ \PassOptionsToPackage{#1}{mathalfa}%
+}
+
+%% option for slightly larger small capitals font, via newtxtext
+\DeclareOption{largesc}{%
+ \ifpdftex
+ \PassOptionsToPackage{largesc=true}{newtxtext}% largesc is a boolean key in newtxtext
+ \else
+ \ClassWarningNoLine{asmeconf}{largesc option is not available under luaLateX. It will be ignored}%
+ \fi
+}
+
+%% Disable newtxtext osf option, which is not appropriate for documents in this class
+\DeclareOption{osf}{%
+ \PassOptionsToPackage{lining}{newtxtext}%
+}
+
+%% option to hyphenate the inconsolata typewriter font [hyphenate] and to issue a warning when that's done.
+\DeclareOption{hyphenate}{%
+ \ifac@fontspec
+ \ClassWarningNoLine{asmeconf}{hyphenate option is not supported by fontspec, will be ignored}%
+ \else
+ \PassOptionsToPackage{hyphenate}{inconsolata}% hyphenate is a key via xkeyval in inconsolata
+ \LogNote{Allowing hyphenation of typewriter font}%
+ \fi
+}
+%% option for monospacing in inconsolata typewriter font [mono].
+\DeclareOption{mono}{%
+ \ifac@fontspec
+ \def\MonoNotMono{}%
+ \else
+ \PassOptionsToPackage{mono}{inconsolata}% mono is a key via xkeyval in inconsolata
+ \fi
+}
+%% option for unslashed zero in inconsolata typewriter font [var0].
+\DeclareOption{var0}{%
+ \ifac@fontspec
+ \def\ssztwo{+ss02}% stylistic alternate for regular zero
+ \else
+ \PassOptionsToPackage{var0}{inconsolata}% var0 is a key via xkeyval in inconsolata
+ \fi
+}
+
+\ProcessKeyvalOptions{acfonts}%
+\def\@KeyFamily{acfonts}
+\@DisableKeys{mathalfa;largesc;osf;hyphenate;mono;var0}
+
+
+%%%%%%% PDF/A Compliance Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% new pdf management in LaTeX, with \DocumentMetaData{..}, is preferred to this approach.
+
+\newif\ifac@setpdfa\ac@setpdfafalse
+\newif\ifac@pdfaone\ac@pdfaonefalse
+
+\if@asme@pdfmanagement\else
+
+ \SetupKeyvalOptions{
+ family=pdfaopt,
+ prefix=pdafopt@,
+ setkeys=\kvsetkeys,
+ }
+ \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]{%
+ \IfFormatAtLeastTF{2018/12/01}{\relax}{%
+ \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2018/12/01 or later are necessary for the [pdf-a] option. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. Meanwhile, you can remove the [pdf-a] option and try again}%
+ }
+ \ac@setpdfatrue
+ \PassOptionsToPackage{pdfa}{hyperref}
+ \AtBeginDocument{\hypersetup{pdfapart=3,pdfaconformance=u}}% note: hyperref takes these options if hyperxmp is loaded
+ }
+ %%% to select part 1, 2 or 3
+ \define@key{pdfaopt}{pdfapart}[3]{%
+ \def\asmeconf@tempa{#1}
+ \AtBeginDocument{\hypersetup{pdfapart=\asmeconf@tempa}}
+ \ifthenelse{\equal{#1}{1}}{\ac@pdfaonetrue}{\relax}%
+ }
+ %%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
+ \ExplSyntaxOn
+ \define@key{pdfaopt}{pdfaconformance}[u]{%
+ \str_set:Ne \l_tmp_str { \str_uppercase:n {#1} }
+ % \typeout{\l_tmp_str}
+ \AtBeginDocument{\hypersetup{pdfaconformance=\l_tmp_str}}
+ }
+ \ExplSyntaxOff
+ \else
+ \define@key{pdfaopt}{pdf-a}[true]{%
+ \ac@setpdfatrue
+ }
+ \fi
+
+ \ProcessKeyvalOptions{pdfaopt}%
+
+ %% Done with these keys, so we can now disable them
+ \def\@KeyFamily{pdfaopt}
+ \@DisableKeys{pdf-a;pdfapart;pdfaconformance}
+\fi
+
+
+%%%%%%%%%%%% PDF/A compliance related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\if@asme@pdfmanagement\else
+ \ifpdftex
+ \ifac@pdfaone
+ \pdfminorversion=4 % for pdf/a-1 need version 4, not 7
+ \else
+ \pdfminorversion=7 % this selection is not essential.
+ \fi
+ \else
+ \ifluatex
+ \ifac@setpdfa\ClassWarningNoLine{asmeconf}{pdf-a option requires pdfLaTeX engine. Under LuaLaTeX, use %
+ \protect\DocumentMetadata{pdfstandard=A-3b} before \protect\documentclass[..]{asmeconf}}%
+ \fi
+ \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
+ }
+ \else
+ \ClassError{asmeconf}{Please use either pdfLaTeX or LuaLaTeX}{This class has NOT been configured to support other engines, and the results will be unpredictable. Exit and rerun using either pdfLaTeX or LuaLaTeX.}%
+ \fi
+ \fi
+\fi
%%%%%%%%%%%%% More Language options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -239,28 +378,32 @@
%%% option to use fontspec [fontspec] (for complex language-specific fonts)
\newif\ifac@fontspec\ac@fontspecfalse
\newif\iffontspecloaded\fontspecloadedfalse% so user can test in .tex file
-\DeclareOption{fontspec}{%
- \ifpdftex
- \ClassWarningNoLine{asmeconf}{fontspec option requires LuaLaTeX, will be ignored under pdfLaTeX}%
+
+\ifpdftex
+ \ifasmeconf@nofontspec
+ \ClassWarningNoLine{asmeconf}{The [nofontspec] option requires LuaLaTeX. It will be ignored under pdfLaTeX}%
+ \fi
+\else
+ \ifasmeconf@nofontspec
+ \ClassWarningNoLine{asmeconf}{The [nofontspec] option has been issued. LuaLaTeX will run without font support}%
\else
- \IfFormatAtLeastTF{2020/10/01}{%
- \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions after 2020 are needed with [fontspec] for language support}
+ \IfFormatAtLeastTF{2020/10/01}{%
\ac@fontspectrue
\fontspecloadedtrue
\def\ssztwo{}% for Inconsolatazi4; default uses slashed zero, +ss02 uses regular zero
\def\MonoNotMono{WordSpace={1,1.33,1.67}}% for Inconsolatazi4; default allows word spacing (is not mono)
- }{%
- \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX installations dated 2020/10/01 or later are needed for the [fontspec] option. Option [fontspec] will be ignored. Language support will be minimal}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/}%
- }
+ }{%
+ \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX installations dated 2020/10/01 or later are needed to run LuaLaTeX with the fontspec package. Fontspec will NOT be loaded. Language support will be minimal}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You may alternatively choose the [nofontspec] option.}%
+ }
\fi
-}
+\fi
\DeclareOption{japanese}{% mainly to control loading of fontspec options
\ifac@fontspec
\PassOptionsToPackage{japanese}{babel}%
\ac@japanesetrue
\else
- \ClassWarningNoLine{asmeconf}{japanese option is supported only with the [fontspec] option + LuaLaTeX. It will be ignored}%
+ \ClassWarningNoLine{asmeconf}{[japanese] option is supported only under LuaLaTeX with fontspec. It will be ignored}%
\fi
}
@@ -301,147 +444,11 @@
%
\DeclareOption{tamil}{\ClassError{asmeconf}{Do not specify "tamil" as a class option}{Babel does not have an ldf file for Tamil. Instead, specify "tamil" when you call the language within your document. No class option is needed.}}
-
-%%%%%%% PDF/A Compliance Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\newif\ifac@setpdfa\ac@setpdfafalse
-\newif\ifac@pdfaone\ac@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]{%
- \IfFormatAtLeastTF{2018/12/01}{%
- \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions 2019 or later are necessary with the [pdf-a] option}
- }{%
- \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2018/12/01 or later are necessary for the [pdf-a] option. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. Meanwhile, you can remove the [pdf-a] option and try again}%
- }
- \ac@setpdfatrue
-% \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
- \PassOptionsToPackage{pdfa}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
- \AtBeginDocument{\hypersetup{pdfapart=3,pdfaconformance=u}}
- }
- %%% to select part 1, 2 or 3
- \define@key{pdfaopt}{pdfapart}[3]{%
-% \PassOptionsToPackage{pdfapart=#1}{hyperref}%
- \def\asmeconf@tempa{#1}
- \AtBeginDocument{\hypersetup{pdfapart=\asmeconf@tempa}}
- \ifthenelse{\equal{#1}{1}}{\ac@pdfaonetrue}{\relax}%
- }
- %%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
- \ExplSyntaxOn
- \define@key{pdfaopt}{pdfaconformance}[u]{%
-% \PassOptionsToPackage{pdfaconformance=#1}{hyperref}%
- \str_set:Ne \l_tmp_str { \str_uppercase:n {#1} }
-% \typeout{\l_tmp_str}
- \AtBeginDocument{\hypersetup{pdfaconformance=\l_tmp_str}}
- }
- \ExplSyntaxOff
-\else
- \define@key{pdfaopt}{pdf-a}[true]{%
- \ac@setpdfatrue
- }
-\fi
-
-\ProcessKeyvalOptions{pdfaopt}%
-
-%% Done with these keys, so we can now disable them
-\def\@KeyFamily{pdfaopt}
-\@DisableKeys{pdf-a;pdfapart;pdfaconformance}
-
-
-%%%%%%%%% Miscellaneous options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% option to balance column height on last page [balance]
-\newif\ifac@balance\ac@balancefalse
-\DeclareOption{balance}{%
- \ac@balancetrue
- \LogNote{Loading flushend package to balance column height on last page}%
-}
-
-%%% option to obtain line numbers [lineno]
-\newif\ifac@lineno\ac@linenofalse
-\DeclareOption{lineno}{\ac@linenotrue}
-
-%% option to omit ASME footer [nofoot]
-\newif\ifac@nofoot\ac@nofootfalse
-\DeclareOption{nofoot}{\ac@nofoottrue}
-
-
-%%% option [contractor] to obtain government contractor copyright notice.
-\newif\ifac@contractor\ac@contractorfalse
-\DeclareOption{contractor}{\ac@contractortrue}
-
-%%% option [govt] to obtain government employee copyright notice.
-\newif\ifac@govt\ac@govtfalse
-\DeclareOption{govt}{\ac@govttrue}
-
-%% option to convert inline author data to a grid of authors
-\newboolean{grid}\setboolean{grid}{false}
-\DeclareOption{grid}{%
- \setboolean{grid}{true}%
- \LogNote{Selected option for a grid of author blocks}%
-}
-%% option to directly use grid of authors
-\newboolean{Oldauthors}\setboolean{Oldauthors}{false}
-\DeclareOption{authorgrid}{%
- \setboolean{Oldauthors}{true}%
- \LogNote{Selected option for a grid of author blocks}%
-}
-\DeclareOption{oldauthors}{%% deprecated, but retained for backward compatibility
- \setboolean{Oldauthors}{true}%
- \LogNote{Selected option for a grid of author blocks}%
-}
-
-%% option for slightly larger small capitals font, via newtxtext
-\DeclareOption{largesc}{%
- \ifac@fontspec
- \ClassWarningNoLine{asmeconf}{largesc option is not available under fontspec, will be ignored}%
- \else
- \PassOptionsToPackage{largesc=true}{newtxtext}% largesc is a boolean key in newtxtext
- \fi
-}
-
-%% 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] and to issue a warning when that's done.
-\DeclareOption{hyphenate}{%
- \ifac@fontspec
- \ClassWarningNoLine{asmeconf}{hyphenate option is not supported by fontspec, will be ignored}%
- \else
- \PassOptionsToPackage{hyphenate}{inconsolata}% hyphenate is a key via xkeyval in inconsolata
- \LogNote{Allowing hyphenation of typewriter font}%
- \fi
-}
-%% option for monospacing in typewriter font [mono].
-\DeclareOption{mono}{%
- \ifac@fontspec
- \def\MonoNotMono{}%
- \else
- \PassOptionsToPackage{mono}{inconsolata}% mono is a key via xkeyval in inconsolata
- \fi
-}
-%% option for unslashed zero typewriter font [var0].
-\DeclareOption{var0}{%
- \ifac@fontspec
- \def\ssztwo{+ss02}% stylistic alternate for regular zero
- \else
- \PassOptionsToPackage{var0}{inconsolata}% var0 is a key via xkeyval in inconsolata
- \fi
-}
-
-\ifthenelse{\boolean{DefaultSups}}{%
- \ifac@fontspec\relax\else
- \PassOptionsToPackage{defaultsups=true}{newtxtext}% defaultsups is a boolean key in newtxtext
- \fi}{\relax}
-
%% Suppress warnings about unused global options
\DeclareOption*{}
-\ProcessOptions \relax
+\ProcessOptions \relax %% end of options section
+
%%%%%%%%%%%%% Geometry, bibliography, graphics, colors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -452,9 +459,18 @@
\RequirePackage[sort&compress,numbers]{natbib}
\setlength\bibsep{1pt plus 1pt minus 1pt}
-\RequirePackage{graphicx} % remove obsolete options, 2023/11/19
+\RequirePackage{graphicx} % removed obsolete options, 2023/11/19
\RequirePackage[dvipsnames,svgnames,x11names]{xcolor}
+% Allow pre 2021/11/15 formats to see the graphicx alt key without causing an error, in preparation for tagged pdf
+\IfFormatAtLeastTF{2021/11/15}{
+ \relax
+}{
+ \AtBeginDocument{
+ \IfPackageLoadedTF{graphicx}{\define@key{Gin}{alt}{}}{\relax}
+ }
+}
+
%%%%%%%%%%%% Table related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{booktabs}
@@ -464,41 +480,12 @@
\newcolumntype{d}[1]{D{.}{.}{#1}}% NB: This conflicts with babel's Spanish language option which makes "." an active character.
% To use "," separator, put this command in your preamble: \newcolumntype{d}[1]{D{,}{,}{#1}}
-%%%%%%%%%%%% PDF/A compliance related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\ifpdftex % moved fontenc 2021/01/31
- \ifac@pdfaone
- \pdfminorversion=4 % for pdf/a-1 need version 4, not 7
- \else
- \pdfminorversion=7 % this selection is not essential.
- \fi
- \RequirePackage[\ac@TtwoA,\ac@LGR,\ac@Tfive,T1]{fontenc}% T2A - Cyrillic (w/o babel warning); LGR - Greek; T5 - Vietnamese; put T1 last 22/03/10
- \RequirePackage[utf8]{inputenc} % for backward compatibility with pre-2018 LaTeX distributions
-\else
- \ifluatex
- \ifac@setpdfa\ClassWarningNoLine{asmeconf}{pdf-a option requires pdfLaTeX engine. Under LuaLaTeX, use %
- \protect\DocumentMetadata{pdfstandard=A-3b} before \protect\documentclass[..]{asmeconf}}%
- \fi
- \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
- }
- \else
- \ClassError{asmeconf}{Please use either pdfLaTeX or LuaLaTeX}{This class has NOT been configured to support other engines, and the results will be unpredictable. Your best course of action is to exit and rerun using either pdfLaTeX or LuaLaTeX.}%
- \fi
-\fi
%%%%%%%%% Caption related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Needs to come before babel messes with captions, to keep uppercase text. 2021/12/25
+%% Needs to come before babel messes with the captions, to keep uppercase text. 2021/12/25
-\ifx\AddToNoCaseChangeList\@undefined % updated July 3, see https://github.com/John02139/asmeconf/issues/5
+\ifx\AddToNoCaseChangeList\@undefined % updated 2022/07/03, see https://github.com/John02139/asmeconf/issues/5
\RequirePackage{textcase} %% Allows uppercase titles and captions without errors from math and citations
\typeout{Asmeconf is loading textcase package.}
\else
@@ -512,7 +499,7 @@
\DeclareCaptionTextFormat{boldmath}{\mathversion{sansbold}#1}
\DeclareCaptionTextFormat{sansmath}{\mathversion{sans}#1}
-\ifac@unboldcaption
+\ifasmeconf@unboldcaption
\captionsetup[figure]{labelformat=uppercase,labelfont={sf,bf,small},textfont={sf,md,small},textformat=sansmath,labelsep=colon}
\captionsetup[table]{labelformat=uppercase,labelfont={sf,bf,small},textfont={sf,md,small},textformat=sansmath,labelsep=colon,skip=0.5\baselineskip}
\else
@@ -531,8 +518,13 @@
\RequirePackage{mathtools}% loads and extends amsmath
-%\def\BabelCaseHack{} %see https://github.com/latex3/babel/issues/193; using this will affect Medieval Latin and a few other languages.
-% Babel update has corrected this issue 24 October 2022.
+\ifpdftex
+ % must load before babel
+ \RequirePackage[\ac@TtwoA,\ac@LGR,\ac@Tfive,T1]{fontenc}
+ % T2A - Cyrillic (w/o babel warning); LGR - Greek; T5 - Vietnamese; put T1 last 2022/03/10
+ \IfFormatAtLeastTF{2018/04/01}{\relax}{\RequirePackage[utf8]{inputenc}}
+\fi
+
\RequirePackage[]{babel}
\ifpdftex
@@ -931,44 +923,31 @@
BoldItalicFont = *-Bold,% has no italic face
]{NotoSansTamil}
%
- \babelprovide[import, captions/abstract = Muhtasari, language = Default]{swahili}
+ \babelprovide[import, captions/abstract = Muhtasari, language = Default]{swahili}
%
- \else % use lualatex without font support for other languages (easier set-up and still enables luacode for numerics)
- % extensive edits 2022/03/14
+ \else % use lualatex without support for system fonts (easier set-up and still enables luacode for numerics)
+ % dropped newtxtext completely, 2024/01/19
\renewcommand*\rmdefault{ntxtlf} % roman font for math
\RequirePackage[T1]{fontenc} % qhv and zi4 are not TU encoded, 2021/12/24
- \DeclareFontFamily{T1}{\sfdefault}{} % sf for math
+ \DeclareFontFamily{T1}{\sfdefault}{} % sf for math
\DeclareFontShape{T1}{\sfdefault}{m}{n}{<-> s*[0.94] ec-qhvr}{} %% see t1qhv.fd; 0.9-->0.94 2022/01/15
+ \DeclareFontShape{T1}{\sfdefault}{b}{n}{<-> s*[0.94] ec-qhvb}{} %% see t1qhv.fd; 0.9-->0.94 2022/01/15
+ \DeclareFontShape{T1}{\sfdefault}{bx}{n}{<-> s*[0.94] ec-qhvb}{} %% see t1qhv.fd; 0.9-->0.94 2022/01/15
\DeclareFontFamily{T1}{zi4}{}% typewriter (Inconsolata)
\DeclareFontShape{T1}{zi4}{m}{n}{<-> s*[1.05] t1-zi4r-5}{}% with options varl and var qu
\DeclareFontShape{T1}{zi4}{b}{n}{<-> s*[1.05] t1-zi4b-5}{}
\DeclareFontShape{T1}{zi4}{bx}{n}{<-> s*[1.05] t1-zi4b-5}{}
\RequirePackage[]{newtxmath} % options will be as passed from newtx
- \RequirePackage[type1text,nofontspec,helvratio=0.91]{newtxtext}% will lose some accented characters this way ... better to use fontspec
- \@ifpackagelater{newtxtext}{2022/02/28}{\relax}{%
- \ClassWarning{asmeconf}{Your copy of the newtxtext package is older than 2022/02/28, so you will see error messages about unknown options 'type1text' and 'nofontspec'. You can click through these for now, but I recommend you update your LaTeX installation for best results.}
- }
\providecommand*{\DeclareFontFamilySubstitution}[3]{\relax}% folks with old latex formats will get a different typewriter font...
\AtBeginDocument{%
\DeclareFontFamilySubstitution{T1}{\ttdefault}{zi4}
}
- \fi
+ \fi
\fi
\RequirePackage[]{mathalfa}% load optional fonts for Calligraphy, Script, Fraktur. Key format: mathalfa=cal=euler (etc.)
\RequirePackage{bm}% load after all math to give further access to bold math
-%% option not to use latex default superscripts; if fontspec loaded, use the superiors package.
-\ifthenelse{\boolean{DefaultSups}}{\relax}{%
- \ifac@fontspec
- \RequirePackage{superiors}% must come after text font is loaded
- \else
- \relax
- \fi
-}
-
-%% override \textsu if using default superiors
-\ifthenelse{\boolean{DefaultSups}}{\let\textsu\textsuperscript}{\relax}
%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath
\def\maketag@@@#1{\hbox{\m@th#1}}
@@ -1043,27 +1022,39 @@
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
-\ifac@govt
+\ifasmeconf@govt
\newgeometry{left=0.5in, right=0.5in, top=0.5in, bottom = 1.in, footskip = 0.3in, columnsep = 0.38in}
\fancyfoot[RO,RE]{}
\fancyfoot[CE,CO]{\@SetFont\thepage\\[1ex]\small 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
-\ifac@contractor
+\ifasmeconf@contractor
\newgeometry{left=0.5in, right=0.5in, top=0.5in, bottom = 1.in, footskip = 0.3in, columnsep = 0.38in}
\fancyfoot[RO,RE]{}
\fancyfoot[CE,CO]{\@SetFont\thepage\\[1ex]\footnotesize 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
-\ifac@nofoot
+% was missing from earlier versions...?
+\ifasmeconf@govtsome
+ \newgeometry{left=0.5in, right=0.5in, top=0.5in, bottom = 1.in, footskip = 0.3in, columnsep = 0.38in}
+ \fancyfoot[RO,RE]{}
+ \fancyfoot[CE,CO]{\@SetFont\thepage\\[1ex]\small 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
+
+\ifasmeconf@nofoot
\fancyfoot[RO,RE]{}
\fi
-%%%%%% footnotes %%%%%%%
-\RequirePackage{fnpos}
-\makeFNbottom
-\makeFNbelow
+%%%%%% Footnotes %%%%%%%
+\RequirePackage{footmisc}%
+\IfPackageAtLeastTF{footmisc}{2022/02/05}{
+ \PassOptionsToPackage{belowfloats}{footmisc}%
+ }{ \RequirePackage{fnpos}
+ \makeFNbottom
+ \makeFNbelow
+ }%
+\setlength\footnotemargin{2ex}% reduce indentation of footnotes, from footmisc
\setlength{\skip\footins}{\baselineskip}% <=== per ASME, 1 extra line
\renewcommand{\footnoterule}{%
@@ -1071,12 +1062,15 @@
\hrule width 0.5in height 0.4pt
\kern 2pt
}
+
+%% include a comma for sequential footnotes. 2024/01/18
+\ExplSyntaxOn
+ \cs_new:Npn \__asmeconf_NoteComma:n { \peek_meaning:NT \footnote { \textsuperscript{\mdseries,} } }
+ \cs_new_eq:NN \__savefootnote \footnote
+ \cs_gset_protected:Npn \footnote #1 { \__savefootnote{#1} \__asmeconf_NoteComma:n }
+\ExplSyntaxOff
-%% reduce indentation of footnotes
-\RenewDocumentCommand\@makefntext{m}{%
- \noindent\makebox[2ex][r]{\@makefnmark}#1}% <== To discourage hyphenation, do \hyphenpenalty=300\exhyphenpenalty=300 before #1
-
%%%%%%%%% Section headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% wish to accommodate hyperref
@@ -1102,35 +1096,16 @@
\titleformat{\section}{\mathversion{sansbold}\bfseries\sffamily\raggedright}{\MakeTextUppercase{\appendixname}\ \thesection.}{0.5em}{\MakeTextUppercase}
}
-%% This patches titlesec's unprotected re-definition of \footnote. See discussion here: https://github.com/jbezos/titlesec/issues/48
+%% This patches titlesec's unprotected re-definition of \footnote.
+%% See discussion here: https://github.com/jbezos/titlesec/issues/48
%% Without this patch, recent versions of LaTeX will require \protect\footnote in section headings.
+%% This issue may be corrected in titlesec, but keeping the patch anyway.
\patchcmd{\ttl@select}{\def\footnote}{\protected\def\footnote}{\typeout{Asmeconf.sty patched titlesec to have protected def of footnote}}{}
%%%%%%%%%% Hyperref, bookmarks, and PDF/A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\if@asme@pdfmanagement% Thanks to Ulrike Fischer
-
-% New 2021/07/23, don't implement yet
-% \IfPDFManagementActiveTF{\@asme@pdfmanagementtrue}{\@asme@pdfmanagementfalse}
-
-\ExplSyntaxOn
- \IfFormatAtLeastTF{2020/02/02}{%
- \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
- }
- }{\@asme@pdfmanagementfalse}
-\ExplSyntaxOff
-
+%% new pdf management in LaTeX, with \DocumentMetaData{..}, is preferred to this *legacy* approach.
\ifpdftex
%%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in the newtx documentation.
\IfFormatAtLeastTF{2020/10/01}{\relax}{%
@@ -1141,7 +1116,7 @@
\InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings
\ifac@setpdfa
- %%%% the pdfmanagement options are experimental, from Ulrike Fischer 2021/06/12
+ %%%% pdfmanagement options, from Ulrike Fischer 2021/06/12
\if@asme@pdfmanagement
\ClassInfo{asmeconf}{pdfmanagement is defined. Class file will not load a color profile}
\else
@@ -1163,11 +1138,9 @@
\fi
\fi
-
\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/01
\hypersetup{%
- unicode, % Unicode encoded PDF strings
pdfborder={0 0 0},%
bookmarksnumbered=true,%
bookmarksopen=true,
@@ -1191,27 +1164,29 @@
\providecommand\hrefurl[2]{\href{#1}{#2}}% to address certain issues around URL recognition with new pdf management code, 2021/12/02
-\RequirePackage{hyperxmp}% improve transfer of metadata to pdf
-
-% Patch bug in hyperxmp, unless a more recent version is used.
-\ifdefined\hyxmp@no@bad@parts% \hyxmp@no@bad@parts is not def'd in TeX Live 2019 or older
- \@ifpackagelater{hyperxmp}{2022/10/15}{% v5.11 or later
- \relax
-% \ClassInfo{asmeconf}{hyperxmp v5.11 or later is in use}
- }{%
- \newcount\hypxmp@tempcnt
- \define@key{Hyp}{pdfapart}{%
- \afterassignment\hyxmp@no@bad@parts\hypxmp@tempcnt=0#1\relax
- \hyxmp@pdfstringdef\@pdfapart{\the\hypxmp@tempcnt}%
- }
- }
+\if@asme@pdfmanagement
+ \ClassInfo{asmejour}{pdfmanagement is defined. Class file will not load hyperxmp}
\else
- \relax
+ \RequirePackage{hyperxmp}% improve transfer of metadata to pdf
+
+ % Patch bug in hyperxmp, unless a more recent version is used.
+ \ifdefined\hyxmp@no@bad@parts% \hyxmp@no@bad@parts is not def'd in TeX Live 2019 or older
+ \@ifpackagelater{hyperxmp}{2022/10/15}{% v5.11 or later
+ \relax
+ }{%
+ \newcount\hypxmp@tempcnt
+ \define@key{Hyp}{pdfapart}{%
+ \afterassignment\hyxmp@no@bad@parts\hypxmp@tempcnt=0#1\relax
+ \hyxmp@pdfstringdef\@pdfapart{\the\hypxmp@tempcnt}%
+ }
+ }
+ \else
+ \relax
+ \fi
\fi
-
%%% ==> recent and evolving development of \pdfstring removes all robust commands from bookmarks, so
-%%% the following interventions may become unnecessary over time (2021/12/01).
+%%% by early 2024, errors are not present; however, these commands serve to still suppress warnings.
%% Since \bm may be useful in headings, this fix will reduce frequency with which
%% alternate pdfstrings must be given in revised section command as \section[pdfstring]{texstring}
@@ -1219,90 +1194,86 @@
\def\bm#1#{\relax}%
}
-%% Let's disable \( and \) in pdf bookmarks, 2020/02/28
+% Let's disable \( and \) in pdf bookmarks, 2020/02/28
\pdfstringdefDisableCommands{%
\def\({\relax}%
\def\){\relax}%
}
-%% Let's also make sure \NoCaseChange in section headings won't break pdf bookmarks
+% Let's also make sure \NoCaseChange in section headings won't break pdf bookmarks
\pdfstringdefDisableCommands{%
\let\NoCaseChange\relax%
}
-%% Let's just remove citations from pdf bookmarks
+% Let's just remove citations from pdf bookmarks
\pdfstringdefDisableCommands{%
\def\cite{\@gobble}%
}
-%% Let's make sure footnotes in section headings don't break pdf bookmarks.
-\robustify{\footnote}
-% \patchcmd{\section}{\sectionmark}{\let\footnote\@gobble\sectionmark}{}{}% <== not really needed in this context, 2020/02/28
+%% Ensure that tag color does not follow \eqref into bookmarks, 2020/02/28
+\pdfstringdefDisableCommands{%
+ \def\eqref#1{(\ref{#1})}%
+}
+
+% Let's make sure footnotes in section headings don't break pdf bookmarks.
+% Revised footnote command above is already robust
\pdfstringdefDisableCommands{%
\def\footnote#1{}%
}
+
%% Let's also add \footnote to the \TextUppercase exception list, so that footnote text won't be capitalized
%% if given in section headings. Ditto for \eqref
%
-\ifx\AddToNoCaseChangeList\@undefined % updated July 3, see https://github.com/John02139/asmeconf/issues/5
+\ifx\AddToNoCaseChangeList\@undefined % updated 2022/07/03, see https://github.com/John02139/asmeconf/issues/5
\patchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\footnote}{\typeout{Asmeconf patched textcase nonchangecase to include footnote.}}{}
\patchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\eqref}{\typeout{Asmeconf patched textcase nonchangecase to include eqref.}}{} %% corrected 2020/01/24
\else
\AddToNoCaseChangeList{\eqref \footnote}
\fi
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% Create an optional argument for unnumbered sections and set pdf bookmark (thru \addcontentsline).
-%%% The optional argument will manually set the pdf bookmark for that section; can be used to avoid hyperref
-%%% errors when macros are in section titles.
-%%% There should not be errors for $, \cite, \ref, \eqref, \label, \footnote, \NoCaseChange, or \bm with current constructions.
-\let\svsection\section
-\RenewDocumentCommand{\section}{s o m}{%
- \IfBooleanTF {#1}
- {\svsection*{#3}\phantomsection%
- {\IfNoValueTF {#2}
- {\addcontentsline{toc}{section}{#3}}
- {\addcontentsline{toc}{section}{#2}}% removed trailing space 2020/02/28
- }%
- }%
- {\IfNoValueTF {#2}
- {\svsection{#3}}
- {\svsection[#2]{#3}}%
- }%
-}
-
-%%%%%%%%%%%%% Line numbering and balancing columns on last page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% 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 additional problem that puts an extra line number above it.
+%%% There should be no errors for section headings with \(, \), \cite, \ref, \eqref, \label, \footnote, \NoCaseChange, or \bm
-\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}}
+%%%%%%%%%%%%% Line numbering and balancing columns on last page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Adjustments when lineno option is used
-\ifac@lineno%
+\ifasmeconf@lineno%
\RequirePackage[switch,mathlines]{lineno}
\renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
\AtBeginDocument{\linenumbers}
- \ClassWarningNoLine{asmeconf}{Package lineno loaded, so final column balancing is disabled}
- \@FixAll{align;alignat;gather;flalign;multline}
- \else
- \ifac@balance\RequirePackage{flushend}\fi % flushend is NOT compatible with lineno
+ \ifasmeconf@balance
+ \ClassWarningNoLine{asmeconf}{Package lineno loaded, so final column balancing will be disabled}%
+ \fi
+ %%% Patch to allow line numbering in AMS math environments.
+ %%% This patch is for lineno versions earlier than v5.2 [2023/05/19]. As of mid-2023, the lineno package
+ %%% has been corrected to account for the AMS math environments. Retaining temporarily for backward compatibility.
+ %%% postdisplaypenalty adjusted to avoid extra line number at end, see: https://tex.stackexchange.com/a/461192/
+ %%% multline has some additional problem that puts an extra line number above it.
+ \IfPackageAtLeastTF{lineno}{2023/05/19}{\relax}{
+ \NewDocumentCommand{\ac@losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}}
+ %
+ \NewDocumentCommand{\ac@FixAMSMath}{m}{%
+ \AtBeginEnvironment{#1}{\ac@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1}{\endlinenomath}%
+ \AtBeginEnvironment{#1*}{\ac@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1*}{\endlinenomath}%
+ }
+ %
+ \NewDocumentCommand{\ac@FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\ac@FixAMSMath}}
+ %
+ \ac@FixAll{align;alignat;gather;flalign;multline}
+ }
+\else
+ \ProvideDocumentEnvironment{linenomath}{}{}{}%
+ \ifasmeconf@balance
+ \RequirePackage{flushend}% flushend package is NOT compatible with lineno
+ \AtEndDocument{\flushcolsend}%
+ \LogNote{Calling flushend package to balance column height on last page}%
+ \fi%
\fi
-%%% Enable dropping lineno option without trashing .aux file
-\providecommand{\@LN@col}[1]{\relax}
+\providecommand{\@LN@col}[1]{\relax}% Enable dropping lineno option without trashing .aux file
\providecommand{\@LN}[2]{\relax}
@@ -1345,39 +1316,22 @@
\newlength\nomenwidth
\newlength\savitemsep
-%% ==> xparse "g" argument used in this version of \entry is deprecated; so have phased out this version, 2021/12/01
-%% If second argument of \entry is omitted, will produce an italicized heading (e.g. "Greek letters")
-%\NewDocumentCommand\entry{m g}{%
-% \IfNoValueTF{#2}{%
-% \itemsep3\p@ plus 1\p@ minus 1\p@%
-% \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000%
-% }{%
-% \item[#1\hfill]#2%
-% \@itempenalty=-\@lowpenalty%
-% }%
-%}
-
-\NewDocumentCommand\entry{m m}{%
- \ifblank{#2}{%
- \ClassWarningNoLine{asmeconf}{The command \protect\entry requires two arguments. To obtain a subheading, use \protect\EntryHeading}
- \itemsep3\p@ plus 1\p@ minus 1\p@%
- \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000%
- }{%
+\NewDocumentCommand\entry{m m}{% simplified greatly 2024/01/18
\item[#1\hfill]#2%
- \@itempenalty=-\@lowpenalty%
- }%
+ \@itempenalty=-\@lowpenalty
}
%% A separate command command for nomenclature subheadings
\NewDocumentCommand\EntryHeading{m}{%
- \itemsep3\p@ plus 1\p@ minus 1\p@%
- \goodbreak\item[\itshape#1\hfill]\mbox{}\setlength\itemsep\savitemsep\@itempenalty=1000%
+ \itemsep3\p@ plus 1\p@ minus 1\p@
+ \goodbreak\item[\itshape#1\hfill]\mbox{}%
+ \setlength{\itemsep}{\savitemsep}\@itempenalty=1000
}
%% Increase first optional argument to a dimension > 2em if wide entries cause undesired misalignment of columns.
%% Second optional argument can be used to rename the environment, e.g., to List of Symbols.
\NewDocumentEnvironment{nomenclature}{O{2em} O{\nomname}}{%
- \setlength\columnsep{2em}
+ \setlength{\columnsep}{2em}
\setlength{\nomenwidth}{#1}
\section*{#2}
\raggedright
@@ -1388,7 +1342,7 @@
\setlength{\labelwidth}{\nomenwidth}%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
- \setlength\savitemsep\itemsep%
+ \setlength{\savitemsep}{\itemsep}%
}%
}{\end{list}\ignorespacesafterend}
@@ -1407,40 +1361,35 @@
\NewDocumentCommand\ConfCity{m}{\gdef\@ConfCity{#1}}
\providecommand\@ConfCity{\hbox{ }}
-\NewDocumentCommand\HeaderConfName{}{%
+\NewDocumentCommand\PaperNo{m}{\gdef\@PaperNo{#1}}
+\providecommand\@PaperNo{\protect\phantom{NO.}}
+
+\NewDocumentCommand\PaperTitle{m}{\gdef\@PaperTitle{#1}}
+\providecommand\@PaperTitle{\hbox{ }}
+
+\NewDocumentCommand\@HeaderTitle{}{%
+ {\bfseries\sffamily
\parbox{\linewidth}{%
- \raggedleft\bfseries\sffamily%
+ \raggedleft
\@ConfName\par%
\MakeTextUppercase{\@ConfAcronym}\par
- \@ConfDate\@ConfCity%
+ \@ConfDate\@ConfCity
}%
-}
-
-\NewDocumentCommand\PaperNo{m}{\gdef\@PaperNo{#1}}
-\providecommand\@PaperNo{\protect\phantom{NO.}}
-
-\NewDocumentCommand\paperno{}{%
\vspace*{2\baselineskip}
- \parbox{\linewidth}{\raggedleft\bfseries\sffamily\LARGE%
+ \parbox{\linewidth}{\raggedleft\LARGE
\MakeTextUppercase{\@PaperNo}%
}%
-}
-
-\NewDocumentCommand\PaperTitle{m}{\gdef\@PaperTitle{#1}}
-\providecommand\@PaperTitle{\hbox{ }}
-
-\NewDocumentCommand\papertitle{}{%
-\vspace*{3\baselineskip}
-\parbox{\linewidth}{\mathversion{sansbold}\centering{\bfseries\sffamily\large%
-\MakeTextUppercase{\@PaperTitle}\par}%%% <=== extra \par to make font leading stick. See adjustment in \MakeTitle
- }%
+ \vspace*{3\baselineskip}
+ \parbox{\linewidth}{\mathversion{sansbold}\centering{\large
+ \MakeTextUppercase{\@PaperTitle}\par}}%%% <=== extra \par to make font leading stick. See adjustment in \MakeTitle
+ }%
}
%%%%%%%%%%% Author and affiliation block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{xcoffins}
-%% To maintain compatibility with newtxtext superiors option, if used, save the definition (inline author style resets it)
+%% Inline author style resets the footnote mark; save the definitions so we can restore them later
\let\savethefootnote\thefootnote
\let\savemakefnmark\@makefnmark
@@ -1466,9 +1415,11 @@
}%
}
+
%%%% option to use the traditional grid layout of authors or the inline style
-\ifthenelse{\boolean{grid}\or\boolean{Oldauthors}}{% This command works better than \if... in this context.
+\ifasmeconf@grid
+ \LogNote{Selected option for a grid of author blocks}%
%%%%%%%%%%%%%%%%%%%% Gridded author layout %%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1495,122 +1446,51 @@
\newlength{\coffinsep}% horizontal space between coffins
\setlength{\coffinsep}{0.03\textwidth}
- \ifthenelse{\boolean{grid}}{%
- \newcounter{authorcnt}
- \setcounter{authorcnt}{0}
+ \newcounter{authorcnt}
+ \setcounter{authorcnt}{0}
+
+ \NewDocumentCommand\SetAffiliation{mm}{\expandafter\xdef\csname af@#1\endcsname{#2}}% defines \af@#1 as Affiliation #2
+
+ \AtBeginDocument{% error control, when no author or empty \affil is given
+ \SetAffiliation{-1}{Missing author name!\\Or extra comma!}
+ \SetAffiliation{99}{Missing affiliation tag!!}
+ \SetAffiliation{100}{Missing number in affiliation!!}
+ }
+
+ \NewDocumentCommand\SetAuthors{>{\SplitList{,}}m}{\ProcessList{#1}{\@TagAutAff}}
- \NewDocumentCommand\SetAffiliation{mm}{\expandafter\xdef\csname af@#1\endcsname{#2}}% defines \af@#1 as Affiliation #2
-
- \AtBeginDocument{% error control, when no author or empty \affil is given
- \SetAffiliation{-1}{Missing author name!\\Or extra comma!}
- \SetAffiliation{99}{Missing affiliation tag!!}
- \SetAffiliation{100}{Missing number in affiliation!!}
- }
-
- \NewDocumentCommand\SetAuthors{>{\SplitList{,}}m}{\ProcessList{#1}{\@TagAutAff}}
-
- \NewDocumentCommand\@AuthNo{m}{%
- \ifblank{#1}{%
- \expandafter\xdef\csname aut@\theauthorcnt\endcsname{}%
- \expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{-1}
- \ClassWarning{asmeconf}{Missing author name, check for extra comma}%
- }{\expandafter\xdef\csname aut@\theauthorcnt\endcsname{#1}%
- }%
- }% defines \aut@authorcnt as Name #1
-
- \NewExpandableDocumentCommand\affil{m}{%
- \ifblank{#1}{%
- \expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{100}%
- }{\expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{#1}%
- }%
- }% defines \autaffil@authorcnt as #1 (unique association)
-
- \NewDocumentCommand\@TagAutAff{m}{%
- \addtocounter{authorcnt}{1}%
- \@AuthNo{#1}%
- }
- \NewDocumentCommand\@SetAuthorBlock{}{%
- \whiledo{\value{authorno}<\value{authorcnt}}{% starting with authorno = 0 ensures we reach authorcnt with +1
- \addtocounter{authorno}{1}%
- \SetVerticalCoffin{\authorblock}{0.3\textwidth}{%
- \centering\sffamily%
- \textbf{\ignorespaces\csname aut@\theauthorno\endcsname\ignorespaces}\\
+ \NewDocumentCommand\@AuthNo{m}{%
+ \ifblank{#1}{%
+ \expandafter\xdef\csname aut@\theauthorcnt\endcsname{}%
+ \expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{-1}
+ \ClassWarning{asmeconf}{Missing author name, check for extra comma}%
+ }{\expandafter\xdef\csname aut@\theauthorcnt\endcsname{#1}%
+ }%
+ }% defines \aut@authorcnt as Name #1
+
+ \NewExpandableDocumentCommand\affil{m}{%
+ \ifblank{#1}{%
+ \expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{100}%
+ }{\expandafter\xdef\csname autaffil@\theauthorcnt\endcsname{#1}%
+ }%
+ }% defines \autaffil@authorcnt as #1 (unique association)
+
+ \NewDocumentCommand\@TagAutAff{m}{%
+ \addtocounter{authorcnt}{1}%
+ \@AuthNo{#1}%
+ }
+ \NewDocumentCommand\@SetAuthorBlock{}{%
+ \whiledo{\value{authorno}<\value{authorcnt}}{% starting with authorno = 0 ensures we reach authorcnt with +1
+ \addtocounter{authorno}{1}%
+ \SetVerticalCoffin{\authorblock}{0.3\textwidth}{%
+ \centering\sffamily%
+ \textbf{\ignorespaces\csname aut@\theauthorno\endcsname\ignorespaces}\\
\ifcsname autaffil@\theauthorno\endcsname% in case the \affil command has been omitted
- \csname af@\csname autaffil@\theauthorno\endcsname\endcsname
+ \csname af@\csname autaffil@\theauthorno\endcsname\endcsname
\else
\csname af@99\endcsname
\fi
- \par}
- \ifnum\value{authorno}=1
- \JoinCoffins\firstrowauthorblock[r,t]\authorblock[l,t]
- \else
- \ifnum\value{authorno}=2
- \JoinCoffins\firstrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \else
- \ifnum\value{authorno}=3
- \JoinCoffins\firstrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \fi
- \fi
- \fi
- \ifnum\value{authorno}=4
- \JoinCoffins\secondrowauthorblock[r,t]\authorblock[l,t]
- \else
- \ifnum\value{authorno}=5
- \JoinCoffins\secondrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \else
- \ifnum\value{authorno}=6
- \JoinCoffins\secondrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \fi
- \fi
- \fi
- \ifnum\value{authorno}=7
- \JoinCoffins\thirdrowauthorblock[r,t]\authorblock[l,t]
- \else
- \ifnum\value{authorno}=8
- \JoinCoffins\thirdrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \else
- \ifnum\value{authorno}=9
- \JoinCoffins\thirdrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \fi
- \fi
- \fi
- \ifnum\value{authorno}=10
- \JoinCoffins\fourthrowauthorblock[r,t]\authorblock[l,t]
- \else
- \ifnum\value{authorno}=11
- \JoinCoffins\fourthrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \else
- \ifnum\value{authorno}=12
- \JoinCoffins\fourthrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \fi
- \fi
- \fi
- \ifnum\value{authorno}=13
- \JoinCoffins\fifthrowauthorblock[r,t]\authorblock[l,t]
- \else
- \ifnum\value{authorno}=14
- \JoinCoffins\fifthrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \else
- \ifnum\value{authorno}=15
- \JoinCoffins\fifthrowauthorblock[r,t]\authorblock[l,t](\coffinsep,0pt)
- \fi
- \fi
- \fi
- \ifnum\value{authorno}>15
- \ClassWarningNoLine{asmeconf}{The class is programmed for up to 15 author blocks. If some of your authors are at the same institution, %
- you may put more than one name above a single address. If you need more than 15 author blocks, try using the in-line author style %
- instead of the [grid] option}
- \fi
- }% end whiledo
- }
- }{% end ifthen for grid, now do else for Oldauthors
- \NewDocumentCommand\SetAuthorBlock{mm}{%
- \addtocounter{authorno}{1}%
- \SetVerticalCoffin{\authorblock}{0.3\textwidth}{%
- \centering\sffamily%
- \textbf{\ignorespaces#1\ignorespaces}\\
- #2%
- }
+ \par}
\ifnum\value{authorno}=1
\JoinCoffins\firstrowauthorblock[r,t]\authorblock[l,t]
\else
@@ -1669,56 +1549,11 @@
\ifnum\value{authorno}>15
\ClassWarningNoLine{asmeconf}{The class is programmed for up to 15 author blocks. If some of your authors are at the same institution, %
you may put more than one name above a single address. If you need more than 15 author blocks, try using the in-line author style %
- instead of the [authorgrid] option}
+ instead of the [grid] option}
\fi
- }
-
- % Changed to follow syntax of the inline style, which is much easier to use! 2020/12/29
- % % allow for NO email address to be given by omitting second argument
- % \NewDocumentCommand{\CorrespondingAuthor}{m g}{%
- % \global\ac@CAtrue%
- % \IfNoValueTF{#2}{%
- % \gdef\@CAsep{\relax}%
- % \gdef\@CAemail{\relax}%
- % }{%
- % \gdef\@CAsep{:\space}%
- % \gdef\@CAemail{#2}%
- % }%
- % \ignorespaces#1\ignorespaces$\bm{^\ast}$%\footnotemark[1]%
- % }
-
- %%% to deal with sequential notes as, e.g., "1,*", or "1,2,*" %%%%%%%%%%
- % bug fixed 2020/12/29
- \newcommand\nextToken\relax
-
- \newcommand\isOthernote{%
- \ifx\CorrespondingAuthor\nextToken\textsuperscript{\sffamily\bfseries,}%
- \else%
- \ifx\JointFirstAuthor\nextToken\textsuperscript{\sffamily\bfseries,}%
- \fi%
- \fi%
- \ignorespaces%
- }
-
- \let\oldCorrespondingAuthor\CorrespondingAuthor
- \renewcommand\CorrespondingAuthor[1]{%
- \oldCorrespondingAuthor{#1}\futurelet\nextToken\isOthernote}
-
- \let\oldJointFirstAuthor\JointFirstAuthor
- \renewcommand\JointFirstAuthor{%
- \oldJointFirstAuthor\futurelet\nextToken\isOthernote}
-
- \let\oldfootnote\footnote
- \renewcommand\footnote[1]{%
- \oldfootnote{#1}\futurelet\nextToken\isOtherfnote}
-
- \newcommand\isOtherfnote{%
- \ifx\footnote\nextToken\textsu{\mdseries,}%
- \fi%
- }
- }%end ifthenelse
-
- \NewDocumentCommand\ConstructAuthorBlock{}{%
+ }% end whiledo
+ }
+ \NewDocumentCommand\@ConstructAuthorBlock{}{%
\ifnum\value{authorno}>3
\JoinCoffins\firstrowauthorblock[hc,b]\secondrowauthorblock[hc,t](0pt, -1.5\baselineskip)
\fi
@@ -1734,7 +1569,7 @@
\centerline{\TypesetCoffin\firstrowauthorblock}%% in this instance, \centerline is better than \centering
}
%%% otherwise use the new compact layout of authors
-}{% i.e., this begins "else"
+\else
%%%%%%%%%%%%%%%%%%%%%% New author layout (inline) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NewCoffin{\AuthorBlock}
@@ -1769,47 +1604,29 @@
}
%%% to deal with sequential notes as, e.g., "1,*", or "1,2,*" %%%%%%%%%%
- \let\oldaffil\affil
- \newcommand\nextToken\relax
-
- \renewcommand\affil[1]{%
- \oldaffil{#1}\futurelet\nextToken\isOthernote}
-
- \newcommand\isOthernote{%
- \ifx\CorrespondingAuthor\nextToken\textsuperscript{\sffamily\bfseries,}%
- \else%
- \ifx\JointFirstAuthor\nextToken\textsuperscript{\sffamily\bfseries,}%
- \else
- \ifx\affil\nextToken\textsuperscript{\sffamily\bfseries,}%
- \fi%
- \fi%
- \fi%
- \ignorespaces%
- }
-
- \let\oldCorrespondingAuthor\CorrespondingAuthor
- \renewcommand\CorrespondingAuthor[1]{%
- \oldCorrespondingAuthor{#1}\futurelet\nextToken\isOthernote}
-
- \let\oldJointFirstAuthor\JointFirstAuthor
- \renewcommand\JointFirstAuthor{%
- \oldJointFirstAuthor\futurelet\nextToken\isOthernote}
-
- \let\oldfootnote\footnote
- \renewcommand\footnote[1]{%
- \oldfootnote{#1}\futurelet\nextToken\isOtherfnote}
-
- \newcommand\isOtherfnote{%
- \ifx\footnote\nextToken\textsu{\mdseries,}%
- \fi%
- }
+ \ExplSyntaxOn
+ \cs_new:Npn \__asmecome_OtherNoteComma:n {
+ \peek_meaning:NTF \affil
+ { \textsuperscript{\mdseries,} }
+ { \peek_meaning:NTF \CorrespondingAuthor
+ { \textsuperscript{\mdseries,} }
+ { \peek_meaning:NT \JointFirstAuthor { \textsuperscript{\mdseries,} } }
+ }
+ }
+ \cs_new_eq:NN \__saveAF \affil
+ \cs_gset_protected:Npn \affil #1 { \__saveAF{#1} \__asmecome_OtherNoteComma:n }
+ \cs_new_eq:NN \__saveCA \CorrespondingAuthor
+ \cs_gset_protected:Npn \CorrespondingAuthor #1 { \__saveCA{#1} \__asmecome_OtherNoteComma:n }
+ \cs_new_eq:NN \__saveJA \JointFirstAuthor
+ \cs_gset_protected:Npn \JointFirstAuthor { \__saveJA \__asmecome_OtherNoteComma:n }
+ \ExplSyntaxOff
+
%%%
- \NewDocumentCommand\SetAuthorBlock{}{%
- \let\savethefootnote\thefootnote
+ \NewDocumentCommand\@SetAuthorBlock{}{%
\JoinCoffins\AuthorBlock[hc,b]\AffiliationsBlock[hc,t](0pt,-\baselineskip)
\centerline{\TypesetCoffin\AuthorBlock}
}
-} %% end ifthenelse for Oldauthors
+\fi % end if...else for grid
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1817,31 +1634,25 @@
\NewDocumentCommand\MakeTitlePage{}{%
\twocolumn[
\begin{@twocolumnfalse}
- \HeaderConfName
- \paperno
- \papertitle
+ \@HeaderTitle
\vspace*{2\baselineskip}
- \ifthenelse{\boolean{Oldauthors}}{%
- \ConstructAuthorBlock}{%
- \ifthenelse{\boolean{grid}}{%
- \@SetAuthorBlock\ConstructAuthorBlock}{%
- \SetAuthorBlock}}
+ \ifasmeconf@grid
+ \@SetAuthorBlock\@ConstructAuthorBlock
+ \else
+ \@SetAuthorBlock
+ \fi
\vspace*{3\baselineskip}
\end{@twocolumnfalse}
]
- \let\@makefnmark\savemakefnmark
+ \let\@makefnmark\savemakefnmark% restore footnote mark font
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\ifac@JA
- \ifDefaultSups\relax\else\ifac@fontspec\def\f@@tn@te{blub}\fi\fi% https://tex.stackexchange.com/a/565263/46356
\footnotetext[2]{\JAwords}
\fi
\ifac@CA
\footnotetext[1]{\CAwords\@CAsep\@CAemail}
\fi
- \ifDefaultSups\relax\else
- \ifac@fontspec\def\f@@tn@te{footnote}\fi
- \fi
- \let\thefootnote\savethefootnote
+ \let\thefootnote\savethefootnote% restore footnote symbol
}
%%%%%%%%%%
@@ -1852,10 +1663,10 @@
\RenewDocumentCommand{\thanks}{m}{\relax}% disabling this standard command (inconsistent with this format)
-%% Produces an unmarked footnote about the version date, to replace "date"
+%% \versionfootnote produces an unmarked footnote about the version date, to replace "date"
%% This tool is for editing and should not be used in the final draft
-%% This version provides working hyperlink, but throws warning; also, \gdef -->\def. 2021/12/09
+%% This form provides working hyperlink, but it throws warning; also, \gdef -->\def. 2021/12/09
%\NewDocumentCommand\versionfootnote{m}{\def\@thefnmark{}\@footnotetext{#1}}
%% A hyperlink in this footnote will not function, since NoHyper is used to suppress 'missing anchor' warning
@@ -1955,7 +1766,8 @@
%%%%%%%%%%%%%%%%%% Times-like fonts for specific languages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpdftex % Under lualatex, babel has problems with the following approach. Use [fontspec] option instead.
+\ifpdftex % Under lualatex, babel has problems with the following approach, which assumes that fontspec has not been loaded.
+ % Recommend not to choose the [nofontspec] option.
% Several modifications made in response to newtx v1.71, 2022/03/14
\ifac@vietnamese
%
@@ -1968,7 +1780,6 @@
\DeclareFontFamilySubstitution{T5}{\rmdefault}{qtm} % new in 02/20/2020 format of LaTeX! Need to test.
\DeclareFontFamilySubstitution{T5}{\ttdefault}{qcr}
}
- % 2021/12/24 removed substitute font package
% Vietnamese is in T5 encoding, can use Tex Gyre Termes font (qtm);
% qhv = Heros (helvetica). We get the right font w/o loading this.
% qcr = Cursor (monospaced) is poor match to inconsolata; qhv (the sf font) matches better, but isn't monospaced.