diff options
author | Norbert Preining <norbert@preining.info> | 2022-07-04 03:03:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-07-04 03:03:43 +0000 |
commit | 1c10375ec46d7d83b2f1efc2a71b7ea114c889f0 (patch) | |
tree | 47b3469111105b7767111dcb89858fbc1e73377f /macros/latex/contrib/projlib | |
parent | 34d318af65decbdb242ae03b64bf3f53266067b6 (diff) |
CTAN sync 202207040303
Diffstat (limited to 'macros/latex/contrib/projlib')
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib.dtx | 231 | ||||
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib.ins | 3 | ||||
-rw-r--r-- | macros/latex/contrib/projlib/README.md | 16 |
3 files changed, 131 insertions, 119 deletions
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx index 18509f3947..1b1be1cf73 100644 --- a/macros/latex/contrib/projlib/ProjLib.dtx +++ b/macros/latex/contrib/projlib/ProjLib.dtx @@ -15,82 +15,88 @@ \ProvidesFile{ProjLib.dtx} %</driver> \NeedsTeXFormat{LaTeX2e}[2022-06-01] -\RequirePackage{l3keys2e} % %<*ProjLib> \ProvidesExplPackage {ProjLib} - {2022/06/15} {} + {2022/07/03} {} {Collective interface of the ProjLib toolkit} %</ProjLib> % %<*projlib-author> \ProvidesExplPackage {projlib-author} - {2022/06/15} {} + {2022/07/03} {} {Enhanced author information block} %</projlib-author> % %<*projlib-datetime> \ProvidesExplPackage {projlib-datetime} - {2022/06/15} {} + {2022/07/03} {} {Convert numeric date-time string to natural language} %</projlib-datetime> % %<*projlib-draft> \ProvidesExplPackage {projlib-draft} - {2022/06/15} {} + {2022/07/03} {} {Useful commands during draft stage} %</projlib-draft> % %<*projlib-font> \ProvidesExplPackage {projlib-font} - {2022/06/15} {} + {2022/07/03} {} {Font selection and configuration} %</projlib-font> % %<*projlib-language> \ProvidesExplPackage {projlib-language} - {2022/06/15} {} + {2022/07/03} {} {Multi-language configuration} %</projlib-language> % %<*projlib-logo> \ProvidesExplPackage {projlib-logo} - {2022/06/15} {} + {2022/07/03} {} {The ProjLib logo} %</projlib-logo> % %<*projlib-math> \ProvidesExplPackage {projlib-math} - {2022/06/15} {} + {2022/07/03} {} {Efficient math setup} %</projlib-math> % %<*projlib-paper> \ProvidesExplPackage {projlib-paper} - {2022/06/15} {} + {2022/07/03} {} {Configuration of the paper style} %</projlib-paper> % +%<*projlib-text> +\ProvidesExplPackage + {projlib-text} + {2022/07/03} {} + {Text-related commands} +%</projlib-text> +% %<*projlib-theorem> \ProvidesExplPackage {projlib-theorem} - {2022/06/15} {} + {2022/07/03} {} {Configuration of theorem-like environments} %</projlib-theorem> % %<*projlib-titlepage> \ProvidesExplPackage {projlib-titlepage} - {2022/06/15} {} + {2022/07/03} {} {Commands for rendering the title page} %</projlib-titlepage> @@ -111,18 +117,20 @@ , title~page .bool_set:N = \l__projlib_main_titlepage_bool , title page .bool_set:N = \l__projlib_main_titlepage_bool , unknown .code:n = { - \PassOptionsToPackage { \CurrentOption } { projlib-language } \PassOptionsToPackage { \CurrentOption } { projlib-author } \PassOptionsToPackage { \CurrentOption } { projlib-datetime } \PassOptionsToPackage { \CurrentOption } { projlib-draft } \PassOptionsToPackage { \CurrentOption } { projlib-font } + \PassOptionsToPackage { \CurrentOption } { projlib-language } \PassOptionsToPackage { \CurrentOption } { projlib-logo } \PassOptionsToPackage { \CurrentOption } { projlib-math } \PassOptionsToPackage { \CurrentOption } { projlib-paper } + \PassOptionsToPackage { \CurrentOption } { projlib-text } \PassOptionsToPackage { \CurrentOption } { projlib-theorem } + \PassOptionsToPackage { \CurrentOption } { projlib-titlepage } } } -\ProcessKeysOptions { ProjLib } +\ProcessKeyOptions [ ProjLib ] \bool_if:NT \l__projlib_main_amsfashion_bool { @@ -142,6 +150,7 @@ \RequirePackage { projlib-logo } \RequirePackage { projlib-math } \RequirePackage { projlib-paper } +\RequirePackage { projlib-text } \bool_if:NT \l__projlib_main_titlepage_bool { @@ -160,7 +169,7 @@ , ams fashion .bool_set:N = \l__projlib_author_amsfashion_bool , unknown .code:n = {} } -\ProcessKeysOptions { projlib-author } +\ProcessKeyOptions [ projlib-author ] \cs_if_exist:NT \subjclass { \endinput } @@ -487,7 +496,7 @@ , day-month .code:n = { \tl_gset:Nn \g__projlib_datetime_input_format_tl { day-month-year } } , unknown .code:n = {} } -\ProcessKeysOptions { projlib-datetime } +\ProcessKeyOptions [ projlib-datetime ] \RequirePackage { relsize } @@ -2137,7 +2146,7 @@ , no report page .bool_set:N = \l__projlib_draft_no_report_page_bool , unknown .code:n = {} } -\ProcessKeysOptions { projlib-draft } +\ProcessKeyOptions [ projlib-draft ] \RequirePackage { projlib-language } \RequirePackage { xcolor } @@ -2156,8 +2165,8 @@ \bool_if:NTF \l__projlib_draft_fast_bool { - \tl_const:Nn \l_projlib_draft_plain_box_begin_tl { $[$ } - \tl_const:Nn \l_projlib_draft_plain_box_after_tl { $]$ } + \tl_const:Nn \l_projlib_draft_plain_box_begin_tl { [ } + \tl_const:Nn \l_projlib_draft_plain_box_after_tl { ] } } { \RequirePackage { tikz } @@ -2248,23 +2257,23 @@ \NewDocumentCommand \DNF { s D<>{} } { \noindent - \group_begin: - \projlib_draft_DNF_font - \stepcounter { projlib_draft_DNF_counter } - \raisebox{\baselineskip}{ - \hypertarget { DNF. \arabic { projlib_draft_DNF_counter } } {} - \label { DNF. \arabic { projlib_draft_DNF_counter } } - } - \nobreak - \projlib_draft_plain_box:nn { projlib_draft_DNF_color } - { - \IfBooleanF { #1 } { \projlib_draft_DNF_text \nobreakspace } - \group_begin: \ttfamily - \# \theprojlib_draft_DNF_counter - \group_end: - \tl_if_blank:nF { #2 } { : \nobreakspace } - \tl_trim_spaces:n { #2 } + \group_begin: \projlib_draft_DNF_font + \stepcounter { projlib_draft_DNF_counter } + \raisebox{\baselineskip}{ + \cs_if_exist:cT { hypertarget } + { + \hypertarget { DNF. \arabic { projlib_draft_DNF_counter } } {} + } + \label { DNF. \arabic { projlib_draft_DNF_counter } } } + \nobreak + \projlib_draft_plain_box:nn { projlib_draft_DNF_color } + { + \IfBooleanF { #1 } { \projlib_draft_DNF_text \nobreakspace } + \texttt { \# \theprojlib_draft_DNF_counter } + \tl_if_blank:nF { #2 } { : \nobreakspace } + \tl_trim_spaces:n { #2 } + } \group_end: \tl_gput_right:Nn \g__projlib_draft_DNF_report_tl { @@ -2414,7 +2423,7 @@ , biolinum .initial:n = { false } , unknown .code:n = {} } -\ProcessKeysOptions { projlib-font } +\ProcessKeyOptions [ projlib-font ] \bool_new:N \g_projlib_font_already_set_bool \bool_gset_false:N \g_projlib_font_already_set_bool @@ -2659,7 +2668,7 @@ , Russian .meta:n = { russian } , unknown .code:n = {} } -\ProcessKeysOptions { projlib-language } +\ProcessKeyOptions [ projlib-language ] \cs_new_protected:Nn \projlib_language_clear_global_option:n { @@ -3202,7 +3211,7 @@ , fast .bool_set:N = \l__projlib_logo_fast_bool , unknown .code:n = {} } -\ProcessKeysOptions { projlib-logo } +\ProcessKeyOptions [ projlib-logo ] \bool_if:NT \l__projlib_logo_fast_bool { @@ -3221,79 +3230,6 @@ \endinput } -%<*projlib-logo-old> -\cs_if_exist:cTF { fontspec } - { - \newfontface \__projlib_logo_font: { LinBiolinum_R.otf } - } - { - \RequirePackage [T1] { fontenc } - \cs_gset:Nn \__projlib_logo_font: - { \fontfamily { LinuxBiolinumT-TLF } \selectfont } - } - -\tl_new:N \g__projlib_logo_sigma_j_tl -\tl_gset:Nn \g__projlib_logo_sigma_j_tl - { - \vbox:n - { - \offinterlineskip - \hbox_overlap_center:n - { - \skip_horizontal:n { 0.75ex } - \hbox_set:Nn \l_tmpa_box { \usefont{U}{zeur}{b}{n} \symbol{"06} } - \box_rotate:Nn \l_tmpa_box { -10 } - \box_scale:Nnn \l_tmpa_box {.4} {.4} - \box_use:N \l_tmpa_box - } - \skip_vertical:n { 0.15ex } - \hbox:n { \j } - } - } - -% \cs_new_protected:Nn \projlib_logo_generic:n -% { -% \group_begin: -% \normalfont -% \__projlib_logo_font: -% \color_group_begin: -% \color_select:n { blue!60!cyan } { P } -% \color_select:n { blue!45!cyan } { r } -% \color_select:n { blue!30!cyan } { o } -% \color_select:n { green!70!black!70 } { #1 } -% \color_select:n { red!20!yellow } { L } -% \color_select:n { red!40!yellow } { i } -% \color_select:n { red!60!yellow } { b } -% \color_group_end: -% \group_end: -% } -\cs_new_protected:Nn \projlib_logo_generic:n - { - \group_begin: - \normalfont - \__projlib_logo_font: - \color_group_begin: - \color_select:n { blue!50!cyan!30!black } { P } - \color_select:n { blue!50!cyan!55!black } { r } - \color_select:n { blue!50!cyan!75!black } { o } - \color_select:n { blue!50!cyan!90!black } { #1 } - \color_select:n { blue!50!cyan!75!black } { L } - \color_select:n { blue!50!cyan!55!black } { i } - \color_select:n { blue!50!cyan!30!black } { b } - \color_group_end: - \group_end: - } - -\DeclareRobustCommand * \ProjLib - { - \projlib_logo_generic:n { \g__projlib_logo_sigma_j_tl } - } -\DeclareRobustCommand * \ProjLibText - { - \projlib_logo_generic:n { j } - } -%</projlib-logo-old> - \RequirePackage { tikz } \cs_new_protected:Nn \projlib_logo_generic:nn @@ -3350,7 +3286,7 @@ { , unknown .code:n = {} } -\ProcessKeysOptions { projlib-math } +\ProcessKeyOptions [ projlib-math ] \RequirePackage { mathtools } \RequirePackage { mathrsfs } @@ -3605,7 +3541,7 @@ , dark paper .meta:n = { paperstyle = dark } , unknown .code:n = {} } -\ProcessKeysOptions { projlib-paper } +\ProcessKeyOptions [ projlib-paper ] \cs_new:Nn \projlib_paper_preview_disable: { @@ -3684,6 +3620,67 @@ } %</projlib-paper> % +%<*projlib-text> +\keys_define:nn { projlib-text } + { + , unknown .code:n = {} + } +\ProcessKeyOptions [ projlib-text ] + +\RequirePackage { projlib-paper } + +\ProvideDocumentCommand \ItemDescription { m } + { + \textcolor { main-text!50!paper } { $($ #1 $)$ } + \nobreakspace + \ignorespaces + } + +\cs_new_protected:Nn \projlib_text_abbreviation_generic:nn + % #1 is the text + % #2 is usually some spacing adjustment + { + #1 + % if followed by a dot, then remove that dot and adjust the spacing + \peek_meaning_ignore_spaces:NTF . + { #2 \use_none:n } + { + % if followed by a comma, then act like nothing happens + % otherwise adjust the spacing + \peek_meaning_ignore_spaces:NTF , + { \prg_do_nothing: } + { #2 } + } + } + +\hook_gput_code:nnn { begindocument/before } { projlib-text } + { + % i.e. + \ProvideDocumentCommand { \ie } { } + { + \projlib_text_abbreviation_generic:nn { \textit{i. \nobreak \hskip.2ex \nobreak e.} } { \skip_horizontal:n { -.25ex } } + } + + % e.g. + \ProvideDocumentCommand { \eg } { } + { + \projlib_text_abbreviation_generic:nn { \textit{e. \nobreak \hskip.2ex \nobreak g.} } { \skip_horizontal:n { -.25ex } } + } + + % cf. + \ProvideDocumentCommand { \cf } { } + { + \projlib_text_abbreviation_generic:nn { \textit{cf.} } { } + } + + % etc. + \ProvideDocumentCommand { \etc } { } + { + \projlib_text_abbreviation_generic:nn { etc. } { } + } + } +%</projlib-text> +% %<*projlib-theorem> \keys_define:nn { projlib-theorem } { @@ -3725,7 +3722,7 @@ , no preset names .bool_set_inverse:N = \l__projlib_theorem_presetname_bool , unknown .code:n = { \PassOptionsToPackage { \CurrentOption } { create-theorem } } } -\ProcessKeysOptions { projlib-theorem } +\ProcessKeyOptions [ projlib-theorem ] \clist_const:Nn \c_projlib_theorem_supported_clist { @@ -3755,8 +3752,10 @@ recall , remark , theorem , + definition-corollary , definition-proposition , definition-theorem , + corollary-definition , proposition-definition , theorem-definition , } @@ -5160,9 +5159,11 @@ } } +\NameTheorem { definition-corollary } { combined = { definition ; corollary } } \NameTheorem { definition-proposition } { combined = { definition ; proposition } } \NameTheorem { definition-theorem } { combined = { definition ; theorem } } +\NameTheorem { corollary-definition } { combined = { corollary ; definition } } \NameTheorem { proposition-definition } { combined = { proposition ; definition } } \NameTheorem { theorem-definition } { combined = { theorem ; definition } } %</projlib-theorem> @@ -5172,7 +5173,7 @@ { , unknown .code:n = {} } -\ProcessKeysOptions { projlib-titlepage } +\ProcessKeyOptions [ projlib-titlepage ] \RequirePackage { projlib-paper } diff --git a/macros/latex/contrib/projlib/ProjLib.ins b/macros/latex/contrib/projlib/ProjLib.ins index 6aac97bf77..d79b671003 100644 --- a/macros/latex/contrib/projlib/ProjLib.ins +++ b/macros/latex/contrib/projlib/ProjLib.ins @@ -18,6 +18,7 @@ \obeyspaces% \gdef\copyright{% \ds@heading% This is file... generated with the docstrip utility. +\MetaPrefix% Copyright (C) 2021-2022 by Jinwen XU @@ -48,6 +49,7 @@ and version 1.3c or later is part of all distributions of LaTeX version \generate{\file{projlib-logo.sty}{\from{ProjLib.dtx}{projlib-logo}}} \generate{\file{projlib-math.sty}{\from{ProjLib.dtx}{projlib-math}}} \generate{\file{projlib-paper.sty}{\from{ProjLib.dtx}{projlib-paper}}} +\generate{\file{projlib-text.sty}{\from{ProjLib.dtx}{projlib-text}}} \generate{\file{projlib-theorem.sty}{\from{ProjLib.dtx}{projlib-theorem}}} \generate{\file{projlib-titlepage.sty}{\from{ProjLib.dtx}{projlib-titlepage}}} @@ -66,6 +68,7 @@ and version 1.3c or later is part of all distributions of LaTeX version \Msg{* projlib-logo.sty *} \Msg{* projlib-math.sty *} \Msg{* projlib-paper.sty *} +\Msg{* projlib-text.sty *} \Msg{* projlib-theorem.sty *} \Msg{* projlib-titlepage.sty *} \Msg{* *} diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md index ddf962d896..ee8924ccc6 100644 --- a/macros/latex/contrib/projlib/README.md +++ b/macros/latex/contrib/projlib/README.md @@ -6,7 +6,7 @@ > **ProjLib** can be interpreted as "***Proj**ect **Lib**rary*" (in English), or as "***Proj**et **Lib**re*" (in French, meaning "*Free Project*"). -> **This bundle is dated 2022/06/15. Please note that the documentations are not yet up-to-date.** +> **This bundle is dated 2022/07/03. Please note that the documentations are not yet up-to-date.** ## Introduction @@ -21,7 +21,7 @@ To get started, simply put this line in your preamble: ## The modules -> Each module correspond to a separate package, for example, the module `theorem` is `projlib-theorem.sty`. +> Each module corresponds to a separate package, for example, the module `theorem` is `projlib-theorem.sty`. The modules include: 1. module `author` - *Enhanced author information block* @@ -36,6 +36,7 @@ The modules include: - Multiple input and output format available. 1. module `draft` - *Useful commands during draft stage* - `\DNF` for marking unfinished part. In addition, a report of all unfinished places shall be printed at the last of your document. + - Reimplemented `\blindtext` to support more languages. 1. module `font` - *Font selection and configuration* - Supporting Palatino, Times, Garamond, Biolinum, Noto, etc. 1. module `language` - *Multi-language configuration* @@ -45,10 +46,13 @@ The modules include: 1. module `logo` - *The ProjLib logo* - Draw the `ProjLib` logo in colorful or colorless fashion. 1. module `math` - *Efficient math setup* - - `\DefineOperator` and `\DefineShortcut` for setting up math macros efficiently - - `\ListOfSymbols` for printing list of symbols + - `\DefineOperator` and `\DefineShortcut` for setting up math macros efficiently. + - `\ListOfSymbols` for printing list of symbols. 1. module `paper` - *Configuration of the paper style* - Paper style configuration, with the themes `yellow`, `green`, `light gray`, `gray`, `dark`, etc. +1. module `text` - *Text-related commands* + - Provide a few useful commands such as `\ie`, `\eg`, `\cf`, `\etc` ; and if you have your own version defined, they won't interfere with your definition. + - `\ItemDescription` for writing leading description to items in `itemize` or `enumerate`. 1. module `theorem` - *Configuration of theorem-like environments* - Setting up theorem-like environments based on the package `create-theorem` - `\CreateTheorem`, `\SetTheorem` and more... @@ -78,6 +82,10 @@ It is recommended to use `latexmk` with option `-xelatex`: ``` latexmk -xelatex ProjLib-doc-**.tex ``` +Here `**` should be replaced with the language identifier, such as `en`. + +## Automation +All these can be done with the given script `MakeFile.sh`. # License |