summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/asmeconf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-10-20 03:02:28 +0000
committerNorbert Preining <norbert@preining.info>2023-10-20 03:02:28 +0000
commitc9ab6fbcc0f960c5e669419f2565ff121a7f33fd (patch)
tree0f4c2f95a5c127504a5a505ad264255d5db049fb /macros/latex/contrib/asmeconf
parent05e4c0a34b97237b4cd2f3fb0d5cd03e73b8e55e (diff)
CTAN sync 202310200302
Diffstat (limited to 'macros/latex/contrib/asmeconf')
-rw-r--r--macros/latex/contrib/asmeconf/README.md7
-rw-r--r--macros/latex/contrib/asmeconf/asmeconf-template.pdfbin471907 -> 476945 bytes
-rw-r--r--macros/latex/contrib/asmeconf/asmeconf-template.tex17
-rw-r--r--macros/latex/contrib/asmeconf/asmeconf.cls89
4 files changed, 78 insertions, 35 deletions
diff --git a/macros/latex/contrib/asmeconf/README.md b/macros/latex/contrib/asmeconf/README.md
index 39f1460ad5..0a4a3a9c0c 100644
--- a/macros/latex/contrib/asmeconf/README.md
+++ b/macros/latex/contrib/asmeconf/README.md
@@ -1,7 +1,7 @@
#asmeconf: A latex template for ASME conference papers#
- Version 1.34 dated 2022/12/30.
+ Version 1.35 dated 2022/10/19.
####Overview####
This class provides a LaTeX template for ASME Conference papers formatted according to
@@ -79,6 +79,11 @@
---
####Change log####
+ v1.35 (2022/10/19)
+ - Adjust pdf-a code to accommodate recent changes to hyperxmp package. NOTE: \\DocumentMetadata{ ..} is now preferred to using class option [pdf-a].
+ - Add option to not use boldface text in captions: [unboldcaption]
+ - Add mathversion sans for sans-serif math and set as default in unbolded captions
+
v1.34 (2022/12/30)
- Roll back advanced metadata feature for compatibility with pre-2022 installations
diff --git a/macros/latex/contrib/asmeconf/asmeconf-template.pdf b/macros/latex/contrib/asmeconf/asmeconf-template.pdf
index 06ceb434d8..f3cf860b33 100644
--- a/macros/latex/contrib/asmeconf/asmeconf-template.pdf
+++ b/macros/latex/contrib/asmeconf/asmeconf-template.pdf
Binary files differ
diff --git a/macros/latex/contrib/asmeconf/asmeconf-template.tex b/macros/latex/contrib/asmeconf/asmeconf-template.tex
index 01191471f7..318e173221 100644
--- a/macros/latex/contrib/asmeconf/asmeconf-template.tex
+++ b/macros/latex/contrib/asmeconf/asmeconf-template.tex
@@ -4,7 +4,7 @@
%% This file is asmeconf-template.tex, a LaTeX template to format ASME Conference papers according to
%% the requirements on ASME's conference web pages, and including hypertext support for the pdf.
%%
-%% This file is version 1.34 dated 2022/12/30
+%% This file is version 1.35 dated 2023/10/19
%%
%% As of version 1.11, this template defaults to ASME's newer conference guidelines first posted July 2019.
%% Those guidelines changed the requested author block formatting to be inline.
@@ -78,18 +78,19 @@
%%
%% LICENSE:
%%
-%% Copyright (c) 2022 John H. Lienhard
+%% Copyright (c) 2023 John H. Lienhard
%%
%% Offered under the MIT license: https://ctan.org/license/mit
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% New pdf management code (June 2021); with this, the class option [pdf-a] can be omitted.
-%% This change to the LaTeX kernel is being phased-in by the LaTeX3 team. Can delete if it gives you trouble.
-%% Under LuaLaTeX, choose pdfstandard=A-3b (and be cautious when loading extra fonts)
+%% RECOMMENDED newpdf management code (June 2022).
+%% This addition the LaTeX kernel was recently made by the LaTeX Project team
+%% see https://www.latex-project.org/news/latex2e-news/ltnews35.pdf
+%% Uncomment the next lines and omit the option [pdf-a] if you are using an up-to-date LaTeX platform
%\DocumentMetadata{%
-% pdfstandard=A-3b,% A-2b, A-2u, A-3b, or A-3u
+% pdfstandard=A-3b,% A-2b, A-2u, A-3b, or A-3u (don't use u options with LuaLaTeX)
% pdfversion=1.7,
% lang=en-US,
%}
@@ -106,7 +107,7 @@
%%%%% pdf metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hypersetup{%
- pdfauthor={John H. Lienhard},
+ pdfauthor={John H. Lienhard}, % <=== change to YOUR name
pdftitle={ASME Conference Paper LaTeX Template}, % <=== change to YOUR pdf file title
pdfkeywords={ASME conference paper, LaTeX template, BibTeX style},% <=== change to YOUR pdf keywords
pdfsubject = {Describes the asmeconf LaTeX template}, % <=== change to YOUR subject
@@ -276,7 +277,7 @@ Sections may either be numbered or left unnumbered.
Simple mathematical expressions can be used in either captions or section headings. For a section heading that includes more complicated math (and macros), you may use the optional argument of \verb|\section[..]{..}| to create a pdf bookmark without losing characters or producing warnings or errors. See the \texttt{asmeconf-template.tex} source file for examples of this procedure. These bookmarks should usually be text expressions, although some math is supported.
-To override the \texttt{sansbold} math version in captions, put \verb|\NoCaseChange{\mathversion{normal}}| in the caption.
+To eliminate boldface type in caption text and math, use the class option \texttt{[unboldcaption]}. To avoid \texttt{sans} math in captions, put \verb|\NoCaseChange{\mathversion{normal}}| in the caption.
\subsection{Subsection and Sub-subsection Headings}
diff --git a/macros/latex/contrib/asmeconf/asmeconf.cls b/macros/latex/contrib/asmeconf/asmeconf.cls
index 253e27d8f9..2d523be750 100644
--- a/macros/latex/contrib/asmeconf/asmeconf.cls
+++ b/macros/latex/contrib/asmeconf/asmeconf.cls
@@ -5,8 +5,8 @@
%% ASME conference requirements as represented on ASME's conference web pages in 2022.
%%
%% This file's version and date:
- \def\versionno{1.34}
- \def\versiondate{2022/12/30\space}
+ \def\versionno{1.35}
+ \def\versiondate{2023/10/19\space}
%%
%% Author: John H. Lienhard, V
%% Department of Mechanical Engineering
@@ -86,7 +86,7 @@
\IfFormatAtLeastTF{2017/04/15}{%
\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.}%
+ \ClassIF{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2020 or later are recommended for the asmeconf class. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You can try to click past the errors for now.}%
}
\DeclareDocumentCommand\LogNote{m}{%
@@ -99,11 +99,10 @@
%% provide iftex command \ifpdftex for those still running old distributions
\IfFormatAtLeastTF{2019/11/07}{%
- \RequirePackage{iftex}% check whether pdftex or another engine is used
+ \RequirePackage{iftex}[2019/11/07]% check whether pdftex or another engine is used
}{%
\LogNote{The asmeconf class requires the missing package iftex---trying a work-around.}
% Code copied from iftex package written by the LaTeX3 Project (used under LPPL).
- % \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}
@@ -144,6 +143,13 @@
\setboolean{DefaultSups}{#1}
}
+%%% set key [unboldcaption] for caption text not to use boldface type.
+\newif\ifac@unboldcaption\ac@unboldcaptionfalse
+\define@key{asmeconf}{unboldcaption}[false]{%
+ \ac@unboldcaptiontrue
+}
+% (with two key families active, \DeclareBoolOption has problems..)
+
%%% Use these switches to load other alphabets for Cyrillic, Greek, Japanese, and Vietnamese text
\newif\ifac@cyrillic\ac@cyrillicfalse
\newif\ifac@greek\ac@greekfalse
@@ -311,17 +317,26 @@
\ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2018/12/01 or later are necessary for the [pdf-a] option. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. Meanwhile, you can remove the [pdf-a] option and try again}%
}
\ac@setpdfatrue
- \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
+% \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
+ \PassOptionsToPackage{pdfa}{hyperref}% note: hyperref takes these options if hyperxmp is loaded
+ \AtBeginDocument{\hypersetup{pdfapart=3,pdfaconformance=u}}
}
%%% to select part 1, 2 or 3
\define@key{pdfaopt}{pdfapart}[3]{%
- \PassOptionsToPackage{pdfapart=#1}{hyperref}%
+% \PassOptionsToPackage{pdfapart=#1}{hyperref}%
+ \def\asmeconf@tempa{#1}
+ \AtBeginDocument{\hypersetup{pdfapart=\asmeconf@tempa}}
\ifthenelse{\equal{#1}{1}}{\ac@pdfaonetrue}{\relax}%
}
%%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
+ \ExplSyntaxOn
\define@key{pdfaopt}{pdfaconformance}[u]{%
- \PassOptionsToPackage{pdfaconformance=#1}{hyperref}%
+% \PassOptionsToPackage{pdfaconformance=#1}{hyperref}%
+ \str_set:Ne \l_tmp_str { \str_uppercase:n {#1} }
+ \typeout{\l_tmp_str}
+ \AtBeginDocument{\hypersetup{pdfaconformance=\l_tmp_str}}
}
+ \ExplSyntaxOff
\else
\define@key{pdfaopt}{pdf-a}[true]{%
\ac@setpdfatrue
@@ -496,8 +511,15 @@
\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,
+\DeclareCaptionTextFormat{sansmath}{\mathversion{sans}#1}
+
+\ifac@unboldcaption
+ \captionsetup[figure]{labelformat=uppercase,labelfont={sf,bf,small},textfont={sf,md,small},textformat=sansmath,labelsep=colon}
+ \captionsetup[table]{labelformat=uppercase,labelfont={sf,bf,small},textfont={sf,md,small},textformat=sansmath,labelsep=colon,skip=0.5\baselineskip}
+\else
+ \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,
+\fi
%% This construction avoids a failure of hyperref in relation to uppercase caption
%% Discussion: https://tex.stackexchange.com/questions/375695/maketextuppercase-inside-table-captions
@@ -987,6 +1009,18 @@
\SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n}
\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% changed from it, 2021/01/31: \mathsf is upright.
+%% Added 2023/10/19
+\DeclareMathVersion{sans}
+\SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it}
+\SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it}
+\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}{\rmdefault}{n}
+\SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n}% \mathsf is upright.
+
% Nice solution from DPC to prevent aux file errors (due to active characters from babel) when switching from pdflatex to lualatex.
\ifx\directlua\undefined
@@ -1130,22 +1164,6 @@
\fi
\fi
-\RequirePackage{hyperxmp}% improve transfer of metadata to pdf
-
-% Patch bug in hyperxmp, unless a more recent version is used.
-\ifdefined\hyxmp@no@bad@parts% \hyxmp@no@bad@parts is not def'd in TeX Live 2019 or older
- \@ifpackagelater{hyperxmp}{2022/09/14}{% no new version at present, still 2020/11/22
- \relax
- }{%
- \newcount\hypxmp@tempcnt
- \define@key{Hyp}{pdfapart}{%
- \afterassignment\hyxmp@no@bad@parts\hypxmp@tempcnt=0#1\relax
- \hyxmp@pdfstringdef\@pdfapart{\the\hypxmp@tempcnt}%
- }
- }
-\else
- \relax
-\fi
\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
@@ -1174,6 +1192,25 @@
\providecommand\hrefurl[2]{\href{#1}{#2}}% to address certain issues around URL recognition with new pdf management code, 2021/12/02
+\RequirePackage{hyperxmp}% improve transfer of metadata to pdf
+
+% Patch bug in hyperxmp, unless a more recent version is used.
+\ifdefined\hyxmp@no@bad@parts% \hyxmp@no@bad@parts is not def'd in TeX Live 2019 or older
+ \@ifpackagelater{hyperxmp}{2022/10/15}{% v5.11 or later
+ \relax
+% \ClassInfo{asmeconf}{hyperxmp v5.11 or later is in use}
+ }{%
+ \newcount\hypxmp@tempcnt
+ \define@key{Hyp}{pdfapart}{%
+ \afterassignment\hyxmp@no@bad@parts\hypxmp@tempcnt=0#1\relax
+ \hyxmp@pdfstringdef\@pdfapart{\the\hypxmp@tempcnt}%
+ }
+ }
+\else
+ \relax
+\fi
+
+
%%% ==> recent and evolving development of \pdfstring removes all robust commands from bookmarks, so
%%% the following interventions may become unnecessary over time (2021/12/01).