diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/nwejm/nwejmart.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/nwejm/nwejmart.cls | 295 |
1 files changed, 266 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/nwejm/nwejmart.cls b/Master/texmf-dist/tex/latex/nwejm/nwejmart.cls index be444ea3ccf..509a7234fce 100644 --- a/Master/texmf-dist/tex/latex/nwejm/nwejmart.cls +++ b/Master/texmf-dist/tex/latex/nwejm/nwejmart.cls @@ -18,8 +18,8 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesExplClass {nwejmart} - {2018/04/07} - {0.98e} + {2019/03/18} + {0.98f} { Class for the journal "North-Western European Journal of Mathematics". } @@ -182,8 +182,8 @@ \RequirePackage{footnote}% \RequirePackage[backend=biber,style=nwejm]{biblatex}% \ExecuteBibliographyOptions{defernumbers=true,dashed=false,uniquename=init,backref,safeinputenc} -\RequirePackage[hyperfootnotes=false,pdfencoding=unicode,final]{hyperref}% -\AtBeginDocument{% +\RequirePackage[pdfencoding=unicode,final]{hyperref}% +\AtEndPreamble{% \hypersetup{hidelinks,hypertexnames=false,breaklinks}% }% \RequirePackage[all]{hypcap} @@ -408,7 +408,7 @@ \graphicspath{{\c__nwejm_issue_images_path_string_tl//}{../\c__nwejm_issue_images_path_string_tl//}} % \glsdisablehyper } - \AtBeginDocument{\g__nwejm_mainmatter_switch_tl} + \AfterEndPreamble{\g__nwejm_mainmatter_switch_tl} \int_new:N \g__nwejm_issue_number_int \int_new:N \g__nwejm_issue_month_int \int_new:N \g__nwejm_issue_year_int @@ -487,6 +487,17 @@ title / german .value_required:n = true, title / dutch .value_required:n = true, % + title-plural .tl_set:N = \l__nwejm_newtheorem_title_plural_tl, + title-plural / french .tl_set:N = \l__nwejm_newtheorem_french_title_plural_tl, + title-plural / english .tl_set:N = \l__nwejm_newtheorem_english_title_plural_tl, + title-plural / german .tl_set:N = \l__nwejm_newtheorem_german_title_plural_tl, + title-plural / dutch .tl_set:N = \l__nwejm_newtheorem_dutch_title_plural_tl, + title-plural .value_required:n = true, + title-plural / french .value_required:n = true, + title-plural / english .value_required:n = true, + title-plural / german .value_required:n = true, + title-plural / dutch .value_required:n = true, + % style .choice:, style / theorem .code:n = {\__nwejm_theorem_style:n {theorem}}, style / definition .code:n = {\__nwejm_theorem_style:n {definition}}, @@ -611,7 +622,10 @@ \file_if_exist:nT { \c__nwejm_main_file_name_tl.aux } {\externaldocument[__nwejm-]{\c__nwejm_main_file_name_tl} - \AtBeginDocument{\setcounter{page}{\number\numexpr\getpagerefnumber{__nwejm-\currfilebase}}} + \AfterEndPreamble{\setcounter{page}{\number\numexpr\getpagerefnumber{__nwejm-\currfilebase}}} +} +\NewDocumentCommand \fixpagenumber { m } { +\setcounter{page}{#1} } \vref@addto\extrasfrench{% \def\reftextfaceafter {page~\reftextvario{ci-contre}{suivante}}% @@ -725,21 +739,72 @@ } \NewDocumentCommand \inputarticle { O{english} m } {% \newrefsection - \tl_if_eq:nnTF { #1 } { german } {% - \selectlanguage{ngerman} - }{ - \tl_if_eq:nnTF { #1 } { french } {% + \renewcommand*{\glspluralsuffix}{s} + \renewcommand*{\glsacrpluralsuffix}{\glspluralsuffix} + \renewcommand*{\glsupacrpluralsuffix}{\glstextup{\glsacrpluralsuffix}} + \StandardFootnotes + \str_case:nn {#1} { + {english} { + \selectlanguage{english} + \renewcommand*{\glossaryname}{Glossary}% + \renewcommand*{\acronymname}{Acronyms}% + \renewcommand*{\entryname}{Notation}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Page List}% + \renewcommand*{\glssymbolsgroupname}{Symbols}% + \renewcommand*{\glsnumbersgroupname}{Numbers}% + } + {german} { + \selectlanguage{ngerman} + \renewcommand*{\glossaryname}{Glossar}% + \renewcommand*{\acronymname}{Akronyme}% + \renewcommand*{\entryname}{Bezeichnung}% + \renewcommand*{\descriptionname}{Beschreibung}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Seiten}% + \renewcommand*{\glssymbolsgroupname}{Symbole}% + \renewcommand*{\glsnumbersgroupname}{Zahlen}% + } + {ngerman} { + \selectlanguage{ngerman} + \renewcommand*{\glossaryname}{Glossar}% + \renewcommand*{\acronymname}{Akronyme}% + \renewcommand*{\entryname}{Bezeichnung}% + \renewcommand*{\descriptionname}{Beschreibung}% + \renewcommand*{\symbolname}{Symbol}% + \renewcommand*{\pagelistname}{Seiten}% + \renewcommand*{\glssymbolsgroupname}{Symbole}% + \renewcommand*{\glsnumbersgroupname}{Zahlen}% + } + {french} { \selectlanguage{french} + \FrenchFootnotes \g__nwejm_french_crefname_tl - }{ - \selectlanguage{#1} + \renewcommand*{\glossaryname}{Glossaire}% + \renewcommand*{\acronymname}{Acronymes}% + \renewcommand*{\entryname}{Terme}% + \renewcommand*{\descriptionname}{Description}% + \renewcommand*{\symbolname}{Symbole}% + \renewcommand*{\pagelistname}{Pages}% + \renewcommand*{\glssymbolsgroupname}{Symboles}% + \renewcommand*{\glsnumbersgroupname}{Nombres}% + \renewcommand*{\glspluralsuffix}{s} + \renewcommand*{\glsacrpluralsuffix}{} + \renewcommand*{\glsupacrpluralsuffix}{} + } + {dutch} { + \selectlanguage{dutch} + \renewcommand*{\glossaryname}{Woordenlijst}% + \renewcommand*{\acronymname}{Acroniemen}% + \renewcommand*{\entryname}{Benaming}% + \renewcommand*{\descriptionname}{Beschrijving}% + \renewcommand*{\symbolname}{Symbool}% + \renewcommand*{\pagelistname}{Pagina's}% + \renewcommand*{\glssymbolsgroupname}{Symbolen}% + \renewcommand*{\glsnumbersgroupname}{Cijfers}% } }% - \tl_if_eq:nnTF { #1 } { french } {% - \FrenchFootnotes - }{% - \StandardFootnotes - } \inputfrom{./}{#2} \clist_put_right:Nn \g__nwejm_counters_to_be_reset_clist { footnote, @@ -771,7 +836,6 @@ \iow_now:Nx \g__nwejm_bib_out_iow {% @periodical{\c__nwejm_issue_bib_key_tl,\iow_newline: issuetitle = {\exp_not:f\c__nwejm_journal_title_string_tl},\iow_newline: - date = {\g__nwejm_bib_issue_date_tl},\iow_newline: number = \int_use:N \g__nwejm_issue_number_int,\iow_newline: % issn = {\l__nwejm_journal_issn_tl},\iow_newline: options = {skipbib}\iow_newline: @@ -1335,7 +1399,7 @@ } } \cs_set_eq:NN \__nwejm_orig_newtheorem \newtheorem -\cs_new_protected:Nn \__nwejm_new_theorem:nnnnn +\cs_new_protected:Nn \__nwejm_new_theorem:nnnnnnnnn { \IfTranslation{English}{#1}{% }{% @@ -1353,12 +1417,30 @@ }{% \DeclareTranslation{Dutch}{#1}{\tl_mixed_case:n{#5}}% } + % + \IfTranslation{English}{#1-plural}{% + }{% + \DeclareTranslation{English}{#1-plural}{\tl_mixed_case:n{#6}}% + } + \IfTranslation{French}{#1-plural}{% + }{% + \DeclareTranslation{French}{#1-plural}{\tl_mixed_case:n{#7}}% + } + \IfTranslation{German}{#1-plural}{% + }{% + \DeclareTranslation{German}{#1-plural}{\tl_mixed_case:n{#8}}% + } + \IfTranslation{Dutch}{#1-plural}{% + }{% + \DeclareTranslation{Dutch}{#1-plural}{\tl_mixed_case:n{#9}}% + } \__nwejm_orig_newtheorem{#1}{\tl_mixed_case:n{ \GetTranslation{#1} }} \bool_if:NF {\g__nwejm_no_numbered_theorem_bool} { \__nwejm_orig_newtheorem*{#1__nwejm_nonumbered}{\tl_mixed_case:n{ \GetTranslation{#1} }} } + } -\cs_generate_variant:Nn \__nwejm_new_theorem:nnnnn { nVVVV } +\cs_generate_variant:Nn \__nwejm_new_theorem:nnnnnnnnn { nVVVVVVVV } \RenewDocumentCommand \newtheorem { O{} m } { \AtBeginDocument{ @@ -1369,6 +1451,12 @@ \tl_clear:N \l__nwejm_newtheorem_german_title_tl \tl_clear:N \l__nwejm_newtheorem_dutch_title_tl % + \tl_clear:N \l__nwejm_newtheorem_title_plural_tl + \tl_clear:N \l__nwejm_newtheorem_french_title_plural_tl + \tl_clear:N \l__nwejm_newtheorem_english_title_plural_tl + \tl_clear:N \l__nwejm_newtheorem_german_title_plural_tl + \tl_clear:N \l__nwejm_newtheorem_dutch_title_plural_tl + % \tl_set:Nn \l__nwejm_newtheorem_english_title_tl { #2 } @@ -1381,13 +1469,26 @@ \tl_set:Nf \l__nwejm_newtheorem_dutch_title_tl { \l__nwejm_newtheorem_english_title_tl } - \tl_set:Nn \l__nwejm_newtheorem_style_tl { - theorem + % + \tl_set:Nf \l__nwejm_newtheorem_english_title_plural_tl { + \l__nwejm_newtheorem_english_title_tl s } + \tl_set:Nf \l__nwejm_newtheorem_french_title_plural_tl { + \l__nwejm_newtheorem_english_title_plural_tl + } + \tl_set:Nf \l__nwejm_newtheorem_german_title_plural_tl { + \l__nwejm_newtheorem_english_title_plural_tl + } + \tl_set:Nf \l__nwejm_newtheorem_dutch_title_plural_tl { + \l__nwejm_newtheorem_english_title_plural_tl + } + % \__nwejm_theorem_style:n {theorem} + % \IfNoValueF {#1} { \keys_set:nn { nwejm / newtheorem } { #1 } + % \tl_if_empty:NF \l__nwejm_newtheorem_title_tl {% \tl_set:Nf \l__nwejm_newtheorem_english_title_tl { @@ -1406,14 +1507,47 @@ \l__nwejm_newtheorem_title_tl } } + % + \tl_if_empty:NT \l__nwejm_newtheorem_title_plural_tl {% + \tl_if_empty:NTF \l__nwejm_newtheorem_title_tl {% + \tl_set:Nn \l__nwejm_newtheorem_title_plural_tl { #2 s } + }{% + \tl_set:Nf \l__nwejm_newtheorem_title_plural_tl { \l__nwejm_newtheorem_title_tl s } + } + } + \tl_set:Nf \l__nwejm_newtheorem_english_title_plural_tl + { + \l__nwejm_newtheorem_title_plural_tl + } + \tl_set:Nf \l__nwejm_newtheorem_french_title_plural_tl + { + \l__nwejm_newtheorem_title_plural_tl + } + \tl_set:Nf \l__nwejm_newtheorem_german_title_plural_tl + { + \l__nwejm_newtheorem_title_plural_tl + } + \tl_set:Nf \l__nwejm_newtheorem_dutch_title_plural_tl + { + \l__nwejm_newtheorem_title_plural_tl + } + % + % \tl_set:Nn \l__nwejm_newtheorem_style_tl { + % theorem + % } } % - \__nwejm_new_theorem:nVVVV + \__nwejm_new_theorem:nVVVVVVVV {#2} {\l__nwejm_newtheorem_english_title_tl} {\l__nwejm_newtheorem_french_title_tl} {\l__nwejm_newtheorem_german_title_tl} {\l__nwejm_newtheorem_dutch_title_tl} + {\l__nwejm_newtheorem_english_title_plural_tl} + {\l__nwejm_newtheorem_french_title_plural_tl} + {\l__nwejm_newtheorem_german_title_plural_tl} + {\l__nwejm_newtheorem_dutch_title_plural_tl} + {\l__nwejm_newtheorem_style_tl} \makesavenoteenv{#2} \bool_if:NF {\g__nwejm_no_numbered_theorem_bool} { \ifcsmacro{#2*}{% @@ -1438,6 +1572,12 @@ } \clist_put_right:Nn \g__nwejm_counters_to_be_reset_clist {#2} } + \ifcurrentbaselanguage{french}{% + \crefname{#2}{\tl_lower_case:n{ \GetTranslation{#2} }}{\tl_lower_case:n{ \GetTranslation{#2-plural} }} + }{% + \crefname{#2}{\GetTranslation{#2}}{\GetTranslation{#2-plural}} + } + \Crefname{#2}{\tl_mixed_case:n{ \GetTranslation{#2} }}{\tl_mixed_case:n{ \GetTranslation{#2-plural} }} } \newtheorem{theorem} \newtheorem{corollary} @@ -1514,7 +1654,8 @@ } \clist_set:Nn \l_tmpa_clist {% hypothesis, - assertion% + assertion,% + condition% } \clist_map_inline:Nn \l_tmpa_clist { \newlist{#1}{enumerate}{1} @@ -1548,6 +1689,94 @@ } } } +\cs_new_protected:Npn \__nwejm_tl_pop_right:n #1 + { + \tl_reverse:f + { + \tl_tail:f + { + \tl_reverse:n { #1 } + } + } + } +\cs_generate_variant:Nn \tl_reverse:n { f } +\cs_generate_variant:Nn \__nwejm_tl_pop_right:n { v } + +\cs_new_protected:Npn \__nwejm_start_newenumeration:nn #1 #2 +{ + \keys_define:nn { nwejm/newenumeration } + { + singular .tl_set:c = {l__nwejm_newenumeration_#2_singular_tl}, + plural .tl_set:c = {l__nwejm_newenumeration_#2_plural_tl}, + label .tl_set:c = {l__nwejm_newenumeration_#2_label_tl}, + } + \IfNoValueF {#1} + { + \keys_set:nn { nwejm/newenumeration } { #1 } + } + \tl_if_empty:cT {l__nwejm_newenumeration_#2_plural_tl} { + \tl_set:cn {l__nwejm_newenumeration_#2_plural_tl} {#2} + } + \tl_if_empty:cT {l__nwejm_newenumeration_#2_singular_tl} { + \tl_set:cV {l__nwejm_newenumeration_#2_singular_tl} {\__nwejm_tl_pop_right:v {l__nwejm_newenumeration_#2_plural_tl}} + } + \tl_if_empty:cT {l__nwejm_newenumeration_#2_label_tl} { + \tl_set:cV {l__nwejm_newenumeration_#2_label_tl} { + \tl_upper_case:n { + \tl_head:f { + \tl_use:c {l__nwejm_newenumeration_#2_singular_tl} + } + } + } + } +} +\cs_new_protected:Npn \__nwejm_end_newenumeration:n #1 +{ + \tl_set:cn {l__nwejm_newenumeration_#1_reference_tl} { + \textsf{ + \tl_use:c {l__nwejm_newenumeration_#1_label_tl} + } + } + \setlist[#1]{% + label= + \normalfont + ( + \tl_use:c {l__nwejm_newenumeration_#1_reference_tl} + $\c_math_subscript_token{\mathsf{\arabic*}}$ + ), + ref= + ( + \tl_use:c {l__nwejm_newenumeration_#1_reference_tl} + $_\mathsf{\arabic*}$ + ) + } + \crefname{#1i}{ + \tl_use:c {l__nwejm_newenumeration_#1_singular_tl} + }{% + \tl_use:c {l__nwejm_newenumeration_#1_plural_tl} + } + \Crefname{#1i}{ + \tl_mixed_case:n{ + \tl_use:c {l__nwejm_newenumeration_#1_singular_tl} + } + }{% + \tl_mixed_case:n{ + \tl_use:c {l__nwejm_newenumeration_#1_plural_tl} + } + } +} +\NewDocumentCommand{\newenumeration}{O{}m} +{ + \__nwejm_start_newenumeration:nn {#1}{#2} + \newlist{#2}{enumerate}{1} + \__nwejm_end_newenumeration:n {#2} +} +\NewDocumentCommand{\renewenumeration}{O{}m} +{ + \__nwejm_start_newenumeration:nn {#1}{#2} + \renewlist{#2}{enumerate}{1} + \__nwejm_end_newenumeration:n {#2} +} \NewDocumentEnvironment{hypotheses}{} { \begin{hypothesis} @@ -1560,11 +1789,19 @@ }{ \end{assertion} } -\RenewDocumentCommand{\DeclareMathOperator}{mm} +\NewDocumentEnvironment{conditions}{} { - \NewDocumentCommand{#1}{} + \begin{condition} + }{ + \end{condition} +} +\RenewDocumentCommand{\DeclareMathOperator}{smm} +{ + \NewDocumentCommand{#2}{} { - \operatorname{#2} + \IfBooleanTF {#1} + {\operatorname*{#3}} + {\operatorname{#3}} \peek_after:Nw \__nwejm_opx_check: } } @@ -1783,7 +2020,7 @@ \cs_set_eq:NN \emptyset \varnothing \tl_new:N \l__nwejm_given_tl \tl_set:Nn \l__nwejm_given_tl { - \nonscript\:\delimsize\slash + \nonscript\:\delimsize\vert \allowbreak \nonscript\: \mathopen{} @@ -2297,7 +2534,7 @@ } \ExplSyntaxOff %% -%% Copyright (C) 2015-2018 by Denis Bitouze <denis.bitouze@univ-littoral.fr> +%% Copyright (C) 2015-2019 by Denis Bitouze <denis.bitouze@univ-littoral.fr> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either |