From 74105dec94c29f2548c3bbc40e53bb28efd193a4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 9 Apr 2018 21:18:46 +0000 Subject: nwejm (9apr18) git-svn-id: svn://tug.org/texlive/trunk@47411 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/nwejm/nwejm-examples-template.dtx | 2 +- Master/texmf-dist/source/latex/nwejm/nwejm.dtx | 1044 +++++++++++++++----- 2 files changed, 801 insertions(+), 245 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/nwejm/nwejm-examples-template.dtx b/Master/texmf-dist/source/latex/nwejm/nwejm-examples-template.dtx index fa7f8d99445..55775e4db46 100644 --- a/Master/texmf-dist/source/latex/nwejm/nwejm-examples-template.dtx +++ b/Master/texmf-dist/source/latex/nwejm/nwejm-examples-template.dtx @@ -56,7 +56,7 @@ % \end{macrocode} % % \begin{macrocode} -\usepackage{lipsum} % Devrait ne pas être utilisé dans un vrai article! +\usepackage{lipsum} % Devrait ne pas être utilisé dans un vrai article ! \addbibresource{sample.bib} % Exemple de fichier bibliographique simple \addbibresource{biblatex-examples.bib} % Exemple de fichier bibliographique sophistiqué % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/nwejm/nwejm.dtx b/Master/texmf-dist/source/latex/nwejm/nwejm.dtx index 9a90a6a3a1e..129e60adbd5 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 ------- -Release 2017/02/14 v0.98d +2018/04/07 v0.98e Development ----------- @@ -44,7 +44,7 @@ https://github.com/dbitouze/nwejm. \input l3docstrip.tex \Msg{********************************************************} \Msg{* Installation} -\Msg{* Class: nwejm 2017/02/14 v0.98d} +\Msg{* Class: nwejm 2018/04/07 v0.98e} \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, 2016, 2017 by Denis Bitouze +Copyright (C) 2015-2018 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,8 @@ Running "make install" installs the files in the local TeX tree. % %\maketitle % +% \changes{v0.98e}{2018/04/07}{Package \package{mathrsfs} replaced by +% \Package{rsfso}. Documentation slighty improved.}% % \changes{v0.98d}{2017/02/14}{No functional changes: this new version only % because of missing files in the 0.98c version when uploaded on CTAN.}% % \changes{v0.98c}{2017/02/09}{Example and template files now from `.dtx' and @@ -287,8 +289,8 @@ Running "make install" installs the files in the local TeX tree. \ProvidesExplClass % {nwejm} % {nwejmart} - {2017/02/14} - {0.98d} + {2018/04/07} + {0.98e} { Class for the journal "North-Western European Journal of Mathematics". } @@ -308,7 +310,7 @@ Running "make install" installs the files in the local TeX tree. \msg_new:nnn{nwejm}{Wrong~issue's~main~file~name!}{You~ are~ using~ the~ `nwejm'~ class~ designed~ for~ the~ complete~ issues~ of~ the~ NWEJM~ and~ aimed~ for~ the~ NWEJM's~ team,~ not~ for~ authors~ of~ articles:~ if~ you're~ - an~ author~ of~ an~ article~,~ you~ should~ use~ the~ `nwejmart'~ class~ + an~ author~ of~ an~ article,~ you~ should~ use~ the~ `nwejmart'~ class~ instead.~ Otherwise,~ if~ you're~ from~ the~ NWEJM's~ team,~ please~ note~ that~ the~ issue's~ main~ file~ should~ be~ named~ `\tl_use:N\c_@@_main_file_name_tl.tex',~ not~ `\c_sys_jobname_str.tex'.~ @@ -383,6 +385,7 @@ Running "make install" installs the files in the local TeX tree. % % \begin{macrocode} \bool_new:N \g_@@_for_authors_bool +\bool_new:N \g_@@_for_printer_bool \bool_new:N \g_@@_cover_bool \bool_new:N \g_@@_coverpage_bool \bool_new:N \g_@@_inside_pages_bool @@ -438,6 +441,10 @@ Running "make install" installs the files in the local TeX tree. % \end{macrocode} % % \begin{macrocode} +\bool_new:N \g_@@_nolocaltoc_bool +% \end{macrocode} +% +% \begin{macrocode} % % \end{macrocode} % @@ -457,6 +464,9 @@ Running "make install" installs the files in the local TeX tree. 12pt .code:n = {% \PassOptionsToClass{12pt}{book} },% + draft .code:n = {% + \PassOptionsToClass{draft}{book} + },% % \end{macrocode} % % \begin{macrocode} @@ -519,8 +529,8 @@ Running "make install" installs the files in the local TeX tree. % \begin{macrocode} \LoadClass { book } \PassOptionsToPackage{export}{adjustbox}% -\PassOptionsToPackage{fleqn}{mathtools}% -\PassOptionsToPackage{french,ngerman,dutch,english,noabbrev}{cleveref} +\PassOptionsToPackage{fleqn}{amsmath}% +\PassOptionsToPackage{french,ngerman,dutch,english,noabbrev,capitalize}{cleveref} % \end{macrocode} % % \begin{macrocode} @@ -613,103 +623,154 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage{graphicx}% % \end{macrocode} % -% \item Establish input relative to a directory: +% \item Graphics package-alike macros for \enquote{general} boxes: % \begin{macrocode} -%\RequirePackage{import}% +\RequirePackage{adjustbox}% % \end{macrocode} % -% \item Put a grey textual watermark on document pages (loaded only if -% "forauthors" \nwejm{}'s option is on): +% \item References to other \LaTeX{} documents: % \begin{macrocode} -%\bool_if:nT { \g_@@_for_authors_bool } { -% \RequirePackage{draftwatermark}[2006/06/30]% -%} +\RequirePackage{xr} % \end{macrocode} % -% \item Graphics package-alike macros for \enquote{general} boxes: +% \item Provide file name and path of input files: % \begin{macrocode} -\RequirePackage{adjustbox}% +\RequirePackage{currfile} % \end{macrocode} % -% \item A new reference scheme for \LaTeX{}, giving the total number of pages in -% the document: +% \item A range of footnote options: % \begin{macrocode} -%\RequirePackage{zref-totpages} +\RequirePackage[multiple]{footmisc}% % \end{macrocode} % -% \item References to other \LaTeX{} documents: +% \item Notes in the margin, even where ×\marginpar× fails: % \begin{macrocode} -\RequirePackage{xr} +\RequirePackage{marginnote}% % \end{macrocode} % -% \item Provide file name and path of input files: +% \item Counter operations with label references: % \begin{macrocode} -\RequirePackage{currfile} +\RequirePackage{refcount}% % \end{macrocode} % -% \item A new reference scheme for \LaTeX{}, providing the facilities of the -% \package{xr} and \package{xr-hyper} packages: +% \item Extension of \LaTeX{}'s color facilities: % \begin{macrocode} -%\RequirePackage{zref-xr}% +\RequirePackage{xcolor}% % \end{macrocode} % -% \item A range of footnote options +% \item Execute command after the next page break: % \begin{macrocode} -\RequirePackage[multiple]{footmisc}% +\RequirePackage{afterpage}% % \end{macrocode} % -% \item Extension of \LaTeX{}'s color facilities: +% \item Determine if the current page is odd or even: % \begin{macrocode} -\RequirePackage{xcolor}% +\RequirePackage{ifoddpage}% +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class> +% \end{macrocode} +% +% \item Establish input relative to a directory: +% \begin{macrocode} +\RequirePackage{import}% +% \end{macrocode} +% +% \item Put a grey textual watermark on document pages (loaded only if +% "forauthors" \nwejm{}'s option is on): +% \begin{macrocode} +\bool_if:nT { \g_@@_for_authors_bool } { + \RequirePackage{draftwatermark}[2006/06/30]% +} +% \end{macrocode} +% +% \item A new reference scheme for \LaTeX{}, giving the total number of pages in +% the document: +% \begin{macrocode} +\RequirePackage{zref-totpages} +% \end{macrocode} +% +% \item A new reference scheme for \LaTeX{}, providing the facilities of the +% \package{xr} and \package{xr-hyper} packages: +% \begin{macrocode} +\RequirePackage{zref-xr}% % \end{macrocode} % % Some of the packages are needed only when the cover has to be produced. % \begin{macrocode} -%\bool_if:NTF {\g_@@_cover_bool} { +\bool_if:NTF {\g_@@_cover_bool} { % \end{macrocode} % % \item Coloured boxes, for \LaTeX{} examples and theorems, etc. % \begin{macrocode} -% \RequirePackage{tcolorbox} + \RequirePackage{tcolorbox} % \end{macrocode} % % \item A single TikZ node for the whole page (used for cover crop marks) % \begin{macrocode} -% \RequirePackage{tikzpagenodes} -% \ExplSyntaxOff -% \usetikzlibrary{calc,backgrounds} -% \ExplSyntaxOn -% \tcbuselibrary{skins} -% \tcbset{_@@_title_cover/.style={% -% colback=white, -% colframe=blue!37!white, -% colupper=blue, -% width=14cm, -% fontupper=\fontsize{9mm}{9mm}\fontseries{bx}\selectfont\sffamily, -% halign=center, -% valign=center, -% % boxsep=3mm, -% boxrule=3mm, -% left=\c_zero_dim, -% right=\c_zero_dim, -% sharp~corners, -% rounded~corners=northwest, -% % draft -% } -% } + \RequirePackage{tikzpagenodes} + \ExplSyntaxOff + \usetikzlibrary{calc,backgrounds} + \ExplSyntaxOn + \tcbuselibrary{skins} + \tcbset{_@@_title_cover/.style={% + colback=white, + colframe=blue!37!white, + colupper=blue, + width=14cm, + fontupper=\fontsize{9mm}{9mm}\fontseries{bx}\selectfont\sffamily, + halign=center, + valign=center, + % boxsep=3mm, + boxrule=3mm, + left=\c_zero_dim, + right=\c_zero_dim, + sharp~corners, + rounded~corners=northwest, + % draft + } + } % \end{macrocode} % % \item Macros for drawing graphs of graph theory (used for the backcover image) % \begin{macrocode} -% \RequirePackage{tkz-berge} -%}{ + \RequirePackage{tkz-berge} +}{ % \end{macrocode} % % Typically, the \Package{standalone} is not used for the cover. % \item Compile \TeX{} pictures stand-alone or as part of a document: % \begin{macrocode} -%\RequirePackage[group=false,subpreambles,sort]{standalone}% -%} +\RequirePackage[group=false,subpreambles,sort]{standalone}% +} +% \end{macrocode} +% +% \item Print page grid in background: +% \begin{macrocode} +\RequirePackage[foreground]{pagegrid}% +% \end{macrocode} +% +% \item Tools to load and manipulate data: +% \begin{macrocode} +\RequirePackage{datatool}% +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class|class-article> +% \end{macrocode} +% +% \item Control float placement: +% \begin{macrocode} +\RequirePackage{placeins}% % \end{macrocode} % % \item Define commands that appear not to eat spaces: @@ -743,12 +804,12 @@ Running "make install" installs the files in the local TeX tree. % % \item Extensions to theorem environments: % \begin{macrocode} -\RequirePackage[thmmarks,amsmath]{ntheorem} +\RequirePackage[amsmath,thmmarks,fleqn]{ntheorem} % \end{macrocode} % % \item Support for using RSFS fonts in maths: % \begin{macrocode} -\RequirePackage{mathrsfs} +\RequirePackage{rsfso} % \end{macrocode} % % \item Vector arrows: @@ -758,8 +819,8 @@ Running "make install" installs the files in the local TeX tree. % % Load of main font to be used: % \begin{macrocode} -%\RequirePackage[easyscsl,noDcommand]{kpfonts} -%\RequirePackage[noDcommand]{kpfonts} +\RequirePackage[easyscsl,noDcommand]{kpfonts} +% %\RequirePackage[noDcommand]{kpfonts} % \end{macrocode} % % \item Flexible and easy interface to page dimensions: @@ -787,6 +848,11 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage{varioref} % \end{macrocode} % +% \item Support for sub-captions (rather sub-floats): +% \begin{macrocode} +\RequirePackage{subcaption} +% \end{macrocode} +% % \item Section numbering (and table of contents control but this is canceled % by \Package{etoc}): % \begin{macrocode} @@ -800,7 +866,7 @@ Running "make install" installs the files in the local TeX tree. % % \item Subliminal refinements towards typographical perfection: % \begin{macrocode} -\RequirePackage[babel=true]{microtype}% +\RequirePackage[babel=true,final]{microtype}% % \end{macrocode} % % \item Current date and time formatting: @@ -818,21 +884,6 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage{environ} % \end{macrocode} % -% \item Print page grid in background: -% \begin{macrocode} -%\RequirePackage[foreground]{pagegrid}% -% \end{macrocode} -% -% \item Tools to load and manipulate data: -% \begin{macrocode} -%\RequirePackage{datatool}% -% \end{macrocode} -% -% \item Control float placement: -% \begin{macrocode} -%\RequirePackage{placeins}% -% \end{macrocode} -% % \item Improve on \LaTeX{}'s footnote handling (useful for its ×\savenotes× and % ×\spewnotes× commands added to theorems environment in order footnotes are % not trapped within them). @@ -848,9 +899,9 @@ Running "make install" installs the files in the local TeX tree. % % \item Hypertext marks: % \begin{macrocode} -\RequirePackage[hyperfootnotes=false,pdfencoding=unicode]{hyperref}% +\RequirePackage[hyperfootnotes=false,pdfencoding=unicode,final]{hyperref}% \AtBeginDocument{% - \hypersetup{hidelinks,hypertexnames=false}% + \hypersetup{hidelinks,hypertexnames=false,breaklinks}% }% % \end{macrocode} % @@ -874,9 +925,12 @@ Running "make install" installs the files in the local TeX tree. \RequirePackage{cleveref}% % \end{macrocode} % -% \item Automatic equation references: +% \item Automatic equation references (we first make use of a workaround due to +% Enrico Gregorio in order to get rid of the warning about \package{etex} --~ +% see https://tex.stackexchange.com/a/285953/18401): % \begin{macrocode} -\RequirePackage{autonum} +\expandafter\def\csname ver@etex.sty\endcsname{3000/12/31} +\let\globcount\newcount % \end{macrocode} % % \end{enumerate} @@ -1087,7 +1141,7 @@ Running "make install" installs the files in the local TeX tree. % \end{macrocode} % For the asides opening and eventuelly closing punctuation marks. % \begin{macrocode} -\tl_const:Nn \c_@@_aside_string_tl {--} +\tl_const:Nn \c_@@_aside_string_tl {---} % \end{macrocode} % For the draft watermark. % \begin{macrocode} @@ -1107,6 +1161,12 @@ Running "make install" installs the files in the local TeX tree. \tl_const:Nn \c_@@_issue_number_year_file_string_tl {\c_@@_main_file_name_tl.iny} % \end{macrocode} % +% % For the name of the file containing the informations needed to separate the +% % PDF files for both the individual articles and for the issue for the printer. +% % \begin{macrocode} +% \tl_const:Nn \c_@@_issue_informations_separate_file_string_tl {\c_@@_main_file_name_tl.ipr} +% % \end{macrocode} +% % For the prefix of the bibliographic key of each article. % \begin{macrocode} \tl_const:Nn \c_@@_issue_bib_key_tl {\int_use:N \g_@@_issue_number_int} @@ -1195,6 +1255,14 @@ Running "make install" installs the files in the local TeX tree. \dim_const:Nn \c_@@_printer_layoutoffset_dim { 10mm } % \end{macrocode} % +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class> +% \end{macrocode} +% % We define a \enquote{potential} layout offset dimension which is non-zero (and % the equal to \enquote{printer} layout offset dimension) iff the output is % prepared for the printer ("\g_@@_for_printer_bool" flag equals true). @@ -1206,14 +1274,6 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % -% \begin{macrocode} -% -% \end{macrocode} -% -% \begin{macrocode} -%<*class> -% \end{macrocode} -% % We define a \enquote{printer} binding dimension % "\c_@@_printer_bindingoffset_dim", fixed by the printer to have different % values depending on some total pages thresholds. If the binding dimension is @@ -1307,14 +1367,6 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % -% \begin{macrocode} -% -% \end{macrocode} -% -% \begin{macrocode} -%<*class|class-article> -% \end{macrocode} -% % The binding offset is applied iff the front cover is required ("frontcover" % option), which implies the output is prepared for the printer, with non-zero % offset ("\g_@@_for_printer_bool" flag equals true). @@ -1330,14 +1382,22 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*class|class-article> +% \end{macrocode} +% % The paper height is rather simple: it is always the layout height dimension % plus 2 times (top and bottom) the layout offset dimension (which turns to be % non-zero iff the output is prepared for the printer). % \begin{macrocode} \dim_const:Nn \c_@@_paperheight_dim { \c_@@_layoutheight_dim - + - 2\c_@@_potential_layoutoffset_dim +% + +% 2\c_@@_potential_layoutoffset_dim } % \end{macrocode} % @@ -1353,23 +1413,23 @@ Running "make install" installs the files in the local TeX tree. % \end{description} % \end{itemize} % \begin{macrocode} -\bool_if:NTF {\g_@@_cover_bool} { - \dim_const:Nn \c_@@_paperwidth_dim { - \c_@@_layoutwidth_dim - + - \c_@@_potential_layoutoffset_dim - + - .5\c_@@_potential_bindingoffset_dim - } -}{ +%\bool_if:NTF {\g_@@_cover_bool} { +% \dim_const:Nn \c_@@_paperwidth_dim { +% \c_@@_layoutwidth_dim +% + +% \c_@@_potential_layoutoffset_dim +% + +% .5\c_@@_potential_bindingoffset_dim +% } +%}{ \dim_const:Nn \c_@@_paperwidth_dim { \c_@@_layoutwidth_dim - + - 2 - \c_@@_potential_layoutoffset_dim - +\c_@@_potential_bindingoffset_dim +% + +% 2\c_@@_potential_layoutoffset_dim +% + +% \c_@@_potential_bindingoffset_dim } -} +%} % \end{macrocode} % % \begin{macrocode} @@ -1441,19 +1501,19 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % -% When the inside pages are produced, the crop marks are shown. % \begin{macrocode} -\bool_if:NT {\g_@@_inside_pages_bool} { - \geometry{showcrop} -} +% % \end{macrocode} % % \begin{macrocode} -% +%<*class> % \end{macrocode} % +% When the inside pages are produced, the crop marks are shown. % \begin{macrocode} -%<*class> +\bool_if:NT {\g_@@_inside_pages_bool} { + \geometry{showcrop} +} % \end{macrocode} % % We create a constant token list that contains the geometry of the front cover. @@ -1557,7 +1617,7 @@ Running "make install" installs the files in the local TeX tree. % \begin{macrocode} \tl_const:Nn \c_@@_main_geometry_tl {% ,layoutsize={\c_@@_layoutwidth_dim,\c_@@_layoutheight_dim} - ,layoutoffset=\c_@@_potential_layoutoffset_dim +% ,layoutoffset=\c_@@_potential_layoutoffset_dim ,textwidth=\c_@@_layoutwidth_dim*3/4 ,textheight=\c_@@_layoutheight_dim*3/4 % ,marginratio={4\string :6,5\string :7} @@ -1588,14 +1648,14 @@ Running "make install" installs the files in the local TeX tree. % % \section{Miscellaneous patches} % -% If we don't ask the cover page (only), the inside back cover and back cover -% pages are automatically included at the end of the document, the former -% containing some condensed instructions to authors. But, this cannot be done -% within "\AtEndDocument" and "\preto\@enddocumenthook" should be used instead -% (see \url{http://tex.stackexchange.com/q/240318/18401}). -% \begin{macrocode} -\bool_if:NF {\g_@@_coverpage_bool} { - \bool_if:NF {\g_@@_inside_pages_bool} { +% % If we don't ask the cover page (only), the inside back cover and back cover +% % pages are automatically included at the end of the document, the former +% % containing some condensed instructions to authors. But, this cannot be done +% % within "\AtEndDocument" and "\preto\@enddocumenthook" should be used instead +% % (see \url{http://tex.stackexchange.com/q/240318/18401}). +% % \begin{macrocode} +% \bool_if:NF {\g_@@_coverpage_bool} { +% \bool_if:NF {\g_@@_inside_pages_bool} { % \preto\@enddocumenthook{ % % \end{macrocode} % % @@ -1617,9 +1677,9 @@ Running "make install" installs the files in the local TeX tree. % \@openrightfalse % \g_@@_display_backcover_tl % }% - }% -}% -% \end{macrocode} +% }% +% }% +% % \end{macrocode} % % % If we don't ask the cover page (only), the document total page numbers should % % be a multiple of four and we add the necessary and sufficient number of blank @@ -1667,6 +1727,10 @@ Running "make install" installs the files in the local TeX tree. } \bool_gset_true:N \g_@@_tableofcontents_already_used_bool }% +\renewcommand\etocaftercontentshook +{% + \exp_after:wN\newgeometry\exp_after:wN{\c_@@_main_geometry_tl}% +}% % \end{macrocode} % % \section{Page styles} @@ -1758,10 +1822,10 @@ Running "make install" installs the files in the local TeX tree. \newpagestyle{@@_mainmatter_ps}[]{% \sethead% [ - \tl_if_exist:NT {\g_@@_short_title_tl} + \tl_if_exist:NT {\g_@@_header_title_tl} { - \tl_if_empty:NF \g_@@_short_title_tl {% - \slshape\g_@@_short_title_tl + \tl_if_empty:NF \g_@@_header_title_tl {% + \slshape\g_@@_header_title_tl } } ]% @@ -2473,7 +2537,8 @@ Running "make install" installs the files in the local TeX tree. % } \setlist[description,1]{font=\scshape\bfseries} \footnotesize% - \begin{multicols*}{2} + \begin{multicols*}{2} + \raggedright \setlength{\columnsep}{1mm} \begin{description}[leftmargin=2em] \item[\c_@@_editorinchief_string_tl] \ @@ -2699,7 +2764,7 @@ Running "make install" installs the files in the local TeX tree. \tl_gclear:N \g_@@_keywords_tl \tl_clear:N \l_tmpb_clist \clist_set:Nn \l_tmpb_clist {#2} - \tl_set:Nn \g_@@_keywords_tl { \clist_use:Nnnn \l_tmpb_clist { ,~ } { ,~ } { ,~ } } + \tl_set:Nx \g_@@_keywords_tl { \clist_use:Nnnn \l_tmpb_clist { ,~ } { ,~ } { ,~ } } % \tl_if_empty:nTF {#1} {% % \hypersetup{pdfkeywords={\g_@@_keywords_tl}} % }{ @@ -2982,6 +3047,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} +% % \end{macro} % % \subsection{\Pkg{Varioref}} @@ -2989,31 +3062,30 @@ Running "make install" installs the files in the local TeX tree. % We have to save the extra definitions of the \Pkg{varioref} which currently is % multilingual aware. % \begin{macrocode} -\addto\extrasfrench{% +\vref@addto\extrasfrench{% \def\reftextfaceafter {page~\reftextvario{ci-contre}{suivante}}% \def\reftextfacebefore{page~\reftextvario{ci-contre}% - {pr\’ec\’edente}}% + {pr\'ec\'edente}}% \def\reftextafter {page~suivante}% \def\reftextbefore - {page~pr\’ec\’edente}% - \def\reftextcurrent - {de~la~pr\’esente~page}% - \def\reftextfaraway#1{page~\pageref{#1}}% - \def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}% - \def\reftextlabelrange#1#2{\ref{#1}~\‘a~\ref{#2}}% -} -\addto\extrasngerman{% + {page~pr\'ec\'edente}% + \def\reftextcurrent {de~la~pr\'esente~page}% + \def\reftextfaraway#1{p.\nobreakspace\pageref{#1}}% + \def\reftextpagerange#1#2{p.\nobreakspace\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1}~\‘a\nobreakspace\ref{#2}}% +} +\vref@addto\extrasngerman{% \def\reftextfaceafter {auf~der~n\"achsten~Seite}% \def\reftextfacebefore{auf~der~vorherigen~Seite}% \let\reftextafter \reftextfaceafter \let\reftextbefore \reftextfacebefore \def\reftextcurrent {auf~dieser~Seite}% - \def\reftextfaraway#1{auf~Seite~\pageref{#1}}% - \def\reftextpagerange#1#2{auf~den~Seiten~\pageref{#1}--\pageref{#2}}% - \def\reftextlabelrange#1#2{\ref{#1}~bis~\ref{#2}}% + \def\reftextfaraway#1{auf~S.\nobreakspace\pageref{#1}}% + \def\reftextpagerange#1#2{auf~den~S.\nobreakspace\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1}~bis\nobreakspace\ref{#2}}% } -\addto\extrasdutch{% +\vref@addto\extrasdutch{% \def\refpagename{pagina}% \def\reftextfaceafter {op~de~\reftextvario{rechter~\refpagename}% {\refpagename\ hiernaast}}% @@ -3024,27 +3096,24 @@ Running "make install" installs the files in the local TeX tree. \def\reftextbefore {op~de~\reftextvario{vorige~\refpagename}% {\refpagename\ hiervoor}}% \def\reftextcurrent {op~deze~\refpagename}% - \def\reftextfaraway#1{op~\refpagename\c_space_tl\pageref{#1}} + \def\reftextfaraway#1{op~\refpagename\nobreakspace\pageref{#1}} } -\addto\extrasenglish{% +\vref@addto\extrasenglish{% \def\reftextfaceafter {on~the~\reftextvario{facing}{next}~page}% \def\reftextfacebefore{on~the~\reftextvario{facing}{preceding}~page}% \def\reftextafter {on~the~\reftextvario{following}{next}~page}% \def\reftextbefore {on~the~\reftextvario{preceding}{previous}~page}% \def\reftextcurrent {on~\reftextvario{this}{the~current}~page}% - \def\reftextfaraway#1{on~page~\pageref{#1}}% - \def\reftextpagerange#1#2{on~pages~\pageref{#1}--\pageref{#2}}% - \def\reftextlabelrange#1#2{\ref{#1}~to~\ref{#2}}% + \def\reftextfaraway#1{on~p.\nobreakspace\pageref{#1}}% + \def\reftextpagerange#1#2{on~pp.\nobreakspace\pageref{#1}--\pageref{#2}}% + \def\reftextlabelrange#1#2{\ref{#1}~to\nobreakspace\ref{#2}}% } % \end{macrocode} -% \end{macro} % +% We don't want randomization in the \package{varioref} expressions in order to +% reduce discrepancies between the whole issue and the individual articles. % \begin{macrocode} -% -% \end{macrocode} -% -% \begin{macrocode} -%<*class|class-article> +\def\reftextvario#1#2{#2} % \end{macrocode} % % \subsection{Article setup} @@ -3086,6 +3155,64 @@ Running "make install" installs the files in the local TeX tree. % \end{macrocode} % \end{macro} % +% Because of the ×capitalize× option passed to \Package{cleveref}, the names of +% the references (\enquote{chapter}, \enquote{theorem}, etc.) have their first +% letter capitalised (even with ×\cref×), which fit the English/Amercian +% typographic rules, but not the French ones. Hence, we redefine these +% references' names in French in order ×\cref× gives their lower case +% version. Because this redefinition is needed more than once, we store it in +% the ×\g_@@_french_crefname_tl× token list. +% \begin{macrocode} +\tl_gset:Nn \g_@@_french_crefname_tl { + \clist_set:Nn \l_tmpa_clist {% + theorem, + corollary, + conjecture, + proposition, + lemma, + axiom, + definition, + remark, + example, + notation, + proof% + } + \clist_map_inline:Nn \l_tmpa_clist { + \crefname{#1}{ + \tl_lower_case:n{ + \GetTranslationFor{french}{#1} + } + }{% + \tl_lower_case:n{ + \GetTranslationFor{french}{plural-#1} + } + } + } + \crefname{equation}{{\'e}quation}{{\'e}quations}% + \crefname{figure}{figure}{figures}% + \crefname{table}{table}{tables}% + \crefname{page}{page}{pages}% + \crefname{part}{partie}{parties}% + \crefname{chapter}{chapitre}{chapitres}% + \crefname{section}{section}{sections}% + \crefname{appendix}{annexe}{annexes}% + \crefname{enumi}{point}{points}% + \crefname{footnote}{note}{notes}% + \crefname{theorem}{th\'eor\`eme}{th\'eor\`emes}% + \crefname{lemma}{lemme}{lemmes}% + \crefname{corollary}{corollaire}{corollaires}% + \crefname{proposition}{proposition}{propositions}% + \crefname{definition}{d\'efinition}{d\'efinitions}% + \crefname{result}{r\'esultat}{r\'esultats}% + \crefname{example}{exemple}{exemples}% + \crefname{remark}{remarque}{remarques}% + \crefname{note}{commentaire}{commentaires}% + \crefname{algorithm}{algorithme}{algorithmes}% + \crefname{listing}{liste}{listes}% + \crefname{line}{ligne}{lignes}% +} +% \end{macrocode} +% % \subsection{Input variant} % % We create a variant of the "\input" macro to be use for the input of each @@ -3097,7 +3224,12 @@ Running "make install" installs the files in the local TeX tree. \tl_if_eq:nnTF { #1 } { german } {% \selectlanguage{ngerman} }{ - \selectlanguage{#1} + \tl_if_eq:nnTF { #1 } { french } {% + \selectlanguage{french} + \g_@@_french_crefname_tl + }{ + \selectlanguage{#1} + } }% % \end{macrocode} % @@ -3113,9 +3245,9 @@ Running "make install" installs the files in the local TeX tree. % % We reset setup possibly chosen in previous articles. % \begin{macrocode} -% \bool_gset_false:N \g_@@_gradient_nabla_bool -% \bool_gset_false:N \g_@@_gradient_nabla_control_bool -% \bool_gset_false:N \g_@@_grad_used_bool +% \bool_gset_false:N \g_@@_gradient_nabla_bool +% \bool_gset_false:N \g_@@_gradient_nabla_control_bool +% \bool_gset_false:N \g_@@_grad_used_bool % \end{macrocode} % % \begin{macrocode} @@ -3201,7 +3333,7 @@ Running "make install" installs the files in the local TeX tree. % title} is store in "\g_@@_title_tl" for later use. % \begin{macrocode} \tl_new:N \g_@@_title_tl -\RenewDocumentCommand \title { o m } { +\RenewDocumentCommand \title { o o m } { % \end{macrocode} % % We don't want the (next) title to appear in the headers of the preceding @@ -3215,16 +3347,24 @@ Running "make install" installs the files in the local TeX tree. % \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 % \IfNoValueF {#1} { \tl_gset:Nn \g_@@_short_title_tl {#1} } - \tl_gset:Nn \g_@@_title_tl {#2} + \IfNoValueF {#2} + { + \tl_gset:Nn \g_@@_header_title_tl {#2} + } + \tl_gset:Nn \g_@@_title_tl {#3} \tl_if_empty:NT \g_@@_short_title_tl {% \tl_gset_eq:NN \g_@@_short_title_tl \g_@@_title_tl } + \tl_if_empty:NT \g_@@_header_title_tl {% + \tl_gset_eq:NN \g_@@_header_title_tl \g_@@_short_title_tl + } } % \end{macrocode} % \end{macro} @@ -3465,9 +3605,9 @@ Running "make install" installs the files in the local TeX tree. % % We enforce all the previous floats to be processed before a new article starts % (this is already done in "acknowledgments"environment but is repeated here if -% what is before provides floats but not acknowledgments). +% what is before provides floats but not acknowledgments). % \begin{macrocode} -% \FloatBarrier% +% \FloatBarrier% % \end{macrocode} % % We store the unique bibliographic key of the current article in the @@ -3685,6 +3825,17 @@ Running "make install" installs the files in the local TeX tree. \tl_gclear:N \g_@@_people_affiliation_tl \tl_gclear:N \g_@@_people_email_tl \tl_clear:N \l_@@_people_first_last_names_tl% +% % \end{macrocode} +% % +% % We insert an invisible local table of contents that will take in account all +% % the sections, subsections, etc. of the article. This local TOC has a label +% % that will be used to display this TOC at the end of the article. +% % \begin{macrocode} +% \etocarticlestyle +% \tl_set:Nn \l_@@_localtableofcontents_label_tl {% +% localtableofcontents-\int_use:N \g_@@_articles_int +% } +% \invisiblelocaltableofcontents \label{\l_@@_localtableofcontents_label_tl} } % \end{macrocode} % \end{macro} @@ -3765,7 +3916,8 @@ Running "make install" installs the files in the local TeX tree. \cs_set_eq:NN \_@@_subsection \subsection \cs_set_eq:NN \_@@_subsubsection \subsubsection \AfterPreamble{% - \RenewDocumentCommand \section { s o m } {% + \RenewDocumentCommand \section { s o o m } {% + \tl_gclear:N \g_@@_short_section_title_tl \IfBooleanTF {#1} { \setsecnumdepth{none}% @@ -3773,7 +3925,16 @@ Running "make install" installs the files in the local TeX tree. { \resetsecnumdepth*% } - \IfNoValueTF{#2}{\_@@_section{#3}}{\_@@_section[#2]{#3}} + \tl_gset:Nn \g_@@_section_title_tl {#4} + \IfNoValueTF{#2}{ + \tl_gset:Nn \g_@@_short_section_title_tl {#4} + }{ + \tl_gset:Nn \g_@@_short_section_title_tl {#2} + } + \_@@_section[\g_@@_short_section_title_tl]{\g_@@_section_title_tl} + \IfNoValueF {#3}{ + \sectionmark{#3} + } } \RenewDocumentCommand \subsection { s o m } {% \IfBooleanT {#1} @@ -3859,6 +4020,16 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % +% \section{Miscellaneous for captions} +% +% We set the caption label separator to make it the same as theorems separator. +% \begin{macrocode} +\DeclareCaptionLabelSeparator{dash}{\nobreakspace--\nobreakspace} +\captionsetup{ + labelsep=dash + } +% \end{macrocode} +% % \section{Miscellaneous (re)definitions} % % We gather here miscellaneous redefinitions. @@ -3952,8 +4123,9 @@ Running "make install" installs the files in the local TeX tree. % % \subsection{Usual theorems and the like} % -% Some usual theorems and the like are defined, thanks to \Pkg{thmtools}. First, -% we define a private function "\_@@_new_theorem" that defines: +% Some usual theorems and the like are defined, thanks to \Pkg{thmtools} build +% upon \Pkg{ntheorem}. First, we define a private function "\_@@_new_theorem" +% that defines: % \begin{enumerate} % \item a new (private, \pkg{thmtools}) theorem with 4 arguments: % \begin{enumerate} @@ -4186,12 +4358,16 @@ Running "make install" installs the files in the local TeX tree. } \clist_map_inline:Nn \l_tmpa_clist { \crefname{#1}{ - \GetTranslation{#1} - }{% - \GetTranslation{plural-#1} + \tl_mixed_case:n{ + \GetTranslation{#1} + } + }{ + \tl_mixed_case:n{ + \GetTranslation{plural-#1} + } } \Crefname{#1}{ - \tl_mixed_case:n{ \protect + \tl_mixed_case:n{ \GetTranslation{#1} } }{% @@ -4200,6 +4376,9 @@ Running "make install" installs the files in the local TeX tree. } } } +\AfterEndPreamble{ + \ifcurrentbaselanguage{french}{\g_@@_french_crefname_tl}{} +} % \end{macrocode} % % \subsection{Assertions and hypotheses enumerations} @@ -4538,19 +4717,11 @@ Running "make install" installs the files in the local TeX tree. #1 } \NewDocumentCommand \set { m O{} } { - \if@display \tl_if_empty:nTF {#2} {% \_@@_set*{#1} }{ \_@@_set*{#1\l_@@_given_tl #2} } - \else - \tl_if_empty:nTF {#2} {% - \_@@_set{#1} - }{ - \_@@_set{#1\l_@@_given_tl #2} - } - \fi } % \end{macrocode} % @@ -4692,32 +4863,405 @@ Running "make install" installs the files in the local TeX tree. } % \end{macrocode} % -% \section{Packages settings, libraries loading, etc.} +% \section{Multiline equations} % -% We gather here miscellaneous settings. +% Thanks to the \package{amsmath}'s ×\allowdisplaybreaks× macro, we let page +% 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} +% \end{macrocode} % -% \subsection{Related to \Pkg{autonum}} +% The drawback of ×\allowdisplaybreaks× macro is it may happen we haven't +% a view on all the multiline equation. In order to reduce this drawback, +% a solution is to add a marginal note notifying the equation continues next +% page if a page break occurs within it. Here is a solution for this (at least +% for ×align(*)× and ×multline(*)× environments) that requires to +% make use of \package{marginnote}'s ×\marginnote× macro, because the usual +% ×\marginpar× doesn't work within math mode. % -% We add \pkg{autonum} support for ×\vref× referencing command: +% Each multiline equation will have a unique number. % \begin{macrocode} -\AfterEndPreamble{ - \autonum@generatePatchedReferenceCSL{vref} +\int_new:N \g_multiline_eq_int +% \end{macrocode} +% Each line of a multiline equation will have a unique number (local +% to the multiline equation). +% \begin{macrocode} +\int_new:N \g_line_of_multiline_eq_int +% \end{macrocode} +% \begin{macrocode} +\tl_new:N \g_line_of_multiline_eq_label_tl +\tl_new:N \g_next_line_of_multiline_eq_label_tl +% \end{macrocode} +% We save the original environments +% \begin{macrocode} +\clist_set:Nn \l_tmpa_clist {align,multline} +\clist_map_inline:Nn \l_tmpa_clist { + \cs_set_eq:cc {db_#1_start:} {#1} + \cs_set_eq:cc {db_#1_end:} {end#1} + \cs_set_eq:cc {db_#1_star_start:} {#1*} + \NewDocumentEnvironment{amsmath#1}{} + {\cs:w db_#1_start:\cs_end:} + {\cs:w db_#1_end:\cs_end:} + \NewDocumentEnvironment{amsmath#1*}{} + {\cs:w db_#1_star_start:\cs_end:} + {\cs:w db_#1_end:\cs_end:} +% \end{macrocode} +% ... and create their new versions. +% \begin{macrocode} + \RenewEnviron{#1} + { + \cs:w db_multiline_eq:nV\cs_end: {#1} \BODY + } + \RenewEnviron{#1*} + { + \cs:w db_multiline_eq:nV\cs_end: {#1*} \BODY + } +} +% \end{macrocode} +% We need to know whether or not we are in a patched environment in order to, in +% the latter case, not patch the ×\intertext× and ×\shortintertext×. +% \begin{macrocode} +\bool_new:N \g_@@_within_patched_amsmath_env_bool +% \end{macrocode} +% The environments ×flalign(*)× and ×alignat(*)× cannot be patched when +% ×align(*)× is patched as above (see +% \url{https://tex.stackexchange.com/q/399979/18401}). As a workaround, we make +% these environments the same as ×align(*)×. +% \begin{macrocode} +\clist_set:Nn \l_tmpa_clist {flalign,alignat} +\clist_map_inline:Nn \l_tmpa_clist { + \RenewEnviron{#1} + { + \cs:w db_multiline_eq:nV\cs_end: {align} \BODY + } + \RenewEnviron{#1*} + { + \cs:w db_multiline_eq:nV\cs_end: {align*} \BODY + } +} % \end{macrocode} % -% The \Pkg{autonum} deletes the definitions of the starred versions of the -% ×equation×, ×align×, ×gather×, ×multline×, ×flalign× environments and that -% may be troubling for the user. Hence we redefine them to be the same as their -% unstarred counterparts: +% The new versions of ×align(*)× and ×multline(*)× are defined +% thanks to the following ×\db_multiline_eq× control sequence. % \begin{macrocode} - \clist_set:Nn \l_tmpa_clist {equation,align,gather,multline,flalign} - \clist_map_inline:Nn \l_tmpa_clist { - \cs_set_eq:cc {#1*} {#1} - \cs_set_eq:cc {end#1*} {end#1} +\seq_new:N \l_db_multiline_eq_seq +\cs_new_protected:Nn \db_multiline_eq:nn +{ +% \end{macrocode} +% +% We set the unique number of the current multiline equation. +% \begin{macrocode} + \int_gincr:N \g_multiline_eq_int +% \end{macrocode} +% +% The number of the 1st line of the current multiline equation is $1$. +% \begin{macrocode} + \int_zero:N \g_line_of_multiline_eq_int + \int_gincr:N \g_line_of_multiline_eq_int +% \end{macrocode} +% +% We globally define the strings of the labels identfying: +% \begin{itemize} +% \item the current line, +% \item the line following the current one, +% \end{itemize} +% of the current multiline equation. +% \begin{macrocode} + \tl_gset:Nx \g_tmpa_tl { + multilineeq + - + \int_use:N \g_multiline_eq_int + - + line + - + } + \tl_gset:Nx \g_line_of_multiline_eq_label_tl { + \g_tmpa_tl + \int_use:N \g_line_of_multiline_eq_int + } + \tl_gset:Nx \g_next_line_of_multiline_eq_label_tl { + \g_tmpa_tl + \int_eval:n {\g_line_of_multiline_eq_int + 1} } - % \msg_warning:nnn{nwejmart}{Starred~AMS~environments}{#1} +% \end{macrocode} +% +% We set the label of the current line. +% \begin{macrocode} + \ltx@label{\g_line_of_multiline_eq_label_tl} + % + \seq_set_split:Nnn \l_db_multiline_eq_seq { \\ } { #2 } + \tl_if_in:nnTF {#1} {multline} { + \begin{amsmath#1} + \bool_gset_true:N \g_@@_within_patched_amsmath_env_bool + \seq_use:Nnnn \l_db_multiline_eq_seq + { \multiline@double@backslash@add@space }{ \multiline@double@backslash@add@space }{ \multiline@double@backslash@add@double@space } + \hfill + \end{amsmath#1} + \bool_gset_false:N \g_@@_within_patched_amsmath_env_bool + }{ + \begin{amsmath#1} + \bool_gset_true:N \g_@@_within_patched_amsmath_env_bool + \seq_use:Nn \l_db_multiline_eq_seq { \multiline@double@backslash } + \end{amsmath#1} + \bool_gset_false:N \g_@@_within_patched_amsmath_env_bool + } + } +% \end{macrocode} +% +% We create a variant of ×\db_multiline_eq× which returns a value. +% \begin{macrocode} +\cs_generate_variant:Nn \db_multiline_eq:nn { nV } +% \end{macrocode} +% +% We create the control sequences involved in ×\db_multiline_eq×. +% \begin{macrocode} +\cs_new_protected:Nn \db_multiline_double_backslash:nn +{ + \db_add_marginal_note: + \IfValueTF{#2}{% + \IfBooleanTF{#1}{\\*[#2]}{\\[#2]}% + }{% + \IfBooleanTF{#1}{\\*}{\\}% + }% + % + \db_add_multiline_eq_label: +} +% \end{macrocode} +% \begin{macrocode} +\NewDocumentCommand{\multiline@double@backslash}{so}{% + \db_multiline_double_backslash:nn {#1}{#2} +} +\NewDocumentCommand{\multiline@double@backslash@add@space}{so}{% + \db_multiline_double_backslash:nn {#1}{#2} + \hspace{\mathindent} +} +\NewDocumentCommand{\multiline@double@backslash@add@double@space}{so}{% + \db_multiline_double_backslash:nn {#1}{#2} + \hspace{2\mathindent} +} +% \end{macrocode} +% \begin{macrocode} +\cs_new_protected:Nn \db_add_marginal_note: +{ +% \end{macrocode} +% +% If (and only if) the pageref of the next line if greater than the +% current line's one, we insert a marginal note telling the equation +% continues on next page. +% \begin{macrocode} + \int_compare:nNnT { + \getpagerefnumber{\g_next_line_of_multiline_eq_label_tl}% + }>{ + \getpagerefnumber{\g_line_of_multiline_eq_label_tl}% + }{ + \reversemarginpar + \marginnote[\g_@@_equation_continues_next_page_tl]{} + \normalmarginpar + \marginnote[\g_@@_equation_continues_next_page_tl]{} + } +} +% \end{macrocode} +% +% We define the content of the marginal note. +% \begin{macrocode} +\tl_gset:Nn \g_@@_equation_continues_next_page_tl { + \tiny + \sffamily + \slshape + ( + \GetTranslation{equation-continues-next-page} + ) +} +% \end{macrocode} +% +% \begin{macrocode} +\cs_new_protected:Nn \db_add_multiline_eq_label: +{ +% \end{macrocode} +% +% Do nothing on first pass. +% \begin{macrocode} + \ifmeasuring@\else +% \end{macrocode} +% +% We set the unique number of the current multiline equation. +% \begin{macrocode} + \int_gincr:N \g_line_of_multiline_eq_int +% \end{macrocode} +% +% We set the label of the current line. +% \begin{macrocode} + \tl_gset:Nx \g_line_of_multiline_eq_label_tl { + \g_tmpa_tl + \int_use:N \g_line_of_multiline_eq_int + } + \tl_gset:Nx \g_next_line_of_multiline_eq_label_tl { + \g_tmpa_tl + \int_eval:n {\g_line_of_multiline_eq_int + 1} + } + \ltx@label{\g_line_of_multiline_eq_label_tl}% + \fi +} +% \end{macrocode} +% We need to redefine the ×\intertext× and ×\shortintertext× macros (re)defined +% by \Pkg{amsmath} and \Pkg{mathtools} in order they display the marginal note +% notifying the equation continues next page if a page break occurs at their level. +% \begin{macrocode} +\def\MT_intertext: {% + \def\intertext##1{% + \db_add_marginal_note: + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\belowdisplayskip + \vskip-\lineskiplimit % CCS + \vskip\normallineskiplimit % CCS + \vskip\l_MT_above_intertext_sep + \vbox{\normalbaselines + \ifdim + \ifdim\@totalleftmargin=\z@ + \linewidth + \else + -\maxdimen + \fi + =\columnwidth + \else \parshape\@ne \@totalleftmargin \linewidth + \fi + \noindent\ignorespaces##1\par}% + \penalty\predisplaypenalty\vskip\abovedisplayskip% + \vskip-\lineskiplimit % CCS + \vskip\normallineskiplimit % CCS + \vskip\l_MT_above_intertext_sep + }% + \db_add_multiline_eq_label: + }% + \MH_let:NwN \shortintertext \shortintertext@ +} +% \end{macrocode} +% \begin{macrocode} +\pretocmd{\MT_orig_shortintertext:n}{% + \bool_if:NT \g_@@_within_patched_amsmath_env_bool { + \db_add_marginal_note: + } +}{}{} +\apptocmd{\MT_orig_shortintertext:n}{\db_add_multiline_eq_label:}{}{} +\pretocmd{\MT_shortintertext:n}{% + \bool_if:NT \g_@@_within_patched_amsmath_env_bool { + \db_add_marginal_note: + } +}{}{} +\apptocmd{\MT_shortintertext:n}{\db_add_multiline_eq_label:}{}{} +% \end{macrocode} +% \begin{macrocode} +\setkeys{\MT_options_name:}{ + original-intertext=false, + original-shortintertext=false +} +% \end{macrocode} +% +% We adapt a patch from Gonzalo Medina in order marginal notes ×\marginnote× +% always are on leeft side of the page (see +% \url{https://tex.stackexchange.com/a/69624/18401}). +% \begin{macrocode} +\newcommand*{\nwejm@marginnote}{% + \@dblarg\NWEJM@mn@marginnote +} +\newcommand{\NWEJM@mn@marginnote}[2][]{% + \ifhmode + \@bsphack + \begingroup + \ifdim\@savsk>\z@\else + \def\:{\@xifnch}\expandafter\def\: { \futurelet\@let@token\@ifnch}% + \fi + \else + \begingroup + \fi + \@ifnextchar [{\NWEJM@mn@@marginnote[{#1}]{#2}}{\NWEJM@mn@@marginnote[{#1}]{#2}[\z@]}% +} +\newcommand{\NWEJM@mn@@marginnote}{} +\long\def\NWEJM@mn@@marginnote[#1]#2[#3]{% + \endgroup + \ifhmode + \NWEJM@mn@@@marginnote[{#1}]{#2}[{#3}]% + \@esphack + \else + \NWEJM@mn@@@marginnote[{#1}]{#2}[{#3}]% + \fi +} + +\long\def\NWEJM@mn@@@marginnote[#1]#2[#3]{% + \begingroup + \ifmmode\mn@strut\let\@tempa\mn@vadjust\else + \if@inlabel\leavevmode\fi + \ifhmode\mn@strut\let\@tempa\mn@vadjust\else\let\@tempa\mn@vlap\fi + \fi + \@tempa{% + \vbox to\z@{% + \vss + \@mn@margintest + \if@reversemargin\if@tempswa + \@tempswafalse + \else + \@tempswatrue + \fi\fi + \rlap{% + \ifx\@mn@currxpos\relax + \kern\marginnoterightadjust + \if@mn@verbose + \PackageInfo{marginnote}{% + xpos not known,\MessageBreak + using \string\marginnoterightadjust}% + \fi + \else\ifx\@mn@currxpos\@empty + \kern\marginnoterightadjust + \if@mn@verbose + \PackageInfo{marginnote}{% + xpos not known,\MessageBreak + using \string\marginnoterightadjust}% + \fi + \else + \if@mn@verbose + \PackageInfo{marginnote}{% + xpos seems to be \@mn@currxpos,\MessageBreak + \string\marginnoterightadjust + \space ignored}% + \fi + \begingroup + \setlength{\@tempdima}{\@mn@currxpos}% + \kern-\@tempdima + \if@twoside\ifodd\@mn@currpage\relax + \kern\oddsidemargin + \else + \kern\evensidemargin + \fi + \else + \kern\oddsidemargin + \fi + \kern 1in + \endgroup + \fi + \fi + \kern\marginnotetextwidth\kern\marginparsep + \vbox to\z@{\kern\marginnotevadjust\kern #3 + \vbox to\z@{% + \hsize\marginparwidth + \linewidth\hsize + \kern-\parskip + \marginfont\raggedrightmarginnote\strut\hspace{\z@}% + \ignorespaces#2\endgraf + \vss}% + \vss}% + }% + }% + }% + \endgroup } % \end{macrocode} % +% \section{Packages settings, libraries loading, etc.} +% +% We gather here miscellaneous settings. +% % \subsection{Related to \Pkg{etoc}} % % TOC depth level is ×section×: @@ -4768,14 +5312,14 @@ Running "make install" installs the files in the local TeX tree. % % \begin{macro}{\printbibliography} % \begin{macrocode} -\int_new:N \l_@@_section_int +% \newcounter{lastpagearticle} \cs_set_eq:NN \_@@_printbibliography \printbibliography \RenewDocumentCommand \printbibliography { O{} } { % \end{macrocode} % We force all the previous floats to be processed no later on the page % following the beginning of the bibliography. % \begin{macrocode} -% \FloatBarrier% + \FloatBarrier% % \end{macrocode} % We automatically insert the acknowledgments (if any) before the bibliography. % \begin{macrocode} @@ -4801,6 +5345,7 @@ Running "make install" installs the files in the local TeX tree. % The independant articles contain their (local) table of contents at their end. % \begin{macrocode} \bool_if:NF \g_@@_nolocaltoc_bool { +% \setcounter{lastpagearticle}{\value{page}} \newpage \setcounter{page}{\c_zero} \pagenumbering{roman}% @@ -4810,8 +5355,26 @@ Running "make install" installs the files in the local TeX tree. % We don't want the article's title (chapter's title) in the (local) table of % contents. % \begin{macrocode} +% % \group_begin: +% % \hypersetup{bookmarksdepth=-2} +% % \etocsetnexttocdepth{subsection} +% % \etocsettocdepth.toc{chapter} +% % \tableofcontents\ref{\l_@@_localtableofcontents_label_tl} +% % \etocsettocdepth.toc {subsection} +% % \group_end: \etocsetlevel{chapter}{6} \tableofcontents +% \afterpage{ +% \pagenumbering{arabic}% +% \setcounter{page}{\value{lastpagearticle}} +% \addtocounter{page}{1} +% \checkoddpage +% \ifoddpage +% \newpage +% % \else +% % \setcounter{page}{\value{lastpagearticle}} +% \fi +% } } % \end{macrocode} % \end{macro} @@ -5001,18 +5564,6 @@ Running "make install" installs the files in the local TeX tree. \ExplSyntaxOff % \end{macrocode} % -% We get rid of useless overfull hbox warnings (due to ×fleqn× and -% \Pkg{autonum}) by telling autonum to ignore overfull box messages when it does -% its tentative math environment in order to establish some internal values (see -% \url{http://tex.stackexchange.com/q/205393/18401}). But this patch works only -% outside ×\ExplSyntaxOn×/×\ExplSyntaxOff× -% \begin{macrocode} -\patchcmd{\autonum@saveEnvironmentSubcommands} - {(0,0)\begin} - {(0,0)\hfuzz=\maxdimen\begin} - {}{} -% \end{macrocode} -% % \begin{macrocode} % % \end{macrocode} @@ -5237,6 +5788,9 @@ Running "make install" installs the files in the local TeX tree. \ProvideDictTranslation{ie}{i.e} \ProvideDictTranslation{Idest}{Id~est} \ProvideDictTranslation{Ie}{I.e} +% +% For the note in the margin notifying when the equation continues next page. +\ProvideDictTranslation{equation-continues-next-page}{Cont. ~next ~page} % \end{macrocode} % % \begin{macrocode} @@ -5296,6 +5850,9 @@ Running "make install" installs the files in the local TeX tree. \ProvideDictTranslation{ie}{c.-\`{a}-d} \ProvideDictTranslation{Idest}{C'est-\`{a}-dire} \ProvideDictTranslation{Ie}{C.-\`{a}-d} +% +% For the note in the margin notifying when the equation continues next page. +\ProvideDictTranslation{equation-continues-next-page}{Cont. ~page ~suiv.} % \end{macrocode} % % \begin{macrocode} @@ -5355,6 +5912,9 @@ Running "make install" installs the files in the local TeX tree. \ProvideDictTranslation{ie}{d.~h} \ProvideDictTranslation{Idest}{Das~heißt} \ProvideDictTranslation{Ie}{D~h} +% +% For the note in the margin notifying when the equation continues next page. +\ProvideDictTranslation{equation-continues-next-page}{Weiter~ nächste~ Seite} % \end{macrocode} % % \begin{macrocode} @@ -5414,6 +5974,9 @@ Running "make install" installs the files in the local TeX tree. \ProvideDictTranslation{ie}{d.w.z} \ProvideDictTranslation{Idest}{Dat~wil~zeggen} \ProvideDictTranslation{Ie}{D.w.z} +% +% For the note in the margin notifying when the equation continues next page. +\ProvideDictTranslation{equation-continues-next-page}{op~ de~ volgende~ pagina} % \end{macrocode} % % \begin{macrocode} @@ -5604,7 +6167,7 @@ Running "make install" installs the files in the local TeX tree. \RequireCitationStyle{authoryear} -\ExecuteBibliographyOptions{giveninits,ibidtracker=constrict} +\ExecuteBibliographyOptions{giveninits,ibidtracker=constrict,pagetracker=page} % \end{macrocode} % @@ -5652,8 +6215,7 @@ Running "make install" installs the files in the local TeX tree. % ×cite:title× defined in ×authortitle× but not in ×authoryear×. % \begin{macrocode} \newbibmacro*{cite:title}{% - \printtext[bibhyperref]{% - \printfield[citetitle]{labeltitle}}} + \printfield[citetitle]{labeltitle}} % \end{macrocode} % % Because we want to replace autocite redundant consecutive citations by @@ -5680,13 +6242,14 @@ Running "make install" installs the files in the local TeX tree. \usebibmacro{cite:label}% \setunit{\addcomma\space}% }{% - \printnames{labelname}% \ifthenelse{% \iffieldundef{labelyear}% }{% + \printtext[bibhyperref]{\printnames{labelname}}% }{% + \printtext[bibhyperref]{\printnames{labelname}% \setunit{\addcomma\space}% - \usebibmacro{cite:labelyear+extrayear}% + \usebibmacro{cite:labeldate+extradate}}% \ifthenelse{% \iffieldundef{labeltitle}% }{% @@ -5743,13 +6306,14 @@ Running "make install" installs the files in the local TeX tree. {\setcounter{textcitetotal}{1}} {\stepcounter{textcitetotal}% \textcitedelim}% - \iffootnote{\usebibmacro{nwejm:cite}}{\usebibmacro{textcite}}} + \iffootnote{\usebibmacro{nwejm:cite}}{\printtext[bibhyperref]{\usebibmacro{textcite}}}} {\ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}} {\usebibmacro{textcite:postnote}} - - +% \end{macrocode} +% +% \begin{macrocode} \ExecuteBibliographyOptions{autocite=nwejmfootcite} % \end{macrocode} % @@ -5765,20 +6329,20 @@ Running "make install" installs the files in the local TeX tree. $pdf_mode = 1; $bibtex_use = 1; -$bibtex = 'biber %O %B'; +$bibtex = 'biber -U %O %B'; -$makeindex = 'texindy -L french'; +$makeindex = 'texindy -L english'; add_cus_dep('idx', 'ind', 0, 'texindy'); sub texindy{ - system("texindy -L french \"$_[0].idx\""); + system("texindy -L english \"$_[0].idx\""); } push @generated_exts, "aux", "idx", "ind", "lo*", "out", "toc", "acn", "acr", "alg", "bbl", "bcf", "fls", "gl*", "ist", "run.xml", "sbl*", "sl*", "sym*", -"xdy", "unq", "mw", "*~" ; +"xdy", "unq", "mw", "*~" "sta" ; -$clean_ext = "synctex.gz* run.xml tex.bak bbl bcf fdb_latexmk run tdo listing" +$clean_ext = "synctex.gz* run.xml tex.bak bbl bcf fdb_latexmk run tdo listing sta" % \end{macrocode} % % \begin{macrocode} @@ -5803,36 +6367,28 @@ $clean_ext = "synctex.gz* run.xml tex.bak bbl bcf fdb_latexmk run tdo listing" #include:tex #include:xparse #include:l3keys2e -#include:l3sort #include:nag -#include:fontenc -#include:inputenc -#include:fontspec #include:graphicx #include:adjustbox -#include:draftwatermark -#include:xspace +#include:tcolorbox #include:csquotes -#include:biblatex #include:array #include:booktabs -#include:varioref #include:mathtools -#include:mathrsfs +#include:ntheorem +#include:rsfso #include:esvect #include:kpfonts #include:translations -#include:fmtcount -#include:geometry #include:babel +#include:varioref +#include:subcaption #include:tocvsec2 #include:etoc #include:microtype #include:datetime2 #include:enumitem -#include:pagegrid -#include:amsthm -#include:thmtools +#include:biblatex #include:hyperref #include:hypcap #include:bookmark -- cgit v1.2.3