summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/asmejour
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
commit93c3758895674cc9ea3e8aaeeb3cf5d1bdc0e3be (patch)
tree5150bfff26491c4e57ddff629e62b4066295a925 /macros/latex/contrib/asmejour
parentd94b7a8c132734a1bc4046d54a75c7882c4c2619 (diff)
CTAN sync 201910030300
Diffstat (limited to 'macros/latex/contrib/asmejour')
-rw-r--r--macros/latex/contrib/asmejour/README.md6
-rw-r--r--macros/latex/contrib/asmejour/asmejour-sample.bib12
-rw-r--r--macros/latex/contrib/asmejour/asmejour-template.pdfbin493846 -> 494919 bytes
-rw-r--r--macros/latex/contrib/asmejour/asmejour-template.tex64
-rw-r--r--macros/latex/contrib/asmejour/asmejour.cls128
5 files changed, 157 insertions, 53 deletions
diff --git a/macros/latex/contrib/asmejour/README.md b/macros/latex/contrib/asmejour/README.md
index 2a040e7a36..8be9aa6158 100644
--- a/macros/latex/contrib/asmejour/README.md
+++ b/macros/latex/contrib/asmejour/README.md
@@ -1,7 +1,7 @@
#asmejour: A template for ASME journal papers#
- Version 1.05 dated 2019/08/17.
+ Version 1.06 dated 2019/10/01.
####Overview####
This class provides a template to format preprints submitted to ASME journals in the style that
@@ -56,7 +56,9 @@
---
####Change log####
-
+
+v1.06: allow standard \\date, \\maketitle, and \\title commands and abstract environment; make final column balancing a package option; remove \\normalfont from AMS equation tags to allow tags to match caption font; incorporate \\subfigure in example template; allow line numbers in AMS display math; provide comma between sequential footnote marks; adjust babel options; other minor edits; revise template text.
+
v1.05: automate list of figures/tables with option to omit; replace balance package with flushend package and automate; revise skips in nomenclature; address conflicts of lineno package with other elements; option to hyphenate typewriter font; new options for footer text; adjust \\emergencystretch and \\tolerance; additional documentation and references
v1.04: edit documentation; add language support via babel
diff --git a/macros/latex/contrib/asmejour/asmejour-sample.bib b/macros/latex/contrib/asmejour/asmejour-sample.bib
index 86a277c808..fcbcc7a840 100644
--- a/macros/latex/contrib/asmejour/asmejour-sample.bib
+++ b/macros/latex/contrib/asmejour/asmejour-sample.bib
@@ -1,4 +1,4 @@
-%% Revised 17 August 2019.
+%% Revised 1 October 2019.
@article{DKE1969,
author = {D. K. Edwards},
@@ -166,6 +166,16 @@
address = {Eugene, OR},
}
+@online{tolusis,
+ author = {Sigitas Tolu{\v{s}}is},
+ title = {The \textsf{flushend} package},
+ year = {2017},
+ organization = {Comprehensive \TeX\ Archive Network},
+ url = {https://www.ctan.org/pkg/flushend},
+ urldate = {October 1, 2019},
+ version = {3.3},
+}
+
@online{bottcher,
author = {Stephan I. B{\"o}ttcher and Uwe L{\"u}ck},
title = {\textsf{lineno.sty}: A {\LaTeX} package to attach line numbers to paragraphs},
diff --git a/macros/latex/contrib/asmejour/asmejour-template.pdf b/macros/latex/contrib/asmejour/asmejour-template.pdf
index 6c15c7effb..b69e52b5ac 100644
--- a/macros/latex/contrib/asmejour/asmejour-template.pdf
+++ b/macros/latex/contrib/asmejour/asmejour-template.pdf
Binary files differ
diff --git a/macros/latex/contrib/asmejour/asmejour-template.tex b/macros/latex/contrib/asmejour/asmejour-template.tex
index fb4dad7fba..93ce5d67ce 100644
--- a/macros/latex/contrib/asmejour/asmejour-template.tex
+++ b/macros/latex/contrib/asmejour/asmejour-template.tex
@@ -1,10 +1,9 @@
% !TEX encoding = UTF-8 Unicode
-
%%
%% This file is asmejour-template.tex, a template to format papers in the style of ASME journal papers
%% as they are being published in 2019.
%%
-%% This file is version 1.05 dated 2019/08/17
+%% This file is version 1.06 dated 2019/10/1
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -16,22 +15,29 @@
%% * Option to color the vertical bar in the title block [barcolor = colorname]
%% * where colorname is any name def'd by xcolor package; omit barcolor option to get black
%%
-%% * Option to include line numbers [lineno]. The lineno package does not number equation
-%% * lines, captions, etc. You must run twice for proper placement of the line numbers.
-%% * This option will disable balancing column height on final page.
+%% * Option to omit the list of figures and list of tables [nolists]
%%
%% * Math options from M. Sharpe's newtxmath package: upright integrals [upint]; and
%% * varvw for a v and w that are better distinguished from greek nu; and also
%% * smallerops, varg, slantedGreek, frenchmath, varbb, cmbraces. Version 1.5 or higher
%% * is recommended.
%%
+%% * Option to include line numbers [lineno]. The lineno package does not number tables,
+%% * footnotes, captions, etc. You must run *twice* for proper placement of the numbers.
+%% * This option will disable balancing of the column heights on final page.
+%%
+%% * Option to balance column heights on final page [balance]. This option sometimes
+%% * misbehaves, so use it with an awareness that it can create unexpected problems.
+%% * This option is not compatible with line numbering.
+%%
%% * Many options for calligraphic, script, and fraktur fonts from the mathalfa package; the
%% * example value used is: mathalfa=cal=euler (use Euler font for \mathcal)
%% * some other options for cal are: dutchcal, zapfc, cm (default), boondox,...
%% * frak (fraktur), bb (blackboard bold), scr (script) may also be controlled.
%%
-%% * An option to omit all the ASME text fields from the footer: nofoot
-%% * An option to omit only the ASME copyright field from the footer: nocopyright
+%% * An option to omit all the ASME text fields from the footer [nofoot].
+%%
+%% * An option to omit only the ASME copyright field from the footer [nocopyright].
%%
%% * An option to use newtxtext's superiors font for footnotes [nodefaultsups] and an option
%% * for slightly larger small capitals, largesc
@@ -39,8 +45,6 @@
%% * Options to set (for the babel package) a primary language [lang= ], and secondary or tertiary
%% * languages, [lang-second] and [lang-third]. The primary language must be the last option given.
%%
-%% * Option to omit the list of figures and list of tables [nolists]
-%%
%% * Option to allow hyphenation of the typewriter font [hyphenate]
%% * Hyphenation is normally suppressed for typewriter mode because it is often used for code.
%%
@@ -76,7 +80,7 @@
%% Class options are described above.
-\documentclass[largesc,upint,varvw,barcolor=Red4,nocopyright,hyphenate,lang-second=french,lang=english]{asmejour}
+\documentclass[largesc,upint,varvw,barcolor=Red4,nocopyright,hyphenate,balance,lang-second=french,lang=english]{asmejour}
\pdfminorversion=7 % This selection is not required.
@@ -131,8 +135,8 @@ Cambridge, MA 02139 USA \\
email: lienhard@mit.edu
}
-%%% Change to your paper title. Can insert line breaks if you wish (otherwise selected automatically).
-\SetTitle{Preprint Template for ASME\\ Journal Papers: asmejour.cls}
+%%% Change to your paper title. Can insert line breaks if you wish (otherwise breaks are selected automatically).
+\title{Preprint Template for ASME\\ Journal Papers: asmejour.cls}
%%% Change these to your keywords. Keywords are automatically printed at the end of the abstract.
@@ -143,12 +147,17 @@ email: lienhard@mit.edu
%% Abstract should be no more than 250 words
-\SetAbstract{%
+\begin{abstract}
This paper is an example and template for the {\upshape\texttt{asmejour}} class. Papers typeset in this class will follow ASME journal style for margins, fonts, headings, captions, and reference formats. Standard \LaTeX\ commands are used. The class will lay out the author, title, and abstract in ASME style. The class will produce a pdf file that that includes hyperlinks, bookmarks, and pdf metadata. The class is intended to be used with the {\upshape\texttt{asmejour.bst}} \hologo{BibTeX} style for typesetting references, which is part of this distribution. This style supports hyperlinks and modern reference formats, following current ASME practice. The class may be invoked with several options, most of which address math fonts. The class calls a number of packages, all of which are in \TeX~Live and in CTAN (\href{http://ctan.org}{ctan.org}). The class is compatible with \hologo{pdfLaTeX} or \LuaLaTeX.
-}
+\end{abstract}
+
+\date{Version 1.06, \today} %% can modify this information as desired.
+ %% Putting \date{} will suppress any date.
+ %% If this command is omitted, date defaults to \today
+ %% This command must come somewhere before \maketitle
-\MakeTitlePage %% This command creates the author/title/abstract block. Essential!
+\maketitle %% This command creates the author/title/abstract block. Essential!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%% End of fields to be completed. Now write! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -167,9 +176,11 @@ To begin, fill in the fields to be completed at top of the \texttt{asmejour-temp
For each author, put author names and affiliation (with line breaks) into a separate \verb|\SetAuthorBlock{name}{affiliation}| command; follow the syntax illustrated \texttt{asmejour-template.tex} file. One author (or more) may be designated as the \verb|\CorrespondingAuthor| by placing the command at the end of the name.
-The title should be placed into \verb|\SetTitle{..}|, and line breaks may be included if desired. Keywords may optionally be including using the \verb|\keywords{..}| command; this command \textit{must} be issued before the abstract. The abstract text must be placed into \verb|\SetAbstract{..}|. The abstract will automatically be italicized.
+The title should be placed into \verb|\title{..}|, and line breaks may be specified if desired. Keywords may optionally be including using the \verb|\keywords{..}| command; this command \textit{must} be issued before the abstract. The abstract text must be placed into \verb|\begin{abstract}|\ldots\verb|\end{abstract}|. The abstract will automatically be italicized.
+
+The date is given as an unnumbered footnote, which deafults to \verb|\today|. Other text for \verb|\date{..}| may be specified. Putting \verb|\date{}| will suppress the footnote.
-After setting up the authors, title, and abstract, issue the \verb|\MakeTitlePage| command.
+After setting up the authors, title, and abstract, issue the \verb|\maketitle| command.
\subsection{Optional to the Color Title Bar}
The vertical bar in the title block is black in all ASME journals. Since the \texttt{asmejour} class is only for preprints, we include the [fun] option to have the bar in color. Any color \texttt{name} recognized by the \texttt{xcolor} package may be invoked by including the option \texttt{barcolor=name} in the \verb|\documentclass[..]{asmejour}| command. The color name is \texttt{Red4} by default. (To have a black bar, either omit the option entirely or use the name \texttt{black}.)
@@ -283,7 +294,7 @@ Text in the figures should be checked for legibility at either single-column wid
\centering{%
\begin{tabular}{l l r}
\hline\hline
-Experiment & $u$ [m/s] & $T$ [\textdegree C] \rule{0pt}{10pt} \\[2pt]
+Experiment & $u$ [m/s] & $T$ [\textdegree C]\rule{0pt}{10pt} \\[2pt]
\hline
Run 11 & 12.5 & 103.4 \rule{0pt}{10pt} \\
Run 12 & 24 & 68.3 \\[1pt]
@@ -325,7 +336,7 @@ The \verb|version={..}| field may be used with \verb|@book|, \verb|@online|, and
\centering{%
\begin{tabular}{!{\hspace*{0.5cm}} >{\raggedright\hangindent=1em} p{3cm} d{3} @{\hspace*{1cm}} d{3} !{\hspace*{0.5cm}}}
\hline\hline
-\rule{0pt}{10pt} Experiment & \multicolumn{1}{c@{\hspace*{1cm}}}{$u$ [m/s]} & \multicolumn{1}{c!{\hspace*{0.5cm}}}{$T$ [\textdegree C]} \\[1pt]
+\rule{0pt}{10pt}Experiment & \multicolumn{1}{c@{\hspace*{1cm}}}{$u$ [m/s]} & \multicolumn{1}{c!{\hspace*{0.5cm}}}{$T$ [\textdegree C]} \\[1pt]
\hline
The first experiment we ran this morning & 124.3 & 68.3 \rule{0pt}{10pt} \\
The second experiment we ran this morning & 82.50 & 103.46 \\
@@ -338,10 +349,11 @@ Our competitor's data & 72.321 & 141.384 \\[1pt]
%%%%%%%%%%%%%%%% end table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
%%%%%%%%%%%%%%%%% begin two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure*}[t]
-\begin{minipage}[t]{0.497\textwidth}
+\begin{subfigure}[t]{0.5\textwidth} % You will get same result using \begin{minipage}[t]{0.5\textwidth}
\vbox{
\vspace*{1.7em}
\centering{
@@ -350,24 +362,26 @@ Our competitor's data & 72.321 & 141.384 \\[1pt]
\vspace*{1.7em}
}
\subcaption{Interior region\label{fig:interior-region}}
-\end{minipage}
+\end{subfigure}%
%%%%%%%% don't leave a break here
-\begin{minipage}[t]{0.497\textwidth}
+\begin{subfigure}[t]{0.5\textwidth} % You will get same result using \begin{minipage}[t]{0.5\textwidth}
\centering{
\includegraphics{sample-figure-2b.pdf}
\subcaption{Exterior region\label{fig:exterior-region}}
-}\end{minipage}
+}\end{subfigure}%
\caption{A figure with two subfigures \cite{Lienhard2019b}\label{fig:2}}
\end{figure*}
%%%%%%%%%%%%%%%%%%% end two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Additional Options for \texttt{asmejour.cls}}
The class accepts a number of options in addition to those already described.
-\subsection{Line Numbers} The option \texttt{[lineno]} invokes the the \texttt{lineno} package~\cite{bottcher}. This will produce line numbers in the margins. You must run \LaTeX\ twice for proper placement. The \texttt{lineno} package is not compatible with the \texttt{flushend} package that makes final short columns the same height. Balancing is disabled when this option is called. See the documentation of the \texttt{lineno} package for further commands to control line numbering. See footnote~\ref{ftnt:3} with regard to footnotes in section headings while this option is in~effect.
+\subsection{Final Column Balancing} The option \texttt{[balance]} invokes the the \texttt{flushend} package~\cite{tolusis}.
+This package will attempt to give equal height to the two columns on the last page. The performance of this package is sometimes inconsistent (with odd page layout or, very rarely, errors), so use this option with caution.
+
+\subsection{Line Numbers} The option \texttt{[lineno]} invokes the the \texttt{lineno} package~\cite{bottcher}. This will produce line numbers in the margins. You must run \LaTeX\ twice for proper placement of the numbers. The \texttt{lineno} package is not compatible with the \texttt{flushend} package that makes final short columns the same height. Balancing is disabled when this option is called. See the documentation of the \texttt{lineno} package for further commands to control line numbering. See footnote~\ref{ftnt:3} with regard to footnotes in section headings while this option is in~effect. The abstract, tables, captions, and footnotes will not be numbered.
\subsection{Changing the Footer Text} The option \texttt{[nofoot]} will omit everything other than a page number from the page footer. The option \texttt{nocopyright} will omit the ASME copyright from the first page footer. The command \verb|\PreprintString{..}| replaces the words \textsf{PREPRINT FOR REVIEW}. The left and right preprint strings can be changed separately using an optional argument: \verb|\PreprintString{..}[L]| and \verb|\PreprintString{..}[R]|.
The final paper number may be added to the page number using \verb|\PaperNumber{..}|.
diff --git a/macros/latex/contrib/asmejour/asmejour.cls b/macros/latex/contrib/asmejour/asmejour.cls
index 72087ac48d..beb4364634 100644
--- a/macros/latex/contrib/asmejour/asmejour.cls
+++ b/macros/latex/contrib/asmejour/asmejour.cls
@@ -1,12 +1,12 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% This file provides the asmejour class for formatting =papers in a layout similar to
+%% This file provides the asmejour class for formatting papers in a layout similar to
%% ASME Journal papers.
%%
%% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex.
%%
%%
-%% This file is version 1.05 dated 2019/08/17.
+%% This file is version 1.06 dated 2019/10/01.
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -20,7 +20,7 @@
%% The Times/Helvetica style fonts are from Michael Sharpe's excellent newtxtext and newtxmath packages.
%% This class is not designed for unicode-math or fontspec.
%%
-%% Options for the class are described on lines 63-157.
+%% Options for the class are described on lines 63-173.
%%
%% The class defines an environment for nomenclature. LaTeX must be run twice to align those columns.
%%
@@ -52,7 +52,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{asmejour}[2019/08/17 asmejour paper format]
+\ProvidesClass{asmejour}[2019/10/01 asmejour paper format]
\LoadClass[twoside,9pt,twocolumn]{extarticle}
@@ -66,11 +66,14 @@
\newboolean{lineno}
\setboolean{lineno}{false}
+\newboolean{balance}
+\setboolean{balance}{false}
+
\newboolean{lists}
\setboolean{lists}{true}
\RequirePackage{kvoptions}
-\RequirePackage{kvsetkeys}
+%\RequirePackage{kvsetkeys} %<== this package is called by kvoptions
\SetupKeyvalOptions{
family=asmejour,
prefix=asmejour@,
@@ -98,7 +101,16 @@
\setboolean{lineno}{#1}
}
+%%% set key [balance] to activate final column balancing.
+\define@key{asmejour}{balance}[true]{%
+ \setboolean{balance}{#1}
+}
+
%%% set key [lang,lang-second,lang-third] to pass languages to babel.
+
+%% In case language options are dropped during editing, include this. Subsequent choice of lang= will override it.
+\PassOptionsToPackage{english}{babel}
+
\define@key{asmejour}{lang}[english]{%
\PassOptionsToPackage{#1}{babel}%
}
@@ -197,6 +209,9 @@
\RequirePackage[]{newtxtext}
\RequirePackage[varqu,varl]{inconsolata} % sans typewriter font
\RequirePackage[]{newtxmath}
+
+%% override \textsu if using default superiors
+\ifthenelse{\boolean{DefaultSups}}{\let\textsu\textsuperscript}{\relax}
\RequirePackage[]{mathalfa} % load optional fonts for Calligraphy, Script, etc.
@@ -249,30 +264,53 @@
\providecommand{\keywordname}{Keywords}
-%%%%%%%%%%%%%%%%% LINE AND EQUATION NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% EQUATION AND LINE NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% ASME puts equation tags in blue
+\RequirePackage{xpatch}
+\xpatchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
+
+%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath
+\def\maketag@@@#1{\hbox{\m@th#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthenelse{\boolean{lineno}}{%
- \RequirePackage[switch]{lineno}
+ \RequirePackage[switch,mathlines]{lineno}
\renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
\AtBeginDocument{\linenumbers}
\ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing is disabled}
+%%% Allow line numbering in AMS math environments.
+%%% postdisplaypenalty adjusted to avoid extra line number at end, see discussion here: https://tex.stackexchange.com/a/461192/
+%%% multline has some problem that puts an extra line number above it.
+%%% Requires xparse and etoolbox
+\NewDocumentCommand{\losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}}
+
+\NewDocumentCommand{\FixAMSMath}{m}{%
+ \AtBeginEnvironment{#1}{\losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1}{\endlinenomath}%
+ \AtBeginEnvironment{#1*}{\losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1*}{\endlinenomath}%
+}
+
+\NewDocumentCommand{\FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\FixAMSMath}}
+\FixAll{align;alignat;gather;flalign;multline}
+
}{%
- \RequirePackage{flushend} % flushend package is NOT compatible with lineno
+ \ProvideDocumentEnvironment{linenomath}{}{}{}
+ \ifthenelse{\boolean{balance}}{% balancing through flushend can produce weird errors
+ \RequirePackage{flushend} % flushend package is NOT compatible with lineno
\AtEndDocument{\flushcolsend}
+ }{\relax}
}
\providecommand{\@LN@col}[1]{\relax}
\providecommand{\@LN}[2]{\relax}
%% ASME page proofs seem to align the number at top of the line, rather than bottom as done here.
-%% ASME puts equation tags in blue
-\RequirePackage{xpatch}
-\xpatchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
-
-
%%%%%%%%%%%%%%%%% FOOTER SET UP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%% footer text names %%%%%%%%%%
+%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%
\newcommand{\JourName}[1]{\gdef\@JourName{#1}}
\providecommand\@JourName{\hbox{ }}
@@ -340,8 +378,27 @@
\renewcommand\@makefntext[1]{%
\noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1} %<== suppress hyphenation
-%% Produces an unmarked footnote about the submission date. Insert \reviewfootnote{..} on first page if desired.
-\def\reviewfootnote{\gdef\@thefnmark{}\@footnotetext}
+%% Produces an unmarked footnote about the revision date.
+%% This command is invoked by \date as part of \MakeTitlePage below.
+%% Text can be anything given as the argument to \date{..}.
+\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{#1}\end{NoHyper}}
+
+% Previous is modified to eliminate missing anchor warning from hyperref that following would cause
+%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
+
+
+%% include a comma for sequential footnotes
+\newcommand\nextToken\relax
+
+\let\oldfootnote\footnote
+\renewcommand\footnote[1]{%
+ \oldfootnote{#1}\futurelet\nextToken\isOtherfnote}
+
+\newcommand\isOtherfnote{%
+ \ifx\footnote\nextToken\textsu{\mdseries,}%
+ \fi%
+}
+
%%%%%%%%% CAPTION RELATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -391,7 +448,7 @@
\RequirePackage{enumitem}
\setlist[enumerate,1]{label = (\arabic*), ref = (\arabic*),labelindent=3mm, leftmargin=*,noitemsep}
-%% have no examples of sublists...
+%% I have no examples of sublists...
%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -601,18 +658,17 @@
}
}
-
\DeclareDocumentCommand\SetAbstract{m}{%
\SetVerticalCoffin{\Abstract}{114mm}{%
\noindent\itshape%
#1
- \@keywords
+ \@keywords\par%
\vspace*{4mm}% <== at bottom of abstract to extend rule
}
}
\DeclareDocumentCommand{\ConstructAuthorBlock}{}{%
-\JoinCoffins\Title[hc,b]\Abstract[hc,t](0pt,-1.5\coffinsep)
+\JoinCoffins\Title[l,b]\Abstract[l,t](0pt,-1.5\coffinsep)
\setlength{\Titleheight}{\CoffinTotalHeight\Title}
\ifdim\Titleheight>\rulecofheight
\setlength{\rulecofheight}{\Titleheight}
@@ -627,10 +683,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Corresponding author gets footnote #1 and subsequent notes are 2, 3, ....
-%%% ASME apparently does not recognize joint first authors...so have not coded that functionality
+%%% ASME apparently does not recognize joint first authors...so I have not coded that functionality
-%%%% Flag for corresponding author (just one expected, although code supports more than one)
-%%%% for more than one, if including email in footnote, place in final command
+%%%% Flag for corresponding author (just one expected, although this code supports more than one)
+%%%% for more than one CA, if including email addresses in the footnote, place them in final the command
\newif\ifCA\CAfalse
\newcommand{\CAemail}[1]{\gdef\@CAemail{#1}}
@@ -666,9 +722,31 @@
\addtocounter{footnote}{1}
\footnotetext{Corresponding author\@CAsep \@CAemail}
\fi
+\ifDate\revfootnote{\@Date} \else\relax \fi
}
-%%%
+%%%%%%%%%%
+
+%% Provide compatibility with titling commands from standard LaTeX article class
+
+\RenewDocumentCommand{\maketitle}{}{\MakeTitlePage}
+\RenewDocumentCommand{\title}{}{\SetTitle}
+
+\RenewDocumentEnvironment{abstract}{+b}{\gdef\tmp{\SetAbstract{#1}}\aftergroup\tmp}{}
+%% Thanks to DPC for the suggestion of \gdef\tmp{...
+
+%% Put date as an unnumbered footnote at bottom of first column
+\newif\ifDate\Datetrue % If true, print a date.
+
+\ExplSyntaxOn
+\RenewDocumentCommand{\date}{m}
+ {%
+ \tl_if_empty:nTF {#1}{\global\Datefalse}{\gdef\@Date{#1}}%
+ }
+\providecommand\@Date{\today}
+\ExplSyntaxOff
+
+\RenewDocumentCommand{\thanks}{m}{\relax} %% disabling this standard command, as it is inconsistent with the format
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%