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 | |
parent | 34d318af65decbdb242ae03b64bf3f53266067b6 (diff) |
CTAN sync 202207040303
Diffstat (limited to 'macros')
27 files changed, 734 insertions, 426 deletions
diff --git a/macros/latex/contrib/hypdoc/README.md b/macros/latex/contrib/hypdoc/README.md index 742390e8cc..b0cd77bf6e 100644 --- a/macros/latex/contrib/hypdoc/README.md +++ b/macros/latex/contrib/hypdoc/README.md @@ -1,6 +1,6 @@ # hypdoc -Version: 2022-06-14 v1.16 +Version: 2022-07-03 v1.17 This package adds hyper features to the package doc that is used in the documentation diff --git a/macros/latex/contrib/hypdoc/hypdoc.dtx b/macros/latex/contrib/hypdoc/hypdoc.dtx index ae0b783633..8eb7e9b2e5 100644 --- a/macros/latex/contrib/hypdoc/hypdoc.dtx +++ b/macros/latex/contrib/hypdoc/hypdoc.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: hypdoc.dtx -% Version: 2022-06-14 v1.16 +% Version: 2022-07-03 v1.17 % Info: Hyper extensions for doc.sty % % Copyright (C) @@ -79,7 +79,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hypdoc 2022-06-14 v1.16 Hyper extensions for doc.sty (HO)} +\Msg{* Package: hypdoc 2022-07-03 v1.17 Hyper extensions for doc.sty (HO)} \Msg{************************************************************************} \keepsilent @@ -91,7 +91,7 @@ This is a generated file. Project: hypdoc -Version: 2022-06-14 v1.16 +Version: 2022-07-03 v1.17 Copyright (C) 2002, 2006, 2007, 2009-2011 Heiko Oberdiek @@ -152,7 +152,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hypdoc.drv}% - [2022-06-14 v1.16 Hyper extensions for doc.sty (HO)]% + [2022-07-03 v1.17 Hyper extensions for doc.sty (HO)]% \PassOptionsToPackage{numbered}{hypdoc} \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/11/22] @@ -167,7 +167,7 @@ and the derived files % \GetFileInfo{hypdoc.drv} % % \title{The \xpackage{hypdoc} package} -% \date{2022-06-14 v1.16} +% \date{2022-07-03 v1.17} % \author{Heiko Oberdiek\thanks % {Please report any issues at \url{https://github.com/ho-tex/hypdoc/issues}}} % @@ -345,7 +345,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hypdoc}% - [2022-06-14 v1.16 Hyper extensions for doc.sty (HO)]% + [2022-07-03 v1.17 Hyper extensions for doc.sty (HO)]% % \end{macrocode} % The package identification is done at the top of the |.dtx| file % in order to use only one identification string. @@ -748,10 +748,12 @@ and the derived files \let\HDorg@tilde~% \let~\HD@savedest@entry \edef\HDorg@catcodeM{\the\catcode`\^^M}% + \let\HDorg@M^^M% \catcode`\^^M=\active \def^^M{}% \InputIfFileExists{\jobname.hd}{}{}% \let~\HDorg@tilde + \let^^M\HDorg@M \catcode`\^^M=\HDorg@catcodeM\relax \newwrite\HD@savedest@out \RerunFileCheck{\jobname.hd}{% @@ -1337,6 +1339,9 @@ and the derived files % \begin{Version}{2022-06-14 v1.16} % \item Avoid to load hyperref if has been already loaded, issue \#1 % \end{Version} +% \begin{Version}{2022-07-03 v1.17} +% \item Restore defintion of active control-m (issue 3) +% \end{Version} % \end{History} % % \PrintIndex diff --git a/macros/latex/contrib/hypdoc/hypdoc.pdf b/macros/latex/contrib/hypdoc/hypdoc.pdf Binary files differindex bd0f77458b..6760c5453f 100644 --- a/macros/latex/contrib/hypdoc/hypdoc.pdf +++ b/macros/latex/contrib/hypdoc/hypdoc.pdf diff --git a/macros/latex/contrib/kdpcover/kdpcover.cls b/macros/latex/contrib/kdpcover/kdpcover.cls index a04b5b2f9e..9e38b0d3b5 100644 --- a/macros/latex/contrib/kdpcover/kdpcover.cls +++ b/macros/latex/contrib/kdpcover/kdpcover.cls @@ -21,7 +21,7 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{kdpcover}[2022/01/09 0.2.4 Cover for Kindle Direct Publishing books] +\ProvidesClass{kdpcover}[2022/07/03 0.3.0 Cover for Kindle Direct Publishing books] \LoadClass{article} \makeatletter @@ -41,6 +41,8 @@ \DeclareOptionX{7x10}{\setlength\kdp@xsize{7in}\setlength\kdp@ysize{10in}} \DeclareOptionX{8x10}{\setlength\kdp@xsize{8in}\setlength\kdp@ysize{10in}} \DeclareOptionX{pages}{\renewcommand*\kdp@pages{#1}} +\newif\ifkdp@barless +\DeclareOptionX{barless}{\kdp@barlesstrue} \DeclareOptionX{pdf}{% \iexec[trace,quiet,stdout=kdpcover-pages-count.txt]{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}% \newread\kdp@pagescount% @@ -75,12 +77,15 @@ \RequirePackage[absolute]{textpos} \TPGrid{16}{16} +\makeatletter \newcommand\putSpine[2][kdpcover-signature]{% - \begin{textblock}{2.4}[0.5,0](8,0)% - \begin{tikzpicture}% - \node [rectangle, inner sep=0em, fill=black, minimum width=2.4\TPHorizModule, minimum height=16\TPVertModule] at (0,0) {}; - \end{tikzpicture}% - \end{textblock}% + \ifkdp@barless\else + \begin{textblock}{2.4}[0.5,0](8,0)% + \begin{tikzpicture}% + \node [rectangle, inner sep=0em, fill=black, minimum width=2.4\TPHorizModule, minimum height=16\TPVertModule] at (0,0) {}; + \end{tikzpicture}% + \end{textblock}% + \fi \begin{textblock}{1}[0.5,0](8,2)% \begin{tikzpicture}% \node [color=white, inner sep=0cm, outer sep=0cm, rotate=270, minimum height=\TPHorizModule] at (0,0) { @@ -92,6 +97,7 @@ \centerline{\includegraphics[width=0.32in]{#1}}% \end{textblock}% } +\makeatother \newcommand\putPicture[1]{% \begin{textblock}{4}(10,2)% diff --git a/macros/latex/contrib/kdpcover/kdpcover.pdf b/macros/latex/contrib/kdpcover/kdpcover.pdf Binary files differindex d80edde8e3..984c26469b 100644 --- a/macros/latex/contrib/kdpcover/kdpcover.pdf +++ b/macros/latex/contrib/kdpcover/kdpcover.pdf diff --git a/macros/latex/contrib/kdpcover/kdpcover.tex b/macros/latex/contrib/kdpcover/kdpcover.tex index 9e94ac13a6..793ba90b01 100644 --- a/macros/latex/contrib/kdpcover/kdpcover.tex +++ b/macros/latex/contrib/kdpcover/kdpcover.tex @@ -27,6 +27,9 @@ % It's better not to use "pages" option here, but to let it calculate % the size of your book from the PDF file. Just say "pdf=book.pdf" and it % will be calculated automatically. +% +% To get rid of the black bar at the center of the page, just add +% "barless" option here. \documentclass[pages=200,6x9]{kdpcover} \begin{document} @@ -45,7 +48,7 @@ % Here we print the version and it will also add the date of the latest % Git commit in the current directory. If it's not a Git repository, % the date won't be printed. -\putVersion{0.2.4} +\putVersion{0.3.0} % This prints the price, which is a good practice to mention, I believe. \putPrice{\$0.00} 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 diff --git a/macros/latex/contrib/simples-matrices/LISEZMOI.md b/macros/latex/contrib/simples-matrices/LISEZMOI.md index 1f3b064cb9..94b937d039 100644 --- a/macros/latex/contrib/simples-matrices/LISEZMOI.md +++ b/macros/latex/contrib/simples-matrices/LISEZMOI.md @@ -1,4 +1,4 @@ -<!-- Time-stamp: <2022-06-19 17:54:55 Yvon Henel (TdS)> --> +<!-- Time-stamp: <2022-07-03 11:22:22 Yvon Henel (TdS)> --> # simples-matrices @@ -22,3 +22,5 @@ valeurs séparées par des virgules. ## Historique * Version 1.0 — 2022-06-19 — Première version publique + +* Version 1.0.1 — 2022-07-03 — Quelques améliorations dans la documentation. diff --git a/macros/latex/contrib/simples-matrices/MANIFEST.md b/macros/latex/contrib/simples-matrices/MANIFEST.md index e24dad4644..c140664354 100644 --- a/macros/latex/contrib/simples-matrices/MANIFEST.md +++ b/macros/latex/contrib/simples-matrices/MANIFEST.md @@ -31,7 +31,6 @@ These files form part of the documentation but are not typeset. Generally they w additional input files for the typeset documentation files listed above. * LISEZMOI.md ‡ -* MANIFEST.md ‡ * README.md ‡ ### Text files @@ -39,7 +38,6 @@ additional input files for the typeset documentation files listed above. Plain text files included as documentation or metadata. * LISEZMOI.md ‡ -* MANIFEST.md ‡ * README.md ‡ ### Derived files @@ -80,7 +78,6 @@ All files included in the `simples-matrices/tex` directory. All files included in the `simples-matrices/doc` directory. * LISEZMOI.md -* MANIFEST.md * README.md * simples-matrices-eng.pdf * simples-matrices-fra.pdf @@ -94,7 +91,6 @@ The following group lists the files included in the CTAN package. ### CTAN files * LISEZMOI.md -* MANIFEST.md * README.md * simples-matrices-eng.pdf * simples-matrices-fra.pdf diff --git a/macros/latex/contrib/simples-matrices/README.md b/macros/latex/contrib/simples-matrices/README.md index 2e06d4a1dc..f73600bf9a 100644 --- a/macros/latex/contrib/simples-matrices/README.md +++ b/macros/latex/contrib/simples-matrices/README.md @@ -1,4 +1,4 @@ -<!-- Time-stamp: <2022-06-19 17:54:49 Yvon Henel (TdS)> --> +<!-- Time-stamp: <2022-07-03 11:22:16 Yvon Henel (TdS)> --> # simples-matrices @@ -23,4 +23,4 @@ separated by commas. * Version 1.0 — 2022-06-19 — First public version - +* Version 1.0.1 — 2022-07-03 — Some improvements in the documentation. diff --git a/macros/latex/contrib/simples-matrices/simples-matrices-eng.pdf b/macros/latex/contrib/simples-matrices/simples-matrices-eng.pdf Binary files differindex bdc2813d48..e0330d2939 100644 --- a/macros/latex/contrib/simples-matrices/simples-matrices-eng.pdf +++ b/macros/latex/contrib/simples-matrices/simples-matrices-eng.pdf diff --git a/macros/latex/contrib/simples-matrices/simples-matrices-fra.pdf b/macros/latex/contrib/simples-matrices/simples-matrices-fra.pdf Binary files differindex b6cd4e15e1..3c6014c34a 100644 --- a/macros/latex/contrib/simples-matrices/simples-matrices-fra.pdf +++ b/macros/latex/contrib/simples-matrices/simples-matrices-fra.pdf diff --git a/macros/latex/contrib/simples-matrices/simples-matrices.dtx b/macros/latex/contrib/simples-matrices/simples-matrices.dtx index d62833e3a7..12e98ed3a9 100644 --- a/macros/latex/contrib/simples-matrices/simples-matrices.dtx +++ b/macros/latex/contrib/simples-matrices/simples-matrices.dtx @@ -13,7 +13,7 @@ % %<*driver|package|doc> \RequirePackage{expl3}[2020/01/12] -\GetIdInfo$Id: simples-matrices.dtx 1.0 2022-06-19 TdS $ +\GetIdInfo$Id: simples-matrices.dtx 1.0.1 2022-07-03 TdS $ {} %</driver|package|doc> %<*driver> @@ -26,7 +26,7 @@ \usepackage{xspace} \usepackage{csquotes} -\providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} } +\providecommand\darg[3]{\texttt{#1}\meta{#2}\texttt{#3}} \begin{document} \DocInput{\jobname.dtx} @@ -52,8 +52,8 @@ % % \maketitle % -% \changes{v1.0}{2022/06/08}{First public -% version.\foreignlanguage{french}{\emph{Première version publique.}}} +% \changes{v1.0}{2022/06/08}{First public version.\foreignlanguage{french}{\emph{Première version publique.}}} +% \changes{v1.0.1}{2022/07/03}{Some improvements in the documentation.\foreignlanguage{french}{\emph{Quelques améliorations dans la documentation.}}} % % \thispagestyle{empty} % @@ -156,22 +156,69 @@ \usepackage{xspace} \usepackage{csquotes} \usepackage{fancyvrb,fancyvrb-ex} +\usepackage{listings} \usepackage{mathtools} \usepackage{delarray} \usepackage{nicematrix} \providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} } +% \colorlet{option}{olive!75!black} +% Couleur des mots-clés de niveau 1 +\colorlet{keyword20}{cyan} %!75!black +% Couleur des mots-clés de niveau 2 +\colorlet{keyword30}{teal} +\colorlet{keycolor}{green!50!black} +\colorlet{dollarcolor}{violet} +\colorlet{cmdmuette}{blue} +\colorlet{cmdcausante}{red} + +\lstset{frame=single,% + language=[LaTeX]{TeX},% + showspaces=false,% + breaklines=true,% + breakatwhitespace=true,% + basicstyle=\ttfamily\bfseries,% + alsoletter={*-$},% + texcsstyle=*[2]\color{cmdcausante},% + texcs=[2]{matrice,declarermatrice*,lamatrice,matid,matnulle,MatriceInterieur,LaMatriceInterieur},% + texcsstyle=*[3]\color{cmdmuette},% + texcs=[3]{declarermatrice,simplesmatricessetup},% + keywordstyle=[20]\color{keyword20},% + keywordstyle=[30]\color{keyword30},% + keywordstyle=[40]\color{keycolor},% + keywordstyle=[50]\color{dollarcolor},% + keywords=[20]{tabular,array,matrix,matrix*,NiceArray},% + keywords=[30]{x,S,T,I,J,C,O,D},% + keywords=[40]{out-of-box,prefix,envir,typeord,argopt},% + keywords=[50]{$},% + escapeinside={\%*@}{@*)}% +} + +\newcommand{\MacroPres}[2]{\textcolor{#1}{\textbf{\cs{#2}}}} +\newcommand{\csmute}{\MacroPres{cmdmuette}} +\newcommand{\csprint}{\MacroPres{cmdcausante}} +\newcommand{\ObjetPres}[2]{\textcolor{#1}{\textbf{\texttt{#2}}}} +\newcommand{\keyname}{\ObjetPres{keycolor}} +\newcommand{\envir}{\ObjetPres{keyword20}} +\newcommand{\TypeMat}{\ObjetPres{keyword30}} + \newcommand{\UnExemple}{% \par \medskip \par \noindent - \begin{minipage}[c]{0.58\linewidth} - \VerbatimInput[gobble=0, frame=single]{code00.tex} + \begin{minipage}[c]{0.66\linewidth} + \lstinputlisting[gobble=0, frame=single, numbers=left, numberstyle={\small}]{code00.tex} \end{minipage} \hspace{\stretch{1}} - \begin{minipage}[c]{0.38\linewidth} + \begin{minipage}[c]{0.32\linewidth} + \small \input{code00} \end{minipage} - \par \medskip} + \par \medbreak} + +\newcommand*{\vliste}{liste\xspace} + +%<FRA> \newcommand{\VoirEx}[1]{(voir exemple en page~\pageref{#1})} +%<ENG> \newcommand{\VoirEx}[1]{(see example on page~\pageref{#1})} \begin{document} %<*FRA> @@ -266,7 +313,7 @@ ensuring a correct presentation of matrices. \textbf{Beware}: you have to provide the suitable mathematical environment to use the macros which print a matrix. Only the unstarred version of -\cs{declarermatrice} may be used outside math-mode. +\csmute{declarermatrice} may be used outside math-mode. %</ENG> %<*FRA> @@ -276,52 +323,102 @@ définir ses macros et gérer les clés d'option. Elle charge également \textbf{Attention}: vous devez fournir l'environnement mathématique adéquat pour utiliser les macros qui écrivent les matrices. Seule la version non-étoilée de -\cs{declarermatrice} peut être utilisée en dehors du mode mathématique. +\csmute{declarermatrice} peut être utilisée en dehors du mode mathématique. %</FRA> %<*ENG> \section{The Macros} \label{sec:macros} -\pkg{simples-matrices} offers six main document macros. +\pkg{simples-matrices} offers nine document macros. %</ENG> %<*FRA> \section{Les macros} \label{sec:macros} -L'extension \pkg{simples-matrices} offre six macros de document. +L'extension \pkg{simples-matrices} offre neuf macros de document. -%</FRA> +%</FRA> + +%<*ENG> +In the main text (syntaxes and examples), the name of a macro of this package is +printed in red if the macro produces some text in the document, otherwise it is +printed in blue. +%</ENG> +%<*FRA> +Dans le texte principal (syntaxes et exemples), le nom d'une macro de cette +extension est écrit en rouge si la macro produit du texte dans le document, +autrement il est écrit en bleu. +%</FRA> %<*ENG> \subsection{Main Macros} \label{sec:main} -This package has five main document macros viz. +The six main document macros are the following: +%</ENG> +%<*FRA> +\subsection{Macros principales} +\label{sec:principales} + +Les six macros principales sont les suivantes: +%</FRA> +%<*ENG> + \begin{function}{\matrice} \begin{syntax} - \cs{matrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{type}\marg{clist of coefficients} + \csprint{matrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{type}\marg{clist of coefficients} \end{syntax} - where \meta{prefix} has the same meaning as the key \texttt{prefix}; - \meta{clist of key-value pairs}, optional and void by default, can be used to - redefined the matrix-like environment; \meta{type} is a string of character + where \meta{prefix} has the same meaning as the key \keyname{prefix} (see page~\pageref{key-prefix}); + \meta{clist of key-value pairs} ---optional and void by default--- can be used to + redefined the \envir{matrix}-like environment; \meta{type} is a string of character the usage of which is explained later ---see \ref{sec:matrix-type}--- and \meta{clist of coefficients} is a clist of the coefficients of the matrix given by row order. The French \emph{matrice} means ``matrix''. +\end{function} +%</ENG> +%<*FRA> +\begin{function}{\matrice} + \begin{syntax} + \csprint{matrice}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\oarg{type}\marg{\vliste des coefficients} + \end{syntax} + où \meta{prefixe} a la même fonction que la clé \keyname{prefix} (voir page~\pageref{key-prefix}); + \meta{\vliste de paires de clé-valeur} --- optionnel et vide par défaut --- + peut être utilisé pour redéfinir l'environnement de type \envir{matrix}; + \meta{type} est une chaine de caractère dont l'utilisation sera expliquée + ci-dessous --- voir~\ref{sec:matrix-type} --- et \meta{\vliste des + coefficients} est la \vliste des coefficients de la matrice donnés ligne par + ligne. +\end{function} +%</FRA> - With \verb+\(\matrice{1, 2, 3, 4}\)+ we obtain \(\matrice{1, 2, 3, 4}\). +%<ENG> With +%<FRA> Avec +\lstinline+$\matrice{1, 2, 3, 4}$+ +%<ENG> we obtain +%<FRA> on obtient +\(\matrice{1, 2, 3, 4}\). - With \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+ - we obtain \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\). - -\end{function} +%<ENG> With +%<FRA> Avec +\lstinline+$\matrice(b)[3]{1, 2, 3, 4, 5, 6}$+ +%<ENG> we obtain +%<FRA> on obtient +\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\). +%<*ENG> \begin{function}{\declarermatrice} \begin{syntax} - \cs{declarermatrice*}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients} + \csmute{declarermatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients} + \end{syntax} +\end{function} + +\begin{function}{\declarermatrice*} + \begin{syntax} + \csprint{declarermatrice*}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients} \end{syntax} where \meta{matrix name} is the name of the matrix to be used afterwards. The other arguments, optional or mandatory, have the same meaning than above. The @@ -332,112 +429,108 @@ This package has five main document macros viz. the same function. \textbf{No check is done} to ensure that one is not redefining a previously defined matrix. + With the macro \csmute{declarermatrice}, the first two optional arguments have + no effect for they are not take into account to define the matrix \VoirEx{sec:declar}. + The French \emph{déclarer une matrice} means ``declare a matrix''. - \end{function} +%</ENG> -\begin{function}{\lamatrice} +%<*FRA> +\begin{function}{\declarermatrice} \begin{syntax} - \cs{lamatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name} + \csmute{declarermatrice}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\marg{nom}\oarg{type}\marg{\vliste des coefficients} \end{syntax} - prints the previously defined matrix the name of which is given by - \meta{matrix name}. The two optional arguments have the meaning as before. - - The French \emph{la matrice} means ``the matrix''. \end{function} -\begin{function}{\MatriceInterieur} + +\begin{function}{\declarermatrice*} \begin{syntax} - \cs{MatriceInterieur} + \csprint{declarermatrice*}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\marg{nom}\oarg{type}\marg{\vliste des coefficients} \end{syntax} - gives the inner part of the last printed ---via \cs{matrice}--- or defined - ---via \cs{declarermatrice}--- matrix. It can be used inside an - \env{array}-like environment. + où \meta{nom} est le nom de la matrice pour utilisation future. Les autres + arguments, optionnels ou obligatoires, ont la même signification que + ci-dessus. La version étoilée définit et écrit la matrice. La version + non-étoilée ne fait que la définir. - The French should be \emph{\foreignlanguage{french}{intérieur de la matrice}} - which means ``inside of the matrix''. What is implicit is the adjective - ``anonymous''. For named matrix see below. + La définition est globale mais on peut redéfinir une matrice nommée existante + avec la même fonction. \textbf{Aucun contrôle} n'est exercé pour s'assurer que + l'on n'est pas en train de redéfinir une matrice nommée précédemment définie. + + Avec la macro \csmute{declarermatrice}, les deux premiers arguments optionnels + n'ont aucun effet car la définition de la matrice n'en tient pas compte \VoirEx{sec:declar}. \end{function} +%</FRA> -\begin{function}{\LaMatriceInterieur} +%<*ENG> +\begin{function}{\lamatrice} \begin{syntax} - \cs{LaMatriceInterieur}\marg{matrix name} + \csprint{lamatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name} \end{syntax} - gives the inner part of the matrix with name \meta{matrix name}. It can be - used inside an \env{array}-like environment. + prints the previously defined matrix the name of which is given by + \meta{matrix name}. The two optional arguments have the meaning as before \VoirEx{sec:declar}. - Again false French but the parallel with \cs{lamatrice} should suggest that, - now, the matrix has a name and we have to use it. + The French \emph{la matrice} means ``the matrix''. \end{function} - -See examples on page~\pageref{sec:examples}. %</ENG> %<*FRA> -\subsection{Macros principales} -\label{sec:principales} - -Les cinq macros principales de document sont les suivantes: - -\begin{function}{\matrice} +\begin{function}{\lamatrice} \begin{syntax} - \cs{matrice}\parg{prefixe}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{type}\marg{vliste des coefficients} + \csprint{lamatrice}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\marg{nom} \end{syntax} - où \meta{prefixe} a la même fonction que la clé \texttt{prefix}; \meta{vliste - de paires de clé-valeur}, optionnel et vide par défaut, peut être utiliser - pour redéfinit l'environnement de type \texttt{matrix}; - \meta{type} est une chaine de caractère dont l'utilisation sera expliquée - ci-dessous --- voir~\ref{sec:matrix-type} --- et \meta{vliste des - coefficients} est la vliste des coefficients de la matrice donnés ligne par - ligne. - - Avec \verb+\(\matrice{1, 2, 3, 4}\)+ on obtient \(\matrice{1, 2, 3, 4}\). - - Avec \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+ - on obtient \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\). - + écrit la matrice nommée de nom \meta{nom}. + Les deux arguments optionnels ont la même signification que ci-dessus \VoirEx{sec:declar}. \end{function} +%</FRA> -\begin{function}{\declarermatrice} +%<*ENG> +\begin{function}{\MatriceInterieur} \begin{syntax} - \cs{declarermatrice*}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{nom}\oarg{type}\marg{vliste des coefficients} + \csprint{MatriceInterieur} \end{syntax} - où \meta{nom} est le nom de la matrice pour utilisation future. Les autres - arguments, optionnels ou obligatoires, ont la même signification que - ci-dessus. La version étoilée définit et écrit la matrice. La version - non-étoilée ne fait que la définir. + gives the inner part of the last printed ---via \csprint{matrice} or + \csprint{declarermatrice*}--- or defined ---via \csmute{declarermatrice}--- + matrix. It can be used inside an \envir{array}-like environment + \VoirEx{sec:matint}. - La définition est global mais on peut redéfinir une matrice nommée existante - avec la même fonction. \textbf{Aucun contrôle} n'est exercé pour s'assurer que - l'on n'est pas en train de redéfinir une matrice nommée précédemment définie. + The French should be \emph{\foreignlanguage{french}{intérieur de la matrice}} + which means ``inside of the matrix''. What is implicit is the adjective + ``anonymous''. For named matrix see below. \end{function} - -\begin{function}{\lamatrice} +%</ENG> +%<*FRA> +\begin{function}{\MatriceInterieur} \begin{syntax} - \cs{lamatrice}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{matrix name} + \csprint{MatriceInterieur} \end{syntax} - écrit la matrice nommée de nom \meta{nom}. - Les deux arguments optionnels ont la même signification que ci-dessus. + donne l'intérieur de la dernière matrice écrite --- via \csprint{matrice} ou + \csprint{declarermatrice*} --- ou définie --- via \csmute{declarermatrice}. On + peut l'utiliser dans un environnement du genre \envir{array} \VoirEx{sec:matint}. \end{function} +%</FRA> -\begin{function}{\MatriceInterieur} +%<*ENG> +\begin{function}{\LaMatriceInterieur} \begin{syntax} - \cs{MatriceInterieur} + \csprint{LaMatriceInterieur}\marg{matrix name} \end{syntax} - donne l'intérieur de la dernière matrice écrite --- via \cs{matrice} --- ou - définie --- via \cs{declarermatrice}. On peut l'utiliser dans un environnement - du genre \env{array}. + gives the inner part of the matrix with name \meta{matrix name}. It can be + used inside an \envir{array}-like environment \VoirEx{sec:matint}. + + Again false French but the parallel with \csprint{lamatrice} should suggest that, + now, the matrix has a name and we have to use it. \end{function} +%</ENG> +%<*FRA> \begin{function}{\LaMatriceInterieur} \begin{syntax} - \cs{LaMatriceInterieur}\marg{nom} + \csprint{LaMatriceInterieur}\marg{nom} \end{syntax} donne l'intérieur de la matrice de nom \meta{nom}. On peut l'utiliser dans un - environnement du genre \env{array}. + environnement du genre \envir{array} \VoirEx{sec:matint}. \end{function} - -Voir les exemples en page~\pageref{sec:exemples}. %</FRA> %<*ENG> @@ -447,7 +540,7 @@ Voir les exemples en page~\pageref{sec:exemples}. One can change the values of the keys of \pkg{simples-matrices} with \begin{function}{\simplesmatricessetup} \begin{syntax} - \cs{simplesmatricessetup}\marg{clist of key-value pairs} + \csmute{simplesmatricessetup}\marg{clist of key-value pairs} \end{syntax} where \meta{clist of key-value pairs} is the usual clist of key-value pairs setting one or many of the three keys of the package as presented on @@ -456,7 +549,6 @@ One can change the values of the keys of \pkg{simples-matrices} with To stick to established convention the name of this macro is created from the name of the package (reduced to \TeX{} letters) followed by \emph{setup}. I apologize for that strange linguistic mixture. - \end{function} %</ENG> %<*FRA> @@ -466,9 +558,9 @@ One can change the values of the keys of \pkg{simples-matrices} with On peut changer les valeurs des clés de \pkg{simples-matrices} avec \begin{function}{\simplesmatricessetup} \begin{syntax} - \cs{simplesmatricessetup}\marg{vliste de paires de clé-valeur} + \csmute{simplesmatricessetup}\marg{\vliste de paires de clé-valeur} \end{syntax} - où \meta{vliste de paires de clé-valeur} est l'habituelle vliste de paires de + où \meta{\vliste de paires de clé-valeur} est l'habituelle \vliste de paires de clé-valeur valuant une ou plusieurs des trois clés de cette extension telles que présentées ci-dessous en page~\pageref{sec:clefs}. @@ -476,18 +568,27 @@ On peut changer les valeurs des clés de \pkg{simples-matrices} avec consiste en le nom de l'extension --- réduite à ces lettres \TeX{}iennes --- suivi de l'anglais \emph{setup}. Je demande pardon pour cette étrange mixture linguistique. - \end{function} %</FRA> + %<*ENG> +\newpage{} \subsection{Shortcuts} \label{sec:shortcuts} There are also two \emph{shortcut} macros: +%</ENG> +%<*FRA> +\subsection{Raccourcis} +\label{sec:shortcuts} + +L'extension propose deux macros \emph{raccourcis}: +%</FRA> +%<*ENG> \begin{function}{\matid} \begin{syntax} - \cs{matid}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns} + \csprint{matid}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns} \end{syntax} which write the identity matrix --- by default --- with \meta{number of columns} columns. If \meta{coefficient} is given, we obtain a diagonal @@ -496,13 +597,29 @@ There are also two \emph{shortcut} macros: The two first optional arguments have the same functionality as in the preceding macros. - \emph{matid} stands for ``\foreignlanguage{French}{matrice identité}'' which means + \emph{matid} stands for \emph{\foreignlanguage{French}{matrice identité}} which means ``identity matrix''. \end{function} +%</ENG> +%<*FRA> +\begin{function}{\matid} + \begin{syntax} + \csprint{matid}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes} + \end{syntax} + qui imprime la matrice identité --- par défaut --- avec + \meta{nombre de colonnes} colonnes. + Si \meta{coefficient} est fourni, on obtient une matrice diagonale + dont tous les coefficients non-nuls sont égaux à \meta{coefficient}. + + Les deux premiers arguments optionnels ont la même fonction que dans les + macros précédentes. +\end{function} +%</FRA> +%<*ENG> \begin{function}{\matnulle} \begin{syntax} - \cs{matnulle}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns} + \csprint{matnulle}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns} \end{syntax} writes the null matrix with \meta{number of columns} columns ---by default--- or a matrix containing with \meta{number of columns} columns and all @@ -511,32 +628,14 @@ There are also two \emph{shortcut} macros: The two first optional arguments have the same functionality as in the preceding macros. - \emph{matnulle} stands for ``\foreignlanguage{French}{matrice nulle}'' which means + \emph{matnulle} stands for \emph{\foreignlanguage{French}{matrice nulle}} which means ``null matrix''. \end{function} %</ENG> %<*FRA> -\subsection{Raccourcis} -\label{sec:shortcuts} - -L'extension propose deux macros \emph{raccourcis}: - -\begin{function}{\matid} - \begin{syntax} - \cs{matid}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes} - \end{syntax} - qui imprime la matrice identité --- par défaut --- avec - \meta{nombre de colonnes} colonnes. - Si \meta{coefficient} est fourni, on obtient une matrice diagonale - dont tous les coefficients non-nuls sont égaux à \meta{coefficient}. - - Les deux premiers arguments optionnels ont la même fonction que dans les - macros précédentes. -\end{function} - \begin{function}{\matnulle} \begin{syntax} - \cs{matnulle}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes} + \csprint{matnulle}\parg{prefixe}\darg{\string<}{\vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes} \end{syntax} imprime la matrice nulle \meta{nombre de colonnes} colonnes --- par défaut --- ou une matrice de \meta{nombre de colonnes} colonnes dont tous les @@ -548,9 +647,9 @@ L'extension propose deux macros \emph{raccourcis}: %</FRA> \begin{VerbatimOut}[gobble=0]{code00.tex} -\(\matid{3}\)\qquad \(\matid[9]{3}\) +$\matid{3}$\qquad $\matid[9]{3}$ \par \medskip -\(\matnulle{3}\)\qquad \(\matnulle[2]{3}\) +$\matnulle{3}$\qquad $\matnulle[2]{3}$ \end{VerbatimOut} \UnExemple{} @@ -559,37 +658,33 @@ L'extension propose deux macros \emph{raccourcis}: \label{sec:keys} The package uses key-value options. There are four keys: -\texttt{envir}, -\texttt{prefix}, -\texttt{typeord} +\keyname{envir}, +\keyname{prefix}, +\keyname{typeord} and -\texttt{argopt}. +\keyname{argopt}. \begin{description} -\item[\texttt{envir} (\textit{\texttt{string}})] the main and last part of the +\item[\keyname{envir} (\textit{\texttt{string}})] the main and last part of the name of the environment used to print the matrix. Its initial value is - \texttt{matrix}. + \texttt{matrix}.\label{key-envir} -\item[\texttt{prefix} (\textit{\texttt{string}})] a string which is prefixed to +\item[\keyname{prefix} (\textit{\texttt{string}})] a string which is prefixed to \texttt{envir} to obtain the complete name of the environment. Its initial value is \texttt{p}. Therefore, by default, the environment used to print the - matrix is \texttt{bmatrix} as defined by \pkg{amsmath}. + matrix is \envir{pmatrix} as defined by \pkg{amsmath}.\label{key-prefix} -\item[\texttt{typeord} (\textit{\texttt{string}})] a string which is the +\item[\keyname{typeord} (\textit{\texttt{string}})] a string which is the ordinary ---i.~e. default--- value of the \meta{type} optional argument. The - initial value of the key is \texttt{C}. + initial value of the key is \TypeMat{C}.\label{key-typeord} -\item[\texttt{argopt} (\textit{\texttt{token list}})] for French +\item[\keyname{argopt} (\textit{\texttt{token list}})] for French \foreignlanguage{french}{\emph{argument optionnel}} (optional argument). That - key is initially void. See page~\pageref{sec:delarray} for usage. + key is initially void. See page~\pageref{sec:delarray} for usage.\label{key-argopt} \end{description} Moreover, an other key is available which is not an option of the package: -\texttt{out-of-box} which is a metakey. - -With |\simplesmatricessetup{out-of-box}| we obtain the same effect as with -|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|% - \BOP| argopt=,|\BOP| typeord=C}|. +\keyname{out-of-box} which is a metakey. %</ENG> %<*FRA> @@ -597,36 +692,43 @@ With |\simplesmatricessetup{out-of-box}| we obtain the same effect as with \label{sec:clefs} L'extension utilise le système de clefs-valeurs pour ses options. Elle possède -quatre clés: \texttt{envir}, \texttt{prefix}, \texttt{typeord} et \texttt{argopt}. +quatre clés: \keyname{envir}, \keyname{prefix}, \keyname{typeord} et \keyname{argopt}. \begin{description} -\item[\texttt{envir} (\textit{\texttt{chaine de caractères}})] la partie finale - du nom de l'environnement utilisé pour imprimer la matrice. Sa valeur initiale - est \texttt{matrix}. +\item[\keyname{envir} (\textit{\texttt{chaine de caractères}})] est la partie + finale du nom de l'environnement utilisé pour imprimer la matrice. Sa valeur + initiale est \texttt{matrix}.\label{key-envir} -\item[\texttt{prefix} (\textit{\texttt{chaine de caractères}})], caractères - placés devant \texttt{envir} pour fournir le nom complet de l'environnement - utilisé pour imprimer la matrice. Sa valeur initiale est \texttt{p}. Cela fait - que l'environnement par défaut est \texttt{pmatrix} fourni par \pkg{amsmath}. +\item[\keyname{prefix} (\textit{\texttt{chaine de caractères}})] contient les + caractères placés devant \texttt{envir} pour fournir le nom complet de + l'environnement utilisé pour imprimer la matrice. Sa valeur initiale est + \texttt{p}. Cela fait que l'environnement par défaut est \envir{pmatrix} + fourni par \pkg{amsmath}.\label{key-prefix} -\item[\texttt{typeord} (\textit{\texttt{chaine de caractères}})] définit la +\item[\keyname{typeord} (\textit{\texttt{chaine de caractères}})] définit la valeur ordinaire --- c.-à-d. par défaut --- de l'argument optionnel - \meta{type}. La valeur initiale de la clé est \texttt{C}. + \meta{type}. La valeur initiale de la clé est \TypeMat{C}.\label{key-typeord} -\item[\texttt{argopt} (\textit{\texttt{liste de lexèmes}}, anglais: - \foreignlanguage{english}{token list})]. Cette clé est vide par défaut. Voir - page~\pageref{sec:delarray} pour son utilisation. +\item[\keyname{argopt} (\textit{\texttt{liste de lexèmes}}, anglais: + \foreignlanguage{english}{token list})] est vide par défaut. Voir + page~\pageref{sec:delarray} pour son utilisation.\label{key-argopt} \end{description} De plus, une clé supplémentaire existe qui est une métaclé: -\texttt{out-of-box}. +\keyname{out-of-box}. +%</FRA> -Avec |\simplesmatricessetup{out-of-box}| on obtient le même effet qu'avec -|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|% - \BOP| argopt=,|\BOP| typeord=C}|. -%</FRA> + +%<ENG> With +%<FRA> Avec +\lstinline|\simplesmatricessetup{out-of-box}| +%<ENG> we obtain the same effect as with +%<FRA> on obtient le même effet qu'avec +\lstinline|\simplesmatricessetup{prefix=p,|\BOP\lstinline| envir=matrix,|% + \BOP\lstinline| argopt=,|\BOP\lstinline| typeord=C}|. %<*ENG> +\newpage{} \section{Examples} \label{sec:examples} \subsection{Without any special package} @@ -651,112 +753,131 @@ C'est-à-dire en chargeant uniquement \pkg{amsmath} comme le fait cette extensio \begin{VerbatimOut}[gobble=0]{code00.tex} \declarermatrice{A}{1, 2, 300, 400} -\(\declarermatrice*{B}{a, b, c, d}\) -\qquad \(\lamatrice{A}\) \par \bigskip -\(\lamatrice(V){A}\) -\qquad \(\lamatrice(b){B}\) +$\declarermatrice*{B}{a, b, c, d}$ +\quad $\lamatrice{A}$ \par \bigskip +$\lamatrice(V){A}$ +\quad $\lamatrice(b){B}$ \end{VerbatimOut} \UnExemple{} %<*ENG> +On the first line of this example, the matrix~\texttt{A} is defined but not +printed. Then, on the second line, the matrix~\texttt{B} is defined and +printed. We can afterwards call the~\texttt{A} or \texttt{B}-matrix with +\csprint{lamatrice}. +%</ENG> +%<*FRA> +Sur la première ligne de l'exemple, la matrice~\texttt{A} est définie mais pas +écrite. Ensuite, sur la seconde ligne, la matrice~\texttt{B} est définie et +écrite. Nous pouvons ensuite appeler les matrices~\texttt{A} ou~\texttt{B} à +l'aide de \csprint{lamatrice}. +%</FRA> + +%<*ENG> \subsubsection{The ``\texttt{type}'' argument} \label{sec:matrix-type} -The last but one --- optional --- argument of macros \cs{matrice} and -\cs{declarermatrice} defaults to \texttt{O}. In that case the value of the key -\texttt{typeord} is used to determine the \emph{type} of the matrix input, +The last but one --- optional --- argument of macros \csprint{matrice}, +\csmute{declarermatrice} and \csprint{declarermatrice*} +defaults to \TypeMat{O}. In that case the value of the key +\keyname{typeord} is used to determine the \emph{type} of the matrix input, see~\pageref{sec:matrix-type-key}. Its value can be a number, in which case it is the number of columns, or a -string ---presently a one letter string--- among: \texttt{C}, \texttt{D}, -\texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} and \texttt{x}. +string ---presently a one letter string--- among: \TypeMat{C}, \TypeMat{D}, +\TypeMat{I}, \TypeMat{J}, \TypeMat{S}, \TypeMat{T} and \TypeMat{x}. %</ENG> %<*FRA> \subsubsection{L'argument \og \texttt{type}\fg} \label{sec:matrix-type} -L'avant dernier argument --- optionnel --- des macros \cs{matrice} et -\cs{declarermatrice} vaut par défaut \texttt{O}. Dans ce cas, c'est la valeur de -la clé \texttt{typeord} qui est utilisée pour déterminer le \emph{type} des -données de la matrice, voir~\pageref{sec:matrix-type-key}. +L'avant dernier argument --- optionnel --- des macros \csprint{matrice}, +\csmute{declarermatrice} et \csprint{declarermatrice*} vaut par défaut +\TypeMat{O}. Dans ce cas, c'est la valeur de la clé \keyname{typeord} qui est +utilisée pour déterminer le \emph{type} des données de la matrice, +voir~\pageref{sec:matrix-type-key}. Sinon, il peut prendre une valeur numérique qui est le nombre de colonnes de la matrice ou encore une chaine de caractères --- à ce jour, une seule lettre --- -parmi: \texttt{C}, \texttt{D}, \texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} et -\texttt{x}. +parmi: \TypeMat{C}, \TypeMat{D}, \TypeMat{I}, \TypeMat{J}, \TypeMat{S}, \TypeMat{T} et +\TypeMat{x}. %</FRA> \medskip{} -%<FRA> \texttt{C} signifie matrice \textbf{carrée}. -%<ENG> \texttt{C} means square matrix for French ``\texttt{C}arré'' means ``square''. +%<FRA> \TypeMat{C} signifie matrice \textbf{carrée}. +%<ENG> \TypeMat{C} means square matrix for French ``\texttt{C}arré'' means ``square''. \begin{VerbatimOut}[gobble=0]{code00.tex} \[ -\matrice{1, 2, 3, 4, 5, 6, 7, 8, 9} -\qquad -\matrice[C]{1, 2, 3, 4, 5, 6, 7, 8, 9} + \matrice{1, 2, 3, 4, 5, 6, 7, 8, 9} + \quad + \matrice[C]{1, 2, 3, 4, 5, 6, 7, 8, 9} \] \end{VerbatimOut} \UnExemple{} -%<FRA> \texttt{D} signifie matrice \textbf{diagonale}. -%<ENG> \texttt{D} means \textbf{diagonal} matrix. +%<FRA> \TypeMat{D} signifie matrice \textbf{diagonale}. +%<ENG> \TypeMat{D} means \textbf{diagonal} matrix. \begin{VerbatimOut}[gobble=0]{code00.tex} \[ - \matrice{1, 2, 3, 4}\qquad - \matrice[D]{1, 2, 3, 4} + \matrice{1, 2, 3, 4}\quad + \matrice[D]{1, 2, 3, 4} \] \end{VerbatimOut} \UnExemple{} %<*FRA> -\texttt{I} signifie matrice triangulaire \textbf{inférieure}; \texttt{J} +\TypeMat{I} signifie matrice triangulaire \textbf{inférieure}; \TypeMat{J} signifie matrice triangulaire inférieure avec des zéros sur la diagonale. %</FRA> %<*ENG> -\texttt{I} means lower triangular matrix. French ``\texttt{I}nférieur'' means -``lower''; \texttt{J} means lower triangular matrix with zeros on the diagonal. +\TypeMat{I} means lower triangular matrix. French ``\texttt{I}nférieur'' means +``lower''; \TypeMat{J} means lower triangular matrix with zeros on the diagonal. %</ENG> \begin{VerbatimOut}[gobble=0]{code00.tex} \[ - \matrice[I]{1, 2, 3}\qquad - \matrice[J]{1, 2, 3} + \matrice[I]{1, 2, 3}\quad + \matrice[J]{1, 2, 3} \] \end{VerbatimOut} \UnExemple{} %<*FRA> -\texttt{S} signifie matrice triangulaire \textbf{supérieure}; \texttt{T} +\TypeMat{S} signifie matrice triangulaire \textbf{supérieure}; \TypeMat{T} signifie matrice triangulaire supérieure avec des zéros sur la diagonale. %</FRA> %<*ENG> -\texttt{S} means upper triangular matrix. French ``\texttt{S}upérieur'' means -``upper''; \texttt{T} means upper triangular matrix with zeros on the diagonal. +\TypeMat{S} means upper triangular matrix. French ``\texttt{S}upérieur'' means +``upper''; \TypeMat{T} means upper triangular matrix with zeros on the diagonal. %</ENG> \begin{VerbatimOut}[gobble=0]{code00.tex} \[ - \matrice[S]{1, 2, 3}\qquad - \matrice[T]{1, 2, 3} + \matrice[S]{1, 2, 3}\quad + \matrice[T]{1, 2, 3} \] \end{VerbatimOut} \UnExemple{} %<*FRA> -\texttt{x} signifie \texttt{xcas}. Avec cette valeur, on peut copier-coller de -\texttt{xcas} dans le document \LaTeX{}. +\TypeMat{x} signifie \texttt{xcas}\footnote{Système de calcul formel libre + disponible ici: + \url{https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac_fr.html}}. Avec +cette valeur, on peut copier-coller de \texttt{xcas} dans le document \LaTeX{}. %</FRA> %<*ENG> -\texttt{x} means \texttt{xcas}. With that value, one can copy-paste from +\TypeMat{x} means \texttt{xcas}\footnote{Free computer algebra system, see here: +\url{https://www-fourier.univ-grenoble-alpes.fr/~parisse/giac.html}.}. With that value, one can copy-paste from \texttt{xcas} into the \LaTeX{} document. %</ENG> \begin{VerbatimOut}[gobble=0]{code00.tex} \[ - \matrice[x]{[[7,1,3],[1,0,3],[5,1,2]]} + \matrice[x]{[[7,1,3],[1,0,3],[5,1,2]]} \] \end{VerbatimOut} \UnExemple{} +\pagebreak[3] %<*FRA> Un nombre donne le nombre de colonnes de la matrice. %</FRA> @@ -765,37 +886,37 @@ A number sets up the number of columns of the matrix. %</ENG> \begin{VerbatimOut}[gobble=0]{code00.tex} \[ - \matrice[2]{1, 2, 3, 4, 5, 6} - \quad - \matrice[3]{1, 2, 3, 4, 5, 6} + \matrice[2]{1, 2, 3, 4, 5, 6} + \quad + \matrice[3]{1, 2, 3, 4, 5, 6} \] \end{VerbatimOut} \UnExemple{} %<*ENG> -\subsubsection{Using the ``\texttt{typeord}'' Key} +\subsubsection{Using the ``\keyname{typeord}'' Key} \label{sec:matrix-type-key} -In this document, the key \texttt{typeord} has the initial value of~\texttt{C}. +In this document, the key \keyname{typeord} has the initial value of~\TypeMat{C}. %</ENG> %<*FRA> -\subsubsection{Utilisation de la clé \og \texttt{typeord}\fg} +\subsubsection{Utilisation de la clé \og \keyname{typeord}\fg} \label{sec:matrix-type-key} -Dans ce document, la clé \texttt{typeord} a comme valeur initiale~\texttt{C}. +Dans ce document, la clé \keyname{typeord} a comme valeur initiale~\TypeMat{C}. %</FRA> \medskip{} \begin{VerbatimOut}[gobble=0]{code00.tex} \simplesmatricessetup{typeord=3} -\(\matrice{1, 2, 3, 4, 5, 6}\) +$\matrice{1, 2, 3, 4, 5, 6}$\quad \simplesmatricessetup{typeord=2} -\(\matrice{1, 2, 3, 4, 5, 6}\) +$\matrice{1, 2, 3, 4, 5, 6}$\quad \simplesmatricessetup{typeord=C} -\(\matrice{1, 2, 3, 4}\) +$\matrice{1, 2, 3, 4}$ \end{VerbatimOut} \UnExemple{} @@ -812,39 +933,55 @@ wants to write a lesson about upper triangular matrices\dots{} %</ENG> %<*ENG> -\subsubsection{Using the \cs{(La)MatriceInterieur} Macros} +\subsubsection{Using the \csprint{(La)MatriceInterieur} Macros} \label{sec:matint} %</ENG> %<*FRA> -\subsubsection{Utilisation des macros \cs{(La)MatriceInterieur}} +\subsubsection{Utilisation des macros \csprint{(La)MatriceInterieur}} \label{sec:matint} %</FRA> \begin{VerbatimOut}[gobble=0]{code00.tex} \declarermatrice{B}[4]{ -\hline ein, zwei, drei, vier, -\hline unos, dos, tres, cuatro, -\hline unu, du, tri, kvar} -\declarermatrice{A}[3]{one, two, three, -un, deux, trois, uno, due, tre} + \hline ein, zwei, drei, vier, + \hline unos, dos, tres, cuatro, + \hline unu, du, tri, kvar}% +\declarermatrice{A}[3]{ + one, two, three, + un, deux, trois, + uno, due, tre}% \begin{tabular}{*{3}{l}} -\MatriceInterieur + \MatriceInterieur %*@\label{anonyme}@*) \end{tabular} -\par \medskip +\par \bigskip *** \par \bigskip +\begin{tabular}{*{3}{l}} + \LaMatriceInterieur{A} %*@\label{parnom}@*) +\end{tabular} +\par \bigskip \begin{tabular}{|*{4}{l|}} -\LaMatriceInterieur{B}\hline + \LaMatriceInterieur{B}\hline \end{tabular} \end{VerbatimOut} \UnExemple{} %<*ENG> +On lines~\ref{anonyme} and~\ref{parnom} we use the same \emph{internal} because +the \texttt{A}-matrix is the last defined before line~\ref{anonyme}. +%</ENG> +%<*FRA> +En lignes~\ref{anonyme} et~\ref{parnom}, nous accédons aux mêmes +\emph{entrailles} car la matrice~\texttt{A} est la dernière définie avant la +ligne~\ref{anonyme}. +%</FRA> + +%<*ENG> \subsection{Changing the Look} \label{sec:changelook} We can load other packages which deal with matrices such as \pkg{mathtools}, \pkg{delarray} or \pkg{nicematrix}. In that case we can change the look of our -matrices thanks to the option-key \texttt{envir}, \texttt{prefix} and -\texttt{argopt}. +matrices thanks to the option-key \keyname{envir}, \keyname{prefix} and +\keyname{argopt}. This document loads the three packages \pkg{mathtools}, \pkg{delarray} and \pkg{nicematrix} in order to give the following examples. @@ -857,8 +994,8 @@ This document loads the three packages \pkg{mathtools}, \pkg{delarray} and On peut charger d'autres extensions qui permettent de présenter des matrices comme \pkg{mathtools}, \pkg{delarray} ou \pkg{nicematrix}. Dans ce cas on peut -changer l'aspect de nos matrices grace aux clés d'option \texttt{envir}, -\texttt{prefix} et \texttt{argopt}. +changer l'aspect de nos matrices grace aux clés d'option \keyname{envir}, +\keyname{prefix} et \keyname{argopt}. Ce document charge les trois extensions \pkg{mathtools}, \pkg{delarray} et \pkg{nicematrix} pour présenter les exemples suivants. @@ -870,29 +1007,27 @@ Ce document charge les trois extensions \pkg{mathtools}, \pkg{delarray} et \label{sec:mathtools} As already stated above there are two ways to use the option-keys: through -\cs{simplesmatricesetup} or through the optional argument -\darg{\string<}{clist of pairs of key-value}{\string>}. I show both. - +\csmute{simples}\BOP\ObjetPres{cmdmuette}{matrices}\BOP\ObjetPres{cmdmuette}{setup} +or through the optional argument \darg{\string<}{clist of pairs of + key-value}{\string>}. I show both. %</ENG> %<*FRA> \subsubsection{Avec \pkg{mathtools}} \label{sec:mathtools} Comme déjà signalé, il y a deux façons d'utiliser les clés d'option: à l'aide de -\cs{simplesmatricesetup} ou en utilisant l'argument optionnel -\darg{\string<}{vliste de paires de clé-valeur}{\string>}. Je montre les deux. - +\csmute{simplesmatricessetup} ou en utilisant l'argument optionnel +\darg{\string<}{\vliste de paires de clé-valeur}{\string>}. Je montre les deux. %</FRA> \begin{VerbatimOut}[gobble=0]{code00.tex} \simplesmatricessetup{ envir=matrix*, prefix=p, argopt=[r]} -\(\matrice{1, 2, 30, 40}\) \qquad +$\matrice{1, 2, 30, 40}$ \quad \simplesmatricessetup{out-of-box} -\(\matrice{1, 2, 30, 40}\) +$\matrice{1, 2, 30, 40}$ \par \medskip -\(\matrice(b)<envir=matrix*, argopt=[l]> - {1, 2, 30, 40}\) +$\matrice(b)<envir=matrix*,argopt=[l]> {1, 2, 30, 40}$ \end{VerbatimOut} \UnExemple{} @@ -910,10 +1045,10 @@ Comme déjà signalé, il y a deux façons d'utiliser les clés d'option: à l'a \begin{VerbatimOut}[gobble=0]{code00.tex} \simplesmatricessetup{ envir=array, prefix=, - argopt=[c][{l c r}\}} -\(\matrice{1, 2, 30, 40}\) \qquad -\(\matid()<envir=array, - argopt={[c][{@{}l c r@{}}\}}>{3}\) + argopt=[c][{l r}\}} +$\matrice{1, 2, 30, 40}$ \quad +$\matid()<envir=array, + argopt={[c][{@{}c c c@{}}\}}>{3}$ \end{VerbatimOut} \UnExemple{} \simplesmatricessetup{out-of-box} @@ -929,49 +1064,66 @@ Comme déjà signalé, il y a deux façons d'utiliser les clés d'option: à l'a %</FRA> \begin{VerbatimOut}[gobble=0]{code00.tex} -\(\matrice<prefix=b, envir=NiceArray, -argopt={{*{2}{c}|cc}}>{1, 2, 3, 4, 5, 6, -7, 8, 9, 10, 11, 12, 13, 14, 15, 16}\) +$\matrice<prefix=b, envir=NiceArray, +argopt={ {cc||rl} }>{1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}$ \end{VerbatimOut} - %| emacs \UnExemple{} -%<*ENG> +%<*ENG> In that case we need to double the curly braces around the column descriptors of -the \texttt{array} environment because the first level is stripped off by +the \envir{array} environment because the first level is stripped off by \LaTeX{} when valuating the key. +\medskip{} + In the following example, for the second matrix, it is not necessary to surround -the value of \texttt{argopt} with an extra pair of curly braces ---even if it is -not dangerous--- for the presence of \texttt{[margin]} prevents \LaTeX{} to -strip off the curly braces. +the value of \keyname{argopt} with an extra pair of curly braces (see +line~\ref{sansaccol}) ---even if it is not dangerous (see +line~\ref{avecaccol})--- for the presence of \texttt{[margin]} prevents \LaTeX{} +to strip off the curly braces. %</ENG> %<*FRA> Dans ce cas il faut doubler les accolades entourant les descripteurs de colonnes -de l'environnement \texttt{array} car \LaTeX{} retire un niveau d'accolades en +de l'environnement \envir{array} car \LaTeX{} retire un niveau d'accolades en valuant la clé. +\medskip{} + Dans l'exemple suivant, pour la deuxième matrice, il n'est pas nécessaire -d'entourer la valeur de \texttt{argopt} d'une paire d'accolades --- même si ça -n'est pas dangereux --- car la présence de \texttt{[margin]} empêche \LaTeX{} de -supprimer une paire d'accolades. +d'entourer la valeur de \keyname{argopt} d'une paire d'accolades (voir +ligne~\ref{sansaccol}) --- même si ça n'est pas dangereux (voir +ligne~\ref{avecaccol}) --- car la présence de \texttt{[margin]} empêche \LaTeX{} +de supprimer une paire d'accolades. %</FRA> \begin{VerbatimOut}[gobble=0]{code00.tex} -\(\matrice<prefix=b, envir=NiceArray, +$\matrice<prefix=b, envir=NiceArray, argopt={{l c r}}>{1, 2, 3, 40, 50, 60, - 700, 800, 900}\) + 700, 800, 900}$ \par \medskip -\(\matrice<prefix=b, envir=NiceArray, -argopt={l c r}[margin]>{1, 2, 3, - 40, 50, 60, 700, 800, 900}\) +$\matrice<prefix=b, envir=NiceArray, +argopt={l c r}[margin]>{1, 2, 3, %*@\label{sansaccol}@*) + 40, 50, 60, 700, 800, 900}$ \par \medskip -\(\matrice<prefix=b, envir=NiceArray, -argopt={{l c r}[margin]}>{1, 2, 3, - 40, 50, 60, 700, 800, 900}\) +$\matrice<prefix=b, envir=NiceArray, +argopt={{l c r}[margin]}>{1, 2, 3, %*@\label{avecaccol}@*) + 40, 50, 60, 700, 800, 900}$ \end{VerbatimOut} \UnExemple{} +%<ENG> \section{Thanks} +%<FRA> \section{Remerciements} +%<*ENG> +Many thanks to Denis \textsc{Bitouzé} for his remarks about the initial state of +this documentation. Thanks to him, some colours have appeared on these pages. +%</ENG> +%<*FRA> +Mille mercis à Denis \textsc{Bitouzé} pour ses remarques à propos de l'état +initial de cette documentation. C'est grâce à lui que quelques couleurs sont +apparues sur ces pages. +%</FRA> + \vspace{\stretch{2}} diff --git a/macros/latex/contrib/simples-matrices/simples-matrices.ins b/macros/latex/contrib/simples-matrices/simples-matrices.ins index 1b04f52f84..b7967dd526 100644 --- a/macros/latex/contrib/simples-matrices/simples-matrices.ins +++ b/macros/latex/contrib/simples-matrices/simples-matrices.ins @@ -1,6 +1,6 @@ \iffalse meta-comment -File simples-matrices.ins Copyright (C) 2019, 2020 Yvon Henel +File simples-matrices.ins Copyright (C) 2022 Yvon Henel It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/simples-matrices/simples-matrices.pdf b/macros/latex/contrib/simples-matrices/simples-matrices.pdf Binary files differindex d9e8561020..33fe637200 100644 --- a/macros/latex/contrib/simples-matrices/simples-matrices.pdf +++ b/macros/latex/contrib/simples-matrices/simples-matrices.pdf diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README index d22404d610..a769b41a75 100644 --- a/macros/luatex/generic/luatexja/README +++ b/macros/luatex/generic/luatexja/README @@ -1,4 +1,4 @@ -The LuaTeX-ja Package 20220530.0 +The LuaTeX-ja Package 20220703.0 -------------------------------- Copyright (c) 2011--2022 The LuaTeX-ja project License: modified BSD (see COPYING) @@ -42,9 +42,9 @@ Installation 2. If you must/want to install manually: a. Download the source archive from CTAN, - or tagged as 20220530.0 in the Git repository by + or tagged as 20220703.0 in the Git repository by <http://git.osdn.jp/view?p=luatex-ja/luatexja.git - ;a=snapshot;h=refs/tags/20220530.0;sf=tgz> + ;a=snapshot;h=refs/tags/20220703.0;sf=tgz> b. Extract the archive and process following three files by LuaLaTeX to generate classes for Japanese typesetting: @@ -93,4 +93,4 @@ Notes This file and ltj-kinsoku.lua are not used anymore. (Do not remove ltj-kinsoku.tex.) -Last commit date: Mon May 30 12:00:10 2022 +0900 +Last commit date: Sun Jul 3 11:15:41 2022 +0900 diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf Binary files differindex 06cae0dffc..7ad9b0ebc5 100644 --- a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf +++ b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf Binary files differindex f5a92ac497..8f1095869c 100644 --- a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf +++ b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf Binary files differindex 2dce1034fc..870d9963ae 100644 --- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf +++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex index 3148d1df9e..e51f4558bb 100644 --- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex +++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex @@ -2,7 +2,7 @@ %%% a test of ruby. \documentclass[a4paper,10ptj]{ltjsarticle} \usepackage[rgb]{xcolor} -\usepackage{enumitem,mleftright} +\usepackage{enumitem,mleftright,pict2e} \usepackage{luatexja-otf,amsmath,bxghost} \usepackage[no-math]{fontspec} \usepackage[match]{luatexja-fontspec} @@ -36,7 +36,6 @@ allcolors=blue, pdftitle={luatexja-ruby.sty} } - \def\Node#1#2{\,\vcenter{\hbox{\fboxsep=1pt\fbox{\vbox{\small\halign{\hfil##\hfil\cr #1\mathstrut\cr\noalign{\smallskip\hrule height.4pt\smallskip}\strut\<#2\cr}}}}}\,} \def\LuaTeX{Lua\TeX} @@ -70,6 +69,15 @@ \ExplSyntaxOff %%%% +\makeatletter +\def\figureautorefname{図} +\def\HyRef@autoref#1#2{% + \begingroup + \Hy@safe@activestrue + \expandafter\HyRef@autosetref\csname r@#2\endcsname{#2}{#1}% + \endgroup\eghostguarded{}%" 欧文ゴースト +} + \title{\textsf{luatexja-ruby}パッケージ} \author{\LuaTeX-jaプロジェクトチーム} \date{\texttt{\csname ver@luatexja-ruby.sty\endcsname}(\today)} @@ -132,7 +140,12 @@ plain \LuaTeX でのロードはまだサポートしておらず, 本来foohogeにおいては…… \end{quote} +また,「親文字全角幅」「親文字全角高さ」という用語は,それぞれ親文字の和文フォントにおける +\cs{zw},~\cs{zh}命令で取得できる値を表す.多くの場合は両者は同じ値であるが,いつでもそうであるという保証はない. +「ルビ全角幅」「ルビ全角高さ」についても同様である. + \subsection{\ruby{命|令}{めい|れい}} +\label{ssec:ltjruby} \paragraph{\cs{ltjruby}} ルビ出力用命令の本体.\verb+\ruby+ という別名を定義している. \begin{quote} @@ -194,11 +207,11 @@ plain \LuaTeX でのロードはまだサポートしておらず, 既定値は\ \verb+{1}{1}{0}+ である. \item[maxmargin=<real>] 親文字の方がルビより長い時に,ルビの先頭と親文字の先頭,及び -ルビ末尾と親文字の末尾の間に許される最大の空白量.\textbf{親文字全角単位}で指定し,既定値は0.5. +ルビ末尾と親文字の末尾の間に許される最大の空白量.\textbf{親文字全角幅単位}で指定し,既定値は0.5. \medskip \item[size=<real>] ルビ文字の親文字に対する大きさ.既定値は0.5. -\item[intergap=<real>] ルビ文字と親文字との空きを親文字全角単位で指定.既定値は0. +\item[intergap=<real>] ルビ文字と親文字との空きを親文字全角高さ単位で指定.既定値は0. \item[rubysmash=<bool>] ルビの高さを0にするか.既定値は偽.次が例である. \begin{LTXexample}[width=0.3\textwidth, preset=\Large] \ \vrule width 0pt height 2\zw depth 1\zw @@ -212,12 +225,13 @@ plain \LuaTeX でのロードはまだサポートしておらず, {本}{ほん}} \end{LTXexample} \item[ybaseheight=<real>] 非負の値が指定された場合, - \emph{縦組以外での}ルビの親文字の高さを全角高さの<real>倍と強制的に固定する. + \emph{縦組以外での}親文字の高さを親文字全角高さの<real>倍と強制的に固定する. 負の値が指定された場合は「固定しない」(すなわち,v0.3より前の挙動と同じになる). - 既定値は0.88. -\item[tbaseheight=<real>] \texttt{ybaseheight}と同様だが,こちらは\emph{縦組での}ルビの親文字の高さを指定する. - 既定値は0.5. + 既定値は$0.88$. +\item[tbaseheight=<real>] \texttt{ybaseheight}と同様だが,こちらは\emph{縦組での}親文字の高さを指定する. + 既定値は$0.5$. \item[baseheight=<real>] \texttt{ybaseheight},\texttt{tbaseheight}を同時に指定したことと同義. + 次の例や\autoref{fig:ruby_vertical}を参照. \begin{LTXexample}[width=0.3\textwidth, preset=\Large] \noindent \ltjruby[baseheight=0.88]{本}{ほん}\ @@ -229,7 +243,64 @@ plain \LuaTeX でのロードはまだサポートしておらず, \ltjruby[baseheight=-1]{本}{ほん}\ \ltjruby[baseheight=-1]{dvi}{ディーヴィーアイ} \end{LTXexample} +\item[yrubydepth=<real>] 非負の値が指定された場合, + \emph{縦組以外での}ルビの深さをルビ全角の<real>倍と強制的に固定する. + 負の値が指定された場合は「固定しない」(すなわち,v0.52以前の挙動と同じになる). + 既定値は$0.12$. +\item[trubydepth=<real>] \texttt{yrubydepth}と同様だが,こちらは\emph{縦組での}ルビの深さを指定する. + 既定値は$0.5$. +\item[rubydepth=<real>] \texttt{yrubydepth},\texttt{trubydepth}を同時に指定したことと同義. + 次の例や\autoref{fig:ruby_vertical}を参照. +\begin{LTXexample}[width=0.3\textwidth, preset=\Large] +\noindent +\ltjruby[rubydepth=0.12]{◆}{ほん}\ +\ltjruby[rubydepth=0.12]{◆}{pdf}\ +\ltjruby[rubydepth=0.12]{◆}{dvi}\\ +\ltjruby[rubydepth=0]{◆}{ほん}\ +\ltjruby[rubydepth=0]{◆}{pdf}\ +\ltjruby[rubydepth=0]{◆}{dvi}\\ +\ltjruby[rubydepth=-1]{◆}{ほん}\ +\ltjruby[rubydepth=-1]{◆}{pdf}\ +\ltjruby[rubydepth=-1]{◆}{dvi} +\end{LTXexample} +\begin{figure}[t] + {\centering\fontsize{48}{48}\selectfont\unitlength=\zw + \begin{picture}(7,2.5)(-0.5,-0.5) + \linethickness{0.4mm} + \put(0,0){\makebox(0,0)[l]{\smash{\hbox to 6.5\zw{親文字$\int_0^1 x\,dx$}}}} + \polygon(0,-.12)(0,0.88)(6.5,0.88)(6.5,-0.12) + \put(0,1.35){\makebox(0,0)[l]{\fontsize{24}{24}\selectfont\smash{\hbox to 13\zw{ルビ文字列◆◆◆◆◆◆◆◆}}}} + \polygon(0,1.2)(0,1.79)(6.5,1.79)(6.5,1.2) + \linethickness{0.125mm} + \put(-0.5,0){\line(1,0){7}} + \put(-0.5,1.35){\line(1,0){7}} + \put(-0.5,1.2){\line(1,0){0.5}} + \put(-0.5,0.88){\line(1,0){0.5}} + \put(-0.25,0){\vector(0,1){0.88}} + \put(-0.25,1.35){\vector(0,-1){0.15}} + \put(-0.25,0.44){\normalsize\makebox(0,0)[r]{$H$\,\,}} + \put(-0.25,1.45){\normalsize\makebox(0,0)[b]{$D$}} + \put(-0.125,0.88){\vector(0,1){0.32}} + \put(-0.125,1.04){\normalsize\makebox(0,0)[l]{\,\,$\mbox{\texttt{intergap}}\cdot p$}} + \end{picture}\par} + + \normalsize\leftskip=0.5\dimexpr\textwidth-30\zw \rightskip=\leftskip + ここで$p$は親文字における全角高さ,$r$はルビ文字における全角高さであり, + \begin{gather*} + H= + \begin{cases} + \mbox{\texttt{[yt]baseheight}}\cdot p&\mbox{if\ $\mbox{\texttt{[yt]baseheight}}\ge 0$,}\\ + \mbox{(自然高さ)}&\mbox{if\ $\mbox{\texttt{[yt]baseheight}}\string<0$,} + \end{cases}\\ + D= + \begin{cases} + \mbox{\texttt{[yt]rubydepth}}\cdot r&\mbox{if\ $\mbox{\texttt{[yt]rubydepth}}\ge 0$,}\\ + \mbox{(自然深さ)}&\mbox{if\ $\mbox{\texttt{[yt]rubydepth}}\string<0$.} + \end{cases} + \end{gather*} + \caption{ルビの垂直配置}\label{fig:ruby_vertical} +\end{figure} \item[kenten=<command>]各文字につく圏点の出力命令を指定する. @@ -268,11 +339,12 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} <option>の既定値を指定する.\textsf{luatexja-ruby}読み込み時の値は 各項目の所で既に説明してあるが,次のようになっている. \begin{verbatim} - pre=-1, post=-1, mode=1, + pre=-1, post=-1, mode=1, stretchruby={1}{2}{1}, stretch = {1}{2}{1}, stretchbol={0}{1}{1}, stretcheol={1}{1}{0}, maxmargin=0.5, size=0.5, intergap=0, rubysmash=false, kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5, + yrubydepth=0.12, trubydepth=0.5, intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip \end{verbatim} @@ -280,14 +352,14 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} \begin{description} \item[\Param{rubypreintrusion}\ttfamily =\{<chr\_code>, <pre\_int>\}] 文字<chr\_code> に,その\textbf{直後}のルビによって掛けられるルビ文字列の最大長 - (つまり,\underline{前文字進入許容量})をルビ全角単位で指定. + (つまり,\underline{前文字進入許容量})をルビ全角幅単位で指定. \textbf{v0.5以降での変更点}:もし$-a$~($a>0$)を指定した場合は,実際の\underline{前文字進入許容量}は$a$となるが, 文字<chr\_code>の前のJFMグルーに進入が発生した場合には,\underline{前文字進入許容量}が0でなかった場合は,の後のJFMグルーにはルビの進入は発生しない. \item[\Param{rubypostintrusion}\ttfamily =\{<chr\_code>, <post\_int>\}] 文字<chr\_code> に,その\textbf{直前}のルビによって掛けられるルビ文字列の最大長 - (つまり,\underline{後文字進入許容量})をルビ全角単位で指定. + (つまり,\underline{後文字進入許容量})をルビ全角幅単位で指定. \textbf{v0.5以降での変更点}:もし$-a$~($a>0$)を指定した場合は,実際の\underline{後文字進入許容量}は$a$となるが, 実際の\underline{後文字進入量}が0でなかった場合は,文字<chr\_code>の後のJFMグルーにはルビの進入は発生しない. @@ -323,7 +395,7 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} \paragraph{\cs{ltjkenten}} -圏点を出力する命令で,\verb+\kenten+ という別名を定義している. +圏点を出力する命令であり, \begin{quote} \ttfamily\cs{ltjkenten}[<option>]\{親文字\} \end{quote} @@ -355,7 +427,6 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} 親文字全角の$1/1000$だけルビ文字列が長くなることを許容している. }であれば, 単純グループルビの並びとして扱われる.すなわち,次ページ冒頭の2行は全くの等価となる. -\newpage \begin{verbatim} \ltjruby{普|通|車}{ふ|つう|しや} \ltjruby{普}{ふ}\ltjruby{通}{つう}\ltjruby{車}{しや} @@ -402,6 +473,12 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} エラーが発生して止まることもあるし,エラーが発生しなくても正しく組まれない. \end{itemize} +\paragraph{別名について} +\verb+\begin{document}+時に% +\begin{itemize} + \item \cs{ruby}がすでに定義されていない場合に限り,\cs{ruby}が\cs{ltjruby}の別名として定義される. + \item \cs{kenten}がすでに定義されていない場合に限り,\cs{kenten}が\cs{ltjkenten}の別名として定義される. +\end{itemize} \section{\ruby{注|意|点}{ちゆう|い|てん}} \paragraph{前後からのルビ文字のはみ出し1} @@ -507,6 +584,7 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1} \newpage \section{\ruby{実|装}{じつ|そう}について} + \subsection{進入量の計算} \label{ssec:calc_intrusion} ルビ文字を自然に組んだときの幅が親文字のそれより多い場合, @@ -880,6 +958,31 @@ $r_2$,~$g_2$を行Bから除去・メモリ解放し,代わりに$n_3$を行B \makebox[10\zw][s]{値とは\ruby{\texttt{;}}{セミコロン}で区切}% \ltjruby{痛}{いたみ}(\ltjruby{病}{びやう}あ + + v0.53\ \ruby{コギト}{Cogito} + \ruby{コイト}{Coito} + \ruby{ノ}{no} + \ruby{ト}{TO} + \ruby{ヨ}{yo} + \ruby{ぢ}{dji} + \\ + \ruby[intergap=-1.5]{ノ}{no} + \ruby[intergap=-1.5]{ト}{TO} + \ruby[intergap=-1.5]{ヨ}{yo} + \ruby[intergap=-1.5]{ぢ}{dji} + + v0.52\ \ruby[rubydepth=-1]{コギト}{Cogito} % too high + \ruby[rubydepth=-1]{コイト}{Coito} % too low + \ruby[rubydepth=-1]{ノ}{no} % too low + \ruby[rubydepth=-1]{ト}{TO} % too low + \ruby[rubydepth=-1]{ヨ}{yo} % too high + \ruby[rubydepth=-1]{ぢ}{dji} % too high + \\ + \ruby[intergap=-1.5,rubydepth=-1]{ノ}{no} % too low + \ruby[intergap=-1.5,rubydepth=-1]{ト}{TO} % too low + \ruby[intergap=-1.5,rubydepth=-1]{ヨ}{yo} % too high + \ruby[intergap=-1.5,rubydepth=-1]{ぢ}{dji} % too high + } \fbox{\box0} diff --git a/macros/luatex/generic/luatexja/doc/luatexja.dtx b/macros/luatex/generic/luatexja/doc/luatexja.dtx index 89bdf86348..7c167d96f6 100644 --- a/macros/luatex/generic/luatexja/doc/luatexja.dtx +++ b/macros/luatex/generic/luatexja/doc/luatexja.dtx @@ -1651,7 +1651,7 @@ The following presets are defined: \hyphenchar\font=-1 \exhyphenchar=-1 haranoaji, hiragino-pro, hiragino-pron, ipa, ipa-hg, ipaex, ipaex-hg, kozuka-pr6, kozuka-pr6n, kozuka-pro, moga-mobo, moga-mobo-ex, - bizud, morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf, + bizud, morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf, noto, noto-jp, sourcehan, sourcehan-jp, ume, yu-osx, yu-win, yu-win10 \end{quote} @@ -8733,12 +8733,14 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \item[noto-otc] Noto Serif CJK and Noto Sans CJK fonts (OTC) %<en> \\*[-\dimexpr\medskipamount+\baselineskip\relax] - \item[noto-otf] Noto Serif CJK and Noto Sans CJK fonts (Language-specific OTF) + \item[noto-otf\textrm{, }noto] Noto Serif CJK and Noto Sans CJK fonts (Language-specific OTF) +%<en> \\*[-\dimexpr\medskipamount+\baselineskip\relax] + \item[noto-jp] Noto Serif CJK and Noto Sans CJK fonts (Region-specific subset OTF) \begin{center}\small -\def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2}% +\def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2&Noto #1 JP #2}% \begin{tabular}{lllll} \toprule -\bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}\\ +\bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}, \texttt{noto}&\texttt{noto-jp}\\ \midrule &light&\AD{Serif}{Light}\\ %<en>\textit{mincho}% @@ -8749,7 +8751,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. &&\AD{Sans}{Regular*}\\ &\smash{\raisebox{1.5ex}{medium}} &\AD{Sans}{Medium}\\ -\cmidrule(l){2-4} +\cmidrule(l){2-5} %<en>\smash{\raisebox{2ex}{\textit{gothic}}}% %<ja>\smash{\raisebox{2ex}{\textgt{ゴシック}}}% &bold&\AD{Sans}{Bold}\\ diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty index 3da21dd155..b1d5873ab6 100644 --- a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty +++ b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty @@ -1,5 +1,5 @@ % luatexja-preset.sty -\ProvidesPackage{luatexja-preset}[2020-09-14 Japanese font presets] +\ProvidesPackage{luatexja-preset}[2022-06-19 Japanese font presets] \RequirePackage{expl3,l3keys2e} \RequirePackage{luatexja} @@ -211,7 +211,7 @@ mc = A-OTF-RyuminPr6N-Light.otf, mc-b = A-OTF-FutoMinA101Pr6N-Bold.otf, gt-d = A-OTF-GothicBBBPr6N-Medium.otf , gt-b = A-OTF-FutoGoB101Pr6N-Bold.otf, gt-u = A-OTF-GothicBBBPr6N-Medium.otf , gt-eb = A-OTF-MidashiGoPr6N-MB31.otf, - mg-m = A-OTF-Jun101Pr6N-Light.otf, + mg-m = A-OTF-ShinMGoPr6N-Light.otf, __custom = false, __office = false, __noembed = false, } @@ -312,6 +312,20 @@ mc-l = Noto~Serif~CJK~JP~Light, __custom = false, __office = false, __noembed = false, } +\ltjpreset_declare_preset:nx{noto}{ + noto-otf, +} +\ltjpreset_declare_preset:nx{noto-jp}{ + mc-m = Noto~Serif~JP~Regular, + mc-b = Noto~Serif~JP~Bold, + gt-d = Noto~Sans~JP~Regular, + gt-b = Noto~Sans~JP~Bold, + gt-u = Noto~Sans~JP~Medium, + gt-eb = Noto~Sans~JP~Black, + mg-m = Noto~Sans~JP~Medium, + mc-l = Noto~Serif~JP~Light, + __custom = false, __office = false, __noembed = false, +} % HaranoAji {Mincho, Gothic} \ltjpreset_declare_preset:nx{haranoaji}{ diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty index 8367feb047..1e50b1f680 100644 --- a/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty +++ b/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty @@ -4,7 +4,7 @@ % LaTeX only! \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luatexja-ruby}[2021-05-17 v0.52] +\ProvidesPackage{luatexja-ruby}[2022-07-03 v0.53] \RequirePackage{luatexja} %%------------------ @@ -78,6 +78,14 @@ \expandafter\def\csname ltj@@rubyip@tbaseheight\endcsname{#1}% } %% これらの値が正のとき,親文字の高さをこの値(\zh 単位)とみなす + +\ltj@@rkeydef{yrubydepth} % 縦組以外 (yoko, utod, dtou) +\ltj@@rkeydef{trubydepth} % 縦組 +\define@key[ltj]{ruby}{rubydepth}{% + \expandafter\def\csname ltj@@rubyip@yrubydepth\endcsname{#1}% + \expandafter\def\csname ltj@@rubyip@trubydepth\endcsname{#1}% +} + \define@boolkey[ltj]{ruby}{intrude_jfmgk}[true]{} \define@boolkey[ltj]{ruby}{intrude_xkanjiskip}[true]{} \define@boolkey[ltj]{ruby}{intrude_kanjiskip}[true]{} @@ -100,7 +108,7 @@ % Lua ソースに渡す table 生成 \bgroup \catcode`\_=11 -\gdef\ltj@@ruby@create@table#1{% #1: ルビ全角 +\gdef\ltj@@ruby@create@table#1#2{% #1: ルビ全角幅,#2: ルビ全角高さ \string{ eps = \ltj@safe@dimen{\ltj@@rubyip@epsilon\zw}, before_jfmgk = 0, after_jfmgk = 0, @@ -119,6 +127,8 @@ + 1048576 * \ifltj@ruby@rubysmash1\else0\fi), baseheight = \ltj@safe@dimen{\ifnum\ltjgetparameter{direction}=3 \ltj@@rubyip@tbaseheight\else\ltj@@rubyip@ybaseheight\fi\zh}, + rubydepth = \ltj@safe@dimen{\ifnum\ltjgetparameter{direction}=3 + \ltj@@rubyip@trubydepth\else\ltj@@rubyip@yrubydepth\fi#2}, intrude_jfmgk = \string{ \ifltj@ruby@intrude_jfmgk [luatexja.icflag_table.FROM_JFM]=true,\fi \ifltj@ruby@intrude_kanjiskip @@ -181,9 +191,10 @@ \protected\def\ltjruby{\@ifnextchar[\ltj@@ruby{\ltj@@ruby[]}}%] \AtBeginDocument{% \ifdefined\ruby\else\let\ruby=\ltjruby\fi + \ifdefined\kenten\else\let\kenten=\ltjkenten\fi \directlua{luatexja.ruby.read_old_break_info()}% } -\def\ltj@@ruby[#1]#2#3{{% #1: option #2: 親文字群,#3: ルビ文字列群,共に| 区切り +\protected\def\ltj@@ruby[#1]#2#3{{% #1: option #2: 親文字群,#3: ルビ文字列群,共に| 区切り \setkeys[ltj]{ruby}{#1}% \directlua{luatexja.ruby.ruby_tmplist_r = \string{\string}; luatexja.ruby.ruby_tmplist_p = \string{\string}}% @@ -191,9 +202,10 @@ % 引数展開,テーブルにセット \pxrr@decompbar{#2}{\let\ltj@@ruby@mark\ltj@@ruby@sp\pxrr@res}% \pxrr@decompbar{#3}{\let\ltj@@ruby@mark\ltj@@ruby@sr\pxrr@res}% - {\fontsize{\ltj@@rubyip@size\dimen0}\z@\selectfont\ltj@@rubyip@fontcmd\global\dimen1=\zw}% + {\fontsize{\ltj@@rubyip@size\dimen0}\z@\selectfont\ltj@@rubyip@fontcmd + \global\dimen1=\zw\global\dimen2=\zh}% \directlua{% - luatexja.ruby.texiface(\ltj@@ruby@create@table{\dimen1}, + luatexja.ruby.texiface(\ltj@@ruby@create@table{\dimen1}{\dimen2}, luatexja.ruby.ruby_tmplist_r, luatexja.ruby.ruby_tmplist_p)}% }} @@ -207,7 +219,6 @@ } \protected\def\ltjkenten{\@ifnextchar[\ltj@@kenten{\ltj@@kenten[]}}%] -\let\kenten=\ltjkenten \def\ltj@@kenten[#1]#2{{% \setkeys[ltj]{ruby}{#1, stretchruby=101}% \@tfor\ltj@@kenten@temp:=#2\do{\ltj@@ruby[]{\ltj@@kenten@temp}{\ltj@@rubyip@kenten}}% @@ -244,11 +255,12 @@ \ltjsetparameter{rubypreintrusion={-1,1}} \setkeys[ltj]{ruby}{ - pre=-1, post=-1, mode=1, + pre=-1, post=-1, mode=1, stretchruby={1}{2}{1}, stretch = {1}{2}{1}, stretchbol={0}{1}{1}, stretcheol={1}{1}{0}, maxmargin=0.5, size=0.5, intergap=0, rubysmash=false, kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5, + yrubydepth=0.12, trubydepth=0.5, intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip, epsilon=0.0001, } diff --git a/macros/luatex/generic/luatexja/src/ltj-ruby.lua b/macros/luatex/generic/luatexja/src/ltj-ruby.lua index 320b7307f0..7fa7ea927e 100644 --- a/macros/luatex/generic/luatexja/src/ltj-ruby.lua +++ b/macros/luatex/generic/luatexja/src/ltj-ruby.lua @@ -3,7 +3,7 @@ -- luatexbase.provides_module({ name = 'luatexja.ruby', - date = '2022-02-03', + date = '2022-06-25', description = 'Ruby annotation', }) luatexja.ruby = {} @@ -398,6 +398,7 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end) setfield(a, 'depth', 0); setfield(k, 'kern', tmp_tbl.intergap) insert_after(r, r, a); insert_after(r, a, k); insert_after(r, k, p); setfield(p, 'next', nil) + if tmp_tbl.rubydepth >= 0 then setfield(r, 'depth', tmp_tbl.rubydepth) end if tmp_tbl.baseheight >= 0 then setfield(p, 'height', tmp_tbl.baseheight) end a = node.direct.vpack(r); setfield(a, 'shift', 0) set_attr(a, attr_ruby, post_intrusion) diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty index eae7d5040b..aa3d1f5463 100644 --- a/macros/luatex/generic/luatexja/src/luatexja.sty +++ b/macros/luatex/generic/luatexja/src/luatexja.sty @@ -27,7 +27,7 @@ \newif\ifltj@disablejfam %%%% VERSION -\def\LuaTeXjaversion{20220530.0} +\def\LuaTeXjaversion{20220703.0} %% Check if LaTeX is used. \begingroup\expandafter\expandafter\expandafter\endgroup |