diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/README.md | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/asmejour-sample.bib | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/asmejour-template.pdf | bin | 729589 -> 728579 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/asmejour-template.tex | 89 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.pdf | bin | 2983602 -> 2982565 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/asmejour/asmejour.cls | 458 |
7 files changed, 294 insertions, 288 deletions
diff --git a/Master/texmf-dist/doc/latex/asmejour/README.md b/Master/texmf-dist/doc/latex/asmejour/README.md index 69fe1e00fc9..612e0b027a6 100644 --- a/Master/texmf-dist/doc/latex/asmejour/README.md +++ b/Master/texmf-dist/doc/latex/asmejour/README.md @@ -1,7 +1,7 @@ #asmejour: A template for ASME journal papers# - Version 1.22 dated 2024/02/06. + Version 1.23 dated 2024/07/24. ####Overview#### This class provides a template to format preprints in the style of journal papers published by the American Society of Mechanical Engineers. @@ -67,6 +67,14 @@ ####Change log#### +v1.23 (2024/07/24) + - Add class option for single-column formatting, \[singlecolumn\], as sometimes requested for review (thanks Lennart Hultgren) + - Change language sample from French to German, to avoid active characters (from Fourier to Pohlhausen) + - Reduce size of line number font + - Adjust code for \\appendix to better accommodate tagged pdf + - Correct bug in babel main language selection + - Miscellaneous code clean up and simplification + v1.22 (2024/02/06) - The newtx package has dropped superiors option, so asmejour has dropped the \[superiors\] option and related code. - Dropped legacy options \[lang, lang-second, lang-third\] diff --git a/Master/texmf-dist/doc/latex/asmejour/asmejour-sample.bib b/Master/texmf-dist/doc/latex/asmejour/asmejour-sample.bib index 3b715d3d059..08438fd94d9 100644 --- a/Master/texmf-dist/doc/latex/asmejour/asmejour-sample.bib +++ b/Master/texmf-dist/doc/latex/asmejour/asmejour-sample.bib @@ -1,6 +1,6 @@ %% Sample bibliography file for asmejour.bst and asmejour.cls %% -%% Revised: 06 February 2024 +%% Revised: 21 July 2024 %% Copyright John H. Lienhard, MIT %% Offered under the MIT license: https://ctan.org/license/mit @@ -350,9 +350,22 @@ title = {Th\'{e}orie Analytique de la Chaleur}, publisher = {Firmin Didot, P\`{e}re et Fils}, address = {Paris}, - url = {https://archive.org/details/analyticaltheory00fourrich}, + url = {https://archive.org/details/analyticaltheory00fourrich}, } +@article{pohlhausen1921, + author = {Pohlhausen, E.}, + title = {Der {W}\"{a}rmeaustausch zwischen festen K\"{o}rpern und {F}l\"{u}ssigkeiten mit kleiner reibung und kleiner {W}\"{a}rmeleitung}, + journal = {Zeitschrift f\"{u}r {A}ngewandte {M}athematik und {M}echanik}, + volume = {1}, + number = {2}, + pages = {115--121}, + doi = {10.1002/zamm.19210010205}, + year = {1921}, +} +%url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/zamm.19210010205}, + + @techreport{reynolds1958, author = {W. C. Reynolds and W. M. Kays and S. J. Kline}, title = {Heat transfer in the Incompressible Turbulent Boundary Layer. {I}---Constant Wall Temperature}, diff --git a/Master/texmf-dist/doc/latex/asmejour/asmejour-template.pdf b/Master/texmf-dist/doc/latex/asmejour/asmejour-template.pdf Binary files differindex 6fc96310102..c15cc9f7977 100644 --- a/Master/texmf-dist/doc/latex/asmejour/asmejour-template.pdf +++ b/Master/texmf-dist/doc/latex/asmejour/asmejour-template.pdf diff --git a/Master/texmf-dist/doc/latex/asmejour/asmejour-template.tex b/Master/texmf-dist/doc/latex/asmejour/asmejour-template.tex index 18ae24c0572..7e3f8a29306 100644 --- a/Master/texmf-dist/doc/latex/asmejour/asmejour-template.tex +++ b/Master/texmf-dist/doc/latex/asmejour/asmejour-template.tex @@ -3,7 +3,7 @@ %% %% This file is asmejour-template.tex, a template to format papers in the style of ASME journal papers. %% -%% This file is version 1.22 dated 2024/02/06 +%% This file is version 1.23 dated 2024/07/24 %% %% Author: John H. Lienhard V %% Department of Mechanical Engineering @@ -33,8 +33,10 @@ %% %% * Option to omit all ASME text fields from the footer [nofoot]. %% +%% * Option for single column formatting [singlecolumn]. +%% %% * Options for PDF/A compliance. With pdfTeX, [pdf-a] will produce PDF/A-3u compliance with sRGB OutputIntent. -%% * [pdfapart= 1 or 2 or 3] and [pdfaconformance= b or u] can enable levels 1b, 2b, 2u, and 3b. +%% * [pdfapart= 1 or 2 or 3] and [pdfaconformance= b or u] will select other levels: 1b, 2b, 2u, and 3b. %% * %% * Recently, LaTeX (2021 and later) has integrated support for pdf-a, through the \DocumentMetadata{..} %% * command. This approach works with both pdfTeX and luaLaTeX. The asmeconf class supports this new feature, @@ -59,8 +61,8 @@ %% * [hyphenate] allow hyphenation, with pdfTeX only (normally, the typewriter font is not hyphenated) %% %% * Options for the babel package to support passages in other languages (such as a translated -%% * abstract in an appendix), e.g. [french]. The main language will default to English -%% * unless a different main language is selected, e.g. [main=spanish]. See Appendix C for details. +%% * abstract in an appendix), e.g. [german]. The main language will default to English +%% * unless a different main language is selected, e.g. [main=spanish]. See Appendix B for details. %% %% For details of the newtx and mathalfa packages, refer to their documentation (available at CTAN: http://ctan.org). %% @@ -82,16 +84,16 @@ %% 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 (don't use u options with LuaLaTeX) -% pdfversion=1.7, -% lang=en-US, -%} +\DocumentMetadata{% + pdfstandard=A-3u,% A-2b, A-2u, A-3b, or A-3u (don't use u options with LuaLaTeX) + pdfversion=1.7, + lang=en-US, +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Class options are described above. -\documentclass[upint,varvw,barcolor=Goldenrod3,mathalfa=cal=euler,balance,hyphenate,french,pdf-a]{asmejour}% subscriptcorrection, +\documentclass[nocopyright,upint,varvw,barcolor=Goldenrod3,mathalfa=cal=euler,balance,hyphenate,german]{asmejour}% subscriptcorrection,french %%%% pdf metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -121,11 +123,14 @@ % Use title case (upper and lower case letters) % Note usage below for corresponding author. -\SetAuthorBlock{Author Name[s]}{Department of Mechanical Engineering,\\ - Institution or Company Name,\\ - Street address,\\ - City, State, Country\\ - email: xxx@yyy.zzz} +\SetAuthorBlock{John H.\ Lienhard\CorrespondingAuthor}{% + Fellow ASME\\ + Rohsenow Kendall Heat Transfer Laboratory,\\ + Department of Mechanical Engineering,\\ + Massachusetts Institute of Technology,\\ + Cambridge, MA 02139 USA\\ + email: lienhard@mit.edu +} % To label one or more corresponding authors put "Name\CorrespondingAuthor". No space after "Name". % An optional argument can be added if email is not in address block as @@ -133,14 +138,12 @@ % Can also include multiple emails and use the command more than once for multiple corresponding authors, % "Name\CorrespondingAuthor{write@to.him, write@to.her}" -\SetAuthorBlock{John H.\ Lienhard V\CorrespondingAuthor}{% -Fellow ASME\\ -Rohsenow Kendall Heat Transfer Laboratory,\\ -Department of Mechanical Engineering,\\ -Massachusetts Institute of Technology,\\ -Cambridge, MA 02139 USA\\ -email: lienhard@mit.edu -} +\SetAuthorBlock{Author Name[s]}{Department of Mechanical Engineering,\\ + Institution or Company Name,\\ + Street address,\\ + City, State, Country\\ + email: xxx@yyy.zzz +} %%% 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} @@ -164,6 +167,7 @@ This paper is an example and {\upshape\LaTeX} template for the {\upshape\texttt{ \maketitle %% This command creates the author/title/abstract block. Essential! + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% End of fields to be completed. Now write! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -227,7 +231,7 @@ Section, subsection, and subsubsection headings should be in title case (first l %% captions go below figures \begin{figure} -\centering\includegraphics[width=\linewidth]{sample-figure-1.pdf} +\centering\includegraphics[width=\linewidth,alt={Linearization errors}]{sample-figure-1.pdf} \caption{Caption with math, eqn.~\eqref{eqn:1}: $\Delta T/T_m$ vs.\ $\Delta T/T_1$~\cite{lienhard2019}\label{fig:1}} \end{figure} @@ -466,8 +470,12 @@ As of June 2022, the \LaTeX 3 team has added native support for PDF/A in the \La \subsection{Typewriter Font Options} This font is the sans-serif, monospaced font \texttt{inconsolata}. By default, the word spacing is variable, but option \texttt{[mono]} ends this behavior. A slashed zero is the default; option \texttt{[var0]} removes the slash. Option \texttt{[hyphenate]} enables hyphenation of the typewriter font when running \hologo{pdfTeX}. +\subsection{Single column layout} The option \texttt{[singlecolumn]} switches from two-column to single-column layout. %%%%%%%%%%%%%%% begin two column table %%%%%%%%%%%%%%%%%% +% +% note: the fourth column could be a dcolumn instead of using \makebox, with d{1.4} replacing c column. +% \begin{table*}[t] \caption{A table spanning two columns}\label{tab:4}% \centering{% @@ -478,7 +486,8 @@ As of June 2022, the \LaTeX 3 team has added native support for PDF/A in the \La \multicolumn{1}{c!{\hspace*{3.em}}}{$\textrm{erfc}(x)$} & \multicolumn{1}{c}{$x$} & \multicolumn{1}{c}{$\textrm{erf}(x)$} & -\multicolumn{1}{c@{\hspace*{1.5em}}}{$\textrm{erfc}(x)$} \\ \midrule +\multicolumn{1}{c@{\hspace*{1.5em}}}{$\textrm{erfc}(x)$} \\ +\midrule 0.00 & 0.00000 & 1.00000 & 1.10 & 0.88021 & 0.11980 \\ 0.05 & 0.05637 & 0.94363 & 1.20 & 0.91031 & 0.08969 \\ 0.10 & 0.11246 & 0.88754 & 1.30 & 0.93401 & 0.06599 \\ @@ -554,7 +563,7 @@ Acknowledge individuals, institutions, or companies that supported the authors i \entry{b}{bulk value} \entry{$\infty$}{free stream value} -\end{nomenclature} +\end{nomenclature} %%%%%%%%%%%%%%% APPENDICES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -571,31 +580,30 @@ Acknowledge individuals, institutions, or companies that supported the authors i This text is just for illustration. The radiation fractional function may be written in terms of the incomplete zeta function for convenience: \begin{align} -f(\lambda T) = {}& \frac{1}{\sigma T^4} \int_0^\lambda\frac{2\pi h c_o^2}{\lambda^5 \left[ \exp (h c_o/k_B T \lambda) - 1\right] } \, d\lambda \\ - = {}& \frac{1}{\sigma T^4}\frac{2\pi k_B^4 T^4}{h^3c_o^2}\int^\infty_{c_2/\lambda T}\frac{t^3}{e^t -1}\, dt\label{eqn:zeta} +f(\lambda T) &= \frac{1}{\sigma T^4} \int_0^\lambda\frac{2\pi h c_o^2}{\lambda^5 \left[ \exp (h c_o/k_B T \lambda) - 1\right] } \, d\lambda \\ + &= \frac{1}{\sigma T^4}\frac{2\pi k_B^4 T^4}{h^3c_o^2}\int^\infty_{c_2/\lambda T}\frac{t^3}{e^t -1}\, dt\label{eqn:zeta} \end{align} When $\lambda T \rightarrow \infty$, $f = 1$ and the last equation yields the well-known result \begin{equation} - {\sigma T^4} =\frac{2\pi k_B^4 T^4}{h^3c_o^2} \underbrace{\int_0^\infty \frac{t^3}{e^t - 1} \, dt}_{\equiv\mspace{2mu} \zetaup(4)\Gamma(4)} +\sigma T^4 =\frac{2\pi k_B^4 T^4}{h^3c_o^2} \underbrace{\int_0^\infty \frac{t^3}{e^t - 1} \, dt}_{\equiv\mspace{2mu} \zetaup(4)\Gamma(4)} \end{equation} where the Gamma function $\Gamma(4) = 3!$ and the Riemann zeta function, $\zetaup(4)$, has the indicated integral representation \cite[\S13.12]{ww1927}. A classical result due to Euler \cite{euler1740} gives $\zetaup(4) = \pi^4/90$ (see also \cite[\S167]{euler1748}), from which we recover the usual definition of the Stefan-Boltzmann constant, $\sigma$. - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{Language Support} +\section{Language Support\label{app:language}} ASME publishes in English, but the \texttt{babel} package is loaded for users who may wish to include other languages. For example, an author might wish to include an appendix that provides the abstract in another language. When more than one language option is included in \verb|\documentclass[..]{asmejour}|, English will be assumed to be the main language of the document. (To choose a different main language, set \texttt{[main=..]}). -If no language options are given, the package defaults to English. As an example, a passage in French is -shown in \selectlanguage{french}\appendixname~\ref{app:fourier}\selectlanguage{english}. +If no language options are given, the package defaults to English. As an example, a passage in German is +shown in \selectlanguage{german}\appendixname~\ref{app:pohlhausen}\selectlanguage{english}. The standard caption and section names will follow \texttt{babel}'s dictionary for primary languages other than English. Users may additionally change ``Keywords'', ``Nomenclature'', and ``Corresponding author'' by renewing the commands \verb|\keywordname|, \verb|\nomname|, and \verb|\CAwords|. Changes to the page footer were described in Sec.~\ref{sec:footer}. The pdf bookmark for ``Appendices'' by be changed by renewing \verb|\appendicesname|. The font encoding is set to T1 and utf-8 input is supported: -%% If you have trouble with the next line (or the French text that follows), your file may not be saved in utf-8 format. You can delete these lines to resolve the issue. +%% If you have trouble with the next line, your file may not be saved in utf-8 format. You can delete these lines to resolve the issue. \typeout{If you have trouble with the next line, your file may not be saved in utf-8 format. You can delete that line to resolve the issue.} \ifluatex\typeout{Under LuaLaTeX, some of these accents must be obtained as escaped characters, with \=a, \c{e}, \l, \.o, \oe, \v{z}, \'z, etc.}\fi àáâäæãåā èéęëêēė îïíīįì ôöòóœøōõ ûüùúū çćč ł ñń ßśš ÿ žźż @@ -604,18 +612,13 @@ No effort has been made to support customization of language-specific fonts (som %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\selectlanguage{french} -\section{Discours Préliminaire de Fourier}\label{app:fourier} - -Les causes primordiales ne nous sont point connues; mais elles sont assujetties à des lois simples et constantes, que l'on peut découvrir par l'observation, et dont l'étude est l'objet de la philosophie naturelle. - -La chale ur pénètre, comme la gravité, toutes les substances de l'univers, ses rayons occupent toutes les parties de l'espace. Le but de notre ouvrage est d'exposer les lois mathématiques que suit cet élément. Cette théorie formera désormais une des branches les plus importantes de la physique générale~\cite{fourier1822}. +\selectlanguage{german} +\section{Der Wärmeaustausch zwischen festen Körpern und Flüssigkeiten mit kleiner reibung und kleiner Wärmeleitung (von E. Pohlhausen)\label{app:pohlhausen}} +In einer strömenden Flussigkeit sind Wärmeleitung und Wärmekonvektion Vorgänge, die mit der inneren Reibung (oder Impulsleitung) und mit der Impulskonvektion große Aehnlichkeit besitzen. Mathematisch findet dies seinen Ausdruck in dem gleichartigen Bau der Differentialgleichungen, die einerseits für die Temperatur und anderseits für den Geschwindigkeitsvektor in der Flüssigkeit bestehen. Man kann daraus auf eine Beziehung +zwischen dem Wärmeaustanch und dem Reibungswiderstand schließen, die eine strömende Flüssigkeit an einem festen Körper hervorrufen. Dies ist zuerst von Prandtl ausgesprochen und durchgeführt worden, und zwar für turbulente Vorgänge, unter der vereinfachenden Annahme von Wärmequellen und -senken im Innern der Flüssigkeit~\cite{pohlhausen1921}. \selectlanguage{english} -% When you drop the [french] option, delete your .aux file as well, since [french] sets ":" as an active character. - - %%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \nocite{*} %% <=== Delete this line - unless you wish to typeset the entire contents of your .bib file. diff --git a/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.pdf b/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.pdf Binary files differindex 5b93ad2cf97..c3b0bc535e1 100644 --- a/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.pdf +++ b/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.pdf diff --git a/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.tex b/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.tex index 69b98af0b29..5a506330aa4 100644 --- a/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.tex +++ b/Master/texmf-dist/doc/latex/asmejour/asmewide_example/asmejour-wide-equation-examples.tex @@ -1,6 +1,6 @@ %% Examples of a widetext macro for setting wide equations in the asmejour class. %% -%% Copyright (c) 2022 John H. Lienhard. Use under the MIT license: https://ctan.org/license/mit +%% Copyright (c) 2024 John H. Lienhard. Use under the MIT license: https://ctan.org/license/mit %% %% %% USAGE: * \begin{widetext} ...wide material here... \end{widetext} @@ -15,8 +15,8 @@ \documentclass[nocopyright,nolists,pdf-a]{asmejour} %% This file's version and date are: - \def\AJwidetextversion{1.01} - \def\AJverdate{October 22, 2023} + \def\AJwidetextversion{1.02} + \def\AJverdate{July 24, 2024} % \usepackage{asmewide} \usepackage{lipsum}% Latin filler text (lipsum generates a message about 'unused global options' - this can be ignored) @@ -81,6 +81,8 @@ address = {New York}, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} +\PreprintString{PREPRINT} + \SetAuthorBlock{John H.\ Lienhard V}{% Fellow of ASME \\ Rohsenow Kendall Heat Transfer Laboratory, \\ diff --git a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls index 095964ffc7b..a8cd43eae27 100644 --- a/Master/texmf-dist/tex/latex/asmejour/asmejour.cls +++ b/Master/texmf-dist/tex/latex/asmejour/asmejour.cls @@ -4,10 +4,9 @@ %% %% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex. %% -%% %% This file's version and date are: - \def\versionno{1.22} - \def\versiondate{2024/01/30\space} + \def\versionno{1.23} + \def\versiondate{2024/07/24\space} %% %% Author: John H. Lienhard V %% Department of Mechanical Engineering @@ -22,14 +21,14 @@ %% 4. Support citations, footnotes, and bold face math in section headings %% 5. Provide optional line numbers for editing and review %% 6. Support balancing height of columns on the last page -%% 7. Support the archival PDF/A standards 1b, 2b, 2u, 3b, and 3u +%% 7. Support archival PDF/A standards %% 8. Provide copyright notices for government employees and government contractors %% 9. Enable various math and text features from the newtxmath, mathalfa, and newtxtext packages %% 10. Support inclusion of passages in languages other than English %% %% This class is compatible with both pdfLaTeX and LuaLaTeX. All packages required by the class -%% are in standard distributions, such as TeXLive, and are also available at CTAN (https://ctan.org/). -%% The use of an up-to-date (Feb. 2020 or later) and complete LaTeX distribution is strongly recommended. +%% are in standard distributions, such as TeX Live, and are also available at CTAN (https://ctan.org/). +%% The use of an up-to-date (Nov. 2022 or later) and complete LaTeX distribution is strongly recommended. %% %% The title block is set by specific commands that are described in the asmejour-template.tex file. %% @@ -57,72 +56,79 @@ %% whether in an action of contract, tort or otherwise, arising from, out of or in connection with the %% software or the use or other dealings in the software. %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{asmejour}[\versiondate asmejour paper format] -\LoadClass[twoside,9pt,twocolumn]{extarticle} - -\ifdefined\NewDocumentCommand\else - \RequirePackage{xparse}[2020/02/25] -\fi +\LoadClass[twoside,9pt]{extarticle}% twocolumn format initiated in \MakeTitle command 2024/07/20 \RequirePackage{iftex}% provides \ifpdftex, etc. \RequirePackage{ifthen} -%%%%%%%%%%%%% Test compatibility of older distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ExplSyntaxOn + \str_const:Nn \ClassName {asmejour} +\ExplSyntaxOff -\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date; \If... added to latex 2020/10/01 -\providecommand\IfPackageAtLeastTF{\@ifpackagelater}% compare version to date; \If... added to latex 2020/10/01 -\providecommand\IfPackageLoadedTF{\@ifpackageloaded}% \If...added to latex 2021/11/15 +%%%%%%%%%%%%% Some compatibility for older distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\IfFormatAtLeastTF{2020/02/25}{% - \ClassInfo{asmeconf}{Your LaTeX format is dated \fmtversion. LaTeX distributions 2020/10/01 or later are strongly recommended, for best results} - }{% - \ClassError{asmeconf}{Your LaTeX format is dated \fmtversion. Formats dated 2020/10/01 or later are recommended for the asmejour class. Older formats may generate errors or fail entirely!}{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, but your abstract will probably not compile properly if you lack the xparse package [2020/02/25], and the code will crash entirely if you lack the iftex package [2019/11/07].}% +\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date; \If... added to latex 2020/10/01 +\providecommand\IfPackageAtLeastTF{\@ifpackagelater}% compare version to date; \If... added to latex 2020/10/01 +\providecommand\IfPDFManagementActiveTF{\@secondoftwo}% \If... added to latex 2021/07/23 +\providecommand\IfPackageLoadedTF{\@ifpackageloaded}% \If...added to latex 2021/11/15 +\providecommand\ClassNoteNoLine[2]{\typeout{^^JClass Note #1: #2.^^J}}% log & terminal note... added to latex 2021/11/15 + +\IfFormatAtLeastTF{2020/10/01}{\relax}{% + \ClassError{\ClassName}{Your LaTeX format is dated \fmtversion. Formats dated 2020/10/01 or later are recommended for the asmejour class. Older formats may generate errors or fail entirely!}{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 any errors for now, but your abstract will not compile properly if you lack the xparse package [2020/02/25], and the code will crash entirely if you lack the iftex package [2019/11/07].}% } - -\DeclareDocumentCommand\LogNote{m}{% - \IfFormatAtLeastTF{2021/11/15}{% - \ClassNoteNoLine{asmejour}{#1}% Added to LaTeX in Nov. 2021 - }{% - \ClassWarningNoLine{asmejour}{#1}% + +% check whether pdfmanagement (\DocumentMetadata) has been loaded (else fall back to hyperxmp and bookmark packages after loading hyperref) +\newif\ifasme@pdfmanagement +\IfPDFManagementActiveTF{ + \asme@pdfmanagementtrue +}{ + \asme@pdfmanagementfalse + \ClassWarningNoLine{\ClassName}{pdfmanagement is not active. Will load hyperxmp and bookmark packages instead} +} + +% Allow pre 2021/11/15 formats to see the graphicx alt key without causing an error +\IfFormatAtLeastTF{2021/11/15}{ + \relax +}{ + \AtBeginDocument{ + \IfPackageLoadedTF{graphicx}{\define@key{Gin}{alt}{}}{\relax} } } -%% Test whether \DocumentMetadata has been loaded (Thank you Ulrike Fischer) -\newif\if@asme@pdfmanagement -\ExplSyntaxOn -\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 - } -\ExplSyntaxOff +% Enable pre-2020/10 formats to access essential macros later moved into LaTeX kernel +\ifdefined\NewDocumentCommand\else + \RequirePackage{xparse}[2020/02/25] +\fi + +% Provide pre-2020/10 installations with basic unicode character mappings +\IfFormatAtLeastTF{2020/10/01}{\relax}{% + \pdfgentounicode=1 %% enable CMaps; was moved into the latex kernel Oct 2020 + \input glyphtounicode.tex %% lists of mappings; was moved into the latex kernel Oct 2020 +} -%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{kvoptions}% this package calls kvsetkeys \SetupKeyvalOptions{ - family=asmejour, + family=\ClassName, prefix=asmejour@, setkeys=\kvsetkeys, } %% for mathalfa, so we may pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox -\define@key{asmejour}{mathalfa}{% +\define@key{\ClassName}{mathalfa}{% \PassOptionsToPackage{#1}{mathalfa}% } +%% Option to obtain line numbers [singlecolumn], 2024/07/20 +\DeclareBoolOption{singlecolumn} + %% Option to obtain line numbers [lineno] \DeclareBoolOption{lineno} @@ -132,6 +138,12 @@ %% Option to omit lists of figures and tables \DeclareBoolOption{nolists} +%% Option to omit ASME copyright notice [nocopyright] +\DeclareBoolOption{nocopyright} + +%% Option to omit ASME footers [nofoot] +\DeclareBoolOption{nofoot} + %% Option for copyright notice if all authors are government employees [govt] \DeclareBoolOption{govt} @@ -141,57 +153,54 @@ %% Option for government contractor copyright notice [contractor] \DeclareBoolOption{contractor} -%% set [barcolor=] to a color name defined by xcolor package +%% set key [barcolor=] to pass a color name defined by xcolor package \DeclareStringOption[black]{barcolor} -%% the key main= passes the choice of main language to babel +%% the key [main= ] to pass the choice of main language to babel \newif\ifaj@mainset\aj@mainsetfalse -\define@key{asmejour}{main}[english]{% +\define@key{\ClassName}{main}{% \PassOptionsToPackage{main=#1,#1}{babel}% added #1 resolves conflicts between certain .ldf files under "main=". \aj@mainsettrue - \ifthenelse{\equal{#1}{english}}{% - \PassOptionsToPackage{pdflang=en}{hyperref}}{% - \LogNote{Selecting #1 as the primary language} - }% + \ClassNoteNoLine{\ClassName}{Selecting #1 as the primary language} } -%% if main language was not chosen explicitly, default to English -\ifaj@mainset\relax\else - \PassOptionsToPackage{main=english}{babel}% - \PassOptionsToPackage{pdflang=en}{hyperref} - \ClassInfo{Selecting English as the primary language, since main= not set}% -\fi - %% Suppress warnings about unused global options, 2021/12/01 -\DeclareDefaultOption{}% suppress warning about unused mathalfa option +\DeclareDefaultOption{} -\ProcessKeyvalOptions{asmejour} +\ProcessKeyvalOptions{\ClassName} %% Turn off these keys now that we're done with them \NewDocumentCommand\aj@DisableOption{m}{% \DisableKeyvalOption[% action=ignore,% - class=asmejour% + class=\ClassName% ]{#1}{\@KeyFamily}% } \NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@DisableOption}} -\def\@KeyFamily{asmejour} -\@DisableKeys{mathalfa;barcolor;lineno;balance;nolists;govt;govtsome;contractor;main} +\def\@KeyFamily{\ClassName} +\@DisableKeys{mathalfa;singlecolumn;lineno;balance;nolists;nocopyright;nofoot;govt;govtsome;contractor;barcolor;main} + + +%% if main language was not was chosen explicitly, default to English +\ifaj@mainset\relax\else + \PassOptionsToPackage{main=english}{babel}% + \ClassNoteNoLine{\ClassName}{Selecting English as the primary language, since main= not set}% +\fi -%%%%%%% PDF/A Compliance Keys %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%% PDF/A Compliance Keys %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% new pdf management in LaTeX, with \DocumentMetaData{..}, is preferred to this approach. \newif\ifaj@setpdfa\aj@setpdfafalse \newif\ifaj@pdfaone\aj@pdfaonefalse -\if@asme@pdfmanagement\else +\ifasme@pdfmanagement\else \SetupKeyvalOptions{ family=pdfaopt, - prefix=pdafopt@, + prefix=pdfaopt@, setkeys=\kvsetkeys, } @@ -201,7 +210,7 @@ \define@key{pdfaopt}{pdf-a}[true]{% \aj@setpdfatrue \PassOptionsToPackage{pdfa}{hyperref} - \AtBeginDocument{\hypersetup{pdfapart=3,pdfaconformance=u}}% note: hyperref takes these options if hyperxmp is loaded + \AtBeginDocument{\hypersetup{pdfapart=3,pdfaconformance=u}}% hyperref takes these options if hyperxmp is loaded } %%% to select part 1, 2 or 3 \define@key{pdfaopt}{pdfapart}[3]{% @@ -209,7 +218,7 @@ \AtBeginDocument{\hypersetup{pdfapart=\asmejour@tempa}} \ifthenelse{\equal{#1}{1}}{\aj@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 currently possible with pdfLaTeX; u not possible with 1. \ExplSyntaxOn \define@key{pdfaopt}{pdfaconformance}[u]{% \str_set:Ne \l_tmp_str { \str_uppercase:n {#1} } @@ -236,9 +245,10 @@ \pdfminorversion=7 % this selection is not required \fi \else - \ifaj@setpdfa\ClassWarningNoLine{asmejour}{pdf-a option requires pdfLaTeX engine. Under LuaLaTeX, use % - \protect\DocumentMetadata{pdfstandard=A-3b} before \protect\documentclass[..]{asmeconf}}\fi% - \ifx\directlua\undefined\else + \ifaj@setpdfa\ClassWarningNoLine{\ClassName}{pdf-a option requires pdfLaTeX. Under LuaLaTeX, use % + \protect\DocumentMetadata{pdfstandard=A-3b} before \protect\documentclass[..]{\ClassName}}% + \fi + \ifx\directlua\undefined\else % default under lualatex is 1.4 \directlua{ if pdf.getminorversion() \string~= 7 then if (status.pdf_gone and status.pdf_gone > 0) @@ -248,58 +258,28 @@ pdf.setminorversion(7) end end + } \fi - }% will lose some accented characters this way... better to use fontspec, if the system fonts exist. \fi \fi -%%%%%%%%%% Further class options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%% Option to omit ASME footer -\DeclareOption{nofoot}{% - \AtBeginDocument{\pagestyle{plain}% - \fancypagestyle{title}{% - \fancyhf{} - \fancyfoot[CE,CO]{\thepage} - } - } -} - -%% Option to omit ASME copyright -\DeclareOption{nocopyright}{% - \AtBeginDocument{\fancypagestyle{title}{% - \fancyhf{} - \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} - \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} - \fancyfoot[CO]{} - } - } -} +%%%%%%%%% Various font-related options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Option for slightly larger small capitals font [largesc], corrected 2021/01/29 \DeclareOption{largesc}{\PassOptionsToPackage{largesc=true}{newtxtext}}% largesc is a boolean key in newtxtext -%% ASME word separation is greater than newtxtext defaults so change these parameters. -\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.10em}{newtxtext}% increased shrink from 0.08, 2021/01/30 - %% Disable newtxtext osf option, which is not appropriate for documents in this class \DeclareOption{osf}{% \PassOptionsToPackage{lining}{newtxtext}% } -%% Option to hyphenate the typewriter font [hyphenate] -\DeclareOption{hyphenate}{% - \PassOptionsToPackage{hyphenate}{inconsolata}% - \LogNote{Allowing hyphenation of typewriter font}% -} - \DeclareOption{hyphenate}{% \ifpdftex \PassOptionsToPackage{hyphenate}{inconsolata}% hyphenate is a key via xkeyval in inconsolata - \LogNote{Allowing hyphenation of typewriter font}% + \ClassNoteNoLine{\ClassName}{Allowing hyphenation of typewriter font}% \else - \ClassWarningNoLine{asmejour}{The [hyphenate] option is only supported with pdftex. It will be ignored}% + \ClassWarningNoLine{\ClassName}{The [hyphenate] option is only supported with pdftex. It will be ignored}% \fi } @@ -329,7 +309,7 @@ \ProcessOptions \relax -%%%%%%%%%%%% Page size, bibliography, graphics, color, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%% Page size, bibliography, graphics, color %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage[paperheight=285.7mm, paperwidth=215.900mm, left=21.100mm, right=21.100mm, top=15.9mm, bottom = 24mm, footskip=8mm]{geometry} \setlength\columnsep{4.5mm} @@ -342,22 +322,8 @@ \renewcommand*{\bibfont}{\footnotesize} \RequirePackage{graphicx} -\RequirePackage[dvipsnames,svgnames,x11names]{xcolor}% remove obsolete options, 2023/10/23 +\RequirePackage[dvipsnames,svgnames,x11names]{xcolor}% removed obsolete options, 2023/10/23 -% Allow pre 2021/11/15 formats to see the graphicx alt key without causing an error, in preparation for tagged pdf -\IfFormatAtLeastTF{2021/11/15}{ - \relax -}{ - \AtBeginDocument{ - \IfPackageLoadedTF{graphicx}{\define@key{Gin}{alt}{}}{\relax} - } -} - -% Nice solution from DPC to prevent aux file errors when switching from pdflatex to lualatex -\ifx\directlua\undefined - \AtBeginDocument{\immediate\write\@auxout{\detokenize{% - \ifx\directlua\undefined\else\endinput\fi}}} -\fi %%%%%%%%%%%%% Table related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -383,7 +349,9 @@ \ifpdftex \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc}% for backward compatibility with pre-2018 LaTeX distributions - \RequirePackage[helvratio=0.91]{newtxtext}% add this scaling 2022/06/26 + %% ASME word separation is greater than newtxtext defaults so change these parameters. + %% increased shrink from 0.08, 2021/01/30; add this helvetica scaling 2022/06/26 + \RequirePackage[helvratio=0.91, spacing=0.3em, stretch=0.18em, shrink=0.10em]{newtxtext}% default {0.25em,0.2em,0.1em} \RequirePackage[varl,varqu]{inconsolata}% sans typewriter font; restored varl, varqu 2020/08/10 \RequirePackage[]{newtxmath} \else % use lualatex with newtxmath and fontspec for text primary fonts. Revised 2023/10/21. @@ -396,20 +364,20 @@ % \RequirePackage[varqu,varl]{inconsolata} % typewriter font for math \renewcommand\rmdefault{ntxtlf} % roman font for math - \DeclareFontFamily{T1}{\sfdefault}{} % sf for math + \DeclareFontFamily{T1}{\sfdefault}{} % sf for math \DeclareFontShape{T1}{\sfdefault}{m}{n}{<-> s*[0.94] ec-qhvr}{} %% see t1qhv.fd; 0.9-->0.94 2022/01/15 \RequirePackage[]{newtxmath} % newtxmath still handles mathematics \RequirePackage[no-math]{fontspec} \defaultfontfeatures{Ligatures=TeX,} % - \def\FontWarning{For luaLaTeX, you MUST have these OpenType fonts installed as system fonts on your computer: TeX Gyre Termes and TeX Gyre Heros (from \string http://www.gust.org.pl/projects/e-foundry/tex-gyre) and Inconsolatazi4 (\string https://ctan.org/tex-archive/fonts/inconsolata/opentype). If DON'T have these fonts, you will see ERROR messages!} + \def\FontWarning{For luaLaTeX, you MUST have these OpenType fonts installed as system fonts on your computer: TeX Gyre Termes and TeX Gyre Heros (from \string http://www.gust.org.pl/projects/e-foundry/tex-gyre) and Inconsolatazi4 (\string https://ctan.org/tex-archive/fonts/inconsolata/opentype). If you DON'T have these fonts, you will see ERROR messages!} % - \IfFontExistsTF{TeXGyreTermesX}{}{\ClassWarning{asmeconf}{\FontWarning} } - \IfFontExistsTF{texgyreheros}{}{ \ClassWarning{asmeconf}{\FontWarning} } - \IfFontExistsTF{Inconsolatazi4}{}{\ClassWarning{asmeconf}{\FontWarning} } + \IfFontExistsTF{TeX Gyre Termes}{}{\ClassWarningNoLine{\ClassName}{\FontWarning} } + \IfFontExistsTF{texgyreheros}{}{ \ClassWarningNoLine{\ClassName}{\FontWarning} } + \IfFontExistsTF{Inconsolatazi4}{}{\ClassWarningNoLine{\ClassName}{\FontWarning} } % - \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. 1.4 + \setmainfont{TeXGyreTermes}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre + WordSpace = {1.20,1.43,1.2},%% This stretch matches newtxtext a little better (reset 2024/07/23) Extension = .otf, UprightFont = *-Regular, ItalicFont = *-Italic, @@ -418,7 +386,8 @@ Numbers = Lining, ] \setsansfont{texgyreheros}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre - WordSpace = {1,1.4,1}, + WordSpace = {1.20,1.43,1.2},%% This stretch matches newtxtext a little better (reset 2024/07/23) +% WordSpace = {1,1.4,1}, Extension = .otf, UprightFont = *-regular, ItalicFont = *-italic, @@ -443,7 +412,7 @@ \RequirePackage{bm}% load after all math for expanded access to bold math -%% In addition to the word spacing options declared in line 235... +%% In addition to the word spacing options declared in line 371... %% Relative to size9.clo: leading reduced to 10 pt; displayskips made greater \renewcommand\normalsize{% \@setfontsize\normalsize\@ixpt{10\p@}% % <== was \@xipt @@ -464,13 +433,12 @@ \newcommand*{\CondSans}{\fontencoding{T1}\fontfamily{qhvc}\selectfont}% remove extra \selectfont, 2023/10/21 \renewcommand\huge{\@setfontsize\huge{14}{14}} %... for author names only \newcommand*{\CondSansBold}{\renewcommand\bfdefault{b}\fontencoding{T1}\fontfamily{qhvc}\selectfont\bfseries} -\renewcommand\Huge{\@setfontsize\Huge{26.5}{26.5}} %... for title font only +\renewcommand\Huge{\@setfontsize\Huge{26.5}{26.5}} %... for title only \RequirePackage{metalogo,hologo}% Access to various LaTeX logos (for use in the documentation) -%% This provides sans serif italic and sans serif bold italic math. -%% It's intended for use in the figure and table captions. -%% Fonts are from newtxsf package. +%% This provides sans serif italic and sans serif bold italic math, against with fonts from newtxsf. +%% For use in the figure and table captions. \DeclareMathVersion{sansbold} \SetSymbolFont{letters}{sansbold}{OML}{ntxsfmi}{b}{it} \SetSymbolFont{lettersA}{sansbold}{U}{ntxsfmia}{b}{it} @@ -480,8 +448,8 @@ \SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n} \SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% \mathsf is upright -%% These lines are to provide math accents for the sans and sansbold math versions. -%% The accents from ntxsfmi work normally with regular times fonts. Added 2021/01/27 +%% Provide math accents for the sans and sansbold math versions. Accents from ntxsfmi work normally +%% with regular times fonts. 2021/01/27 \DeclareSymbolFont{lettersAB}{U}{ntxsfmia}{m}{it} \SetSymbolFont{lettersAB}{normal}{U}{ntxsfmia}{m}{it} \SetSymbolFont{lettersAB}{bold}{U}{ntxsfmia}{b}{it} @@ -556,8 +524,7 @@ \DeclareMathSymbol{\sfhslash}{\mathalpha}{lettersAB}{52}% this is not upright \DeclareMathSymbol{\sfhbar}{\mathalpha}{lettersAB}{53}% this is not upright -%%% sans math version, potential value with PGFPlots, and provisionally called in subfigure captions. -%%% this is experimental, still needs stress testing. 2021/01/30 +%%% sans math version, potential value with PGFPlots, called in subfigure captions. 2021/01/30 \DeclareMathVersion{sans} \SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it} \SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it} @@ -569,7 +536,7 @@ \SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n} -%%%%%%%%%%%%%%%%% Some adjustments to math layout %%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% Some adjustments to math layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setlength{\jot}{10pt}% <== default is 3pt @@ -580,7 +547,7 @@ \allowdisplaybreaks % ASME allows these breaks -%%%%%%%%%%%%%%%%% Equation and Line Numbering %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% Equation and Line Numbering %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{etoolbox}% patching amsmath @@ -598,37 +565,36 @@ \ifasmejour@lineno \RequirePackage[switch,mathlines]{lineno}% - \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}% + \renewcommand{\linenumberfont}{\normalfont\scriptsize\color{red}}% \AtBeginDocument{\linenumbers}% \ifasmejour@balance - \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing will be disabled}% + \ClassWarningNoLine{\ClassName}{Package lineno loaded, so final column balancing will be disabled}% \fi %%% Patch to allow line numbering in AMS math environments. %%% This patch is for lineno versions earlier than v5.2 [2023/05/19]. As of mid-2023, the lineno package %%% has been corrected to account for the AMS math environments. Retaining temporarily for backward compatibility. %%% postdisplaypenalty adjusted to avoid extra line number at end, see: https://tex.stackexchange.com/a/461192/ - %%% multline has some additional problem that puts an extra line number above it. \IfPackageAtLeastTF{lineno}{2023/05/19}{\relax}{ - \NewDocumentCommand{\ac@losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}} + \NewDocumentCommand{\aj@losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}} % - \NewDocumentCommand{\ac@FixAMSMath}{m}{% - \AtBeginEnvironment{#1}{\ac@losepostpenalty\linenomath}% + \NewDocumentCommand{\aj@FixAMSMath}{m}{% + \AtBeginEnvironment{#1}{\aj@losepostpenalty\linenomath}% \AtEndEnvironment{#1}{\endlinenomath}% - \AtBeginEnvironment{#1*}{\ac@losepostpenalty\linenomath}% + \AtBeginEnvironment{#1*}{\aj@losepostpenalty\linenomath}% \AtEndEnvironment{#1*}{\endlinenomath}% } % - \NewDocumentCommand{\ac@FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\ac@FixAMSMath}} + \NewDocumentCommand{\aj@FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@FixAMSMath}} % - \ac@FixAll{align;alignat;gather;flalign;multline} + \aj@FixAll{align;alignat;gather;flalign;multline} } % \else \ProvideDocumentEnvironment{linenomath}{}{}{}% - \ifasmejour@balance % balancing through flushend can produce weird errors - \RequirePackage{flushend}% flushend package is NOT compatible with lineno + \ifasmejour@balance % balancing through flushend can produce weird errors. + \RequirePackage{flushend}% flushend package is NOT compatible with lineno. \AtEndDocument{\flushcolsend}% - \LogNote{Calling flushend package to balance column height on last page}% + \ClassNoteNoLine{\ClassName}{Calling flushend package to balance column height on last page}% \fi% \fi @@ -638,9 +604,9 @@ %% ASME page proofs seem to align the number at top of the line, rather than bottom as done here. -%%%%%%%%%%%%%%%%% Footer Set Up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% Footer Set Up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\JourName}[1]{\gdef\@JourName{#1}} \providecommand\@JourName{\hbox{ }} @@ -650,8 +616,8 @@ } \providecommand\@PaperYear{\the\year} -\def\@PreprintStringL{PREPRINT FOR REVIEW} -\def\@PreprintStringR{PREPRINT FOR REVIEW} +\def\@PreprintStringL{PREPRINT}% updated 2024/07/24 +\def\@PreprintStringR{PREPRINT} \NewDocumentCommand{\PreprintString}{m o}{% \IfNoValueTF{#2}{% @@ -668,32 +634,53 @@ %%%%%% Fancyhdr %%%%%%%%%%%%%%%%%%%%%%%%% -\RequirePackage{fancyhdr} +\RequirePackage{fancyhdr}% options revised 2024/07/23 \pagestyle{fancy} \fancyhf{}% clear all header and footer fields \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} -\fancyfoot[RE]{\large\bfseries\sffamily Transactions of the ASME} -\fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} -\fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} -\fancyfoot[LE]{\large\sffamily {\bfseries \@PaperNumber\thepage\space\space/}\space\space\@PreprintStringL\ } +\ifasmejour@nofoot + \fancyfoot[CE,CO]{\thepage} +\else + \fancyfoot[RE]{\large\bfseries\sffamily Transactions of the ASME} + \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} + \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} + \fancyfoot[LE]{\large\sffamily {\bfseries \@PaperNumber\thepage\space\space/}\space\space\@PreprintStringL\ } +\fi -\fancypagestyle{title}{% +\fancypagestyle{title}{% is an odd page \fancyhf{}% clear all header and footer fields \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} - \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} - \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} - \fancyfoot[CO]{\large\bfseries\sffamily Copyright \textcopyright\ \@PaperYear\ by ASME} + \ifasmejour@nofoot + \fancyfoot[CO]{\thepage} + \else + \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage} + \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName} + \ifasmejour@nocopyright + \fancyfoot[CO]{} + \else + \fancyfoot[CO]{\large\bfseries\sffamily Copyright \textcopyright\ \@PaperYear\ by ASME} + \fi + \fi } + %%%%%% Footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{fnpos} \makeFNbottom \makeFNbelow +\RequirePackage{footmisc}% +\IfPackageAtLeastTF{footmisc}{2022/02/05}{ + \PassOptionsToPackage{belowfloats}{footmisc}% + }{ \RequirePackage{fnpos} + \makeFNbottom + \makeFNbelow + }% +\setlength\footnotemargin{4mm}% reduce indentation of footnotes, from footmisc \setlength{\skip\footins}{12pt plus 2pt minus 1pt} \renewcommand{\footnoterule}{% @@ -702,10 +689,6 @@ \kern 2pt } -%% reduce indentation of footnotes -\renewcommand\@makefntext[1]{% - \noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1}% <== suppress hyphenation - %% 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{..}. @@ -717,13 +700,13 @@ %% include a comma for sequential footnotes \ExplSyntaxOn - \cs_new:Npn \__asmejour_NoteComma:n { \peek_meaning:NT \footnote { \textsu{\mdseries,} } } + \cs_new:Npn \__asmejour_NoteComma:n { \peek_meaning:NT \footnote { \textsuperscript{\mdseries,} } } \cs_new_eq:NN \__savefootnote \footnote \cs_gset_protected:Npn \footnote #1 { \__savefootnote{#1}\__asmejour_NoteComma:n } \ExplSyntaxOff -%%%%%%%%% Caption Related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Caption Related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \addto{\captionsenglish}{% \renewcommand{\figurename}{Fig.} @@ -739,7 +722,7 @@ \captionsetup[figure]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad} \captionsetup[table]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad,skip=0.5\baselineskip} -%% 30 January 2021. ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face. +%% 2021/01/30: ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face. \captionsetup[subfigure]{labelfont={sf},textfont={sf},textformat=sansmath,labelformat=simple}% default: =parens \renewcommand\thesubfigure{(\textit{\alph{subfigure}})} @@ -747,7 +730,7 @@ \renewcommand\thesubtable{(\textit{\alph{subtable}})} -%%%%%%%%%%%% Section Headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%% Section Headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage[raggedright,indentafter]{titlesec} @@ -760,28 +743,28 @@ \titlespacing{\subsubsection}{\parindent}{12pt plus 3pt minus 2pt}{0.5em} %% ASME style does not seem to go lower than third level heading, so ... -%% ....putting \paragraph into \subsubsection settings. +%% ...put \paragraph into \subsubsection settings. \titleformat{\paragraph}[runin]{\itshape}{\thesubsubsection}{0.5em}{}[.] \titlespacing{\paragraph}{\parindent}{14pt plus 3pt minus 2pt}{0.5em} %% Special handling of the appendices %% Assumes that appendices are the last technical content in paper -\providecommand{\appendicesname}{Appendices} - -\RenewDocumentCommand{\appendix}{}{% - \pdfbookmark[1]{\appendicesname}{appendices} - \setcounter{section}{0} - \renewcommand\thesection{\Alph{section}} - \setcounter{equation}{0} - \renewcommand\theequation{\Alph{section}\arabic{equation}} - \titleformat{\section}[block]{\mathversion{bold}\bfseries\large\raggedright}{\appendixname\ \thesection:}{0.5em}{}[\setcounter{equation}{0}] -} +\providecommand*{\appendicesname}{Appendices} +\newcounter{appeqn}%% Code revised to better support tagged pdf, 2024/07/24 +\patchcmd{\appendix}{% + \setcounter{subsection}{0}}{% + \setcounter{subsection}{0}% + \pdfbookmark[1]{\appendicesname}{appendices}% + \@addtoreset{equation}{appeqn}\stepcounter{appeqn}% + \gdef\theequation{\@Alph\c@section\@arabic\c@equation}% +}{}{} +\apptocmd{\appendix}{\titleformat{\section}[block]{\mathversion{bold}\bfseries\large\raggedright}{\appendixname\ \thesection:}{0.5em}{}} %% natbib's \bibsection controls section heading for References. -%%%%%%%%%%%%%%%%% List environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% List environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{enumitem} @@ -789,24 +772,20 @@ %% I have no examples of sublists... -%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% new pdf management in LaTeX, with \DocumentMetaData{..}, is preferred to this approach. \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 - } + %%% to assist with unicode glyph mapping in pdf/a, per M. Sharpe's recommendation in newtx documentation \InputIfFileExists{glyphtounicode-cmr.tex}{}{} %% additional mappings \InputIfFileExists{glyphtounicode-ntx.tex}{}{} %% additional mappings + %% new pdf management in LaTeX, with \DocumentMetaData{..}, is preferred to this approach. \ifaj@setpdfa - %%%% the pdfmanagement options are experimental, from Ulrike Fischer 2021/06/12 - \if@asme@pdfmanagement - \ClassInfo{asmejour}{pdfmanagement is defined. Class file will not load a color profile} + %%%% the pdfmanagement options from Ulrike Fischer 2021/06/12 + \ifasme@pdfmanagement + \ClassInfo{\ClassName}{pdfmanagement is defined. Class file will not load a color profile} \else - \ClassInfo{asmejour}{pdfmanagement not defined. Class file will load a color profile}% + \ClassInfo{\ClassName}{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{% @@ -826,41 +805,41 @@ %%% -\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/23 +\RequirePackage[psdextra]{hyperref} % provide most hyperref options via \hypersetup, but per documentation + % set [psdextra] here (for additional math support in bookmarks) 2021/12/23 \hypersetup{% - pdfborder={0 0 0},% - bookmarksnumbered=true,% - bookmarksopen=true,% - bookmarksopenlevel=1,% - colorlinks=true,% - linkcolor=blue, % - citecolor=blue, % - urlcolor=blue, % - filecolor=red, % added 2021/12/23, to make certain broken links more apparent - pdfnewwindow=true,% - pdfpagelayout=SinglePage, %TwoPageRight,% changed 2020/08/12 - pdfdisplaydoctitle=true% + pdfborder={0 0 0}, + bookmarksnumbered=true, + bookmarksopen=true, + bookmarksopenlevel=1, + colorlinks=true, + linkcolor=blue, + citecolor=blue, + urlcolor=blue, + filecolor=red, % added 2021/12/23, to make certain broken links more apparent + pdfnewwindow=true, + pdfpagelayout=SinglePage, % was TwoPageRight, changed 2020/08/12 + pdfdisplaydoctitle=true, } \urlstyle{same} % don't switch to typewriter font \RequirePackage{doi} % supports nasty characters in some doi's \renewcommand{\doitext}{doi:~} % change the default, {doi:}, to this for 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/22 %% This alias is also incorporated into asmejour.bst -\if@asme@pdfmanagement - \ClassInfo{asmejour}{pdfmanagement is defined. Class file will not load hyperxmp} +\ifasme@pdfmanagement + \ClassInfo{\ClassName}{pdfmanagement is defined. Class file will not load hyperxmp} \else + \RequirePackage{bookmark} %% improves handling of pdf bookmarks \RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf % Patch bug in hyperxmp, unless a more recent version is used. \@ifpackagelater{hyperxmp}{2022/10/15}{% v5.11 or later \relax - % \ClassInfo{asmeconf}{hyperxmp v5.11 or later is in use} + % \ClassInfo{\ClassName}{hyperxmp v5.11 or later is in use} }{% \ifx\undefined\hyxmp@no@bad@parts\relax\else \newcount\hypxmp@tempcnt @@ -872,10 +851,11 @@ } \fi -%%%%%% Adjustments to accommodate hyperref bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%% Adjustments to accommodate hyperref bookmarks %%%%%%%%%%%%%%%%%%%%%% -%%% ==> recent and evolving development of \pdfstring removes all robust commands from bookmarks, so -%%% the following interventions may become unnecessary over time (2021/12/23). +%%% Recent development of \pdfstring has removed all robust commands from bookmarks (2021/12/23). +%%% By mid-2024, no errors are thrown except for \bm; however, these commands serve to still suppress warnings. +%%% Math shift by $..$ still creates a warning, but I am leaving that in place. To avoid, use \( .. \) instead. %% Since \bm is useful in headings, this fix will reduce frequency with which %% alternate pdfstrings must be given in section command as \section[pdfstring]{texstring} @@ -896,7 +876,7 @@ %% Ensure that tag color does not follow \eqref into bookmarks, 2020/02/28 \pdfstringdefDisableCommands{% - \def\eqref#1{(\ref{#1})}% + \def\eqref#1{(\ref*{#1})}% } %% Let's make sure footnotes in section headings don't break pdf bookmarks. @@ -906,13 +886,13 @@ } -%%%%%%%%%%%%% Define some section and other names for special environments %%%%%%% +%%%%%%%%%%%%% Define some section and other names for special environments %%%%%%%%%%%%%%%%%%%%%%%% \providecommand{\nomname}{Nomenclature} \providecommand{\keywordname}{Keywords} \providecommand{\CAwords}{Corresponding Author.} -%%%%%%%%%%%%% Nomenclature Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%% Nomenclature Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Nomenclature environment in ASME Journal Style. %% Run twice to get proper label width. @@ -926,7 +906,7 @@ \NewDocumentCommand{\entry}{m m}{% \ifblank{#2}{% - \ClassError{asmejour}{The command \protect\entry should have two arguments. For subheadings, use \protect\EntryHeading}{It appears that you gave only one argument for \protect\entry. You need to include a second argument.} + \ClassError{\ClassName}{The command \protect\entry should have two arguments. For subheadings, use \protect\EntryHeading}{It appears that you gave only one argument for \protect\entry. You need to include a second argument.} }{% \item[\hfill#1${} = {}$]#2% \@itempenalty=-\@lowpenalty% @@ -938,7 +918,7 @@ %% A separate command command for nomenclature subheadings \NewDocumentCommand\EntryHeading{m}{% - \itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip + \itemsep12\p@ plus 4\p@ minus 4\p@ \goodbreak\item[\bfseries#1\hfill]\mbox{}\itemsep3\p@ plus 1\p@ minus 1\p@\@itempenalty=1000% add \mbox for tagged pdf, 2023/10/20 } @@ -966,28 +946,25 @@ }% }{% \setcounter{savedlength}{\widest}% - \end{list}% + \end{list}\ignorespacesafterend } -%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ASME requires these lists for production. \ifasmejour@nolists - \LogNote{Omitting lists of figures and tables}% + \ClassNoteNoLine{\ClassName}{Omitting lists of figures and tables}% \else \AtEndDocument{% - \clearpage \twocolumn[% - \begin{@twocolumnfalse} \listoffigures \listoftables - \end{@twocolumnfalse} ]% }% \fi -%%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{xcoffins} @@ -1028,12 +1005,12 @@ \fi } - \NewDocumentCommand\SetTitle{m}{% \SetVerticalCoffin{\Title}{114mm}{% \vspace*{0.5mm}% <== ASME doesn't align bar and text \noindent\Huge\CondSansBold\raggedright% #1% + %\gdef\@title{#1}% for tagging, etc. 2024/07/24. pdf metadata will probably override. \par } } @@ -1086,7 +1063,7 @@ \addtocounter{footnote}{-1}% in case of more than one CA } -%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newlength{\@AbstractSep}%% <== separation of author/abstract coffin from main two-column text. \setlength{\@AbstractSep}{12.5mm} @@ -1094,12 +1071,15 @@ \NewDocumentCommand{\MakeTitlePage}{}{% \thispagestyle{title}% - \twocolumn[ - \begin{@twocolumnfalse} + \ifasmejour@singlecolumn % 2024/07/20 \@ConstructAuthorBlock \vspace*{\@AbstractSep} - \end{@twocolumnfalse} - ] + \else + \twocolumn[ + \@ConstructAuthorBlock + \vspace*{\@AbstractSep} + ] + \fi \ifaj@CA \addtocounter{footnote}{1} \footnotetext{\CAwords} @@ -1113,7 +1093,7 @@ \fi } -%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Provide compatibility with titling commands from standard LaTeX article class @@ -1143,7 +1123,7 @@ \RenewDocumentCommand{\thanks}{m}{\relax}%% disabling this standard command, as it is inconsistent with this format -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput %% |