summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-17 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2024-02-17 03:01:13 +0000
commit8886ad587a305595ce543a74b0fc779f0732a6e9 (patch)
tree25f6e576a52343cad4a3b56b2f669e09432211b8 /macros/latex
parenta6e02d45ad0d10cfc3256fc91abe80d6228325a4 (diff)
CTAN sync 202402170301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/cnbwp/README22
-rw-r--r--macros/latex/contrib/cnbwp/cnbwp.cls41
-rw-r--r--macros/latex/contrib/cnbwp/doc/cnbpaper.pdfbin185714 -> 193215 bytes
-rw-r--r--macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.pdfbin246897 -> 243395 bytes
-rw-r--r--macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.tex138
-rw-r--r--macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.pdfbin251357 -> 248382 bytes
-rw-r--r--macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.tex145
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx17
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin594429 -> 598997 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex13
-rw-r--r--macros/latex/contrib/functional/README.txt2
-rw-r--r--macros/latex/contrib/functional/functional.pdfbin860824 -> 696206 bytes
-rw-r--r--macros/latex/contrib/functional/functional.sty4
-rw-r--r--macros/latex/contrib/functional/functional.tex22
-rw-r--r--macros/latex/contrib/pynotebook/README.md6
-rw-r--r--macros/latex/contrib/pynotebook/doc/pynotebook-doc.pdfbin0 -> 392958 bytes
-rw-r--r--macros/latex/contrib/pynotebook/doc/pynotebook-doc.tex482
-rw-r--r--macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.pdfbin0 -> 74884 bytes
-rw-r--r--macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.tex239
-rw-r--r--macros/latex/contrib/pynotebook/tex/pynotebook.sty315
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin93819 -> 93842 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty2
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex10
-rw-r--r--macros/latex/contrib/tabularray/README.txt2
-rw-r--r--macros/latex/contrib/tabularray/tabularray-2021.sty12
-rw-r--r--macros/latex/contrib/tabularray/tabularray.pdfbin885598 -> 746205 bytes
-rw-r--r--macros/latex/contrib/tabularray/tabularray.sty222
-rw-r--r--macros/latex/contrib/tabularray/tabularray.tex29
28 files changed, 1462 insertions, 261 deletions
diff --git a/macros/latex/contrib/cnbwp/README b/macros/latex/contrib/cnbwp/README
index 095473e539..9e63d3f6d9 100644
--- a/macros/latex/contrib/cnbwp/README
+++ b/macros/latex/contrib/cnbwp/README
@@ -1,5 +1,5 @@
=============================================================================
-Package: cnbwp Version 2013.12 1 January 2014
+Package: cnbwp Version 2024.02 13 February 2024
=============================================================================
The purpose of the package is to support proper formatting of Working Papers
@@ -13,8 +13,24 @@ cnbwp-manual-en.pdf = English manual
The doc/ directory contains not only the manual with its source files but also
a few sample files.
+Distributions:
+The package is distributed both with MiKTeX and TeX Live and is packaged
+for Linux distros.
-Installation:
+Installation in MiKTeX:
+Use MiKTeX Console, see https://miktex.org/howto/miktex-console
+
+TeX Live:
+tlmgr install cnbwp
+
+Redhat packages:
+install texlive-cnbwp.noarch and texlive-cnb-doc.noarch by system
+packaging manager
+
+Debian packages:
+The package is a part of texlive-lang-czechslovak
+
+Installation in other distros:
1. put cnbwp.cls and cnbwpsizes.clo to the directory where latex expects packages,
preferably $TEXMF/tex/latex/cnbwp
@@ -28,5 +44,5 @@ Installation:
The license of the package is LPPL.
-Author: Z. Wagner, http://icebearsoft.euweb.cz
+Author: Z. Wagner, https://www.zdenek-wagner.eu
Developed for the Czech National Bank
diff --git a/macros/latex/contrib/cnbwp/cnbwp.cls b/macros/latex/contrib/cnbwp/cnbwp.cls
index 03951df228..9c93aa345f 100644
--- a/macros/latex/contrib/cnbwp/cnbwp.cls
+++ b/macros/latex/contrib/cnbwp/cnbwp.cls
@@ -1,6 +1,6 @@
-%% $Id: cnbwp.cls 67 2013-12-18 20:44:49Z zw $
+%% $Id: cnbwp.cls 85 2024-02-10 13:57:33Z zw $
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{cnbwp}[2013/12/18 LaTeX class for working papers of CNB]
+\ProvidesClass{cnbwp}[2024/02/09 LaTeX class for working papers of CNB]
% Figure and table numbering, hierarchical is the default
@@ -225,12 +225,12 @@
\CNB@tempdima=\textwidth \advance\CNB@tempdima -\wd\CNB@tempbox
\vbox to \headheight{\hsize\textwidth \vss
\hbox to \textwidth{\vbox{\hsize\wd\CNB@tempbox \box\CNB@tempbox}\hss
- \vbox{\hsize\CNB@tempdima \raggedright \textit{\the\CNB@authors}}}\CNB@psrule}}%
+ \vbox{\hsize\CNB@tempdima \raggedright \textit{\the\CNB@Pageauthors}}}\CNB@psrule}}%
\def\@oddhead{\let\thanks\@gobble\normalfont\normalsize
\setbox\CNB@tempbox=\hbox{\CNB@pshskip\thepage}%
\CNB@tempdima=\textwidth \advance\CNB@tempdima -\wd\CNB@tempbox
\vbox to \headheight{\hsize\textwidth \vss
- \hbox to \textwidth{\vbox{\hsize\CNB@tempdima \CNB@raggedleft \textit{\CNB@tit}}\hss
+ \hbox to \textwidth{\vbox{\hsize\CNB@tempdima \CNB@raggedleft \textit{\CNB@headertit}}\hss
\vbox{\hsize\wd\CNB@tempbox \box\CNB@tempbox}}\CNB@psrule}}}
\def\CNB@raggedleft{\parfillskip \z@ \leftskip 0pt plus .3\textwidth \relax \hskip 0mm plus .5\textwidth}
@@ -239,6 +239,7 @@
% Title page
\newtoks\CNB@autaddress
\newtoks\CNB@authors
+\newtoks\CNB@Pageauthors
\def\CNB@lastauthor{}
\def\CNB@add@address#1#2{\ifcat$\the\CNB@autaddress$
@@ -257,14 +258,37 @@
\fi
\fi}
-\def\author#1#2{\CNB@add@address{#1}{#2}\CNB@add@author@with@delim\CNB@comma
+\def\CNB@add@Pageauthor@with@delim#1{\ifcat$\the\CNB@Pageauthors$
+ \ifcat$\CNB@lastauthor$ \else \CNB@Pageauthors\expandafter{\CNB@lastauthor}\fi
+ \else
+ \ifcat$\CNB@lastauthor$ \else
+ \CNB@Pageauthors\expandafter\expandafter\expandafter
+ {\expandafter\the\expandafter\CNB@Pageauthors #1}% add delimiter
+ \CNB@Pageauthors\expandafter\expandafter\expandafter
+ {\expandafter\the\expandafter\CNB@Pageauthors\CNB@lastauthor}% expanded stored author
+ \let\CNB@and\CNB@comma@and
+ \fi
+ \fi}
+
+\def\author{\@ifnextchar[{\CNB@authorShort}{\CNB@authorLong}}
+
+\def\CNB@authorShort[#1]#2#3{\CNB@add@address{#2}{#3}\CNB@add@author@with@delim\CNB@comma
+ \def\CNB@lastauthor{#1}\CNB@add@Pageauthor@with@delim\CNB@comma
+ \def\CNB@lastauthor{#2}}
+
+\def\CNB@authorLong#1#2{\CNB@add@address{#1}{#2}\CNB@add@author@with@delim\CNB@comma
+ \def\CNB@lastauthor{#1}\CNB@add@Pageauthor@with@delim\CNB@comma
\def\CNB@lastauthor{#1}}
\def\CNB@comma{\unskip, \ignorespaces}
\def\CNB@and{\unskip\space and \ignorespaces}
\def\CNB@comma@and{\unskip, and \ignorespaces}
-\def\title#{\def\CNB@tit}
+%\def\title#{\def\CNB@tit}
+\def\title{\@ifnextchar[{\CNB@Pagetitle}{\CNB@Onlytitle}}
+\def\CNB@Pagetitle[#1]#2{\def\CNB@tit{#2}\def\CNB@headertit{#1}}
+\def\CNB@Onlytitle#1{\def\CNB@tit{#1}\def\CNB@headertit{#1}}
+
\long\def\acknowledge#1{\def\CNB@ack{\\#1}}
\def\CNB@ack{}
@@ -277,11 +301,14 @@
\vskip 25pt plus .333fil
\begin{center}
\let\@makefnmark\@gobble
- \large\the\CNB@authors\,$^*$\footnotetext{\the\CNB@autaddress \CNB@ack}
+ \large\the\CNB@authors\,$^*$\CNB@putack\par
\end{center}
\endgroup\setcounter{footnote}{0}%
}
+%\,$^*$\footnotetext{\the\CNB@autaddress \CNB@ack}
+\def\CNB@putack{\footnotetext{$^*$\the\CNB@autaddress \interlinepenalty-20 \CNB@ack}}
+
\def\CNB@indentenv #1#2:{\begingroup \parskip\z@ \leftskip 30mm \parindent -25mm
\rightskip \leftskip \advance\rightskip \parindent
\aftergroup#1\normalfont
diff --git a/macros/latex/contrib/cnbwp/doc/cnbpaper.pdf b/macros/latex/contrib/cnbwp/doc/cnbpaper.pdf
index d0d7be5de2..8e7e3b4ad3 100644
--- a/macros/latex/contrib/cnbwp/doc/cnbpaper.pdf
+++ b/macros/latex/contrib/cnbwp/doc/cnbpaper.pdf
Binary files differ
diff --git a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.pdf b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.pdf
index 1c5cb8c3cf..54198b52a7 100644
--- a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.pdf
+++ b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.pdf
Binary files differ
diff --git a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.tex b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.tex
index 61fbe6bc17..484fd32f68 100644
--- a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.tex
+++ b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-cs.tex
@@ -4,7 +4,7 @@
\usepackage{cnbwp-manual}
\setdefaultlanguage{czech}
\title{Návod k použití třídy \fn{cnbwp} pro psaní Working~Papers~ČNB}
-\author{Zdeněk Wagner}\date{verze 2013.12}
+\author{Zdeněk Wagner}\date{verze 2024.02}
\def\?li{\discretionary{-}{-}{-}li}
\begin{document}
\maketitle
@@ -50,87 +50,34 @@ závažné chybě, případně k chybě s exotickým hlášením, takže její p
\section{Instalace}\label{instalace}\index{instalace}
Veškerá makra pro psaní Working Papers České národní banky jsou implementována v třídě
-\fn{cnbwp.cls}. Třída je distribuována v archivním souboru \fn{cnbwp.zip}. Soubor je v archivu
-uložen s cestou odpovídající standardu TDS~(\TeX\ Directory Structure). Způsob instalace se
-nepatrně liší v závislosti na konkrétní distribuci \TeX{}u.
+\fn{cnbwp.cls}. Třída včetně dokumentace je nyní součástí běžných distribucí \TeX{}u, takže ji
+můžete nainstalovat nástroji své distribuce.
\subsection{\MikTeX}\label{inst.miktex}
-Soubor \fn{cnbwp.zip} rozbalíme do adresáře \url{X:\localtexmf}, kde \texttt{X:} označuje disk, na
-němž je \MikTeX{} instalován (obvykle~\texttt{C:}). Poté otevřeme menu
-\zwurl{Start/Programy/MikTeX/MikTeX Options}. Na kartě Roots si ověříme, že \url{X:\localtexmf} je
-v seznamu prohledávaných adresářů. Pokud není, přidáme jej. Pak stiskneme tlačítko \texttt{Refresh
-FNDB}. Úspěšnost instalace lze ověřit příkazem:
-
-\begin{verbatim}
-findtexmf cnbwp.cls
-\end{verbatim}
-
-\noindent Při úspěšné instalaci bude vypsána plná cesta k souboru \fn{cnbwp.cls}.
-
-\pozor Adresář \url{X:\localtexmf} je určen pro místní soubory, které nejsou standardní součástí
-\MikTeX u. Pokud přeinstalujete \MikTeX\ novou verzí, nebude tento adresář přepsán, takže o soubory
-nepřijdete.
-
-\subsection{\teTeX}\label{inst.tetex}
-Tato distribuce je standardem v unixových systémech a je dostupná i pro OS/2 resp. eComStation.
-Uvedeme si pouze instalaci v Linuxu. Instalace v OS/2 je obdobná. Liší se jen tím, že pro
-oddělování adresářů je užito zpětné lomítko a musíme explicitně zadat označení disku, na nějž jsme
-\teTeX\ nainstalovali.
-
-Soubor \fn{cnbwp.zip} rozbalíme do adresáře \url{/usr/share/texmf-local}. Při instalaci v unixových
-systémech je nutno dohlédnout na to, aby soubor
-\url{/usr/share/texmf-local/tex/latex/cnb/cnbwp.cls} neměl DOSové konce řádků. Po rozbalení souboru
-je obvykle nutné obnovit souborovou databázi příkazem \texttt{mktexlsr}.
-
-Z této distribuce vychází i \TeXLive, proto vše, co bude popsáno v následující kapitole, platí i
-pro \teTeX.
+Třída cnbwp je součástí distribuce a lze ji nainstalovat použitím konzoly. V konzoli je též možno
+povolit automatickou instalaci, takže balíček bude nainstalován, kdy jej dokument bude potřebovat.
\subsection{\TeXLive}\label{inst.tl}
-\TeXLive\ je oblíbenou multiplatformní distribucí \TeX{}u. Vychází ze stejných zdrojů jako
-\hyperref[inst.tetex]{\teTeX}, instalace je tedy podobná. Adresář, do nějž rozbalíme
-\fn{cnbwp.zip}, je většinou \url{/usr/local/texlive/texmf-local} v unixových systémech,
-\url{X:\TeXLive\texmf-local} ve
-Windows. \TeXLive\ však lze nainstalovat do libovolného adresáře a dokonce můžeme mít instalováno
-několik verzí \TeXLive\ současně. Adresář, do nějž máme \fn{cnbwp.zip} rozbalit, zjistíme příkazem:
-
-\begin{verbatim}
-kpsewhich --expand-var=$TEXMFLOCAL
-\end{verbatim}
-\index{kpsewhich}
-
-Adresářový strom \url{texmf-local} je sdílen všemi verzemi \TeXLive\ nainstalovaných na daném
-počítači. Při instalaci novější verze \TeXLive\ budou soubory nalezeny automaticky.
-
-\pozor Distribuce \TeXLive\ obvykle vyžaduje po přidání souborů spuštění programu
-\texttt{mktexlsr}. V distribucích pro Windows pro tento účel existuje i položka v Menu \TeXLive.
-Pokud programem \texttt{mktexlsr} neobnovíme databázi a před jménem adresáře s třídou \fn{cnbwp}
-jsou uvedeny dva vykřičníky, \LaTeX\ nebude schopen třídu najít. Chceme\?li zjistit, zda \LaTeX\
-třídu najde, použijeme příkaz:
+\TeXLive\ je oblíbenou multiplatformní distribucí \TeX{}u. Třída cnbwp je součástí distribuce a lze
+ji nainstalovat v terminálovém okně příkazem
\begin{verbatim}
-kpsewhich cnbwp.cls -progname latex
+tlmgr install cnbwp
\end{verbatim}
-\noindent
-Pokud je vše v pořádku, příkaz vypíše plnou cestu k souboru \fn{cnbwp.cls}.
-
-\subsection{\emTeX}\label{inst.emtex}
-Tato distribuce je zastaralá, Eberhard Mattes ji už neudržuje. Je vhodnější přejít na jinou
-distribuci. Pokud přesto chcete používat \emTeX, rozbalte \fn{cnbwp.zip} do pomocného adresáře, v
-adresáři \url{X:\emtex\texinput\latex2e} vytvořte podadresář \fn{cnbwp} a do něj zkopírujte soubory
-\fn{cnbwp.cls} a \fn{cnbwpsizes.clo}.
+\subsection{Jiné distribuce}\label{inst.other}
+Při instalaci třídy \fn{cnbwp} do jiných distribucí je nutno řídit se manuálem dodávaným s
+příslušnou distribucí. V podstatě je nutné najít adresář, kde distribuce očekává třídy a styly pro
+\LaTeX, a do něj vložit soubory \fn{cnbwp.cls} a \fn{cnbwpsizes.clo}. Do adresáře, kde jsou
+očekávány soubory pro \BibTeX, je nutno vložit \fn{abbrvcnb.bst}. V některých distribucích je nutno
+obnovit databázi jmen souborů.
\subsection{Scientific Word}\label{inst.sciword}
Návod je psán pro verzi 5.5. V této verzi rozbalte \fn{cnbwp.zip} do adresáře \url{X:\sw55\TCITeX},
-v jiných verzích se pravděpodobně bude lišit jméno kořenového adresáře. Scientific Word nedodržuje
-zcela přesně TDS, jména adresářů obsahují malá i velká písmena. Souborové systémy FAT a NTFS však
-malá a velká písmena nerozlišují, takže by to nemělo způsobit žádný problém.
-
-\subsection{Jiné distribuce}\label{inst.other}
-Při instalaci třídy \fn{cnbwp} do jiných distribucí je nutno řídit se manuálem dodávaným s
-příslušnou distribucí. Současné distribuce jsou založeny obvykle na \fn{web2c} a dodržují standard
-TDS, proto lze postupovat obdobně jako při instalaci pro \hyperref[inst.tl]{\TeXLive, viz
-kap.~\ref*{inst.tl}}.
+v jiných verzích se pravděpodobně bude lišit jméno kořenového adresáře. Zde vytvořte adresář
+\url{tex\latex\cnbwp} pro soubory \fn{cnbwp.cls} a \fn{cnbwpsizes.clo} a adresář
+\url{bibtex\bst\cnbwp} pro \fn{abbrvcnb.bst}. Kromě nakopírování těchto souborů žádná další akce
+není nutná.
\subsection{Zpracování dokumentů ze Scientific Wordu v~jiných
distribucích}\label{sciword.elsewhere}
@@ -143,9 +90,9 @@ podle toho, jakou distribuci používáte.
příkazem \texttt{mktexlsr}, nebo z menu.
\section{Testování instalace}\label{test.inst}
-V mnoha distribucích lze správnost instalace otestovat příkazem \texttt{kpsewhich}, jak bylo uvedeno
-v kapitole~\ref{inst.tl}. Můžeme tak ověřit, že \LaTeX\ dokáže najít třídu \fn{cnbwp} i makra z
-adresáře \fn{SWmacros}. Nemáme\?li program \texttt{kpsewhich} ve své distribuci, stačí napsat
+V mnoha distribucích lze správnost instalace otestovat příkazem \texttt{kpsewhich}, nebo
+\texttt{findtexmf} v závislosti na distribuci \TeX{}u. Můžeme tak ověřit, že \LaTeX\ dokáže najít třídu \fn{cnbwp} i makra z
+adresáře \fn{SWmacros}. Nemáme\?li ve své distribuci žádný z těchto programů, stačí napsat
jednoduchý dokument:
\begin{verbatim}
@@ -307,25 +254,34 @@ preambuli. Přesněji řečeno, makra, definující název, jména autorů a pod
\cmd{documentclass} a \cmd{maketitle}. Jejich uvedení na samém začátku souboru tedy může
být užitečné.
-Název práce zadáváme jako argument makra \xx\cmd{title}. Název bude vytištěn později, až uvedeme
-příkaz \xx\cmd{maketitle}, ale dostane se též do záhlaví:
+Název práce zadáváme jako parameter makra \xx\cmd{title}.
+Volitelným parametrem makra \xx\cmd{title} je alternativní název pro záhlaví strany. Volitelný parametr předchází povinné parametry.
+Název bude vytištěn později, až uvedeme
+příkaz \xx\cmd{maketitle}, ale dostane se též do záhlaví:
\begin{verbatim}
-\title{Fidlovačka aneb žádný hněv a žádná rvačka}
+\title{Fidlovačka aneb žádný hněv a žádná rvačka},
\end{verbatim}
+nebo
+\begin{verbatim}
+\title[Jenom Fidlovačka]{Fidlovačka aneb žádný hněv a žádná rvačka}
+\end{verbatim}
+
-Jména autorů zapisujeme pomocí makra \xx\cmd{author}, které vyžaduje dva parametry. V prvním
-parametru je uvedeno plné jméno, v druhém parametru název instituce. Makro se uvede pro každého
-autora samostatně např. takto:
+Jména autorů zapisujeme pomocí makra \xx\cmd{author}, které vyžaduje dva parametry a má jeden volitelný parameter. V prvním
+parametru je uvedeno plné jméno, v druhém parametru název instituce.
+Volitelným parametrem je zkrácená forma jména, která se použije jen pro záhlaví strany. Volitelný parametr předchází povinné parametry.
+Makro se uvede pro každého autora samostatně např. takto:
\begin{verbatim}
\author{Kapitán Nemo}{Nautilus}
-\author{Robinson Crusoe}{Pustý ostrov}
+\author[R. Crusoe]{Robinson Crusoe}{Pustý ostrov}
\end{verbatim}
Makro \xx\cmd{maketitle} doplní před jméno posledního autora spojku „and“ podle britských pravidel,
tj. čárka je uvedena pouze v případě, že práce má více než dva autory.
-Jména autorů jsou též přenesena do záhlaví.
+
+Jména autorů jsou přenesena do záhlaví dle volby.
\subsubsection{Poděkování}\label{ack}
Poděkování je nepovinnou součástí Working Paper. Uvádíme jej v argumentu makra
@@ -621,6 +577,7 @@ První čárka (uvnitř závorek) je součástí seznamu autorů, druhá čárka
anglických pracích uvádíme čárku před \textit{and} v případě, kdy citace má více než dna
autory.
+\DeclareRobustCommand\minus{-}% \xx\cmd{-} triggers an error
\pozor Zapomenutá
čárka nebo vynechané závorky okolo hodnoty obsahující čárku mají za následek chybové hlášení o
neznámé položce s podivným jménem. Někdy se kvůli chybám tohoto typu může dokonce ztratit velká
@@ -629,7 +586,7 @@ neznámé položce s podivným jménem. Někdy se kvůli chybám tohoto typu mů
V databázových souborech určených pro zpracování \BibTeX{}em často používáme složené závorky, jimiž
zabraňujeme konverzi na malá či velká písmena. \LaTeX\ žádné konverze neprovádí, proto závorky
nepotřebujeme. Můžeme však použít různá makra, např. \xx\cmd{mbox} pro zabránění nevhodnému dělení,
-\xx\cmd{-} k určení vhodného místa dělení slova, a dokonce si můžeme přímo uvnitř prostředi
+\xx\cmd{\minus} k určení vhodného místa dělení slova, a dokonce si můžeme přímo uvnitř prostředi
\xx\texttt{thebibliography} definovat vlastní makra, jež budou v ostatních částech dokumentu
neznámá (nebo definovaná jinak).
@@ -1337,8 +1294,12 @@ Pokud budete používat soubor \fn{cnbpaper.tex} jako šablonu svého dokumentu,
které balíčky skutečně potřebujete. Nepotřebné příkazy \cmd{usepackage} vymažte. Je možné, že
budete potřebovat nějaké další balíčky. Jedním z nich může být \xx\fn{amsmath}.
-\section{Změny, verze 2013.12}
+\section{Změny}
+
+\subsection{Verze 2013.12}
+
V prosinci 2013 byly provedeny tyto změny:
+
\begin{enumerate}
\item Zrušeny přepínače 11pt a 12pt pro nastavení velikosti písma v dokumentu.
\item Změna způsobu zadávání autorů, změna syntaxe makra \cmd{author}.
@@ -1354,6 +1315,15 @@ V prosinci 2013 byly provedeny tyto změny:
\item Aktualizován manuál.
\end{enumerate}
+\subsection{Verze 2024.2}
+
+V únoru 2024 byly provedeny tyto změny:
+
+\begin{enumerate}
+\item Přidány volitelné parametry pro sázení hlavičky strany v makrech \author a \title
+\item Aktualizován manuál.
+\end{enumerate}
+
\appendix
\section{P\v{r}\'iloha}\label{priloha}
V příloze je uveden příklad všech typů prací zapsaných pomocí maker z kapitoly~\ref{makra} a jejích
diff --git a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.pdf b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.pdf
index 6881164f27..c14cd12ec7 100644
--- a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.pdf
+++ b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.tex b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.tex
index c77626f57d..d59cad7381 100644
--- a/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.tex
+++ b/macros/latex/contrib/cnbwp/doc/cnbwp-manual-en.tex
@@ -4,7 +4,7 @@
\usepackage{cnbwp-manual}
\setdefaultlanguage{english}
\title{Manual for Using the \fn{cnbwp} Class to Write CNB~Working~Papers}
-\author{Zdeněk Wagner}\date{version 2013.12}
+\author{Zdeněk Wagner}\date{version 2024.02}
\begin{document}
\maketitle
@@ -48,97 +48,35 @@ error with a strange message (such that the cause of the error will be difficult
occur during document preparation.
\section{Installation}\label{instalace}\index{installation} All macros used for writing CNB Working
-Papers are implemented in the \fn{cnbwp.cls} class. The class is distributed in the archive file
-\fn{cnbwp.zip}. The file is saved in the archive with a path conforming to the TDS~(\TeX\ Directory
-Structure) standard. The installation method varies slightly depending on the specific \TeX{}
-distribution.
-
-\subsection{\MikTeX}\label{inst.miktex} Extract the \fn{cnbwp.zip} file to the \url{X:\localtexmf}
-directory, where \texttt{X:} denotes the disk on which \MikTeX{} is installed
-(usually~\texttt{C:}). Then open the menu \zwurl{Start/Programy/MikTeX/MikTeX Options}. On the
-Roots tab, check that \url{X:\localtexmf} is on the list of directories searched. If not, add it.
-Then click \texttt{Refresh FNDB}. To determine whether \LaTeX\ will locate the class, use
-the command:
+Papers are implemented in the \fn{cnbwp.cls} class. The class is nowadays available as a part of
+the \TeX\ distributions. You can thus install it by the tools of the distribution.
-\begin{verbatim}
-findtexmf cnbwp.cls
-\end{verbatim}
+\subsection{\MikTeX}\label{inst.miktex}
+This class is distributed with \MikTeX\ and can be installed from its console. It is even possible to
+enable \textit{installation on the fly} and the package will then be installed authomatically when
+needed.
-\noindent If everything is OK, the command will print the full path for the \fn{cnbwp.cls}
-file.
-
-\pozor The \url{X:\localtexmf} directory is intended for local files that are not a
-standard
-component of \MikTeX. If you update \MikTeX\, this directory will not be overwritten, so
-you will
-not lose the files.
-
-\subsection{\teTeX}\label{inst.tetex} This distribution is the standard in Unix systems
-and is also
-available for OS/2 and eComStation. We will describe the installation in Linux only. The
-installation in OS/2 is similar, differing only in that a backslash is used to separate
-the
-directories and the name of the disk on which \teTeX\ has been installed must be entered
-explicitly.
-
-Extract the \fn{cnbwp.zip} file to the \url{/usr/share/texmf-local} directory. When
-installing in
-Unix systems, you must make sure that the
-\url{/usr/share/texmf-local/tex/latex/cnb/cnbwp.cls} file
-does not have DOS line ends. Once the file has been extracted, the file database usually
-needs to
-be refreshed using the \texttt{mktexlsr} command.
-
-\TeXLive\ is based on this distribution, so everything described in the following
-section applies to \teTeX\ as well.
-
-\subsection{\TeXLive}\label{inst.tl} \TeXLive\ is a popular multiplatform \TeX{} distribution. It
-comes from the same sources as \hyperref[inst.tetex]{\teTeX}, so the installation is similar. The
-directory to which \fn{cnbwp.zip} should be extracted is usually
-\url{/usr/local/texlive/texmf-local} in Unix
-systems and \url{X:\TeXLive\texmf-local} in Windows. However, \TeXLive\ may be installed
-in any
-directory and you can even have several versions of \TeXLive\ installed simultaneously.
-The
-directory to which \fn{cnbwp.zip} should be extracted can be determined using the command:
+\subsection{\TeXLive}\label{inst.tl}
+\TeXLive\ is a popular multiplatform \TeX{} distribution. It includes the package which can be
+installed from the command line by
\begin{verbatim}
-kpsewhich --expand-var=$TEXMFLOCAL
+tlmgr install cnbwp
\end{verbatim}
-\index{kpsewhich}
-
-The \texttt{texmf-local} directory tree is shared by all \TeXLive\ versions installed on
-a computer. If a newer version is installed, the files will automatically be found.
-
-\pozor The \TeXLive\ distribution usually requires \texttt{mktexlsr} to be run after the files have
-been added. In distributions for Windows there is even an item in the \TeXLive menu for this
-purpose. If the database is not refreshed using \texttt{mktexlsr} and two exclamation marks are
-given in front of the name of the directory containing the \fn{cnbwp} class, \LaTeX\ will not be
-able to locate the class. To determine whether \LaTeX\ will locate the class, use the command:
-
-\begin{verbatim}
-kpsewhich cnbwp.cls -progname latex
-\end{verbatim}
-
-\noindent If everything is OK, the command will print the full path for the \fn{cnbwp.cls} file.
-
-\subsection{\emTeX}\label{inst.emtex} This distribution is obsolete and Eberhard Mattes no longer
-maintains it. It is better to switch to another distribution. However, if you do want to use
-\emTeX, extract \fn{cnbwp.zip} to an auxiliary directory, create a \fn{cnb} subdirectory
-in
-\url{X:\emtex\texinput\latex2e} and copy \fn{cnbwp.cls} and \fn{cnbwpsizes.clo} into it.
+
+\subsection{Other Distributions}\label{inst.other}
+To install the \fn{cnbwp} class in other
+distributions you will need to follow the instructions given in the manual supplied with the
+relevant distribution. Generally, you have to find path where the distribution expects \LaTeX\
+class and style files an put \fn{cnbwp.cls} and \fn{cnbwpsizes.clo} there. Afterwards you have to
+put \fn{abbrvcnb.bst} to the directory where the \BibTeX\ files are expected. It might be necessary
+to refresh the filename database.
\subsection{Scientific Word}\label{inst.sciword} This manual is written for version 5.5. In this
version, extract \fn{cnbwp.zip} to \url{X:\sw55\TCITeX}. In other versions the name of the root
-directory will probably differ. Scientific Word does not adhere strictly to TDS, as the directory
-names contain both lower-case and upper-case letters. However, the FAT and NTFS file systems are
-not case sensitive, so this should not cause any problems.
-
-\subsection{Other Distributions}\label{inst.other} To install the \fn{cnbwp} class in other
-distributions you will need to follow the instructions given in the manual supplied with the
-relevant distribution. The current distributions are usually based on \fn{web2c} and conform to the
-TDS standard, so the installation procedure is analogous to that for \hyperref[inst.tl]{\TeXLive,
-see section~\ref*{inst.tl}}.
+directory will probably differ. In this folder you should create \url{tex\latex\cnbwp} for files
+\fn{cnbwp.cls} and \fn{cnbwpsizes.clo}, and \url{bibtex\bst\cnbwp} for \fn{abbrvcnb.bst}. Nothing
+else is needed.
\subsection{Preparing Documents from Scientific Word in Other
Distributions}\label{sciword.elsewhere} Documents created using Scientific Word require specific
@@ -150,10 +88,11 @@ using.
\pozor Remember that in some distributions after adding files you have to refresh the database
either using the \texttt{mktexlsr} command or from the menu.
-\section{Testing the Installation}\label{test.inst} In many distributions the installation can be
-tested using the \texttt{kpsewhich} command, as mentioned in section~\ref{inst.tl}. This enables
+\section{Testing the Installation}\label{test.inst} Successfull installation can be
+verified using the \texttt{kpsewhich} or \texttt{findtexmf} command depending on the \TeX\
+distribution. This allows
you to check whether \LaTeX\ is able to locate the \fn{cnbwp} class and the macros from the
-\fn{SWmacros} directory. If you do not have \texttt{kpsewhich} in your distribution, all you need
+\fn{SWmacros} directory. If you do not have any of these commands in your distribution, all you need
to do is write a simple document:
\begin{verbatim}
@@ -343,24 +282,23 @@ the title, the names of the authors and the acknowledgements can be written anyw
between \cmd{documentclass} and
\cmd{maketitle}. It can thus be useful to place them right at the beginning of the file.
-The title of the work is written as the argument of the \xx\cmd{title} macro. The title
-will be
-printed later, after you write the \xx\cmd{maketitle} command, but it will also be put in
-the
-header:
+The title of the work is written as the argument of the \xx\cmd{title} macro. It will also be put in the page header. This macro accepts also one optional parameter when alternative form should be used for the page header. The title will be printed later, after you write the \xx\cmd{maketitle} command:
\begin{verbatim}
\title{Twelfth Night, or What You Will}
\end{verbatim}
+or optionally
+\begin{verbatim}
+\title[12. Night]{Twelfth Night, or What You Will}
+\end{verbatim}
-The names of the authors are entered using the \xx\cmd{author} macro that requires two
-parameters. The first parameter conains the full name. The authors' institution is
-entered in the second argument , e.g. as follows:
+The names of the authors are entered using the \xx\cmd{author} macro that requires two parameters and has one optional parameter. The first parameter defines the full name. The authors' institution is
+entered in the second argument. Optionally, the short for of the name may be used and will be used just for the page header. Optional parameter is the first parameter, e.g. as follows:
\begin{verbatim}
\author{Captain Nemo}{Nautilus}
-\author{Robinson Crusoe}{Desert Island}
+\author[R. Crusoe]{Robinson Crusoe}{Desert Island}
\end{verbatim}
\subsubsection{Acknowledgements}\label{ack} Acknowledgements are an optional part of a
@@ -1431,7 +1369,7 @@ document or chapter (in the case of a book). You should therefore specify more t
option so
that \LaTeX\ has a choice. Stating the [h]\index{h@[h]} specifier alone usually results in
the
-float being shifted to a separate page or to the end of the document.
+float being shifted to a separate page or to the end of the document.
In some cases the float \textbf{has to be} in a specific location. You thus have to tell
\LaTeX\
@@ -1792,8 +1730,11 @@ packages you really need. Delete any unnecessary \cmd{usepackage} commands. You
some
additional packages, such as \xx\fn{amsmath}.
-\section{Changes, Version 2013.12}
+\section{Changes}
+
+\subsection{Version 2013.12}
The following changes were made in December, 2013:
+
\begin{enumerate}
\item Switches 11pt and 12pt for changing the font size were removed.
\item The syntax of the \cmd{author} macro was changed.
@@ -1809,6 +1750,14 @@ the \fn{abstrakt} environment.
\item The manual was updated.
\end{enumerate}
+\subsection{Version 2024.2}
+The following changes were made in February, 2024:
+
+\begin{enumerate}
+\item Optional parameters for typesetting page headers were added for \author and \title macros.
+\item The manual was updated.
+\end{enumerate}
+
\appendix
\section{Appendix}\label{priloha}
The annex gives examples of all types of works written using the macros from
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 16f5b792c0..a69d7de48b 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/02/12}{2024ac}
+\ProvidesExplClass{easybook}{2024/02/16}{2024ad}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/02/12}{2024ac}
+\ProvidesExplPackage{easybase}{2024/02/16}{2024ad}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1831,12 +1831,23 @@
\everymath{\displaystyle}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
+\dim_new:N \hangwd
\cs_set_protected:Npn \hangpara #1#2
{
\dim_set:Nn \hangindent {#1}
\int_set:Nn \hangafter {#2}
\noindent\ignorespaces
}
+\NewDocumentCommand{\hangfrom}{sO{\hangwd}mO{1}}
+ {
+ \hbox_set:Nn \l_tmpa_box {#3}
+ \dim_set:Nn \hangwd { \box_wd:N \l_tmpa_box }
+ \hangpara{#2}{#4}
+ \IfBooleanTF{#1}
+ {\hbox_to_wd:nn {#2} { }}
+ {\box_use_drop:N \l_tmpa_box}
+ \ignorespaces
+ }
\DeclareDocumentEnvironment{hangparas}{mm+b}
{
\dim_zero:N \parindent
@@ -2341,7 +2352,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/12}{2024ac}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/16}{2024ad}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 1cb2868c87..dbddf2a96c 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index a1ddad3ca6..3a725ee03c 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024ac,
- date = 2024/02/12,
+ version = v2024ad,
+ date = 2024/02/16,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -1083,6 +1083,12 @@
\begin{commands}
\command{hangpara}[\marg{缩进长度}\marg{缩进开始行数}]
悬挂缩进命令 \cs{hangpara} 使其后的一个段落保持悬挂缩进。参数与 \env{hangparas} 环境相同,不过只有一个段落。\meta{缩进长度} 可以是带单位的数值或由文本长度测定命令 \cs{widthof} 提供。
+ \command{hangfrom}[\sarg\oarg{缩进长度}\marg{悬挂内容}\oarg{缩进开始行数}]\newtag%
+ 指定首行的 \meta{悬挂内容},其后一个段落保持悬挂缩进。\meta{缩进长度} 默认为 \meta{悬挂内容} 文本长度 \cs{hangwd} 的值,支持数学表达式。\meta{缩进开始行数} 默认为 \code{1}。如果是带有星号参数的命令,则首行不输出 \meta{悬挂内容},以等于 \meta{缩进长度} 长度的空白代替。
+ \begin{ctexexam}
+ \hangfrom[\hangwd + 1em]{悬挂标签\hspace{0.5em}}[1]
+ \hangfrom*[3em]{}
+ \end{ctexexam}
\end{commands}
\begin{environments}
@@ -1352,12 +1358,13 @@
\shortversion{v = 1.638,date = 2022/03/04,changes = 增加目录条目样式选项注册命令 \cs{RegisterTocName}。}
\shortversion{v = 1.644,date = 2022/03/10,changes = 增加浮动环境目录声明命令 \cs{DeclareFloatList} 配合 \pkg*{caption} 宏包。}
\shortversion{v = 1.682,date = 2022/05/01,changes = 将迷你页判断命令 \cs{notminipage} 改为被保护命令兼容 \pkg*{circledtext} 宏包。}
- \begin{version}[v = 2024ac,date = 2024/02/12,simple]
+ \begin{version}[v = 2024ad,date = 2024/02/16,simple]
\item 核对依赖宏包的更新改动,优化使用手册的内容细节。
\item 修复图表等浮动环境题注目录中条目标签编号的计数器值显示错误问题。
\item 修复附录命令 \cs{appendix} 的可选参数设置英文目录中条目名字和编号失效的问题。
\item 新增目录风格定义命令 \cs{SetTocStyle} 和使用命令 \cs{UseTocStyle}。
\item 新增脚注段落文本格式定义命令 \cs{deffntpara} 和脚注间距离选项 \option{footnotesep}。
+ \item 新增悬挂缩进命令 \cs{hangfrom}。
\end{version}
\end{changelog}
\nocite{*}
diff --git a/macros/latex/contrib/functional/README.txt b/macros/latex/contrib/functional/README.txt
index f15c24459f..806939deea 100644
--- a/macros/latex/contrib/functional/README.txt
+++ b/macros/latex/contrib/functional/README.txt
@@ -1,5 +1,5 @@
Functional: Intuitive Functional Programming Interface for LaTeX2
-Copyright : 2022-2023 (c) Jianrui Lyu <tolvjr@163.com>
+Copyright : 2022-2024 (c) Jianrui Lyu <tolvjr@163.com>
CTAN Page : https://ctan.org/pkg/functional
Repository: https://github.com/lvjr/functional
Repository: https://bitbucket.org/lvjr/functional
diff --git a/macros/latex/contrib/functional/functional.pdf b/macros/latex/contrib/functional/functional.pdf
index 2bd469d994..26f7701a5d 100644
--- a/macros/latex/contrib/functional/functional.pdf
+++ b/macros/latex/contrib/functional/functional.pdf
Binary files differ
diff --git a/macros/latex/contrib/functional/functional.sty b/macros/latex/contrib/functional/functional.sty
index 1a4307276f..65b12ba750 100644
--- a/macros/latex/contrib/functional/functional.sty
+++ b/macros/latex/contrib/functional/functional.sty
@@ -14,7 +14,7 @@
\NeedsTeXFormat{LaTeX2e}[2018-04-01]
\RequirePackage{expl3}
-\ProvidesExplPackage{functional}{2023-01-07}{2023A}
+\ProvidesExplPackage{functional}{2024-02-16}{2024A}
{^^JIntuitive Functional Programming Interface for LaTeX2}
\cs_generate_variant:Nn \iow_log:n { V }
@@ -2320,7 +2320,7 @@
\prop_new:N \gTmpiProp \prop_new:N \gTmpjProp \prop_new:N \gTmpkProp
\prop_new:N \g@FunTmpxProp \prop_new:N \g@FunTmpyProp \prop_new:N \g@FunTmpzProp
-\prop_set_eq:NN \cEmptyProp \c_empty_prop
+\prop_const_from_keyval:Nn \cEmptyProp {}
\prgNewFunction \propNew { M } { \prop_new:N #1 }
diff --git a/macros/latex/contrib/functional/functional.tex b/macros/latex/contrib/functional/functional.tex
index 33d9a53f19..3b36c8579a 100644
--- a/macros/latex/contrib/functional/functional.tex
+++ b/macros/latex/contrib/functional/functional.tex
@@ -3,7 +3,7 @@
\documentclass[oneside]{book}
\usepackage[a4paper,margin=2.5cm]{geometry}
-\newcommand*{\myversion}{2023A}
+\newcommand*{\myversion}{2024A}
\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
@@ -207,8 +207,8 @@ Both examples calculate first the square of $5$ and produce $25$,
then calculate the square of $25$ and produce $625$.
In contrast to \verb!expl3!, this \verb!functional! package
does evaluation of functions from inside to outside,
-which means composition of functions works like othe programming languages
-such as \verb!Lua! or \verb!JavsScript!.
+which means composition of functions works like other programming languages
+such as \verb!Lua! or \verb!JavaScript!.
You can define new functions with \cs{prgNewFunction} command.
To make composition of functions work as expected,
@@ -317,7 +317,7 @@ print(a) ---- 1
Same as \verb!expl3!, the names of local variables \emph{must} start with \verb!l!,
while names of global variables \emph{must} start with \verb!g!.
The difference is that \verb!functional! package provides only one function for setting
-both local and global varianbles of the same type,
+both local and global variables of the same type,
by checking leading letters of their names. So for integer variables, you can write
\verb!\intSet\lTmpaInt{1}! and \verb!\intSet\gTmpbInt{2}!.
@@ -481,7 +481,7 @@ and many expansion functions for expanding them, which are necessary for power u
Within \verb!functional! package, there are only three variants
(\verb!c!, \verb!e!, \verb!V!) are provided, and these variants are defined
-as functions (\cs{expName}, \cs{expWhole}, \cs{expValue}, respetively),
+as functions (\cs{expName}, \cs{expWhole}, \cs{expValue}, respectively),
which are easier to use for regular users.
\begin{demohigh}
@@ -1719,9 +1719,9 @@ If the \meta{token list} is blank, the result is empty.
\section{Mapping over Token Lists}
-All mappings are done at the current group level, \emph{i.e.} any
-local assignments made by the \meta{function} or \meta{code} discussed
-below remain in effect after the loop.
+%All mappings are done at the current group level, \emph{i.e.} any
+%local assignments made by the \meta{function} or \meta{code} discussed
+%below remain in effect after the loop.
%\begin{function}{\tlMapFunction}
%\begin{syntax}
@@ -2641,9 +2641,9 @@ $-1$ is the right-most character, \emph{etc.}
\section{Mapping over Strings}
-All mappings are done at the current group level, \emph{i.e.} any
-local assignments made by the \meta{function} or \meta{code} discussed
-below remain in effect after the loop.
+%All mappings are done at the current group level, \emph{i.e.} any
+%local assignments made by the \meta{function} or \meta{code} discussed
+%below remain in effect after the loop.
%\begin{function}{\strMapFunction,\strVarMapFunction}
%\begin{syntax}
diff --git a/macros/latex/contrib/pynotebook/README.md b/macros/latex/contrib/pynotebook/README.md
new file mode 100644
index 0000000000..e291f076ed
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/README.md
@@ -0,0 +1,6 @@
+pynotebook is a package to present (raw, markdown or python) codes (and execution with lualatex) as in a jupyter notebook.
+--------------------------------------------------------------------------------------------------------------------------
+
+Author....: Cédric Pierquet
+email.....: cpierquet@outlook.fr
+Licence...: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
diff --git a/macros/latex/contrib/pynotebook/doc/pynotebook-doc.pdf b/macros/latex/contrib/pynotebook/doc/pynotebook-doc.pdf
new file mode 100644
index 0000000000..d688335cf9
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/doc/pynotebook-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/pynotebook/doc/pynotebook-doc.tex b/macros/latex/contrib/pynotebook/doc/pynotebook-doc.tex
new file mode 100644
index 0000000000..ef408c246b
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/doc/pynotebook-doc.tex
@@ -0,0 +1,482 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[english,11pt,a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{pynotebook}
+\usepackage{enumitem}
+\usepackage{soul}
+\usepackage{codehigh}
+\usepackage{multicol}
+\usepackage{fontawesome5}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+%\rhead{\sffamily\small\affloetalab[Legende]}
+\lfoot{\sffamily\small [pynotebook]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\usepackage{xspace}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+
+\def\TPversion{0.1.0}
+\def\TPdate{15/02/2024}
+
+\sethlcolor{lightgray!25}
+\NewDocumentCommand\ShowCode{ m }{%
+ \hl{\vphantom{\texttt{pf}}\texttt{#1}}%
+}
+
+\usepackage{babel}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{pynotebook}}\\
+ \\
+ {\LARGE Present a Jupyter notebook, with} \\
+ {\LARGE tcolorbox, and listings or piton/pyluatex.} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/pynotebook}}
+\end{tabular}
+\end{center}
+
+\hrule
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+\hrule
+
+\vspace*{5mm}
+
+\vfill~
+
+\pagebreak
+
+\section{Samples, with listings}
+
+\begin{NotebookMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}
+
+It's possible to use \LaTeX{} formulas, like %
+\[
+\left\lbrace\begin{array}{l}
+ F_0 = 0\\
+ F_1 = 1 \\
+ F_{n+2} = F_{n+1} + F_n
+\end{array}\right.
+\]
+\end{NotebookMarkdown}
+
+\begin{NotebookRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookRaw}
+
+\begin{NotebookIn}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}{\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+%\vspace*{5mm}
+%
+%\begin{center}
+% With \ShowCode{piton} and \ShowCode{pyluatex} (with code execution, but with \hologo{LuaLaTeX} and \textsf{--shell-escape}) :
+%\end{center}
+%
+%\includegraphics[clip]{pynotebook-samples-pitonpyluatex.pdf}
+
+\vfill~
+
+\section{History}
+
+\verb|v0.1.0|~:~~~~Initial version
+
+\vspace*{15mm}
+
+\pagebreak
+
+\section{The package pynotebook}
+
+\subsection{Ideas}
+
+The idea is to provides environments to reproduce a Jupyter notebook :
+
+\begin{itemize}
+ \item with \textit{blocks} for \textsf{RAW} or \textsf{Markdown} ;
+ \item with \ShowCode{listings} and no limitation with compiler, but without code execution ;
+ \item with \ShowCode{piton} and \ShowCode{pyluatex} with \hologo{LuaLaTeX} and \textsf{--shell-escape}.
+\end{itemize}
+
+The documentation use \hologo{pdfLaTeX}, but examples with \hologo{LuaLaTeX} are given in an other doc.
+
+\subsection{Loading}
+
+The package loads within the preamble, with \ShowCode{\textbackslash usepackage\{pynotebook\}}.
+
+The loaded packages are \ShowCode{tcolorbox} (with \ShowCode{skins,breakable,listings}), \ShowCode{calc}, \ShowCode{xstring} and \ShowCode{iftex}.
+
+If \hologo{LuaLaTeX} is detected, \ShowCode{piton} is loaded (but there's an option to avoid the loading), whereas \ShowCode{pyluatex} needs to be manually loaded, due to the declaration of the executable.
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%with pdflatex
+\usepackage{pynotebook}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%with LuaLaTeX and piton
+\usepackage{pynotebook}
+\usepackage[options]{pyluatex}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%with LuaLaTeX but without piton capability
+\usepackage[nopiton]{pynotebook}
+\end{codehigh}
+
+\subsection{Global usage}
+
+In order to respect the left-alignment, the \textit{titles} \ShowCode{In [ ]} and \ShowCode{Out[ ]} can add a blank character, to avoid offset due to counter with two digits !
+
+\pagebreak
+
+\section{Common text blocks}
+
+\subsection{Intro}
+
+The different text blocks are given with their own output.
+
+The package provides environments :
+
+\begin{itemize}
+ \item for a \textsf{RAW} block, with \texttt{teletype} font ; for a \textsf{Mardown} block, with all \hologo{LaTeX} support ;
+ \item a version with \textsf{piton} is given, in order to align perfectly the blocks !
+\end{itemize}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookRaw}[options tcbox]{<width>}
+<code>
+\end{NotebookRaw}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookMarkdown}[options tcbox]{<width>}
+<code>
+\end{NotebookMarkdown}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookPitonRaw}[options tcbox]{<width>}
+<code>
+\end{NotebookPitonRaw}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookPitonMarkdown}[options tcbox]{<width>}
+<code>
+\end{NotebookPitonMarkdown}
+\end{codehigh}
+
+\subsection{Examples}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}\\
+It's possible to use \LaTeX{} formulas, like %
+\[
+ \left\lbrace\begin{array}{l}
+ F_0 = 0\\
+ F_1 = 1 \\
+ F_{n+2} = F_{n+1} + F_n
+ \end{array}\right.
+\]
+\end{NotebookMarkdown}
+
+\begin{NotebookRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookRaw}
+\end{codehigh}
+
+\begin{NotebookMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}\\
+It's possible to use \LaTeX{} formulas, like %
+\[
+ \left\lbrace\begin{array}{l}
+ F_0 = 0\\
+ F_1 = 1 \\
+ F_{n+2} = F_{n+1} + F_n
+ \end{array}\right.
+\]
+\end{NotebookMarkdown}
+
+\begin{NotebookRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookRaw}
+
+\pagebreak
+
+\section{The code blocks, with listings}
+
+\subsection{Intro}
+
+With \ShowCode{listings}, the different blocks are given with their own output (no code execution).
+
+The package provides environments :
+
+\begin{itemize}
+ \item with \texttt{In~[...]} ;
+ \item with \texttt{Out[...]} ;
+ \item without \textit{header}, eg for a \textit{console execution}.
+\end{itemize}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookIn}(*)[options tcbox]{<width>}
+<code>
+\end{NotebookIn}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookOut}(*)[options tcbox]{<width>}
+<code>
+\end{NotebookOut}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookConsole}[options tcbox]{<width>}
+<code>
+\end{NotebookConsole}
+\end{codehigh}
+
+The starred versions removes the counter, and don't display it.
+
+The blocks with \textit{header} (\texttt{In/Out}) are automatically numbered, and the global style is fixed.
+
+\subsection{Examples}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookIn}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}{\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+\begin{NotebookConsole}{\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookConsole}
+\end{codehigh}
+
+\begin{NotebookIn}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}{\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+\begin{NotebookConsole}{\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookConsole}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookIn}*[flush right]{13cm}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+\end{NotebookIn}
+
+\begin{NotebookOut}*[flush right]{13cm}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+\begin{NotebookConsole}[flush right]{13cm}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookConsole}
+\end{codehigh}
+
+\begin{NotebookIn}*[flush right]{13cm}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}*[flush right]{13cm}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+\begin{NotebookConsole}[flush right]{13cm}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookConsole}
+
+\pagebreak
+
+\section{The code blocks, with piton and pyluatex}
+
+\subsection{Intro}
+
+With \ShowCode{piton} and \ShowCode{pyluatex}, the different blocks are given with the code to be displayed (\texttt{In/Out}) or with the code to be executed (\textsf{Out} or \textsf{Console}).
+
+The package provides environments :
+
+\begin{itemize}
+ \item with \texttt{In~[...]} ;
+ \item with \texttt{Out[...]} ;
+ \item without \textit{header}, eg for a \textit{console execution}.
+\end{itemize}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookPitonIn}(*)[options tcbox]{<width>}
+<code>
+\end{NotebookPitonIn}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookPitonOut}(*)[options tcbox]{<width>}
+<code>
+\end{NotebookPitonOut}
+\end{codehigh}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{NotebookPitonConsole}[options tcbox]{<width>}
+<code>
+\end{NotebookPitonConsole}
+\end{codehigh}
+
+The starred versions removes the counter, and don't display it.
+
+The blocks with \textit{header} (\texttt{In/Out}) are automatically numbered, and the global style is fixed.
+
+\subsection{Examples}
+
+Due to the necessary usage of \hologo{LuaLaTeX} and \textsf{--shell-escape}, examples are given in a separate file.
+
+\pagebreak
+
+\section{Some customization}
+
+\subsection{Ideas}
+
+The package provides to macro, in order to :
+
+\begin{itemize}
+ \item configure the \textit{words} \texttt{In/Out} in \textsf{french} ;
+ \item configure the spacing before and after the boxes (\ShowCode{0.33\textbackslash baselineskip} by default).
+\end{itemize}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\SetJupyterLng{fr} %set french words
+
+\SetJupyterParSkip{<length>} %modify space before/after (or default)
+
+\setcounter{JupyterIn}{<nb>} %modify the counter
+\end{codehigh}
+
+\subsection{Examples}
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\SetJupyterLng{fr}
+\SetJupyterParSkip{\baselineskip}
+\setcounter{JupyterIn}{14}
+
+\begin{NotebookIn}{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}{0.75\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+\end{codehigh}
+
+\SetJupyterLng{fr}
+\SetJupyterParSkip{\baselineskip}
+\setcounter{JupyterIn}{14}
+
+\hrulefill
+
+\begin{NotebookIn}{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookIn}
+
+\begin{NotebookOut}{0.75\linewidth}
+[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
+\end{NotebookOut}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.pdf b/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.pdf
new file mode 100644
index 0000000000..7869f7ff32
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.pdf
Binary files differ
diff --git a/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.tex b/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.tex
new file mode 100644
index 0000000000..86123fccfa
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/doc/pynotebook-examples-pitonpylautex.tex
@@ -0,0 +1,239 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: lualatex: {shell: yes, synctex: yes, interaction: batchmode}
+% arara: lualatex: {shell: yes, synctex: yes, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[a4paper,11pt]{article}
+\def\PLver{0.1.0}
+\usepackage[margin=1.5cm]{geometry}
+\usepackage{pynotebook}
+\usepackage[executable=python]{pyluatex}
+\usepackage{codehigh}
+
+\begin{document}
+
+\part*{pynotebook (\PLver), with piton and pyluatex}
+
+\section{Preamble}
+
+\begin{codehigh}
+\documentclass{article}
+\usepackage{pynotebook}
+\usepackage[executable=python]{pyluatex} % with a specific compilation !!
+\end{codehigh}
+
+\section{Examples of text blocks}
+
+\begin{codehigh}
+\begin{NotebookPitonMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}
+
+It's possible to use \LaTeX{} formulas, like %
+\[
+ \left\lbrace\begin{array}{l}
+ F_0 = 0\\
+ F_1 = 1 \\
+ F_{n+2} = F_{n+1} + F_n
+ \end{array}\right.
+\]
+\end{NotebookPitonMarkdown}
+
+\begin{NotebookPitonRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookPitonRaw}
+\end{codehigh}
+
+\begin{NotebookPitonMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}
+
+It's possible to use \LaTeX{} formulas, like %
+\[
+\left\lbrace\begin{array}{l}
+F_0 = 0\\
+F_1 = 1 \\
+F_{n+2} = F_{n+1} + F_n
+\end{array}\right.
+\]
+\end{NotebookPitonMarkdown}
+
+\begin{NotebookPitonRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookPitonRaw}
+
+\section{Examples of code blocks (with execution of code !)}
+
+\begin{codehigh}
+\begin{NotebookPitonIn}{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookPitonIn}
+\end{codehigh}
+
+\begin{NotebookPitonIn}{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookPitonIn}
+
+\begin{codehigh}
+\begin{NotebookPitonOut}{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonOut}
+\end{codehigh}
+
+\begin{NotebookPitonOut}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonOut}
+
+\begin{codehigh}
+\SetJupyterLng{fr}
+\SetJupyterParSkip{\baselineskip}
+\setcounter{JupyterIn}{11}
+\end{codehigh}
+
+\SetJupyterLng{fr}
+\SetJupyterParSkip{\baselineskip}
+\setcounter{JupyterIn}{14}
+
+\begin{codehigh}
+\begin{NotebookPitonIn}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookPitonIn}
+\end{codehigh}
+
+\begin{NotebookPitonIn}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookPitonIn}
+
+\begin{codehigh}
+\begin{NotebookPitonOut}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonOut}
+\end{codehigh}
+
+\begin{NotebookPitonOut}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonOut}
+
+\begin{codehigh}
+\begin{NotebookPitonConsole}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonConsole}
+\end{codehigh}
+
+\begin{NotebookPitonConsole}[center]{0.75\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonConsole}
+
+\pagebreak
+
+\section{Global example}
+
+\SetJupyterParSkip{default}
+\setcounter{JupyterIn}{0}
+
+\begin{NotebookPitonMarkdown}{\linewidth}
+{\Large\bfseries This is a test for a \textsf{Markdown} block.}
+
+It's possible to use \LaTeX{} formulas, like %
+\[
+\left\lbrace\begin{array}{l}
+F_0 = 0\\
+F_1 = 1 \\
+F_{n+2} = F_{n+1} + F_n
+\end{array}\right.
+\]
+\end{NotebookPitonMarkdown}
+
+\begin{NotebookPitonRaw}{\linewidth}
+This is a sample block, with RAW output.
+
+Just to use all capacities of Jupyter notebook ;-)
+\end{NotebookPitonRaw}
+
+\begin{NotebookPitonIn}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+[fibonacci_of(n) for n in range(15)]
+\end{NotebookPitonIn}
+
+\begin{NotebookPitonOut}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(15)])
+\end{NotebookPitonOut}
+
+\begin{NotebookPitonRaw}{\linewidth}
+Let’s compute Fibonacci terms from 10th to 20th :-)
+\end{NotebookPitonRaw}
+
+\begin{NotebookPitonIn}{\linewidth}
+[fibonacci_of(n) for n in range(10,21)]
+\end{NotebookPitonIn}
+
+\begin{NotebookPitonConsole}{\linewidth}
+def fibonacci_of(n) :
+ if n in {0,1} :
+ return n
+ return fibonacci_of(n-1) + fibonacci_of(n-2)
+
+print([fibonacci_of(n) for n in range(10,21)])
+\end{NotebookPitonConsole}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/pynotebook/tex/pynotebook.sty b/macros/latex/contrib/pynotebook/tex/pynotebook.sty
new file mode 100644
index 0000000000..6a84f42a6b
--- /dev/null
+++ b/macros/latex/contrib/pynotebook/tex/pynotebook.sty
@@ -0,0 +1,315 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pynotebook}[2024/02/15 0.1.0 Present codes like in jupyter notebook]
+%0.1.0 Initial version
+
+%------Usefull packages and libraries
+\RequirePackage{tcolorbox}
+\RequirePackage{iftex}
+\RequirePackage{xstring}
+\RequirePackage{calc}
+\tcbuselibrary{skins,breakable}
+
+%-----Option(s) for not loading piton and not creating environments
+\newif\if@piton \@pitontrue
+\DeclareOption{nopiton}{\@pitonfalse}%
+\DeclareOption*{}
+\ProcessOptions\relax
+
+%------Utils
+\newcommand\JupyterPromptIn{In~}
+\newcommand\JupyterPromptOut{Out}
+
+\NewDocumentCommand\promptjupyter{ s m m m m }{%
+ \IfBooleanTF{#1}%
+ {\makebox[0pt][r]{\texttt{\color{#3}#2[~~]:#5}}\vspace{-\baselineskip}}%
+ {\makebox[0pt][r]{\texttt{\color{#3}#2[#4]:#5}}\vspace{-\baselineskip}}%
+}
+
+\newcounter{JupyterIn}
+
+\NewDocumentCommand\SetJupyterLng{ m }{%
+ \IfStrEqCase{#1}{%
+ {en}{\renewcommand\JupyterPromptIn{In~}\renewcommand\JupyterPromptOut{Out}}%
+ {fr}{\renewcommand\JupyterPromptIn{Entrée}\renewcommand\JupyterPromptOut{Sortie}}%
+ }%
+ [\renewcommand\JupyterPromptIn{In~}\renewcommand\JupyterPromptOut{Out}]%
+}
+
+%-----Parskip
+\newlength{\JupyterParSkip}
+\setlength{\JupyterParSkip}{0.33\baselineskip}
+\NewDocumentCommand\SetJupyterParSkip{ m }{%
+ \IfStrEq{#1}{default}%
+ {\setlength{\JupyterParSkip}{0.33\baselineskip}}%
+ {\setlength{\JupyterParSkip}{#1}}%
+}
+\tcbset{tcbjpuparskip/.style={before skip=\JupyterParSkip,after skip=\JupyterParSkip}}
+
+%------With listings (pdflatex or lualatex)
+\ifluatex
+\tcbuselibrary{listings}
+\lstdefinestyle{PLJupyter}{%
+ language = python,
+ inputencoding = utf8,
+ basicstyle = \ttfamily\footnotesize,
+ keywordstyle = \color{green!50!black},
+ keywordstyle = [2]\color{magenta},
+ commentstyle = \color{gray}\itshape,
+ stringstyle = \color{red!75},
+ numberstyle = \scriptsize\ttfamily\color{gray},
+ aboveskip = 0pt,
+ belowskip = 0pt,
+ tabsize = 4,
+ showstringspaces = false,
+ columns = fullflexible,
+ keepspaces = true,
+ breaklines = true,
+ breakatwhitespace = true
+}
+\else
+\tcbuselibrary{listingsutf8}
+\lstdefinestyle{PLJupyter}{%
+ language = python,
+ inputencoding = utf8/latin1,
+ basicstyle = \ttfamily\footnotesize,
+ keywordstyle = \color{green!50!black},
+ keywordstyle = [2]\color{magenta},
+ commentstyle = \color{gray}\itshape,
+ stringstyle = \color{red!75},
+ numberstyle = \scriptsize\ttfamily\color{gray},
+ aboveskip = 0pt,
+ belowskip = 0pt,
+ tabsize = 4,
+ showstringspaces = false,
+ columns = fullflexible,
+ keepspaces = true,
+ breaklines = true,
+ breakatwhitespace = true
+}
+\fi
+
+\newlength{\LargeurPromptJupyterIn}
+\newlength{\LargeurPromptJupyterOut}
+\newlength{\LargeurPromptJupyter}
+\newlength{\OffsetPromptJupyter}
+\setlength{\OffsetPromptJupyter}{9pt}
+\newlength{\LargeurNumbersJupyter}
+
+\newcommand\SetJupyterLengths{%
+ \settowidth{\LargeurPromptJupyterIn}{\footnotesize\texttt{\JupyterPromptIn[10]:}}%
+ \settowidth{\LargeurPromptJupyterOut}{\footnotesize\texttt{\JupyterPromptOut[10]:}}%
+ \setlength{\LargeurPromptJupyter}{\maxof{\LargeurPromptJupyterIn}{\LargeurPromptJupyterOut}}
+ \settowidth{\LargeurNumbersJupyter}{\scriptsize\texttt{00}}%
+}
+
+\NewDocumentEnvironment{NotebookIn}{ s O{} m }%
+{%
+ \SetJupyterLengths%
+ \noindent%
+ \IfBooleanTF{#1}%
+ {\tcbset{tcbjpuptitlein/.style={title=\promptjupyter*{\JupyterPromptIn}{red!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupyter}}}}}%
+ {\refstepcounter{JupyterIn}\tcbset{tcbjpuptitlein/.style={title=\promptjupyter{\JupyterPromptIn\ifnum\value{JupyterIn}<10~\fi}{red!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupyter}}}}}%
+ \tcblisting{%
+ breakable,sharp corners=all,boxrule=0.5pt,enhanced,size=small,width=#3,tcbjpuparskip,
+ colframe=gray,colback=lightgray!15,
+ left skip=\LargeurPromptJupyter+\OffsetPromptJupyter-2mm,
+ tcbjpuptitlein,
+ fonttitle=\linespread{1}\footnotesize,
+ attach title to upper,
+ listing only,
+ listing options={style=PLJupyter,xleftmargin=\LargeurNumbersJupyter,numbers=left,firstnumber=1,numbersep=2mm},%
+ overlay={\begin{tcbclipinterior}\draw[line width=0.375pt,gray!75] ([xshift={\LargeurNumbersJupyter+1mm}]frame.south west)--([xshift={\LargeurNumbersJupyter+1mm}]frame.north west);\end{tcbclipinterior}},%
+ #2
+ }%
+}%
+{%
+ \endtcblisting%
+}
+
+\NewDocumentEnvironment{NotebookConsole}{ O{} m }%
+{%
+ \SetJupyterLengths%
+ \addtolength{\LargeurNumbersJupyter}{0.5mm}
+ \noindent%
+ \tcblisting{%
+ breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#2,tcbjpuparskip,
+ colframe=lightgray!15,colback=white,
+ left skip=\LargeurPromptJupyter+\OffsetPromptJupyter-2mm,
+ attach title to upper,
+ listing only,
+ listing options={style=tcblatex,basicstyle=\ttfamily\footnotesize},%
+ #1
+ }%
+}%
+{%
+ \endtcblisting%
+}%
+
+\NewDocumentEnvironment{NotebookOut}{ s O{} m }%
+{%
+ \SetJupyterLengths%
+ \addtolength{\LargeurNumbersJupyter}{0.5mm}
+ \IfBooleanTF{#1}%
+ {\tcbset{tcbjpuptitleout/.style={title=\promptjupyter*{\JupyterPromptOut}{blue!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupyter}}}}}%
+ {\tcbset{tcbjpuptitleout/.style={title=\promptjupyter{\JupyterPromptOut\ifnum\value{JupyterIn}<10~\fi}{blue!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupyter}}}}}%
+ \noindent%
+ \tcblisting{%
+ breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#3,tcbjpuparskip,
+ colframe=lightgray!15,colback=white,
+ left skip=\LargeurPromptJupyter+\OffsetPromptJupyter-2mm,
+ tcbjpuptitleout,
+ fonttitle=\linespread{1}\footnotesize,
+ attach title to upper,
+ listing only,
+ listing options={style=tcblatex,basicstyle=\ttfamily\footnotesize},%
+ #2
+ }%
+}%
+{%
+ \endtcblisting%
+}%
+
+\NewDocumentEnvironment{NotebookRaw}{ O{} m }%
+{%
+ \SetJupyterLengths%
+ \addtolength{\LargeurNumbersJupyter}{0.5mm}
+ \noindent%
+ \tcblisting{%
+ breakable,sharp corners=all,boxrule=0.5pt,enhanced,size=small,width=#2,tcbjpuparskip,
+ colframe=gray,colback=lightgray!15,
+ left skip=\LargeurPromptJupyter+\OffsetPromptJupyter-2mm,
+ attach title to upper,
+ listing only,
+ listing options={style=tcblatex,basicstyle=\ttfamily\footnotesize,numberstyle=\scriptsize\ttfamily\color{gray},xleftmargin=\LargeurNumbersJupyter,numbers=left,firstnumber=1,numbersep=2mm},%
+ overlay={\begin{tcbclipinterior}\draw[line width=0.375pt,gray!75] ([xshift={\LargeurNumbersJupyter+1mm}]frame.south west)--([xshift={\LargeurNumbersJupyter+1mm}]frame.north west);\end{tcbclipinterior}},%
+ #1
+ }%
+}%
+{%
+ \endtcblisting%
+}%
+
+\NewDocumentEnvironment{NotebookMarkdown}{ O{} m }%
+{%
+ \SetJupyterLengths%
+ \addtolength{\LargeurNumbersJupyter}{0.5mm}
+ \noindent%
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#2,tcbjpuparskip,colframe=lightgray!15,colback=white,left skip=\LargeurPromptJupyter+\OffsetPromptJupyter-2mm,
+ attach title to upper,fontupper=\footnotesize,tcbjpuparskip,#1]%
+}%
+{%
+ \endtcolorbox%
+}%
+
+\if@piton
+%----With Piton (only lualatex)
+\ifluatex
+\RequirePackage{piton}
+\RequirePackage{environ}
+\newlength{\LargeurPromptJupiter}
+\newlength{\LargeurPromptJupiterIn}
+\newlength{\LargeurPromptJupiterOut}
+\newlength{\OffsetPromptJupiter}
+\setlength{\OffsetPromptJupiter}{9pt}
+\newlength{\LargeurNumbersJupiter}
+
+\newcommand\SetJupiterLengths{%
+ \settowidth{\LargeurPromptJupiterIn}{\footnotesize\texttt{\JupyterPromptIn[10]:}}%
+ \settowidth{\LargeurPromptJupiterOut}{\footnotesize\texttt{\JupyterPromptOut[10]:}}%
+ \setlength{\LargeurPromptJupiter}{\maxof{\LargeurPromptJupiterIn}{\LargeurPromptJupiterOut}}%
+ \settowidth{\LargeurNumbersJupiter}{\footnotesize\texttt{00}}%
+}
+
+\NewPitonEnvironment{NotebookPitonIn}{ s O{} m }%
+{%
+ \SetJupiterLengths%
+ \IfBooleanTF{#1}%
+ {\tcbset{tcbjpuptitlein/.style={title=\promptjupyter*{\JupyterPromptIn}{red!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupiter}}}}}%
+ {\refstepcounter{JupyterIn}\tcbset{tcbjpuptitlein/.style={title=\promptjupyter{\JupyterPromptIn\ifnum\value{JupyterIn}<10~\fi}{red!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupiter}}}}}%
+ \noindent%
+ \PitonOptions{left-margin={\LargeurNumbersJupiter+1.75mm},all-line-numbers}%
+ \PitonOptions{tabs-auto-gobble,break-lines,indent-broken-lines}%
+ %on crée la boîte
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.5pt,enhanced,size=small,width=#3,colframe=gray,colback=lightgray!15,left skip=\LargeurPromptJupiter+\OffsetPromptJupiter-2mm,tcbjpuptitlein,fonttitle=\linespread{1}\footnotesize,attach title to upper,fontupper=\footnotesize,overlay={%
+ \begin{tcbclipinterior}\draw[line width=0.375pt,gray!75] ([xshift={\LargeurNumbersJupiter+2.25mm}]frame.south west)--([xshift={\LargeurNumbersJupiter+2.25mm}]frame.north west);\end{tcbclipinterior}},bottom=-0.5mm,tcbjpuparskip,#2]%
+}%
+{%
+ \endtcolorbox%
+}
+
+\NewDocumentEnvironment{NotebookPitonConsole}{ O{} m }%
+{%
+ \SetJupiterLengths%
+ \noindent%
+ \PitonOptions{tabs-auto-gobble,break-lines,indent-broken-lines}%
+ %on crée la boîte
+ \PyLTVerbatimEnv%
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#2,colframe=lightgray!15,colback=white,left skip=\LargeurPromptJupiter+\OffsetPromptJupiter-2mm,attach title to upper,fontupper=\footnotesize,bottom=-0.5mm,tcbjpuparskip,#1]%
+ \begin{pythonq}%
+}%
+{%
+ \end{pythonq}%
+ \directlua{%
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}")
+ }%
+ \endtcolorbox%
+}
+
+\NewDocumentEnvironment{NotebookPitonOut}{ s O{} m }%
+{%
+ \SetJupiterLengths%
+ \IfBooleanTF{#1}%
+ {\tcbset{tcbjpuptitleout/.style={title=\promptjupyter*{\JupyterPromptOut}{blue!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupiter}}}}}%
+ {\tcbset{tcbjpuptitleout/.style={title=\promptjupyter{\JupyterPromptOut\ifnum\value{JupyterIn}<10~\fi}{blue!75!black}{\theJupyterIn}{\hspace*{\OffsetPromptJupiter}}}}}%
+ \noindent%
+ \PitonOptions{tabs-auto-gobble,break-lines,indent-broken-lines}%
+ %on crée la boîte
+ \PyLTVerbatimEnv%
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#3,colframe=lightgray!15,colback=white,left skip=\LargeurPromptJupiter+\OffsetPromptJupiter-2mm,tcbjpuptitleout,fonttitle=\linespread{1}\footnotesize,attach title to upper,fontupper=\footnotesize,bottom=-0.5mm,tcbjpuparskip,#2]%
+ \begin{pythonq}%
+}%
+{%
+ \end{pythonq}%
+ \directlua{%
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}")
+ }%
+ \endtcolorbox%
+}
+
+\NewPitonEnvironment{NotebookPitonRaw}{ O{} m }%
+{%
+ \SetJupiterLengths%
+ \noindent%
+ \SetPitonStyle{Number=}%
+ \PitonOptions{left-margin={\LargeurNumbersJupiter+1.75mm},all-line-numbers,language=minimal}%
+ \PitonOptions{tabs-auto-gobble,break-lines,indent-broken-lines}%
+ %on crée la boîte
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.5pt,enhanced,size=small,width=#2,colframe=gray,colback=lightgray!15,left skip=\LargeurPromptJupiter+\OffsetPromptJupiter-2mm,attach title to upper,fontupper=\footnotesize,overlay={%
+ \begin{tcbclipinterior}\draw[line width=0.375pt,gray!75] ([xshift={\LargeurNumbersJupiter+2.25mm}]frame.south west)--([xshift={\LargeurNumbersJupiter+2.25mm}]frame.north west);\end{tcbclipinterior}},bottom=-0.5mm,tcbjpuparskip,#1]%
+}%
+{%
+ \endtcolorbox%
+}
+
+\NewDocumentEnvironment{NotebookPitonMarkdown}{ O{} m }%
+{%
+ \SetJupiterLengths%
+ \noindent%
+ \tcolorbox[breakable,sharp corners=all,boxrule=0.3pt,enhanced,size=small,width=#2,tcbjpuparskip,colframe=lightgray!15,colback=white,left skip=\LargeurPromptJupiter+\OffsetPromptJupiter-2mm,
+ attach title to upper,fontupper=\footnotesize,tcbjpuparskip,#1]%
+}%
+{%
+ \endtcolorbox%
+}%
+
+\fi
+\fi
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index 2a9f56f6c2..2f512d8f75 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index 41fa6ea8b1..117a0e167b 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2024/02/13}{1.46d}
+\ProvidesExplPackage{spbmark}{2024/02/16}{1.46e}
{Customize superscripts and subscripts}
\cs_generate_variant:Nn \box_set_ht:Nn { cv }
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index 9fbf4962cf..3235237822 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -7,8 +7,8 @@
{
package = spbmark,
title = the spbmark package,
- version = v1.46d,
- date = 2024/02/13,
+ version = v1.46e,
+ date = 2024/02/16,
authors = Qu Yi,
info = Customize superscript and subscript,
email = toquyi@163.com,
@@ -163,8 +163,8 @@ The options common to \meta{kv list} of the three commands are as follows. They
\keyval{regex}{regular expression}\newtag%
After using the superscript or subscript command, this option is used to determine whether the \textcolor{red}{following} tokens match the \meta{regular expression}. If it does \textcolor{red}{not}, the width of the this marker returns to zero.
\begin{example}[code-only]
- \newcommand{\mysp}[2][]{\super[regex=\c{mysb},#2]{#1}}
- \newcommand{\mysb}[2][]{\sub[regex=\c{mysp},#2]{#1}}
+ \newcommand{\mysp}[2][]{\super[regex=\c{mysb},#1]{#2}}
+ \newcommand{\mysb}[2][]{\sub[regex=\c{mysp},#1]{#2}}
\end{example}
\end{options}
@@ -215,7 +215,7 @@ The following list of keys control the format both of superscript \emph{or} subs
After the subscript command is used, the regular expression rules of the following tokens are matched. See Section \ref{sec:user commands} for the meaning of this option.
\end{options}
-If \option{sphmove} is positive, the superscript or subscript moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscript and superscript is opposite. For superscript, if \option{spvmove} is positive, the superscript moves up, conversely it moves down. For subscript, if \option{spvmove} is positive, the subscript moves down, conversely it moves up.
+If \option{sphmove} is positive, the superscript or subscript moves to the right, conversely it moves to the left. The positive direction of vertical offset of subscript and superscript is \textcolor{red}{opposite}. For superscript, if \option{spvmove} is positive, the superscript moves up, conversely it moves down. For subscript, if \option{spvmove} is positive, the subscript moves down, conversely it moves up.
The following list of keys control the format of superscript \emph{and} subscript.
\begin{options}
diff --git a/macros/latex/contrib/tabularray/README.txt b/macros/latex/contrib/tabularray/README.txt
index da1c4f4f1e..1dc3aa0a7d 100644
--- a/macros/latex/contrib/tabularray/README.txt
+++ b/macros/latex/contrib/tabularray/README.txt
@@ -1,5 +1,5 @@
Package: Typeset tabulars and arrays with LaTeX3
-Copyright: 2021-2023 (c) Jianrui Lyu <tolvjr@163.com>
+Copyright: 2021-2024 (c) Jianrui Lyu <tolvjr@163.com>
CTAN: https://ctan.org/pkg/tabularray
Repository: https://github.com/lvjr/tabularray
Repository: https://bitbucket.org/lvjr/tabularray
diff --git a/macros/latex/contrib/tabularray/tabularray-2021.sty b/macros/latex/contrib/tabularray/tabularray-2021.sty
index f5ad547d71..bf67b77a01 100644
--- a/macros/latex/contrib/tabularray/tabularray-2021.sty
+++ b/macros/latex/contrib/tabularray/tabularray-2021.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{tabularray}{2021-12-01}{2021Q}
+\ProvidesExplPackage{tabularray}{2024-02-16}{2021R}
{Typeset tabulars and arrays with LaTeX3}
\RequirePackage{xparse}
@@ -1011,6 +1011,9 @@
\dim_zero_new:N \rulewidth
\dim_set:Nn \rulewidth {0.4pt}
+\prop_new:N \g__tblr_defined_hdash_styles_prop
+\prop_new:N \g__tblr_defined_vdash_styles_prop
+
\prop_gset_from_keyval:Nn \g__tblr_defined_hdash_styles_prop
{ solid = \hrule height \rulewidth }
\prop_gset_from_keyval:Nn \g__tblr_defined_vdash_styles_prop
@@ -2830,6 +2833,13 @@
%% \section{Initialize Table Inner Specifications}
%%% --------------------------------------------------------
+\prop_new:N \g__tblr_initial_table_prop
+\prop_new:N \g__tblr_initial_rows_prop
+\prop_new:N \g__tblr_initial_columns_prop
+\prop_new:N \g__tblr_initial_cells_prop
+\prop_new:N \g__tblr_initial_hlines_prop
+\prop_new:N \g__tblr_initial_vlines_prop
+
\prop_gset_from_keyval:Nn \g__tblr_initial_table_prop
{
stretch = 1,
diff --git a/macros/latex/contrib/tabularray/tabularray.pdf b/macros/latex/contrib/tabularray/tabularray.pdf
index c5f94d11fc..2726d20a9c 100644
--- a/macros/latex/contrib/tabularray/tabularray.pdf
+++ b/macros/latex/contrib/tabularray/tabularray.pdf
Binary files differ
diff --git a/macros/latex/contrib/tabularray/tabularray.sty b/macros/latex/contrib/tabularray/tabularray.sty
index 5f6b43ebd2..66ec506b96 100644
--- a/macros/latex/contrib/tabularray/tabularray.sty
+++ b/macros/latex/contrib/tabularray/tabularray.sty
@@ -18,7 +18,7 @@
\DeclareCurrentRelease{}{2022-01-01}
\RequirePackage{expl3}
-\ProvidesExplPackage{tabularray}{2023-03-01}{2023A}
+\ProvidesExplPackage{tabularray}{2024-02-16}{2024A}
{Typeset tabulars and arrays with LaTeX3}
%% \IfFormatAtLeastTF, xparse and lthooks are added in LaTeX 2020-10-01
@@ -167,6 +167,24 @@
\dim_new:N \leftsep
\dim_new:N \rightsep
+%% Some functions for lwarp to remove rules and boxes
+\cs_new:Npn \tblr_hrule_ht:n #1
+ {
+ \hrule height ~ #1 \scan_stop:
+ }
+\cs_new:Npn \tblr_vrule_wd_ht_dp:nnn #1 #2 #3
+ {
+ \vrule width ~ #1 ~ height ~ #2 ~ depth ~ #3 \scan_stop:
+ }
+\cs_new_protected:Npn \tblr_box_use:N #1
+ {
+ \box_use:N #1
+ }
+\cs_new_protected:Npn \tblr_vbox_set:Nn #1 #2
+ {
+ \vbox_set:Nn #1 {#2}
+ }
+
%%% --------------------------------------------------------
%%> \section{Data Structures Based on Property Lists}
%%% --------------------------------------------------------
@@ -1086,6 +1104,9 @@
\dim_zero_new:N \rulewidth
\dim_set:Nn \rulewidth {0.4pt}
+\prop_new:N \g__tblr_defined_hdash_styles_prop
+\prop_new:N \g__tblr_defined_vdash_styles_prop
+
\prop_gset_from_keyval:Nn \g__tblr_defined_hdash_styles_prop
{ solid = \hrule height \rulewidth }
\prop_gset_from_keyval:Nn \g__tblr_defined_vdash_styles_prop
@@ -2662,6 +2683,7 @@
\cs_new_protected:Npn \__tblr_builder:nnn #1 #2 #3
{
\int_gincr:N \g_tblr_level_int
+ \__tblr_hook_use:n { tabularray/trial/before }
\bool_set_true:N \lTblrMeasuringBool
\__tblr_clear_prop_lists:
\__tblr_clear_spec_lists:
@@ -2689,6 +2711,7 @@
\__tblr_enable_content_commands:
\__tblr_calc_cell_and_line_sizes:
\bool_set_false:N \lTblrMeasuringBool
+ \__tblr_hook_use:n { tabularray/trial/after }
\LogTblrTracing { step = build ~ the ~ whole ~ table}
\__tblr_build_whole:
\int_gdecr:N \g_tblr_level_int
@@ -2751,11 +2774,9 @@
{
\__tblr_hook_split_before:
\tl_set:Nx \l__tblr_expand_tl { \__tblr_spec_item:nn { outer } { expand } }
- \tl_set:Nx \l__tblr_expand_tl { \tl_head:N \l__tblr_expand_tl }
- \tl_if_empty:NF \l__tblr_expand_tl
+ \tl_map_inline:Nn \l__tblr_expand_tl
{
- \exp_last_unbraced:NNV
- \__tblr_expand_table_body:NN \l__tblr_body_tl \l__tblr_expand_tl
+ \__tblr_expand_table_body:NN \l__tblr_body_tl ##1
}
}
@@ -2953,6 +2974,13 @@
%%> \section{Initialize Table Inner Specifications}
%%% --------------------------------------------------------
+\prop_new:N \g__tblr_initial_table_prop
+\prop_new:N \g__tblr_initial_rows_prop
+\prop_new:N \g__tblr_initial_columns_prop
+\prop_new:N \g__tblr_initial_cells_prop
+\prop_new:N \g__tblr_initial_hlines_prop
+\prop_new:N \g__tblr_initial_vlines_prop
+
\prop_gset_from_keyval:Nn \g__tblr_initial_table_prop
{
stretch = 1,
@@ -3193,6 +3221,7 @@
B .meta:n = { baseline = B },
valign .meta:n = { baseline = #1 }, % obsolete, will be removed some day
expand .code:n = \__tblr_outer_gput_spec:nn { expand } {#1},
+ expand+ .code:n = \__tblr_outer_gconcat_spec:nn { expand } {#1},
headsep .code:n = \__tblr_outer_gput_spec:nn { headsep } {#1},
footsep .code:n = \__tblr_outer_gput_spec:nn { footsep } {#1},
presep .code:n = \__tblr_outer_gput_spec:nn { presep } {#1},
@@ -3210,6 +3239,11 @@
}
\cs_generate_variant:Nn \__tblr_outer_gput_spec:nn { ne }
+\cs_new_protected:Npn \__tblr_outer_gconcat_spec:nn #1 #2
+ {
+ \__tblr_outer_gput_spec:ne {#1} { \__tblr_spec_item:nn { outer } { #1 } \exp_not:n { #2 } }
+ }
+
\regex_const:Nn \c__tblr_option_key_name_regex { ^ [A-Za-z\-] + $ }
\msg_new:nnn { tabularray } { unknown-outer-key }
@@ -5505,6 +5539,7 @@
\cs_new_protected:Npn \__tblr_build_whole:
{
+ \__tblr_hook_use:n { tabularray/table/before }
\tl_if_eq:enTF { \__tblr_spec_item:nn { outer } { long } } { true }
{ \__tblr_build_long_table:e { \__tblr_spec_item:nn { outer } { halign } } }
{
@@ -5518,6 +5553,7 @@
{ \__tblr_spec_item:nn { outer } { baseline } }
}
}
+ \__tblr_hook_use:n { tabularray/table/after }
}
\dim_new:N \l__tblr_remain_height_dim
@@ -5573,8 +5609,19 @@
% \pagetotal maybe exceed \pagegoal after adding presep,
% or after adding rowhead or rowfoot of the table.
% In these cases, we will not typeset table in this page,
- % but rather do some negative \vskip and execute \newpage.
- \skip_vertical:n { \pagegoal - \pagetotal }
+ % but rather force a page break.
+ \group_begin:
+ \dim_set:Nn \l_tmpb_dim
+ {
+ % Enough to overfill the page (including shrink).
+ \pagegoal - \pagetotal + \l_tmpa_dim
+ + \__tblr_box_height:N \l__tblr_table_firsthead_box
+ + \__tblr_box_height:N \l__tblr_table_firstfoot_box
+ }
+ \skip_vertical:n { \l_tmpb_dim }
+ \tex_penalty:D 9999
+ \skip_vertical:n { -\l_tmpb_dim }
+ \group_end:
}
{
\__tblr_build_page_table:nnx {#1}
@@ -5582,8 +5629,8 @@
{ \int_use:N \l__tblr_prev_i_int }
\int_incr:N \l__tblr_table_page_int
\int_set:Nn \l__tblr_long_from_int { \l__tblr_prev_i_int + 1 }
+ \TblrNewPage
}
- \TblrNewPage
\hbox{}\kern-\topskip\nobreak
\noindent
\LogTblrTracing { page }
@@ -5796,7 +5843,7 @@
\cs_new_protected:Npn \__tblr_build_one_table:nnNN #1 #2 #3 #4
{
\box_clear:N \l__tblr_table_hlines_box
- \vbox_set:Nn \l__tblr_table_box
+ \tblr_vbox_set:Nn \l__tblr_table_box
{
\int_step_variable:nnNn {#1} {#2} \l__tblr_i_tl
{
@@ -5804,9 +5851,9 @@
{ \int_compare_p:nNn { \l__tblr_i_tl } > {#1} }
{ \bool_if_p:N #3 }
{ \__tblr_put_one_hline:n { \__tblr_build_hline:V \l__tblr_i_tl } }
- \hrule height ~ 0pt % remove lineskip between hlines and rows
+ \tblr_hrule_ht:n { 0pt } % remove lineskip between hlines and rows
\__tblr_put_one_row:n { \__tblr_build_row:N \l__tblr_i_tl }
- \hrule height ~ 0pt
+ \tblr_hrule_ht:n { 0pt }
}
\bool_if:NT #4
{
@@ -5818,7 +5865,7 @@
- \box_ht:N \l__tblr_table_hlines_box
- \box_dp:N \l__tblr_table_hlines_box
}
- \box_use:N \l__tblr_table_hlines_box
+ \tblr_box_use:N \l__tblr_table_hlines_box
}
}
@@ -6253,11 +6300,11 @@
\__tblr_get_row_inner_height_depth:VNNNN #1
\l__tblr_row_ht_dim \l__tblr_row_dp_dim
\l__tblr_row_abovesep_dim \l__tblr_row_belowsep_dim
- \vrule width ~ 0pt ~ height ~ \l__tblr_row_ht_dim ~ depth ~ \l__tblr_row_dp_dim
+ \__tblr_hook_use:n { tabularray/row/before }
+ \tblr_vrule_wd_ht_dp:nnn {0pt} {\l__tblr_row_ht_dim} {\l__tblr_row_dp_dim}
\hbox_set:Nn \l__tblr_row_vlines_box
{
- \vrule width ~ 0pt ~ height ~ \l__tblr_row_ht_dim
- ~ depth ~ \l__tblr_row_dp_dim
+ \tblr_vrule_wd_ht_dp:nnn {0pt} {\l__tblr_row_ht_dim} {\l__tblr_row_dp_dim}
}
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
@@ -6269,6 +6316,7 @@
{ \__tblr_build_vline_segment:nn {#1} { \int_eval:n {\c@colcount + 1} } }
\skip_horizontal:n { - \box_wd:N \l__tblr_row_vlines_box }
\box_use:N \l__tblr_row_vlines_box
+ \__tblr_hook_use:n { tabularray/row/after }
}
%% Read from table specifications and calculate inner height/depth of the row
@@ -6442,8 +6490,12 @@
}
}
-\tl_new:N \l__tblr_cell_rowspan_tl
-\tl_new:N \l__tblr_cell_colspan_tl
+%% These public variables are updated by default before building a cell
+\tl_new:N \lTblrCellRowSpanTl
+\tl_new:N \lTblrCellColSpanTl
+\tl_new:N \lTblrCellBackgroundTl
+\bool_new:N \lTblrCellOmittedBool
+
\dim_new:N \l__tblr_cell_wd_dim
\dim_new:N \l__tblr_cell_ht_dim
@@ -6460,17 +6512,17 @@
{ \__tblr_data_item:nen { column } {#2} { leftsep} }
\tl_set:Nx \l__tblr_y_tl
{ \__tblr_data_item:nen { column } {#2} { rightsep } }
- \tl_set:Nx \l__tblr_cell_colspan_tl
+ \tl_set:Nx \lTblrCellColSpanTl
{ \__tblr_data_item:neen { cell } {#1} {#2} { colspan } }
- \int_compare:nNnTF { \l__tblr_cell_colspan_tl } < {2}
+ \int_compare:nNnTF { \lTblrCellColSpanTl } < {2}
{ \dim_set:Nn \l__tblr_cell_wd_dim { \l__tblr_w_tl } }
{
\__tblr_get_span_horizontal_sizes:NNNNN #1 #2
\l__tblr_o_dim \l__tblr_cell_wd_dim \l__tblr_q_dim
}
- \tl_set:Nx \l__tblr_cell_rowspan_tl
+ \tl_set:Nx \lTblrCellRowSpanTl
{ \__tblr_data_item:neen { cell } {#1} {#2} { rowspan } }
- \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
+ \int_compare:nNnTF { \lTblrCellRowSpanTl } < {2}
{ \dim_set:Nn \l__tblr_cell_ht_dim { \l__tblr_h_tl } }
{
\__tblr_get_span_vertical_sizes:NNNNN #1 #2
@@ -6482,8 +6534,73 @@
\group_end:
}
+%% These public variables are updated by html library before building a cell
+\tl_new:N \lTblrCellAboveBorderStyleTl
+\tl_new:N \lTblrCellAboveBorderWidthTl
+\tl_new:N \lTblrCellAboveBorderColorTl
+\tl_new:N \lTblrCellBelowBorderStyleTl
+\tl_new:N \lTblrCellBelowBorderWidthTl
+\tl_new:N \lTblrCellBelowBorderColorTl
+\tl_new:N \lTblrCellLeftBorderStyleTl
+\tl_new:N \lTblrCellLeftBorderWidthTl
+\tl_new:N \lTblrCellLeftBorderColorTl
+\tl_new:N \lTblrCellRightBorderStyleTl
+\tl_new:N \lTblrCellRightBorderWidthTl
+\tl_new:N \lTblrCellRihgtBorderColorTl
+
+%% #1: row number in tl; #2: column number in tl
+%% This function is called only when html library is loaded.
+%% The properties can be used by tagpdf, tex4ht and lwarp packages
+\cs_new_protected:Npn \__tblr_expose_cell_properties:NN #1 #2
+ {
+ \__tblr_expose_cell_border:NNnn #1 #2 { hline } { Above }
+ \tl_set:Nx \l_tmpa_tl { \int_eval:n { #1 + \lTblrCellRowSpanTl } }
+ \__tblr_expose_cell_border:NNnn \l_tmpa_tl #2 { hline } { Below }
+ \__tblr_expose_cell_border:NNnn #1 #2 { vline } { Left }
+ \tl_set:Nx \l_tmpb_tl { \int_eval:n { #2 + \lTblrCellColSpanTl } }
+ \__tblr_expose_cell_border:NNnn #1 \l_tmpb_tl { vline } { Right }
+ }
+
+\tl_new:N \l__tblr_dash_value_tl
+\tl_new:N \l__tblr_dash_value_head_tl
+\tl_new:N \l__tblr_dash_value_tail_tl
+\tl_new:N \l__tblr_width_value_tl
+\tl_new:N \l__tblr_color_value_tl
+
+%% #1: row number in tl; #2: column number in tl;
+%% #3: hline or vline; #4: position of border (Above/Below/Left/Right).
+\cs_new_protected:Npn \__tblr_expose_cell_border:NNnn #1 #2 #3 #4
+ {
+ %% get border style
+ \tl_set:Nx \l__tblr_dash_value_tl %% may be empty
+ { \__tblr_spec_item:ne { #3 } { [#1][#2](1) / @dash } }
+ \tl_set:Nx \l__tblr_dash_value_head_tl { \tl_head:N \l__tblr_dash_value_tl }
+ \tl_set:Nx \l__tblr_dash_value_tail_tl { \tl_tail:N \l__tblr_dash_value_tl }
+ \exp_args:NV \tl_if_eq:NNTF \l__tblr_dash_value_head_tl \@tblr@dash
+ {
+ \tl_set_eq:cN { lTblrCell #4 BorderStyleTl } \l__tblr_dash_value_tail_tl
+ %% get border width
+ \tl_set:Nx \l__tblr_width_value_tl
+ { \__tblr_spec_item:ne { #3 } { [#1][#2](1) / wd } }
+ \tl_if_empty:NTF \l__tblr_width_value_tl
+ { \tl_set:cn { lTblrCell #4 BorderWidthTl } { 0.4pt } }
+ { \tl_set_eq:cN { lTblrCell #4 BorderWidthTl } \l__tblr_width_value_tl }
+ %% get border color
+ \tl_set:cx { lTblrCell #4 BorderColorTl }
+ { \__tblr_spec_item:ne { #3 } { [#1][#2](1) / fg } }
+ }
+ {
+ \tl_clear:c { lTblrCell #4 BorderStyleTl }
+ \tl_set:cn { lTblrCell #4 BorderWidthTl } { 0pt }
+ \tl_clear:c { lTblrCell #4 BorderColorTl }
+ }
+ }
+
\cs_new_protected:Npn \__tblr_build_cell_content:NN #1 #2
{
+ \bool_if:NT \l__tblr_html_variables_bool
+ { \__tblr_expose_cell_properties:NN #1 #2 }
+ \__tblr_hook_use:n { tabularray/cell/before }
\hbox_set_to_wd:Nnn \l__tblr_a_box { \l__tblr_cell_wd_dim }
{
\tl_if_eq:NnTF \g__tblr_cell_halign_tl {j}
@@ -6502,7 +6619,7 @@
\c__tblr_valign_m_tl
{
\vfil
- \int_compare:nNnT { \l__tblr_cell_rowspan_tl } < {2}
+ \int_compare:nNnT { \lTblrCellRowSpanTl } < {2}
{
\box_set_ht:Nn \l__tblr_a_box
{ \__tblr_data_item:nen { row } {#1} { @row-upper } }
@@ -6522,7 +6639,7 @@
\c__tblr_valign_f_tl
{
\vfil
- \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
+ \int_compare:nNnTF { \lTblrCellRowSpanTl } < {2}
{
\box_set_dp:Nn \l__tblr_a_box
{ \__tblr_data_item:nen { row } {#1} { @row-foot } }
@@ -6532,7 +6649,7 @@
{
\__tblr_data_item:nen
{ row }
- { \int_eval:n { #1 + \l__tblr_cell_rowspan_tl - 1 } }
+ { \int_eval:n { #1 + \lTblrCellRowSpanTl - 1 } }
{ @row-foot }
}
}
@@ -6550,16 +6667,22 @@
\skip_horizontal:n { \l__tblr_x_tl }
\box_use:N \l__tblr_c_box
\skip_horizontal:n { \l__tblr_y_tl - \l__tblr_cell_wd_dim + \l__tblr_w_tl }
+ \__tblr_hook_use:n { tabularray/cell/after }
}
\cs_new_protected:Npn \__tblr_build_cell_background:NN #1 #2
{
- \int_compare:nNnT { \__tblr_data_item:neen { cell } {#1} {#2} { omit } } = {0}
+ \bool_set:Nn \lTblrCellOmittedBool
{
- \group_begin:
- \tl_set:Nx \l__tblr_b_tl
+ \int_compare_p:nNn
+ { \__tblr_data_item:neen { cell } {#1} {#2} { omit } } = {1}
+ }
+ \bool_if:NF \lTblrCellOmittedBool
+ {
+ \tl_set:Nx \lTblrCellBackgroundTl
{ \__tblr_data_item:neen { cell } {#1} {#2} { background } }
- \tl_if_empty:NF \l__tblr_b_tl
+ \group_begin:
+ \tl_if_empty:NF \lTblrCellBackgroundTl
{
\__tblr_get_cell_background_width:NNN #1 #2 \l_tmpa_dim
\__tblr_get_cell_background_depth:NNN #1 #2 \l_tmpb_dim
@@ -6567,7 +6690,7 @@
{ \dim_use:N \l_tmpa_dim }
{ \l__tblr_row_ht_dim }
{ \dim_use:N \l_tmpb_dim }
- { \l__tblr_b_tl }
+ { \lTblrCellBackgroundTl }
}
\group_end:
}
@@ -6576,7 +6699,7 @@
%% #1: row number; #2: column number; #3 resulting dimension
\cs_new_protected:Npn \__tblr_get_cell_background_width:NNN #1 #2 #3
{
- \int_compare:nNnTF { \l__tblr_cell_colspan_tl } < {2}
+ \int_compare:nNnTF { \lTblrCellColSpanTl } < {2}
{ \dim_set:Nn #3 { \l__tblr_x_tl + \l__tblr_w_tl + \l__tblr_y_tl } }
{
\dim_set:Nn #3 { \l__tblr_o_dim + \l__tblr_cell_wd_dim + \l__tblr_q_dim }
@@ -6586,7 +6709,7 @@
%% #1: row number; #2: column number; #3 resulting dimension
\cs_new_protected:Npn \__tblr_get_cell_background_depth:NNN #1 #2 #3
{
- \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
+ \int_compare:nNnTF { \lTblrCellRowSpanTl } < {2}
{ \dim_set_eq:NN #3 \l__tblr_row_dp_dim }
{
\dim_set:Nn #3
@@ -6622,7 +6745,7 @@
\dim_zero:N #4
\dim_add:Nn #4
{ \prop_item:Ne \l__tblr_row_item_skip_size_prop { item[#1] } }
- \int_step_inline:nnn { #1 + 1 } { #1 + \l__tblr_cell_rowspan_tl - 1 }
+ \int_step_inline:nnn { #1 + 1 } { #1 + \lTblrCellRowSpanTl - 1 }
{
\dim_add:Nn #4
{
@@ -6634,7 +6757,7 @@
\dim_set:Nn #5
{
\__tblr_data_item:nen { row }
- { \int_eval:n { #1 + \l__tblr_cell_rowspan_tl - 1 } } { belowsep }
+ { \int_eval:n { #1 + \lTblrCellRowSpanTl - 1 } } { belowsep }
}
%\tl_log:x { cell[#1][#2] ~:~ \dim_use:N #3, \dim_use:N #4, \dim_use:N #5 }
}
@@ -6651,7 +6774,7 @@
\dim_zero:N #4
\dim_add:Nn #4
{ \prop_item:Ne \l__tblr_col_item_skip_size_prop { item[#2] } }
- \int_step_inline:nnn { #2 + 1 } { #2 + \l__tblr_cell_colspan_tl - 1 }
+ \int_step_inline:nnn { #2 + 1 } { #2 + \lTblrCellColSpanTl - 1 }
{
\dim_add:Nn #4
{
@@ -6663,7 +6786,7 @@
\dim_set:Nn #5
{
\__tblr_data_item:nen { column }
- { \int_eval:n {#2 + \l__tblr_cell_colspan_tl - 1} } { rightsep }
+ { \int_eval:n {#2 + \lTblrCellColSpanTl - 1} } { rightsep }
}
%\tl_log:x { cell[#1][#2] ~:~ \dim_use:N #3, \dim_use:N #4, \dim_use:N #5 }
}
@@ -6916,7 +7039,11 @@
\NewDocumentCommand \UseTblrLibrary { m }
{
- \clist_map_inline:nn {#1} { \use:c { __tblr_use_lib_ ##1: } }
+ \clist_map_inline:nn {#1}
+ {
+ \use:c { __tblr_use_lib_ ##1: }
+ \cs_undefine:c { __tblr_use_lib_ ##1: }
+ }
}
%% Library amsmath and environments +array, +matrix, +cases, ...
@@ -7200,6 +7327,29 @@
}
}
+%% Library hook provides some public hooks
+
+\cs_new_protected:Npn \__tblr_hook_use:n #1 {}
+
+\NewTblrLibrary { hook }
+ {
+ \cs_set_eq:NN \__tblr_hook_use:n \hook_use:n
+ \hook_new_pair:nn { tabularray/trial/before } { tabularray/trial/after }
+ \hook_new_pair:nn { tabularray/table/before } { tabularray/table/after }
+ \hook_new_pair:nn { tabularray/row/before } { tabularray/row/after }
+ \hook_new_pair:nn { tabularray/cell/before } { tabularray/cell/after }
+ }
+
+%% Library html provides more public variables
+%% These variables can be used by tagpdf, tex4ht and lwarp packages
+
+\bool_new:N \l__tblr_html_variables_bool
+
+\NewTblrLibrary { html }
+ {
+ \bool_set_true:N \l__tblr_html_variables_bool
+ }
+
%% Library nameref and its caption-ref template
\NewTblrLibrary { nameref }
diff --git a/macros/latex/contrib/tabularray/tabularray.tex b/macros/latex/contrib/tabularray/tabularray.tex
index 3c050a4537..3a1404310f 100644
--- a/macros/latex/contrib/tabularray/tabularray.tex
+++ b/macros/latex/contrib/tabularray/tabularray.tex
@@ -1,7 +1,7 @@
% -*- coding: utf-8 -*-
% !TEX program = lualatex
\documentclass[oneside]{book}
-\newcommand*{\myversion}{2023A}
+\newcommand*{\myversion}{2024A}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
\usepackage[a4paper,margin=2.5cm]{geometry}
@@ -1570,6 +1570,7 @@ there are several other outer specifications which are described in Table~\ref{k
\K{long} & change the table to a long table & \None \\
\K{tall} & change the table to a tall table & \None \\
\K{expand} & you need this key to use verb commands & \None \\
+ \K{expand+} & like \K{expand} but appends to previous values & \None \\
\end{spectblr}
\subsection{Set Baseline in Another Way}
@@ -1607,19 +1608,27 @@ In contrast to traditional \verb!tabular! environment, \verb!tabularray! environ
need to see every \verb!&! and \verb!\\! when splitting the table body with \verb!l3regex!.
And you can not put cell text inside any table command defined with \verb!\NewTableCommand!.
But you could use outer key \verb!expand! to make \verb!tabularray! expand
-every occurrence of a specified macro \underline{once} before splitting the table body.
+every occurrence of any of the specified macros \underline{once} and \underline{in the given oder} before splitting the table body.
Note that you \underline{can not} expand a command defined with \verb!\NewDocumentCommand!.
+You can also use \verb!expand+! if you still want to keep the macros in the current \verb!expand! setting.
To expand a command without optional argument, you can define it with \verb!\newcommand!.
\begin{demohigh}
-\newcommand*\tblrbody{
- \hline
+\newcommand*\tblrrowa{
20 & 30 & 40 \\
+}
+\newcommand*\tblrrowb{
50 & 60 & 70 \\
+}
+\newcommand*\tblrbody{
+ \hline
+ \tblrrowa
+ \tblrrowb
\hline
}
-\begin{tblr}[expand=\tblrbody]{ccc}
+\SetTblrOuter{expand=\tblrbody\tblrrowa}
+\begin{tblr}[expand+=\tblrrowb]{ccc}
\hline
AA & BB & CC \\
\tblrbody
@@ -2865,6 +2874,16 @@ We can also use color series of \verb!xcolor! package to color table rows:
\end{tblr}
\end{demohigh}
+\section{Library \texttt{hook}}
+
+This library is experimental, please see\\
+\url{https://github.com/lvjr/tabularray/wiki/HooksAndVariables}.
+
+\section{Library \texttt{html}}
+
+This library is experimental, please see\\
+\url{https://github.com/lvjr/tabularray/wiki/HooksAndVariables}.
+
\section{Library \texttt{nameref}}
From version 2022D, you can load \verb!nameref! library