summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/asmeconf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-07 22:19:18 +0000
committerKarl Berry <karl@freefriends.org>2019-11-07 22:19:18 +0000
commitb1ebca3a4d5011ff74392a28eca5650892f36795 (patch)
tree749ef3e0e0ac959769a28f3676e3d77a90ab1861 /Master/texmf-dist/tex/latex/asmeconf
parent437fdd254d30688066f3b9d3192591b20701b732 (diff)
asmeconf (7nov19)
git-svn-id: svn://tug.org/texlive/trunk@52679 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/asmeconf')
-rw-r--r--Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls67
1 files changed, 47 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls b/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
index 66554fa3842..2ce3ccce4ee 100644
--- a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
+++ b/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
@@ -5,7 +5,9 @@
%%
%% Please note that ASME's journals follow specifications different from ASME conference papers.
%%
-%% This file is version 1.12 dated 2019/10/02.
+%% This file is version 1.13 dated 2019/11/06.
+ \def\versionno{1.13}
+ \def\versiondate{2019/11/06\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -31,7 +33,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-153.
+%% Options for the class are configured on lines 79-169.
%%
%% The class defines two environments: abstract and nomenclature. The latter has an optional argument to
%% control the space between the entries and the definitions.
@@ -67,7 +69,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{asmeconf}[2019/10/02 ASME Conference Paper Format]
+\ProvidesClass{asmeconf}[\versiondate ASME Conference Paper Format]
\LoadClass[twoside,twocolumn,10pt]{article}
% Two-sided layout not used in ASME's specs, although that's how the papers are printed
@@ -120,6 +122,21 @@
\setboolean{lineno}{#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{asmeconf}{lang}[english]{%
+ \PassOptionsToPackage{main=#1}{babel}%
+}
+\define@key{asmeconf}{lang-second}[english]{%
+ \PassOptionsToPackage{#1}{babel}%
+}
+\define@key{asmeconf}{lang-third}[english]{%
+ \PassOptionsToPackage{#1}{babel}%
+}
+
\ProcessKeyvalOptions*
%% option to have colored hyperlinks
@@ -180,13 +197,14 @@
\RequirePackage{booktabs}
\RequirePackage{array}
-\RequirePackage{dcolumn} %%% alignment on decimal places
-\newcolumntype{d}[1]{D{.}{.}{#1}}
+\RequirePackage{dcolumn} %%% alignment on decimal places
+\newcolumntype{d}[1]{D{.}{.}{#1}} %% conflicts with babel's spanish language option.
%%%% FONT related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{mathtools} % extends amsmath
\RequirePackage[utf8]{inputenc}
+\RequirePackage[]{babel}
\RequirePackage[]{newtxtext}
\RequirePackage[varqu,varl]{inconsolata} % sans typewriter font
\RequirePackage[]{newtxmath}
@@ -269,9 +287,10 @@
\RequirePackage[labelfont={sf,bf},hypcap=false]{caption}
\RequirePackage[hypcap=false,list=true]{subcaption}
+\DeclareCaptionLabelFormat{uppercase}{\MakeTextUppercase{#1} #2}
\DeclareCaptionTextFormat{boldmath}{\mathversion{sansbold}#1}
-\captionsetup[figure]{name=FIGURE,labelfont={sf,bf,small},textfont={sf,bf,small},textformat=boldmath, labelsep=colon}
-\captionsetup[table]{name=TABLE,labelfont={sf,bf,small},textfont={sf,bf,small},textformat=boldmath, labelsep=colon,skip=0.5\baselineskip}
+\captionsetup[figure]{labelformat=uppercase, labelfont={sf,bf,small},textfont={sf,bf,small},textformat=boldmath, labelsep=colon}
+\captionsetup[table]{labelformat=uppercase, labelfont={sf,bf,small},textfont={sf,bf,small},textformat=boldmath, labelsep=colon,skip=0.5\baselineskip} %name=TABLE,
%% This construction avoids a failure of hyperref in relation to uppercase caption
%% Discussion: https://tex.stackexchange.com/questions/375695/maketextuppercase-inside-table-captions
@@ -280,7 +299,13 @@
\renewcommand*{\caption}[2][\shortcaption]{\def\shortcaption{#2}\scaption[#1]{\MakeTextUppercase{#2}}}%
}
-
+%%%%%% introduce some caption or section names %%%%%%%%%%%
+ \providecommand{\nomname}{Nomenclature}
+ \providecommand{\keywordname}{Keywords}
+ \providecommand{\appendicesname}{APPENDICES}
+ \providecommand{\JAwords}{Joint first authors}
+ \providecommand{\CAwords}{Corresponding author}
+
%%%%%%%%%%%%%%%%%% Section headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% wish to accommodate hyperref
@@ -303,9 +328,9 @@
%% Assumes that appendices are the last content in paper
\RenewDocumentCommand{\appendix}{}{%
\setcounter{section}{0}
- \pdfbookmark[0]{Appendices}{appendices}
+ \pdfbookmark[0]{\appendicesname}{appendices}
\renewcommand\thesection{\Alph{section}}
- \titleformat{\section}{\mathversion{sansbold}\bfseries\sffamily\raggedright}{APPENDIX \thesection.}{0.5em}{\MakeTextUppercase}
+ \titleformat{\section}{\mathversion{sansbold}\bfseries\sffamily\raggedright}{\MakeTextUppercase{\appendixname}\ \thesection.}{0.5em}{\MakeTextUppercase}
}
%%%%%%%%%%%%% hyperref %%%%%%%%%%%%%%%%%%%
@@ -429,12 +454,12 @@
\DeclareDocumentCommand{\keywords}{m}{%
\IfNoValueTF{#1}{%
\relax}{%
- \long\def\@keywords{\par\smallskip\noindent{\bfseries\sffamily Keywords:} #1}%
+ \long\def\@keywords{\par\smallskip\noindent{\bfseries\sffamily \keywordname:} #1}%
}
}
\DeclareDocumentEnvironment{abstract}{}{%
- \section*{Abstract}\itshape%
+ \section*{\abstractname}\itshape%
}
{\upshape\@keywords%\medskip%
}
@@ -453,13 +478,14 @@
\DeclareDocumentCommand{\entry}{m g}{%
\IfNoValueTF{#2}{%
\itemsep3\p@ plus 1\p@ minus 1\p@%
- \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\nopagebreak% \smallskip
+ \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000%\nopagebreak% \smallskip
}{%
\item[#1\hfill]#2%
+ \@itempenalty=-\@lowpenalty%
}
}
-\DeclareDocumentEnvironment{nomenclature}{O{2em} O{Nomenclature}}{%
+\DeclareDocumentEnvironment{nomenclature}{O{2em} O{\nomname}}{%
\setlength\columnsep{2em}
\setlength{\nomenwidth}{#1}
\section*{#2}
@@ -664,11 +690,12 @@
%% Flag for corresponding author (expecting just one, but if two enter both email addresses and flag both authors)
\newif\ifCA\CAfalse
-% allow for NO email address to be given by omitting second argument
+% allow for NO email address to be given by omitting the argument (g argument is deprecated, seems to have trouble with \IfNoValueTF)
\DeclareDocumentCommand{\CorrespondingAuthor}{g}{%
\ignorespaces$\bm{^\ast}$%
\global\CAtrue%
- \IfNoValueTF{#1}{%
+ % \IfNoValueTF{#1}{%
+ \ifblank{#1}{%
\gdef\@CAsep{\relax}
\gdef\@CAemail{\relax}
}{%
@@ -734,10 +761,10 @@
\centerline{\TypesetCoffin\AuthorBlock}
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\ifJA
- \footnotetext[2]{Joint first authors}
+ \footnotetext[2]{\JAwords}
\fi
\ifCA
- \footnotetext[1]{Corresponding author:\space\@CAemail}
+ \footnotetext[1]{\CAwords\@CAsep\@CAemail}
\fi
\let\thefootnote\savethefootnote
}
@@ -763,10 +790,10 @@
\let\@makefnmark\savemakefnmark
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\ifJA
- \footnotetext[2]{Joint first authors}
+ \footnotetext[2]{\JAwords}
\fi
\ifCA
- \footnotetext[1]{Corresponding author\@CAsep \@CAemail}
+ \footnotetext[1]{\CAwords\@CAsep\@CAemail}
\fi
\let\thefootnote\savethefootnote
}