From ae7dbaafa6e0f7fcf645250131a684a424b7e2e7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 13 Oct 2021 20:30:22 +0000 Subject: nwejm (13oct21) git-svn-id: svn://tug.org/texlive/trunk@60753 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/nwejm/nwejm.dtx | 172 +++++++++++++++---------- 1 file changed, 107 insertions(+), 65 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/nwejm/nwejm.dtx b/Master/texmf-dist/source/latex/nwejm/nwejm.dtx index 01bab653f01..86bfb0627ba 100644 --- a/Master/texmf-dist/source/latex/nwejm/nwejm.dtx +++ b/Master/texmf-dist/source/latex/nwejm/nwejm.dtx @@ -13,7 +13,7 @@ new journal "North-Western European Journal of Mathematics". Release ------- -2020-03-18 v1.0.1 +2021-10-12 v1.0.2 Development ----------- @@ -44,7 +44,7 @@ https://github.com/dbitouze/nwejm. \input l3docstrip.tex \Msg{********************************************************} \Msg{* Installation} -\Msg{* Class: nwejm 2020-03-18 v1.0.1} +\Msg{* Class: nwejm 2021-10-12 v1.0.2} \Msg{* for the journal} \Msg{* "North-Western European Journal of Mathematics" (DB)} \Msg{********************************************************} @@ -61,7 +61,7 @@ License:| Released under the LaTeX Project Public License v1.3c or later \endpreamble \postamble -Copyright (C) 2015-2020 by Denis Bitouze +Copyright (C) 2015-2021 by Denis Bitouze This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either @@ -174,6 +174,12 @@ Running "make install" installs the files in the local TeX tree. % %\maketitle % +% \changes{v1.0.2}{2021-10-12}{% +% \begin{itemize} +% \item Fix gh \#4 (\url{https://git.io/JKLYW}). +% \item Fix bug in case of other engine than \hologo{pdfTeX}. +% \end{itemize} +% }% % \changes{v1.0.1}{2020-03-18}{% % \begin{itemize} % \item Fix bugs due to \Package{expl3} changes. @@ -317,8 +323,8 @@ Running "make install" installs the files in the local TeX tree. \ProvidesExplClass % {nwejm} % {nwejmart} - {2020-03-18} - {1.0.1} + {2021-10-12} + {1.0.2} { Class for the journal "North-Western European Journal of Mathematics". } @@ -373,8 +379,8 @@ Running "make install" installs the files in the local TeX tree. can~be~used~only~in~document~body~and~not~in~preamble!}% \msg_new:nnn{nwejmart}{Article~setup~not~consistent}{The~ article~ setup~ concerning~ the~ option~ `#1'~ has~ changed~ after~ its~ 1st~ use.~ Please~ - use~ \articlesetup~ command~ just~ once,~ just~ after~ the~ beginning~ of~ - the~ document.}% + use~ `\string\articlesetup'~ command~ just~ once,~ just~ after~ the~ + beginning~ of~ the~ document.}% \msg_new:nnn{ % nwejmart % nwejm @@ -442,13 +448,11 @@ Running "make install" installs the files in the local TeX tree. \bool_gset_true:N \g_@@_language_specified_bool% \PassOptionsToPackage{main=#1}{babel} \PassOptionsToPackage{#1}{varioref} - \AtBeginDocument{ + \AddToHook{begindocument/before}{% \LoadDictionaryFor{#1}{nwejm} - } - \AtEndPreamble{% \FCloadlang{#1} } - \AfterEndPreamble{% + \AddToHook{begindocument/end}{% \selectlanguage{#1} } } @@ -574,7 +578,7 @@ Running "make install" installs the files in the local TeX tree. % We load the dictionaries containing the translations needed for theorems and % the like. % \begin{macrocode} -\AtBeginDocument{ +\AddToHook{begindocument/before}{ \LoadDictionaryFor{french}{nwejm} \LoadDictionaryFor{english}{nwejm} \LoadDictionaryFor{dutch}{nwejm} @@ -608,23 +612,37 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage[l2tabu,orthodox]{nag} % \end{macrocode} % -% \item In case of \hologo{pdfTeX} engine, we enforce \pkg{inputenc} to be -% loaded with its \docAuxKey*{utf8} option. Otherwise \pkg{fontspec}, -% convenient for both \hologo{XeLaTeX} and \hologo{LuaLaTeX}, is loaded with -% ligatures à la \TeX{} by default enabled. +% \item In case of \hologo{pdfTeX} engine, we enforce \pkg{fontenc} to be +% loaded with its \docAuxKey*{T1} option. Otherwise \pkg{fontspec}, +% convenient for both \hologo{XeLaTeX} and \hologo{LuaLaTeX}, is loaded by the +% \pkg{unicode-math} package. % \begin{macrocode} \sys_if_engine_pdftex:TF - { - \RequirePackage[utf8]{inputenc} - }{ - \RequirePackage{fontspec} - \DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ } - } +{ % \end{macrocode} % % \item Standard package for selecting font encodings: % \begin{macrocode} -\RequirePackage[T1]{fontenc} + \RequirePackage[T1]{fontenc} +% \end{macrocode} +% +% \item Load of main font to be used: +% \begin{macrocode} + \RequirePackage[easyscsl,noDcommand]{kpfonts} +}{ +% \end{macrocode} +% +% \item Unicode mathematics support for \hologo{XeTeX} and \hologo{LuaTeX}: +% \begin{macrocode} + \RequirePackage{unicode-math} +% \end{macrocode} +% +% \item OTF version of the Kp-fonts for both roman and sans-serif font, but +% LatinModern for the monospaced one. +% \begin{macrocode} + \RequirePackage[noDcommand]{kpfonts-otf} + \setmonofont[Scale = MatchLowercase]{Latin Modern Mono} +} % \end{macrocode} % % \item Formatting both header and footers (pagestyle), and sections headers: @@ -704,9 +722,7 @@ Running "make install" installs the files in the local TeX tree. % \end{macrocode} % % \item Extension to \Pkg{amsmath}: correct various bugs/defeciencies in amsmath -% and useful tools for mathematical typesetting\footnote{The \Pkg{mathtools} -% loads \pkg{amsmath}, hence it's not necessary to load the -% latter. It has to be loaded before \pkg{datatool} and \pkg{kpfonts}.}: +% and useful tools for mathematical typesetting: % \begin{macrocode} \RequirePackage{mathtools} % \end{macrocode} @@ -716,22 +732,11 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage[amsmath,thmmarks,fleqn]{ntheorem} % \end{macrocode} % -% \item Support for using RSFS fonts in maths: -% \begin{macrocode} -\RequirePackage{rsfso} -% \end{macrocode} -% % \item Vector arrows: % \begin{macrocode} \RequirePackage{esvect} % \end{macrocode} % -% Load of main font to be used: -% \begin{macrocode} -\RequirePackage[easyscsl,noDcommand]{kpfonts} -% %\RequirePackage[noDcommand]{kpfonts} -% \end{macrocode} -% % \item Flexible and easy interface to page dimensions: % \begin{macrocode} \RequirePackage{geometry} @@ -909,7 +914,7 @@ Running "make install" installs the files in the local TeX tree. % \item Hypertext marks: % \begin{macrocode} \RequirePackage[pdfencoding=unicode,final]{hyperref}% -\AtEndPreamble{% +\AddToHook{begindocument/before}{% \hypersetup{hidelinks,hypertexnames=false,breaklinks}% }% % \end{macrocode} @@ -1872,7 +1877,7 @@ Running "make install" installs the files in the local TeX tree. % \begin{macrocode} \box_new:N \l_@@_journal_logo_box \box_new:N \l_@@_journal_name_box - \AfterEndPreamble{% + \AddToHook{begindocument/end}{% \hbox_set:Nn \l_@@_journal_name_box { \bfseries% @@ -1937,7 +1942,7 @@ Running "make install" installs the files in the local TeX tree. % \end{itemize} % % \begin{macrocode} -\AtBeginDocument{% +\AddToHook{begindocument}{% \graphicspath{{\c_@@_issue_images_path_string_tl//}{../\c_@@_issue_images_path_string_tl//}} % \glsdisablehyper } @@ -1955,7 +1960,7 @@ Running "make install" installs the files in the local TeX tree. % to be different. % \end{itemize} % \begin{macrocode} -% \AfterEndPreamble{\g_@@_mainmatter_switch_tl} +% \AddToHook{begindocument/end}{\g_@@_mainmatter_switch_tl} % \end{macrocode} % % \section{Options} @@ -2737,10 +2742,10 @@ Running "make install" installs the files in the local TeX tree. rectangle (current~page.south~east); % laboratory logo \node[anchor=south~east] at ([xshift=-10mm]current~page~text~area.south~east) - {\includegraphics[height=.66\c_@@_logos_rectangle_height_dim]{logo-painleve}} ; + {\includegraphics[height=.5\c_@@_logos_rectangle_height_dim]{logo-painleve}} ; % university logo \node[anchor=south~west] at (current~page~text~area.south~west) - {\includegraphics[height=.66\c_@@_logos_rectangle_height_dim]{logo-ul1-ufr-math}} ; + {\includegraphics[height=.5\c_@@_logos_rectangle_height_dim]{ul-fst-math}} ; % crop marks \draw [white] ([xshift=2.5mm]current~page~text~area.north~east) -- @@ -2872,7 +2877,7 @@ Running "make install" installs the files in the local TeX tree. % %\file_if_exist:nT { \c_@@_main_file_name_tl.aux } %{\externaldocument[@@-]{\c_@@_main_file_name_tl} -% \AfterEndPreamble{\setcounter{page}{\number\numexpr\getpagerefnumber{@@-\currfilebase}}} +% \AddToHook{begindocument/end}{\setcounter{page}{\number\numexpr\getpagerefnumber{@@-\currfilebase}}} %} % \end{macrocode} % @@ -3292,6 +3297,14 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class> +% \end{macrocode} +% % \subsection{Input variant} % % We create a variant of the "\input" macro to be use for the input of each @@ -3301,6 +3314,7 @@ Running "make install" installs the files in the local TeX tree. % \url{https://tex.stackexchange.com/q/475788/18401}). % \begin{macrocode} \NewDocumentCommand \inputarticle { O{english} m } {% + \int_gincr:N \g_@@_articles_int \newrefsection \renewcommand*{\glspluralsuffix}{s} \renewcommand*{\glsacrpluralsuffix}{\glspluralsuffix} @@ -3309,6 +3323,7 @@ Running "make install" installs the files in the local TeX tree. \str_case:nn {#1} { {english} { \selectlanguage{english} + % \shorthandoff{"}% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% @@ -3320,6 +3335,7 @@ Running "make install" installs the files in the local TeX tree. } {german} { \selectlanguage{ngerman} + % \shorthandon{"}% \renewcommand*{\glossaryname}{Glossar}% \renewcommand*{\acronymname}{Akronyme}% \renewcommand*{\entryname}{Bezeichnung}% @@ -3331,6 +3347,7 @@ Running "make install" installs the files in the local TeX tree. } {ngerman} { \selectlanguage{ngerman} + % \shorthandon{"}% \renewcommand*{\glossaryname}{Glossar}% \renewcommand*{\acronymname}{Akronyme}% \renewcommand*{\entryname}{Bezeichnung}% @@ -3342,6 +3359,7 @@ Running "make install" installs the files in the local TeX tree. } {french} { \selectlanguage{french} + % \shorthandoff{"}% % \end{macrocode} % % Though we switch to \pkg{babel}'s ×french×, footnotes are not displayed as @@ -3363,6 +3381,7 @@ Running "make install" installs the files in the local TeX tree. } {dutch} { \selectlanguage{dutch} + % \shorthandon{"}% \renewcommand*{\glossaryname}{Woordenlijst}% \renewcommand*{\acronymname}{Acroniemen}% \renewcommand*{\entryname}{Benaming}% @@ -3406,6 +3425,11 @@ Running "make install" installs the files in the local TeX tree. } } % \end{macrocode} +% We ensure the sections' counter will be printed as arabic numerals (in case +% ×\appendix× has been used in a previous article): +% \begin{macrocode} + \gdef\thesection{\@arabic\c@section} +% \end{macrocode} % We reset all acronyms entries. % \begin{macrocode} \glsresetall @@ -3413,6 +3437,14 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class|class-article> +% \end{macrocode} +% % \section{(Re)Definition of document commands that identify the article} % % The names of the authors of the different articles will appear at several @@ -3424,7 +3456,7 @@ Running "make install" installs the files in the local TeX tree. % This can be done only at the beginning of the document, in order to know the % characteristics of the current issue. % \begin{macrocode} -\AtBeginDocument{% +\AddToHook{begindocument}{% % \end{macrocode} % % We first create a token list containing the date of the current issue formated @@ -3476,7 +3508,6 @@ Running "make install" installs the files in the local TeX tree. % We increment the "\g_@@_articles_int" integer that counts the number of % articles in order to provide for each of them a unique bibliographic key. % \begin{macrocode} - \int_gincr:N \g_@@_articles_int \tl_gclear:N \g_@@_short_title_tl \tl_gclear:N \g_@@_header_title_tl \tl_gclear:N \g_@@_short_subtitle_tl @@ -3977,7 +4008,7 @@ Running "make install" installs the files in the local TeX tree. % instead of begin of the document in order some settings needed in preamble are % taken in account. % \begin{macrocode} -%\AtEndPreamble{\file_input:n {\c_@@_configuration_file_string_tl}} +%\AddToHook{begindocument/before}{\file_input:n {\c_@@_configuration_file_string_tl}} % \end{macrocode} % % \subsection{Miscellaneous} @@ -4353,7 +4384,7 @@ Running "make install" installs the files in the local TeX tree. % \begin{macrocode} \RenewDocumentCommand \newtheorem { O{} m } { - \AtBeginDocument{ + \AddToHook{begindocument}{ \tl_clear:N \l_@@_newtheorem_style_tl \tl_clear:N \l_@@_newtheorem_title_tl \tl_clear:N \l_@@_newtheorem_french_title_tl @@ -4582,7 +4613,7 @@ Running "make install" installs the files in the local TeX tree. } } } -\AfterEndPreamble{ +\AddToHook{begindocument/end}{ \ifcurrentbaselanguage{french}{\g_@@_french_crefname_tl}{} } % \end{macrocode} @@ -5197,7 +5228,7 @@ Running "make install" installs the files in the local TeX tree. % breaks fall where they may, even in the middle of a multi-line equation. If % needed, the ×\\*× command can be used to prohibit a pagebreak after a given line. % \begin{macrocode} -\AtEndPreamble{\allowdisplaybreaks} +\AddToHook{begindocument/before}{\allowdisplaybreaks} % \end{macrocode} % % The drawback of ×\allowdisplaybreaks× macro is it may happen we haven't @@ -5626,7 +5657,7 @@ Running "make install" installs the files in the local TeX tree. % header and footer on the page (and the following ones until the next article) % where the bibliography appears). % \begin{macrocode} -\AtEndPreamble{% +\AddToHook{begindocument/before}{% \defbibheading{_@@_subbibliography}[\refname]{% \section*{#1} }% @@ -5731,18 +5762,21 @@ Running "make install" installs the files in the local TeX tree. % is not robust in \pkg{kpfonts} code % (cf. \url{https://groups.google.com/d/msg/fr.comp.text.tex/hIi97ipK5qA/WJoPwvH-p1UJ}). % \begin{macrocode} -\ifkp@easyscsl -\DeclareRobustCommand{\itshape}{\not@math@alphabet\itshape\mathit% - \ifthenelse{\equal{\f@shape}{\scdefault}}{\fontshape{scsl}}{% - \fontshape\itdefault}\selectfont} -\fi +\sys_if_engine_pdftex:T +{ + \ifkp@easyscsl + \DeclareRobustCommand{\itshape}{\not@math@alphabet\itshape\mathit% + \ifthenelse{\equal{\f@shape}{\scdefault}}{\fontshape{scsl}}{% + \fontshape\itdefault}\selectfont} + \fi % \end{macrocode} % % We replace the \pkg{kpfonts}' \enquote{mathfrak} by the one from % \enquote{eufrak}, as the former doesn't provide Euler Fraktur digits. % \begin{macrocode} -\DeclareMathAlphabet\mathfrak{U}{euf}{m}{n} -\SetMathAlphabet\mathfrak{bold}{U}{euf}{b}{n} + \DeclareMathAlphabet\mathfrak{U}{euf}{m}{n} + \SetMathAlphabet\mathfrak{bold}{U}{euf}{b}{n} +} % \end{macrocode} % % \subsection{Related to \Pkg{hyperref}} @@ -5825,7 +5859,7 @@ Running "make install" installs the files in the local TeX tree. % \end{macrocode} % % \begin{macrocode} -\AfterEndPreamble{% +\AddToHook{begindocument/end}{% % \end{macrocode} % % If the cover production is asked, we automatically load some libraries, make @@ -5855,18 +5889,18 @@ Running "make install" installs the files in the local TeX tree. % Because articles' title are displayed thanks to the ×\chapter× command, we % have to format its layout. % \begin{macrocode} -\AfterEndPreamble{% +\AddToHook{begindocument/end}{% \titleformat{\chapter}[block] {\normalfont\centering}{}{0pt}{} \titlespacing*{\chapter}{0pt}{0pt}{0pt} } % \end{macrocode} % -% \Pkg{xy} performs category code changes of ×@× ×\AtBeginDocument× and this +% \Pkg{xy} performs category code changes of ×@× ×\AddToHook{begindocument}× and this % cause troubles (see \url{tex.stackexchange.com/q/303238/18401}). Hence, we % prohibit it. % \begin{macrocode} -\AtEndPreamble{% +\AddToHook{begindocument/before}{% \@ifpackageloaded{xy}{% \msg_error:nn{ % nwejmart @@ -5877,6 +5911,16 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % +% % By default, we switch the shorthand character ×"× off used by the Dutch and +% % German languages as they are source of many troubles, especially with the +% % ×tikzcd× environments. +% % \begin{macrocode} +% \AddToHook{begindocument/end}{% +% \shorthandoff{"}% +% \usetikzlibrary{babel}% +% } +% % \end{macrocode} +% % We now leave the \LaTeX3{} programming environment. % \begin{macrocode} \ExplSyntaxOff @@ -6734,7 +6778,6 @@ $clean_ext = "synctex.gz* run.xml tex.bak bbl bcf fdb_latexmk run tdo listing st #include:booktabs #include:mathtools #include:ntheorem -#include:rsfso #include:esvect #include:kpfonts #include:translations @@ -6945,8 +6988,7 @@ dutch % \Finale %%% Local Variables: -%%% mode: tex -%%% eval: (doctex-mode) +%%% mode: doctex %%% ispell-local-dictionary: "english" %%% TeX-command-default: "TeX" %%% TeX-master: t -- cgit v1.2.3