summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/asmejour/asmejour.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/asmejour/asmejour.cls')
-rw-r--r--macros/latex/contrib/asmejour/asmejour.cls50
1 files changed, 34 insertions, 16 deletions
diff --git a/macros/latex/contrib/asmejour/asmejour.cls b/macros/latex/contrib/asmejour/asmejour.cls
index 87bd31d377..b452428380 100644
--- a/macros/latex/contrib/asmejour/asmejour.cls
+++ b/macros/latex/contrib/asmejour/asmejour.cls
@@ -6,9 +6,9 @@
%% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex.
%%
%%
-%% This file is version 1.09 dated 2019/11/07.
- \def\versionno{1.09}
- \def\versiondate{2019/11/07\space}
+%% This file is version 1.10 dated 2020/2/28.
+ \def\versionno{1.10}
+ \def\versiondate{2020/02/28\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
@@ -34,7 +34,7 @@
%%
%% LICENSE:
%%
-%% Copyright (c) 2019 John H. Lienhard
+%% Copyright (c) 2020 John H. Lienhard
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
%% associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -210,7 +210,7 @@
%%%%%%%% FONT related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{mathtools} % extends amsmath
-\RequirePackage[utf8]{inputenc} % backward compatibility...
+\RequirePackage[utf8]{inputenc} % backward compatibility...LuaLaTeX will disable
\RequirePackage[]{babel}
\RequirePackage[]{newtxtext}
\RequirePackage[varqu,varl]{inconsolata} % sans typewriter font
@@ -274,8 +274,8 @@
%%%%%%%%%%%%%%%%% EQUATION AND LINE NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ASME puts equation tags in blue
-\RequirePackage{xpatch}
-\xpatchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
+\RequirePackage{etoolbox} % dropped xpatch 28/2/20
+\patchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath
\def\maketag@@@#1{\hbox{\m@th#1}}
@@ -484,7 +484,7 @@
\urlstyle{same} % don't switch to typewriter font
-\RequirePackage{doi} % provides hyperlinks for doi in bibliography
+\RequirePackage{doi} % supports nasty characters in some doi's
\renewcommand{\doitext}{doi:~} % change the default, {doi:}, to this for ASME specification
@@ -494,16 +494,26 @@
\def\bm#1#{\relax}%
}
+%% Let's disable \( and \) in pdf bookmarks, 28/2/20
+\pdfstringdefDisableCommands{%
+ \def\({\relax}%
+ \def\){\relax}%
+}
+
%% Let's just remove citations from pdf bookmarks
\pdfstringdefDisableCommands{%
\def\cite{\@gobble}%
}
+%% Ensure that tag color does not follow \eqref into bookmarks, 28/2/20
+\pdfstringdefDisableCommands{%
+ \def\eqref#1{(\ref{#1})}%
+}
+
%% Let's make sure footnotes in section headings don't break pdf bookmarks.
-\RequirePackage{etoolbox}
\robustify{\footnote}
\pdfstringdefDisableCommands{%
- \def\footnote#1{}%
+ \def\footnote#1{}%
}
%%% Create an optional argument for unnumbered sections and set pdf bookmark (thru \addcontentsline).
@@ -513,16 +523,16 @@
\let\svsection\section
\RenewDocumentCommand{\section}{s o m}{%
\IfBooleanTF {#1}
- {\svsection*{#3}\phantomsection
+ {\svsection*{#3}\phantomsection%
{\IfNoValueTF {#2}
- {\addcontentsline{toc}{section}{#3} }
- {\addcontentsline{toc}{section}{#2} }
- }
+ {\addcontentsline{toc}{section}{#3}}
+ {\addcontentsline{toc}{section}{#2}}% remove trailing space 28/2/20
+ }%
}
{\IfNoValueTF {#2}
{\svsection{#3}}
- {\svsection[#2]{#3}}
- }
+ {\svsection[#2]{#3}}%
+ }%
}
@@ -758,6 +768,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{iftex}%% can delete all this if desired.
+\ifpdftex
+ \pdfminorversion=7 % This selection is not required.
+\else
+ \relax
+\fi
+
+
\endinput
%%
%% End of file `asmejour.cls'.