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.cls149
1 files changed, 85 insertions, 64 deletions
diff --git a/macros/latex/contrib/asmeconf/asmeconf.cls b/macros/latex/contrib/asmeconf/asmeconf.cls
index b1f0ec6b34..2f1932a0d8 100644
--- a/macros/latex/contrib/asmeconf/asmeconf.cls
+++ b/macros/latex/contrib/asmeconf/asmeconf.cls
@@ -5,9 +5,9 @@
%%
%% Please note that ASME's journals follow specifications different from ASME conference papers.
%%
-%% This file is version 1.19 dated 2020/08/12.
- \def\versionno{1.19}
- \def\versiondate{2020/08/12\space}
+%% This file is version 1.20 dated 2020/11/08.
+ \def\versionno{1.20}
+ \def\versiondate{2020/11/08\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -34,7 +34,7 @@
%% This class is not designed for unicode-math or fontspec, given that the ASME conference style is
%% specific with respect to the font selections.
%%
-%% Options for the class are configured on lines 79-210.
+%% Options for the class are configured on lines 79-216.
%%
%% The class defines two environments: abstract and nomenclature. The latter has an optional argument to
%% control the space between the entries and the definitions.
@@ -79,22 +79,18 @@
%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{ifthen}
-\RequirePackage{iftex} % check whether pdftex or another engine is used
-\newboolean{DefaultSups}
-\setboolean{DefaultSups}{true}
-\newboolean{Oldauthors}
-\setboolean{Oldauthors}{false}
-\newboolean{Balance}
-\setboolean{Balance}{false}
-\newboolean{lineno}
-\setboolean{lineno}{false}
-\newboolean{setpdfa}
-\setboolean{setpdfa}{false}
-\newboolean{pdfaone}
-\setboolean{pdfaone}{false}
+\RequirePackage{iftex} % check whether pdftex or another engine is used
+
+\newboolean{Balance}\setboolean{Balance}{false}
+\newboolean{DefaultSups}\setboolean{DefaultSups}{true}
+\newboolean{contractor}\setboolean{contractor}{false}
+\newboolean{govt}\setboolean{govt}{false}
+\newboolean{lineno}\setboolean{lineno}{false}
+\newboolean{Oldauthors}\setboolean{Oldauthors}{false}
+\newboolean{pdfaone}\setboolean{pdfaone}{false}
+\newboolean{setpdfa}\setboolean{setpdfa}{false}
\RequirePackage{kvoptions}
-%\RequirePackage{kvsetkeys} % already loaded by kvoptions
\SetupKeyvalOptions{
family=asmeconf,
prefix=asmeconf@,
@@ -103,6 +99,27 @@
setkeys=\kvsetkeys,
}
+%%% set key [balance] to balance column height on last page.
+\define@key{asmeconf}{balance}[true]{%
+ \setboolean{Balance}{#1}
+ \ClassWarningNoLine{asmeconf}{Loading flushend package to balance column height on last page}%
+}
+
+%%% set key [contractor] to obtain government contractor copyright notice.
+\define@key{asmeconf}{contractor}[true]{%
+ \setboolean{contractor}{#1}
+}
+
+%%% set key [govt] to obtain government employee copyright notice.
+\define@key{asmeconf}{govt}[true]{%
+ \setboolean{govt}{#1}
+}
+
+%%% set key [lineno] to obtain line numbers.
+\define@key{asmeconf}{lineno}[true]{%
+ \setboolean{lineno}{#1}
+}
+
%%% for mathalfa, we may now pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
\define@key{asmeconf}{mathalfa}{%
\PassOptionsToPackage{#1}{mathalfa}%
@@ -113,21 +130,6 @@
\setboolean{DefaultSups}{#1}
}
-%%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
-\define@key{asmeconf}{nodefaultsups}[false]{%
- \setboolean{DefaultSups}{#1}
-}
-
-%%% set key [balance] to balance column height on last page.
-\define@key{asmeconf}{balance}[true]{%
- \setboolean{Balance}{#1}
- \ClassWarningNoLine{asmeconf}{Loading flushend package to balance column height on last page}%
-}
-
-%%% set key [lineno] to obtain linenumbers.
-\define@key{asmeconf}{lineno}[true]{%
- \setboolean{lineno}{#1}
-}
%%% set key [lang,lang-second,lang-third] to pass languages to babel.
@@ -153,16 +155,16 @@
\define@key{pdfaopt}{pdf-a}[true]{%
\setboolean{setpdfa}{#1}%
\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}%
-}
-%% 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
\ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}%
@@ -173,12 +175,12 @@
%% option to have colored hyperlinks
\DeclareOption{colorlinks}{%
\PassOptionsToPackage{colorlinks=true}{hyperref}%
- }
+}
%% option to omit ASME footer
\DeclareOption{nofoot}{%
\AtBeginDocument{\pagestyle{plain}}%
- }
+}
%% Access many options from newtxmath. See newtx documentation for details.
\DeclareOption{upint,smallerops,varvw,varg,uprightGreek,slantedGreek,frenchmath,varbb,cmbraces}{\PassOptionsToPackage{}{newtxmath}}
@@ -189,11 +191,16 @@
%% Option not to use latex default superscripts, instead using the newtxtext superiors font [nodefaultsups]
\ifthenelse{\boolean{DefaultSups}}{\PassOptionsToPackage{defaultsups}{newtxtext}}{\relax}
-%% option to use old authors
+%% option to use grid of authors
+\DeclareOption{authorgrid}{%
+ \setboolean{Oldauthors}{true}%
+ \ClassWarningNoLine{asmeconf}{Selected option for a grid of author blocks}%
+}
+%% retained for backward compatibility
\DeclareOption{oldauthors}{%
\setboolean{Oldauthors}{true}%
\ClassWarningNoLine{asmeconf}{Selected option for a grid of author blocks}%
- }
+}
%% Option to hyphenate the typewriter font [hyphenate]
\DeclareOption{hyphenate}{%
@@ -206,14 +213,11 @@
\ProcessOptions \relax
-
%%%%%%%%%%%%% end options %%%%%%%%%%%%%%%%%%%
-
-\RequirePackage[letterpaper, left=0.5in, right=0.5in, top=0.5in, bottom = 1.in, footskip=0.5in]{geometry}
+\RequirePackage[letterpaper, left=0.5in, right=0.5in, top=0.5in, bottom = 1.in, footskip=0.5in, columnsep=0.38in]{geometry}
% conforms to ASME required margins
\setlength\parindent{0.25in}
-\setlength\columnsep{0.38in}
\RequirePackage[sort&compress,numbers]{natbib}
\setlength\bibsep{1pt plus 1pt minus 1pt}
@@ -300,12 +304,27 @@
\pagestyle{fancy}
\fancyfoot{}
+\fancyhead{}
\fancyfoot[CE,CO]{\thepage}
\fancyfoot[RO,RE]{Copyright~\textcopyright~\the\year\ by ASME}
-\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
+\ifthenelse{\boolean{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]{\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.}
+ }{\relax
+}
+
+\ifthenelse{\boolean{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]{\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.}
+ }{\relax
+}
+
+
%%%%%% footnotes %%%%%%%
\RequirePackage{fnpos}
@@ -387,18 +406,18 @@
\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)
- >>
- ]
-}%
+ \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)
+ >>
+ ]
+ }%
}{\relax}
\RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf
@@ -488,11 +507,6 @@
%%%%%%%%%%%%% Line numbering and balancing columns on last page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{lineno}}{%
- \RequirePackage[switch,mathlines]{lineno}
- \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
- \AtBeginDocument{\linenumbers}
- \ClassWarningNoLine{asmeconf}{Package lineno loaded, so final column balancing is disabled}
%%% Allow line numbering in AMS math environments.
%%% postdisplaypenalty adjusted to avoid extra line number at end, see discussion here: https://tex.stackexchange.com/a/461192/
%%% multline has some problem that puts an extra line number above it.
@@ -507,11 +521,18 @@
}
\NewDocumentCommand{\FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\FixAMSMath}}
-\FixAll{align;alignat;gather;flalign;multline}
+%%% Adjustments when lineno option is used
+\ifthenelse{\boolean{lineno}}{%
+ \RequirePackage[switch,mathlines]{lineno}
+ \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
+ \AtBeginDocument{\linenumbers}
+ \ClassWarningNoLine{asmeconf}{Package lineno loaded, so final column balancing is disabled}
+ \FixAll{align;alignat;gather;flalign;multline}
}{%
\ifthenelse{\boolean{Balance}}{\RequirePackage{flushend}}{\relax} % flushend is NOT compatible with lineno
}
+%%% Enable dropping lineno option without trashing .aux file
\providecommand{\@LN@col}[1]{\relax}
\providecommand{\@LN}[2]{\relax}