summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls')
-rw-r--r--Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls925
1 files changed, 647 insertions, 278 deletions
diff --git a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls b/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
index de5fc86ca21..7ed5a6ca179 100644
--- a/Master/texmf-dist/tex/latex/asmeconf/asmeconf.cls
+++ b/Master/texmf-dist/tex/latex/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 2020.
+%% ASME conference requirements as represented on ASME's conference web pages in 2021.
%%
%% This file's version and date:
- \def\versionno{1.26}
- \def\versiondate{2021/02/20\space}
+ \def\versionno{1.27}
+ \def\versiondate{2021/12/26\space}
%%
%% Author: John H. Lienhard, V
%% Department of Mechanical Engineering
@@ -16,7 +16,7 @@
%% This LaTeX template was designed to approach the following aims:
%%
%% 1. Match ASME's current layout and font specifications
-%% 2. With amseconf.bst, match ASME's reference formats and support DOI & URL fields
+%% 2. With amseconf.bst, match ASME's reference formats including DOI & URL (replaces asmems4.bst)
%% 3. Provide hyperref compatibility for hyperlinks, pdf bookmarks, and metadata
%% 4. Set author names in either the traditional grid or the more recent inline style
%% 5. Support citations, footnotes, and bold face, sans serif math in section headings
@@ -31,6 +31,8 @@
%% access language-specific fonts), but the class does not support unicode-math. All packages required
%% by the class are in TeXLive and CTAN (https://ctan.org/).
%%
+%% Use an up-to-date LaTeX distribution: for pdfLaTeX, TeX Live 2016 or later; for LuaLaTeX, TeX Live 2021 or later.
+%%
%% Commands for entering conference headers and author names are specific to this class.
%% See asmeconf-template.tex for details.
%%
@@ -69,12 +71,52 @@
\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.
-%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifdefined\NewDocumentCommand\else
+ \RequirePackage{xparse} % enable older installations to access features recently moved into LaTeX kernel
+\fi
-\RequirePackage{xparse} % access features not yet moved into the LaTeX kernel
\RequirePackage{etoolbox}
\RequirePackage{ifthen}
-\RequirePackage{iftex} % check whether pdftex or another engine is used
+
+%%%%%%%%%%%%% Test compatibility of older distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date (thanks Ulrike Fischer)
+
+\IfFormatAtLeastTF{2017/01/01}{%
+ \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions 2020 or later are strongly recommended for best results}
+ }{%
+ \ClassError{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.}%
+}
+
+\DeclareDocumentCommand\LogNote{m}{%
+ \IfFormatAtLeastTF{2021/11/01}{%
+ \ClassNoteNoLine{asmeconf}{#1}%
+ }{%
+ \ClassWarningNoLine{asmeconf}{#1}%
+ }
+}
+
+%% provide iftex command \ifpdftex for those still running old distributions
+\IfFormatAtLeastTF{2019/11/07}{%
+ \RequirePackage{iftex}% 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).
+ % \csname and \let construct useful for hiding \ifzzz tokens from outer level \if tests.
+ \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}
+}
+
+%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -85,6 +127,11 @@
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}%
+}
+
%%% for mathalfa, we may now pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
\define@key{asmeconf}{mathalfa}{%
\PassOptionsToPackage{#1}{mathalfa}%
@@ -119,7 +166,7 @@
\ac@mainsettrue
\ifthenelse{\equal{#1}{english}}{%
\PassOptionsToPackage{pdflang=en}{hyperref}}{%
- \ClassWarningNoLine{asmeconf}{Selecting #1 as the primary language}%
+ \LogNote{Selecting #1 as the primary language}%
\ifthenelse{\equal{#1}{greek}}{%
\ac@greektrue
\def\ac@LGR{LGR}%
@@ -147,7 +194,7 @@
\ac@mainsettrue%
\ifthenelse{\equal{#1}{english}}{%
\relax}{%
- \ClassWarningNoLine{asmeconf}{Selecting #1 as the primary language}%
+ \LogNote{Selecting #1 as the primary language}%
}%
}
\define@key{asmeconf}{lang-second}[english]{% deprecated option
@@ -157,13 +204,14 @@
\PassOptionsToPackage{#1}{babel}%
}
+\DeclareDefaultOption{}% suppress warning about unused mathalfa option, 2021/06/15
\ProcessKeyvalOptions{asmeconf}
%% if main language was not chosen explicitly, default to English
\ifac@mainset\relax\else
\PassOptionsToPackage{main=english}{babel}%
\PassOptionsToPackage{pdflang=en}{hyperref}
- %\ClassWarningNoLine{asmeconf}{Selecting English as the primary language, since main= not set}%
+ \ClassInfo{asmeconf}{Selecting English as the primary language, since main= not set}%
\fi
%% Turn off these keys now that we're done with them
@@ -176,30 +224,30 @@
}
\NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\ac@DisableOption}}
-\@DisableKeys{main;lang;nodefaultsups;mathalfa;lang-second;lang-third}
+\@DisableKeys{main;lang;nodefaultsups;mathalfa;lang-second;lang-third;vietnamese}
+
%%%%%%%%%%%%% More Language options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% option to use fontspec [fontspec] (e.g, if you need complex language-specific fonts)
+%%% 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}%
\else
- \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)
+ \IfFormatAtLeastTF{2020/10/01}{%
+ \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions after 2020 are needed with [fontspec] for language support}
+ \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/}%
+ }
\fi
}
-\DeclareOption{greek}{%
- \PassOptionsToPackage{greek}{babel}%
- \ac@greektrue
- \def\ac@LGR{LGR}%
-}
-
\DeclareOption{japanese}{% mainly to control loading of fontspec options
\ifac@fontspec
\PassOptionsToPackage{japanese}{babel}%
@@ -209,6 +257,12 @@
\fi
}
+\DeclareOption{greek}{%
+ \PassOptionsToPackage{greek}{babel}%
+ \ac@greektrue
+ \def\ac@LGR{LGR}%
+}
+
%% Cyrillic languages
\NewDocumentCommand\@CyrOptions{>{\SplitList{;}}m}{\ProcessList{#1}{\@CyrOptSet}}
\NewDocumentCommand\@CyrOptSet{m}{%
@@ -248,25 +302,28 @@
\ifpdftex %% PDF/A compliance has only been configured for pdflatex
%
-%%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
+ %%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
\define@key{pdfaopt}{pdf-a}[true]{%
\ac@setpdfatrue
- \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}%
+ \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
}
-%%% to select part 1, 2 or 3
+ %%% to select part 1, 2 or 3
\define@key{pdfaopt}{pdfapart}[3]{%
\PassOptionsToPackage{pdfapart=#1}{hyperref}%
\ifthenelse{\equal{#1}{1}}{\ac@pdfaonetrue}{\relax}%
}
-%%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
+ %%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
\define@key{pdfaopt}{pdfaconformance}[u]{%
\PassOptionsToPackage{pdfaconformance=#1}{hyperref}%
}
- \ProcessKeyvalOptions{pdfaopt}%
\else
- \ifac@pdfaone\ClassWarningNoLine{asmeconf}{PDF/A compliance option requires pdfLaTeX engine}\fi
+ \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}
@@ -277,8 +334,8 @@
%%% option to balance column height on last page [balance]
\newif\ifac@balance\ac@balancefalse
\DeclareOption{balance}{%
- \ac@balancetrue
- \ClassWarningNoLine{asmeconf}{Loading flushend package to balance column height on last page}%
+ \ac@balancetrue
+ \LogNote{Loading flushend package to balance column height on last page}%
}
%%% option to obtain line numbers [lineno]
@@ -298,15 +355,21 @@
\newif\ifac@govt\ac@govtfalse
\DeclareOption{govt}{\ac@govttrue}
-%% option to use grid of authors
+%% 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}%
- \ClassWarningNoLine{asmeconf}{Selected option for a grid of author blocks}%
+ \setboolean{Oldauthors}{true}%
+ \LogNote{Selected option for a grid of author blocks}%
}
\DeclareOption{oldauthors}{%% deprecated, but retained for backward compatibility
- \setboolean{Oldauthors}{true}%
- \ClassWarningNoLine{asmeconf}{Selected option for a grid of author blocks}%
+ \setboolean{Oldauthors}{true}%
+ \LogNote{Selected option for a grid of author blocks}%
}
%% option for slightly larger small capitals font, via newtxtext
@@ -329,7 +392,7 @@
\ClassWarningNoLine{asmeconf}{hyphenate option is not supported by fontspec, will be ignored}%
\else
\PassOptionsToPackage{hyphenate}{inconsolata}% hyphenate is a key via xkeyval in inconsolata
- \ClassWarningNoLine{asmeconf}{Allowing hyphenation of typewriter font}%
+ \LogNote{Allowing hyphenation of typewriter font}%
\fi
}
%% option for monospacing in typewriter font [mono].
@@ -369,7 +432,7 @@
\setlength\bibsep{1pt plus 1pt minus 1pt}
\RequirePackage{graphicx}
-\ifpdf\def\MyColorOption{fixpdftex}\else\ifluatex\def\MyColorOption{luatex}\else\def\MyColorOption{}\fi\fi
+\ifpdftex\def\MyColorOption{fixpdftex}\else\ifluatex\def\MyColorOption{luatex}\else\def\MyColorOption{}\fi\fi
\RequirePackage[hyperref,\MyColorOption,dvipsnames,svgnames,x11names]{xcolor}
%%%%%%%%%%%% Table related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -378,12 +441,12 @@
\RequirePackage{array}
\RequirePackage{dcolumn}% alignment on decimal places
-\newcolumntype{d}[1]{D{.}{.}{#1}}% NB: This conflicts with babel's spanish language option which makes "." an active character.
- % To use "," separator, put this in preamble: \newcolumntype{d}[1]{D{,}{,}{#1}}
+\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}}
-%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% PDF/A compliance related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpdftex % moved fontenc 31 Jan 2021
+\ifpdftex % moved fontenc 2021/01/31
\ifac@pdfaone
\pdfminorversion=4 % for pdf/a-1 need version 4, not 7
\else
@@ -392,13 +455,48 @@
\RequirePackage[T1,\ac@TtwoA,\ac@LGR,\ac@Tfive]{fontenc}% T2A to support Cyrillic (w/o babel warning); LGR - Greek; T5 - Vietnamese
\RequirePackage[utf8]{inputenc} % for backward compatibility with pre-2018 LaTeX distributions
\else
- \ifluatex
- \relax
+ \ifluatex
+ \ifac@setpdfa\ClassWarningNoLine{asmejour}{pdf-a option requires pdfLaTeX engine. Under LuaLaTeX, use %
+ \protect\DeclareDocumentMetadata{pdfstandard=A-3b} before \protect\begin{document}}%
+ \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
+
+\RequirePackage{textcase} %% Allows uppercase titles and captions without errors from math and citations
+
+\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]{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
+\AtBeginDocument{
+ \let\scaption\caption
+ \renewcommand*{\caption}[2][\shortcaption]{\def\shortcaption{#2}\scaption[#1]{\MakeTextUppercase{#2}}}
+}
+
+%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\RequirePackage{mathtools}% loads and extends amsmath
\RequirePackage[]{babel}
@@ -408,22 +506,22 @@
\RequirePackage[]{newtxmath}
\else
\ifac@fontspec
- \RequirePackage[varqu,varl]{inconsolata}% typewriter font for math
- \renewcommand*{\sfdefault}{qhv} % sans font for math
- \renewcommand{\rmdefault}{ntxtlf} % roman font for math
- \RequirePackage[]{newtxmath} % newtxmath still handles mathematics
-
+ \RequirePackage[varqu,varl]{inconsolata} % typewriter font for math
+ \renewcommand\rmdefault{ntxtlf} % roman font for math
+ \RequirePackage[T1]{fontenc} % qhv is not TU encoded, 2021/12/24
+ \DeclareFontFamily{T1}{\sfdefault}{} % sf for math
+ \DeclareFontShape{T1}{\sfdefault}{m}{n}{<-> s*[0.9] ec-qhvr}{} %% see t1qhv.fd
+ \RequirePackage[]{newtxmath} % newtxmath still handles mathematics
\RequirePackage[no-math]{fontspec}
- \defaultfontfeatures{Ligatures= TeX,}
+ \defaultfontfeatures{Ligatures=TeX,}
%
\setmainfont{TeXGyreTermesX}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre
- WordSpace = {1,1.4,1},%% This stretch matches newtxtext a little better.
+ WordSpace = {1,1.4,1},%% This stretch matches newtxtext a little better. 1.4
Extension = .otf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic,
- Ligatures= TeX,
Numbers = Lining,
]
\setsansfont{texgyreheros}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre
@@ -433,7 +531,6 @@
ItalicFont = *-italic,
BoldFont = *-bold,
BoldItalicFont = *-bolditalic,
- Ligatures = TeX,
Numbers = Lining,
Scale=0.9,
]
@@ -445,21 +542,20 @@
ItalicFont = *-Regular,% has no italic face
BoldFont = *-Bold,
BoldItalicFont = *-Bold,% has no italic face
- Ligatures = TeX,
RawFeature = {+ss01,\ssztwo,+ss03},
]
%
% For many languages, using babel commands helps font loading.
% Noto fonts are available at https://github.com/googlefonts
\def\Noto@scale{0.92}
- \def\NotoAra@scale{0.91}% The serif font only
+ \def\Ara@scale{0.91}% For the serif font only
\def\NotoBan@scale{0.92}% 1.} should probably stay consistent within the Noto family.
\def\NotoDev@scale{0.92}% 1.} should probably stay consistent within the Noto family.
\def\NotoTam@scale{0.92}
\def\Noto@color{black}
%
\babelprovide[import, language=Default]{arabic}
- \babelfont [arabic]{rm}[Scale=\NotoAra@scale,
+ \babelfont [arabic]{rm}[Scale=\Ara@scale,
Renderer=HarfBuzz,
Extension = .ttf,
UprightFont = *-Regular,
@@ -521,9 +617,33 @@
\NewDocumentCommand\@LoadBabelCyr{>{\SplitList{;}}m}{\ProcessList{#1}{\@CyrillicBabel}}
\NewDocumentCommand\@CyrillicBabel{m}{%
\babelprovide[import,language=Default,script=Cyrillic]{#1}
- \babelfont [#1]{rm}[Scale=\Noto@scale,Color=\Noto@color]{NotoSerif}
- \babelfont [#1]{sf}[Scale=\Noto@scale,Color=\Noto@color]{NotoSans}
- \babelfont [#1]{tt}[Scale=\Noto@scale,Color=\Noto@color]{NotoSansMono}
+ \babelfont [#1]{rm}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,%
+ ]{NotoSerif}
+ \babelfont [#1]{sf}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,%
+ ]{NotoSans}
+ \babelfont [#1]{tt}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]{NotoSansMono}
}
\@LoadBabelCyr{russian;belarusian;bulgarian;macedonian;serbian-cyrillic;ukrainian}% serbianc has no .ini under fontspec
\setlocalecaption{serbian-cyrillic}{abstract}{Сажетак}% NB: utf-8
@@ -564,20 +684,70 @@
BoldItalicFont = *-Bold,% has no italic face
]{NotoSansDevanagari}
}
- \@LoadBabelDev{hindi;marathi;kashmiri;nepali;sanskrit}% no .ldf files for these languages, but they do have .ini. Nepali: no abstractname
+ \@LoadBabelDev{hindi;marathi;kashmiri;nepali;sanskrit}
+ % No .ldf files for these languages, but they do have .ini files. Nepali: no abstractname
%
% Greek
\babelprovide[import,language=Default]{greek}
- \babelfont [greek]{rm}[Scale=\Noto@scale,WordSpace={1.1},Color=\Noto@color]{NotoSerif}% increase word spacing slightly
- \babelfont [greek]{sf}[Scale=\Noto@scale,WordSpace={1.1},Color=\Noto@color]{NotoSans}
- \babelfont [greek]{tt}[Scale=\Noto@scale,Color=\Noto@color]{NotoSansMono}
+ \babelfont [greek]{rm}[%
+ Scale=\Noto@scale,
+ WordSpace={1.1},% increase word spacing slightly
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,%
+ ]{NotoSerif}
+ \babelfont [greek]{sf}[%
+ Scale=\Noto@scale,
+ WordSpace={1.1},% increase word spacing slightly
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,%
+ ]{NotoSans}
+ \babelfont [greek]{tt}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+ Extension = .ttf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]{NotoSansMono}
%
% Japanese
\ifac@japanese
\RequirePackage[match]{luatexja-fontspec}% japanese typesets *much* better with this loaded
- \setmainjfont{NotoSerifCJKjp}[Scale=\Noto@scale,Color=\Noto@color]
- \setsansjfont{NotoSansCJKjp}[Scale=\Noto@scale,Color=\Noto@color]
- \setmonojfont{NotoSansMonoCJKjp}[Scale=\Noto@scale,Color=\Noto@color]
+ \setmainjfont{NotoSerifCJKjp}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+% Extension = .otf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]
+ \setsansjfont{NotoSansCJKjp}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+% Extension = .ttc,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]
+ \setmonojfont{NotoSansMonoCJKjp}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]
\ltjsetparameter{jacharrange={-1, -2, +3, -4, -5, +6, +7, +8}}% this prevents luatexja from breaking Russian and Greek.
% see: https://tex.stackexchange.com/questions/222320/russian-in-document-with-japanese-as-main-language-lualatex-ltjsarticle
% Need at least one of the following to load the Japanese dictionary.
@@ -593,13 +763,21 @@
\babelfont [japanese]{sf}[%
Scale=\Noto@scale,
Color=\Noto@color,
- Extension = .ttc,
+ % Extension = .ttc,
UprightFont = *-Regular,
ItalicFont = *-Regular,% has no italic face
BoldFont = *-Bold,
BoldItalicFont = *-Bold,% has no italic face
- ]{NotoSansCJK}
- \babelfont [japanese]{tt}[Scale=\Noto@scale,Color=\Noto@color]{NotoSansMonoCJKjp}% renders same as Sans!
+ ]{NotoSansCJKjp}
+ \babelfont [japanese]{tt}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+% Extension = .ttc,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]{NotoSansMonoCJKjp}% renders same as Sans!
\fi
% Note: \japaneseabstractname is not defined if japanese is not called as a package option.
@@ -623,7 +801,15 @@
BoldFont = *-Bold,
BoldItalicFont = *-Bold,% has no italic face
]{NotoSansCJK}
- \babelfont [korean]{tt}[Scale=\Noto@scale,Color=\Noto@color]{NotoSansMonoCJKkr}
+ \babelfont [korean]{tt}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+% Extension = .ttc,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]{NotoSansMonoCJKkr}
\renewcommand\koreanabstractname{초록}% NB: utf-8
% Simplified Chinese
@@ -646,7 +832,15 @@
BoldFont = *-Bold,
BoldItalicFont = *-Bold,% has no italic face
]{NotoSansCJK}
- \babelfont [chinese-simplified]{tt}[Scale=\Noto@scale,Color=\Noto@color]{NotoSansMonoCJKsc}
+ \babelfont [chinese-simplified]{tt}[%
+ Scale=\Noto@scale,
+ Color=\Noto@color,
+% Extension = .ttc,
+ UprightFont = *-Regular,
+ ItalicFont = *-Regular,% has no italic face
+ BoldFont = *-Bold,
+ BoldItalicFont = *-Bold,% has no italic face
+ ]{NotoSansMonoCJKsc}
%
% Traditional Chinese (includes characters for Cantonese also)
\babelprovide[import,language=Default]{chinese-traditional}
@@ -740,7 +934,7 @@
%% font size selection
%% ASME's specs differ slightly from latex standard article-10 class
-\renewcommand\LARGE{\@setfontsize\LARGE{16}{19.2}} %{18}{21.6}} updated 7/7/19 to match new ASME spec.
+\renewcommand\LARGE{\@setfontsize\LARGE{16}{19.2}} %{18}{21.6}} updated 2019/7/7 to match new ASME spec.
% ...default is 17.28/22 ... used for paper#
\renewcommand\large{\@setfontsize\large{11}{13.6}} % default is 12/14 ... used for headings
@@ -756,11 +950,13 @@
\DeclareMathVersion{sansbold}
\SetSymbolFont{letters}{sansbold}{OML}{ntxsfmi}{b}{it}
\SetSymbolFont{lettersA}{sansbold}{U}{ntxsfmia}{b}{it}
-\SetSymbolFont{symbols}{sansbold}{LMS}{ntxsy}{b}{n}
+\IfFormatAtLeastTF{2016/01/05}{%
+ \SetSymbolFont{symbols}{sansbold}{LMS}{ntxsy}{b}{n}
+ }{\relax}
\SetSymbolFont{largesymbols}{sansbold}{LMX}{ntxexx}{b}{n}% added 25 Jan 2021
\SetSymbolFont{largesymbolsTXA}{sansbold}{U}{ntxexa}{b}{n}% added 25 Jan 2021
\SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n}
-\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% changed from it 31 Jan 2021, \mathsf is upright.
+\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% changed from it, 2021/01/31: \mathsf is upright.
% Nice solution from DPC to prevent aux file errors (due to active characters from babel) when switching from pdflatex to lualatex.
@@ -769,6 +965,7 @@
\ifx\directlua\undefined\else\endinput\fi}}}
\fi
+
%%%%%%%% Footers and Footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
@@ -814,29 +1011,11 @@
\RenewDocumentCommand\@makefntext{m}{%
\noindent\makebox[2ex][r]{\@makefnmark}#1}% <== To discourage hyphenation, do \hyphenpenalty=300\exhyphenpenalty=300 before #1
-%%%%%%%%% Caption related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\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]{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
-\AtBeginDocument{
- \let\scaption\caption
- \renewcommand*{\caption}[2][\shortcaption]{\def\shortcaption{#2}\scaption[#1]{\MakeTextUppercase{#2}}}%
-}
%%%%%%%%% Section headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% wish to accommodate hyperref
-\RequirePackage{textcase} %% Allows uppercase titles and captions without errors from math and citations
-
\RequirePackage[raggedright,indentafter]{titlesec}
%% ASME specifies 10 pt headings
@@ -845,9 +1024,9 @@
\titleformat{\subsection}{\mathversion{sansbold}\bfseries\sffamily\raggedright}{\thesubsection}{0.5em}{}
\titleformat{\subsubsection}[runin]{\mathversion{sansbold}\bfseries\sffamily}{\thesubsubsection}{0.5em}{}[.\hspace*{0.5em}]
-\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{1pt plus 1pt minus 1pt} % from 2 pt 2 pt 1 pt, 7/7/19
+\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{1pt plus 1pt minus 1pt} % from 2 pt 2 pt 1 pt, 2019/7/7
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 1pt}
-\titlespacing\subsubsection{\parindent}{6pt plus 3pt minus 2pt}{0pt plus 2pt minus 1pt} % from 12 4 3, 7/7/19
+\titlespacing\subsubsection{\parindent}{6pt plus 3pt minus 2pt}{0pt plus 2pt minus 1pt} % from 12 4 3, 2019/7/7
%% Special handling of the appendices
%% Assumes that appendices are the last content in paper
@@ -860,63 +1039,97 @@
%%%%%%%%%% Hyperref, bookmarks, and PDF/A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifac@setpdfa
- %%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in the newtx documentation.
- \pdfgentounicode=1 %% enable CMaps
- \input glyphtounicode.tex %% lists of mappings
- \InputIfFileExists{glyphtounicode-cmr.tex}{}{} %% additional mappings
- \InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings
-%
- %%% a fairly generic RGB color profile, aimed at on-screen rendering (not print production)
- \immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
- \pdfcatalog{%
- /OutputIntents [
- <<
- /Type /OutputIntent
- /S /GTS_PDFA1
- /DestOutputProfile \the\pdflastobj\space 0 R
- /OutputConditionIdentifier (sRGB)
- /Info (sRGB)
- >>
- ]
- }%
+\newif\if@asme@pdfmanagement% Thanks to Ulrike Fischer
+
+\ExplSyntaxOn
+ \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
+
+\ifpdftex
+ %%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in the newtx documentation.
+ \IfFormatAtLeastTF{2020/10/01}{\relax}{%
+ \pdfgentounicode=1 %% enable CMaps; has moved into the latex kernel Oct 2020
+ \input glyphtounicode.tex %% lists of mappings; has moved into the latex kernel Oct 2020
+ }
+ \InputIfFileExists{glyphtounicode-cmr.tex}{}{} %% additional mappings
+ \InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings
+
+ \ifac@setpdfa
+ %%%% the pdfmanagement options are experimental, from Ulrike Fischer 2021/06/12
+ \if@asme@pdfmanagement
+ \ClassInfo{asmeconf}{pdfmanagement is defined. Class file will not load a color profile}
+ \else
+ \ClassInfo{asmeconf}{NOTE: pdfmanagement not defined. Class file will load a color profile}%
+ %%% a fairly generic RGB color profile, aimed at on-screen rendering (not print production)
+ \immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
+ \pdfcatalog{%
+ /OutputIntents [
+ <<
+ /Type /OutputIntent
+ /S /GTS_PDFA1
+ /DestOutputProfile \the\pdflastobj\space 0 R
+ /OutputConditionIdentifier (sRGB)
+ /Info (sRGB)
+ >>
+ ]
+ }%
+ \fi
+ \fi
\fi
\RequirePackage{hyperxmp}% improve transfer of metadata to pdf
-\RequirePackage[%
+\RequirePackage[psdextra]{hyperref} % recent kernel transition suggests providing most hyperref options via \hypersetup,
+ % but setting psdextra here (for additional math support in bookmarks) 2021/12/01
+
+\hypersetup{%
unicode, % Unicode encoded PDF strings
- psdextra, % additional support for math in pdf bookmarks
pdfborder={0 0 0},%
- bookmarks=true, %
bookmarksnumbered=true,%
- bookmarksopen=true,%
+ bookmarksopen=true,
bookmarksopenlevel=1,%
-% colorlinks=true,%%% <=== set true to get colored type, but do so via package options
linkcolor=blue, %
citecolor=blue, %
- urlcolor=blue, %
- breaklinks=true,%
- pdftitle={}, % <=== add in .tex file
- pdfkeywords={}, % <=== add in .tex file
+ urlcolor=blue, %
+ filecolor=red, % added 2021/12/02, to make certain broken links more apparent
pdfnewwindow=true,%
- pdfpagelayout=SinglePage, %TwoPageRight,% changed this 08/12/20
- pdfauthor={}, % <=== add in .tex file
+ pdfpagelayout=SinglePage, %TwoPageRight,% changed this 2020/12/08
pdfdisplaydoctitle=true%
- ]{hyperref}
+% colorlinks=true,% <=== set true to get colored type, but do so via package options in .tex file
+}
\urlstyle{same} % don't switch to typewriter font for urls
\RequirePackage{doi} % supports the nasty characters in some doi's
\renewcommand{\doitext}{DOI } % change to this from default value, {doi:}, per ASME specification
\RequirePackage{bookmark} % improves handling of pdf bookmarks
+\providecommand*{\toclevel@subfigure}{1}% <== to address unknown bookmark level of subfigure. 2021/12/24
+
+\providecommand\hrefurl[2]{\href{#1}{#2}}% to address certain issues around URL recognition with new pdf management code, 2021/12/02
+
+%%% ==> recent and evolving development of \pdfstring removes all robust commands from bookmarks, so
+%%% the following interventions may become unnecessary over time (2021/12/01).
+
%% 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}
\pdfstringdefDisableCommands{%
\def\bm#1#{\relax}%
}
-%% Let's disable \( and \) in pdf bookmarks, 28/2/20
+%% Let's disable \( and \) in pdf bookmarks, 2020/02/28
\pdfstringdefDisableCommands{%
\def\({\relax}%
\def\){\relax}%
@@ -934,7 +1147,7 @@
%% 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 28/2/20
+% \patchcmd{\section}{\sectionmark}{\let\footnote\@gobble\sectionmark}{}{}% <== not really needed in this context, 2020/02/28
\pdfstringdefDisableCommands{%
\def\footnote#1{}%
}
@@ -943,7 +1156,7 @@
%% if given in section headings. Ditto for \eqref
%
\patchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\footnote}{}{}
-\patchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\eqref}{}{} %% corrected 24 Jan 2020
+\patchcmd{\@uclcnotmath}{\@nonchangecase\ref}{\@nonchangecase\ref\@nonchangecase\eqref}{}{} %% corrected 2020/01/24
%%% Create an optional argument for unnumbered sections and set pdf bookmark (thru \addcontentsline).
@@ -956,7 +1169,7 @@
{\svsection*{#3}\phantomsection%
{\IfNoValueTF {#2}
{\addcontentsline{toc}{section}{#3}}
- {\addcontentsline{toc}{section}{#2}}% removed trailing space 28/2/20
+ {\addcontentsline{toc}{section}{#2}}% removed trailing space 2020/02/28
}%
}%
{\IfNoValueTF {#2}
@@ -1032,15 +1245,25 @@
%% Nomenclature environment %%%%%%%%%%%%%%%%%%
%%
-%% 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.
\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}{%
+%\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%
}{%
@@ -1049,12 +1272,14 @@
}%
}
-%% A separate command command for nomenclature subheadings (xparse "g" argument used in \entry is deprecated)
+%% A separate command command for nomenclature subheadings
\NewDocumentCommand\EntryHeading{m}{%
\itemsep3\p@ plus 1\p@ minus 1\p@%
\goodbreak\item[\itshape#1\hfill]\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{\nomenwidth}{#1}
@@ -1111,7 +1336,7 @@
\NewDocumentCommand\papertitle{}{%
\vspace*{3\baselineskip}
\parbox{\linewidth}{\mathversion{sansbold}\centering{\bfseries\sffamily\large%
-\MakeTextUppercase{\@PaperTitle}\par}%%% <=== extra \par to make leading stick. See adjustment in \MakeTitle
+\MakeTextUppercase{\@PaperTitle}\par}%%% <=== extra \par to make font leading stick. See adjustment in \MakeTitle
}%
}
@@ -1133,7 +1358,7 @@
%% Flag for corresponding author (expecting just one, but if two enter both email addresses and flag both authors)
\newif\ifac@CA\ac@CAfalse
-\NewDocumentCommand\CorrespondingAuthor{m}{% Revised this command 29/12/20, to make the CA email mandatory but possibly empty
+\NewDocumentCommand\CorrespondingAuthor{m}{% Revised this command 2020/12/29, to make the CA email mandatory but possibly empty
\ignorespaces$\bm{^\ast}$%
\global\ac@CAtrue%
\ifblank{#1}{%
@@ -1147,7 +1372,7 @@
%%%% option to use the traditional grid layout of authors or the inline style
-\ifthenelse{\boolean{Oldauthors}}{% This command works better than \if... in this context.
+\ifthenelse{\boolean{grid}\or\boolean{Oldauthors}}{% This command works better than \if... in this context.
%%%%%%%%%%%%%%%%%%%% Gridded author layout %%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1156,91 +1381,247 @@
%% Allows for up to fifteen author groups... if you need more authors, the edits should be obvious
%% You can put multiple authors above a single affiliation to reduce number of author blocks needed.
\NewCoffin{\firstrowauthorblock}
- \SetHorizontalCoffin\firstrowauthorblock{}
\NewCoffin{\secondrowauthorblock}
- \SetHorizontalCoffin\secondrowauthorblock{}
\NewCoffin{\thirdrowauthorblock}
- \SetHorizontalCoffin\thirdrowauthorblock{}
\NewCoffin{\fourthrowauthorblock}
- \SetHorizontalCoffin\fourthrowauthorblock{}
\NewCoffin{\fifthrowauthorblock}
- \SetHorizontalCoffin\fifthrowauthorblock{}
+ \AtBeginDocument{% corrected 2021/12/01
+ \SetHorizontalCoffin\firstrowauthorblock{}
+ \SetHorizontalCoffin\secondrowauthorblock{}
+ \SetHorizontalCoffin\thirdrowauthorblock{}
+ \SetHorizontalCoffin\fourthrowauthorblock{}
+ \SetHorizontalCoffin\fifthrowauthorblock{}
+ }
\newcounter{authorno}
\setcounter{authorno}{0}
\newlength{\coffinsep}% horizontal space between coffins
\setlength{\coffinsep}{0.03\textwidth}
-
- \NewDocumentCommand\SetAuthorBlock{mm}{%
- \addtocounter{authorno}{1}%
- \SetVerticalCoffin{\authorblock}{0.3\textwidth}{%
- \centering\sffamily%
- \textbf{\ignorespaces#1\ignorespaces}\\
- #2%
- }
- \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)
+
+ \ifthenelse{\boolean{grid}}{%
+ \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\@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
+ \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
- \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)
+ \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
- \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)
+ \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
- \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)
+ \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
- \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 [authorgrid] option}
- \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%
+ }
+ \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 [authorgrid] 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{}{%
\ifnum\value{authorno}>3
\JoinCoffins\firstrowauthorblock[hc,b]\secondrowauthorblock[hc,t](0pt, -1.5\baselineskip)
@@ -1255,52 +1636,7 @@
\JoinCoffins\firstrowauthorblock[hc,b]\fifthrowauthorblock[hc,t](0pt, -1.5\baselineskip)
\fi
\centerline{\TypesetCoffin\firstrowauthorblock}%% in this instance, \centerline is better than \centering
- }
-
- % Changed to follow syntax of the inline style, which is much easier to use! 29/12/2020
- % % 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 29/12/2020
- \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%
- }
-
%%% otherwise use the new compact layout of authors
}{% i.e., this begins "else"
@@ -1308,9 +1644,9 @@
\NewCoffin{\AuthorBlock}
\NewCoffin{\AffiliationBlock}
\NewCoffin{\AffiliationsBlock}
-
+ \AtBeginDocument{\SetHorizontalCoffin\AffiliationsBlock{}}% corrected 2021/12/01
+
%% NB: \parbox width to \textwidth (full page) not \linewidth (single column)
- \SetHorizontalCoffin\AffiliationsBlock{}
\NewDocumentCommand\SetAuthors{m}{%
\SetHorizontalCoffin\AuthorBlock{%
\parbox{\textwidth}{\centering\sffamily\bfseries\ignorespaces#1\ignorespaces}%
@@ -1321,14 +1657,19 @@
\NewDocumentCommand\SetAffiliation{mm}{%
\SetVerticalCoffin\AffiliationBlock{\textwidth}{%
- \centering\sffamily\footnotemark[#1]#2\ignorespaces%
+ \ifblank{#1}{%
+ \centering\sffamily#2\ignorespaces}{% empty argument for one author or one affiliation, where affiliation need not be tagged
+ \centering\sffamily\footnotemark[#1]#2\ignorespaces}%
}
\JoinCoffins\AffiliationsBlock[hc,b]\AffiliationBlock[hc,t](0pt,-1pt)
}
%%% Affiliation mark
\NewDocumentCommand{\affil}{m}{%
- {\bfseries\footnotemark[#1]}%
+ \ifblank{#1}{%
+ \ClassWarning{asmeconf}{Empty affiliation tag}%
+ \@gobble% 9 Dec 2021, addresses modification for commas
+ }{\bfseries\footnotemark[#1]}%
}
%%% to deal with sequential notes as, e.g., "1,*", or "1,2,*" %%%%%%%%%%
@@ -1386,7 +1727,9 @@
\vspace*{2\baselineskip}
\ifthenelse{\boolean{Oldauthors}}{%
\ConstructAuthorBlock}{%
- \SetAuthorBlock}
+ \ifthenelse{\boolean{grid}}{%
+ \@SetAuthorBlock\ConstructAuthorBlock}{%
+ \SetAuthorBlock}}
\vspace*{3\baselineskip}
\end{@twocolumnfalse}
]
@@ -1415,24 +1758,29 @@
%% 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
-\NewDocumentCommand\versionfootnote{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{#1}\end{NoHyper}}
-\RenewDocumentCommand{\date}{m}{\versionfootnote{#1}}% if one wants to use \date this same way; fixed bug 14/01/2021
+%% This version provides working hyperlink, but 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
+\NewDocumentCommand\versionfootnote{m}{\def\@thefnmark{}\begin{NoHyper}\@footnotetext{#1}\end{NoHyper}}
+
+\RenewDocumentCommand{\date}{m}{\versionfootnote{#1}}% if one wants to use \date this same way; fixed bug 2021/01/14
%%%%%%%%%%%%%% Sans serif upright greek and sans mathversion %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Provide sans-serif *upright* Greek letters, following a suggestion by Michael Sharpe (March 2019).
%% Following Sharpe's newtxsf implementation of the STIX fonts, under the LaTeX Project Public License.
-%% (Note that \mathversion{sansbold} provides sans-serif *italic* Greek letters.) Various edits 25 Jan 2021
+%% (Note that \mathversion{sansbold} provides sans-serif *italic* Greek letters.) Various edits 2021/01/25
\DeclareSymbolFont{lettersAB}{U}{ntxsfmia}{m}{it}
\SetSymbolFont{lettersAB}{normal}{U}{ntxsfmia}{m}{it}
\SetSymbolFont{lettersAB}{bold}{U}{ntxsfmia}{b}{it}
-\SetSymbolFont{lettersAB}{sansbold}{U}{ntxsfmia}{b}{it}% added 25/01/2021, to get this bold in captions, etc.
+\SetSymbolFont{lettersAB}{sansbold}{U}{ntxsfmia}{b}{it}% added 2021/01/25, to get this bold in captions, etc.
\DeclareFontSubstitution{U}{ntxsfmia}{m}{it}
-\DeclareMathSymbol{\sfGamma}{\mathalpha}{lettersAB}{0}% adjust to avoid overwriting newtxmath commands 25/01/2021
+\DeclareMathSymbol{\sfGamma}{\mathalpha}{lettersAB}{0}% adjust to avoid overwriting newtxmath commands, 2021/01/25
\DeclareMathSymbol{\sfDelta}{\mathalpha}{lettersAB}{1}
\DeclareMathSymbol{\sfTheta}{\mathalpha}{lettersAB}{2}
\DeclareMathSymbol{\sfLambda}{\mathalpha}{lettersAB}{3}
@@ -1466,7 +1814,7 @@
\DeclareMathSymbol{\sfrho}{\mathalpha}{lettersAB}{26}
\DeclareMathSymbol{\sfsigma}{\mathalpha}{lettersAB}{27}
\DeclareMathSymbol{\sftau}{\mathalpha}{lettersAB}{28}
-\DeclareMathSymbol{\sfUpsilon}{\mathalpha}{lettersAB}{29}
+\DeclareMathSymbol{\sfupsilon}{\mathalpha}{lettersAB}{29}
\DeclareMathSymbol{\sfphi}{\mathalpha}{lettersAB}{30}
\DeclareMathSymbol{\sfchi}{\mathalpha}{lettersAB}{31}
@@ -1475,7 +1823,7 @@
\DeclareMathSymbol{\sfvarepsilon}{\mathalpha}{lettersAB}{34}
\DeclareMathSymbol{\sfvartheta}{\mathalpha}{lettersAB}{35}
-\DeclareMathSymbol{\sfvarpi}{\mathord}{lettersAB}{36}% added these 25/01/2021
+\DeclareMathSymbol{\sfvarpi}{\mathord}{lettersAB}{36}% added these 2021/01/25
\DeclareMathSymbol{\sfvarrho}{\mathord}{lettersAB}{37}
\DeclareMathSymbol{\sfvarsigma}{\mathord}{lettersAB}{38}
\DeclareMathSymbol{\sfvarphi}{\mathord}{lettersAB}{39}
@@ -1486,7 +1834,7 @@
\DeclareMathSymbol{\sfhslash}{\mathalpha}{lettersAB}{52}% this is not upright
\DeclareMathSymbol{\sfhbar}{\mathalpha}{lettersAB}{53}% this is not upright
-\DeclareMathAccent{\grave}{\mathord}{lettersAB}{254}% added these after bug report 24/01/2021
+\DeclareMathAccent{\grave}{\mathord}{lettersAB}{254}% added these after bug report 2021/01/24
\DeclareMathAccent{\acute}{\mathord}{lettersAB}{255}
\DeclareMathAccent{\check}{\mathord}{lettersAB}{186}
\DeclareMathAccent{\breve}{\mathord}{lettersAB}{187}
@@ -1496,30 +1844,51 @@
\DeclareMathAccent{\dot}{\mathord}{lettersAB}{224}
\DeclareMathAccent{\tilde}{\mathord}{lettersAB}{219}
-%%% sans math version, potential value with PGFPlots, e.g., not for use in main text. 25/01/2021 %%%
+%%% sans math version, potential value with PGFPlots, e.g., not for use in main text. 2021/01/25 %%%
\DeclareMathVersion{sans}
\SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it}
\SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it}
\SetSymbolFont{lettersAB}{sans}{U}{ntxsfmia}{m}{it}
-\SetSymbolFont{symbols}{sans}{LMS}{ntxsy}{m}{n}
+\IfFormatAtLeastTF{2016/01/05}{%
+ \SetSymbolFont{symbols}{sans}{LMS}{ntxsy}{m}{n}
+ }{\relax}
\SetSymbolFont{largesymbols}{sans}{LMX}{ntxexx}{m}{n}
\SetSymbolFont{largesymbolsTXA}{sans}{U}{ntxexa}{m}{n}
\SetSymbolFont{operators}{sans}{\encodingdefault}{\sfdefault}{m}{n}
-\SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n}% make upright 31 Jan 2021.
+\SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n}% make upright 2021/01/31.
%%%%%%%%%%%%%%%%%% Times-like fonts for specific languages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdftex % Under lualatex, babel has problems with the following approach. Use [fontspec] option instead.
- \ifac@vietnamese
- \RequirePackage{substitutefont}%
- \substitutefont{T5}{\rmdefault}{qtm}% Vietnamese is in T5 encoding, can use Tex Gyre Termes font (qtm);
- %\substitutefont{T5}{\sfdefault}{qhv}% qhv = Heros (helvetica). We get the right font w/o loading this.
-
+ \ifac@vietnamese
+ % 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.
- % From TeX Gyre Cursor .fd file by B. Jackowski and J. M. Nowacki, released under the GUST license
+
+ % From TeX Gyre Termes and Cursor .fd files by B. Jackowski and J. M. Nowacki, released under the GUST license
\begingroup
\nfss@catcodes
+ \def\qtm@scale{s*[0.97]}
+ \DeclareFontFamily{T5}{\rmdefault}{}% not adjusting wordspacing
+ \DeclareFontShape{T5}{\rmdefault}{b}{sc}{<-> \qtm@scale t5-qtmb-sc}{}
+ \DeclareFontShape{T5}{\rmdefault}{b}{n}{<-> \qtm@scale t5-qtmb}{}
+ \DeclareFontShape{T5}{\rmdefault}{b}{scit}{<-> \qtm@scale t5-qtmbi-sc}{}
+ \DeclareFontShape{T5}{\rmdefault}{b}{it}{<-> \qtm@scale t5-qtmbi}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{sc}{<-> \qtm@scale t5-qtmr-sc}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{n}{<-> \qtm@scale t5-qtmr}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{scit}{<-> \qtm@scale t5-qtmri-sc}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{it}{<-> \qtm@scale t5-qtmri}{}
+ \DeclareFontShape{T5}{\rmdefault}{bx}{sc}{<->ssub * qtm/b/sc}{}
+ \DeclareFontShape{T5}{\rmdefault}{bx}{n}{<->ssub * qtm/b/n}{}
+ \DeclareFontShape{T5}{\rmdefault}{bx}{scit}{<->ssub * qtm/b/scit}{}
+ \DeclareFontShape{T5}{\rmdefault}{bx}{it}{<->ssub * qtm/b/it}{}
+ \DeclareFontShape{T5}{\rmdefault}{b}{sl}{<->sub * qtm/b/it}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{sl}{<->sub * qtm/m/it}{}
+ \DeclareFontShape{T5}{\rmdefault}{b}{scsl}{<->sub * qtm/b/scit}{}
+ \DeclareFontShape{T5}{\rmdefault}{m}{scsl}{<->sub * qtm/m/scit}{}
+
\def\qcr@scale{s*[0.95]}
\DeclareFontFamily{T5}{\ttdefault}{}% not adjusting wordspacing
\DeclareFontShape{T5}{\ttdefault}{b}{sc}{<-> \qcr@scale t5-qcrb-sc}{}
@@ -1540,7 +1909,7 @@
\DeclareFontShape{T5}{\ttdefault}{m}{scsl}{<->sub * qcr/m/scit}{}
\endgroup
\fi
-
+
\ifac@greek
%% Based on Artemisia fd files by A. Tsolomitis and ideas from substitutefont package by G. Milde, both LaTeX Public License.
\begingroup
@@ -1601,10 +1970,10 @@
\DeclareFontShape{LGR}{\ttdefault}{bx}{sl}{<->\DejaVuSansMono@@scale DejaVuSansMono-TLF/b/it}{}
\DeclareFontShape{LGR}{\ttdefault}{bx}{it}{<->\DejaVuSansMono@@scale DejaVuSansMono-TLF/b/it}{}
\DeclareFontShape{LGR}{\ttdefault}{bx}{n}{ <->\DejaVuSansMono@@scale DejaVuSansMono-TLF/b/n}{}
-
+
\endgroup
\fi
-
+
\ifac@cyrillic
%% Paratype fonts for cyrillic, maintained by Pavel Farar, under Latex Project Public License
\begingroup
@@ -1652,7 +2021,7 @@
\DeclareFontShape{T2A}{\ttdefault}{bx}{n}{<->ssub * PTMono-TLF/b/n}{}
\DeclareFontShape{T2A}{\ttdefault}{bx}{sl}{<->ssub * PTMono-TLF/b/sl}{}
- \endgroup
+ \endgroup
\fi
\fi