diff options
Diffstat (limited to 'macros')
86 files changed, 2257 insertions, 788 deletions
diff --git a/macros/latex/contrib/hyperref/ChangeLog.txt b/macros/latex/contrib/hyperref/ChangeLog.txt index 660a34563e..d4f1cd0fa3 100644 --- a/macros/latex/contrib/hyperref/ChangeLog.txt +++ b/macros/latex/contrib/hyperref/ChangeLog.txt @@ -1,3 +1,17 @@ +2023-11-09 Ulrike Fischer + * correct \cyreref to \cyrerev issue 307 + * corrent \textddagger definition issue 308 + * correct \DiamandSolid to \DiamondSolid in \psdmapshortnames issue 310 + * correct \textDiamandSolid to \textDiamondSolid issue 310 + * remove now unneeded fallbacks for reference commands + * nameref: remove unneeded beamer patch + * nameref: remove unneeded ifthen patch + * nameref: remove memoir patches, it handles titles itself now + * nameref: remove outdated titlesec patch. + +=========== +Version: 2023-10-27 v7.01e + 2023-11-07 Ulrike Fischer * improve thm code, issue 304 * insert socket for varwidth, issue 204 and 293 diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md index 0e47cc5012..b6cb9bc4d5 100644 --- a/macros/latex/contrib/hyperref/README.md +++ b/macros/latex/contrib/hyperref/README.md @@ -1,6 +1,6 @@ # README for hyperref bundle -Version 2023-11-07 v7.01e +Version 2023-11-09 v7.01f ## INTRODUCTION diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf Binary files differindex 1a9546b24e..3fd7b070cf 100644 --- a/macros/latex/contrib/hyperref/doc/backref.pdf +++ b/macros/latex/contrib/hyperref/doc/backref.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.html b/macros/latex/contrib/hyperref/doc/hyperref-doc.html index c84196a6c6..d6d79f4428 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.html +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html @@ -25,7 +25,7 @@ href="https://github.com/latex3/hyperref/issues" class="url" ><span class="ec-lmvtt-10x-x-120">https://github.com/latex3/hyperref/issues</span></a><span class="ec-lmr-12">)</span></div><br /> <div class="date" ><span -class="ec-lmr-12">2023-11-07 v7.01e</span></div> +class="ec-lmr-12">2023-11-09 v7.01f</span></div> </div> <h3 class="likesectionHead"><a id="x1-1000"></a>Contents</h3> diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf Binary files differindex 06eca0ae05..f641b410f2 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex index cfc4058afb..0d0c73190b 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -166,7 +166,7 @@ } \makeatother \title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2023-11-07 v7.01e} +\date{2023-11-09 v7.01f} \begin{document} diff --git a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf Binary files differindex 1305ef1528..307ef8a813 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf Binary files differindex 04ea790337..9cbb79825a 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref.pdf diff --git a/macros/latex/contrib/hyperref/doc/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf Binary files differindex 5b2f5f320e..b1c45978ea 100644 --- a/macros/latex/contrib/hyperref/doc/nameref.pdf +++ b/macros/latex/contrib/hyperref/doc/nameref.pdf diff --git a/macros/latex/contrib/hyperref/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx index d8309b3eb9..96c5ef9610 100644 --- a/macros/latex/contrib/hyperref/hluatex.dtx +++ b/macros/latex/contrib/hyperref/hluatex.dtx @@ -1,6 +1,6 @@ % \iffalse % Source File: hluatex.dtx -% 2023-11-07 v7.01e +% 2023-11-09 v7.01f % % Copyright % 2016-2019 Oberdiek Package Support Group @@ -31,7 +31,7 @@ % % \begin{macrocode} %<*luatex> -%% 2023-11-07 v7.01e +%% 2023-11-09 v7.01f %% force unicode encoding, see issue #101 %% code mostly copied from hxetex.def \HyPsd@LoadUnicode diff --git a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx index d013b89980..4c13813679 100644 --- a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx +++ b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 2023-11-07 v7.01e} +% \date{Version 2023-11-09 v7.01f} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/hyperref/hyperref-patches.dtx b/macros/latex/contrib/hyperref/hyperref-patches.dtx index 2c1209001a..4a5134a2b2 100644 --- a/macros/latex/contrib/hyperref/hyperref-patches.dtx +++ b/macros/latex/contrib/hyperref/hyperref-patches.dtx @@ -55,7 +55,7 @@ % }^^A % } % -% \date{Version 2023-11-07 v7.01e} +% \date{Version 2023-11-09 v7.01f} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/hyperref/hyperref.dtx b/macros/latex/contrib/hyperref/hyperref.dtx index c6fccc9cfd..94d6b909ff 100644 --- a/macros/latex/contrib/hyperref/hyperref.dtx +++ b/macros/latex/contrib/hyperref/hyperref.dtx @@ -51,7 +51,7 @@ %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} %<psdextra>\ProvidesFile{psdextra.def} -%<!none&!packageEnd> [2023-11-07 v7.01e % +%<!none&!packageEnd> [2023-11-09 v7.01f % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -9420,21 +9420,6 @@ } % \end{macrocode} -% Ignore star from referencing macros: -% This is only needed if LaTeX doesn't define the starred -% variants itself. -% \begin{macrocode} -\@ifundefined{@kernel@ref} - {\LetLtxMacro\NoHy@OrgRef\ref - \DeclareRobustCommand*{\ref}{% - \@ifstar\NoHy@OrgRef\NoHy@OrgRef - } - \LetLtxMacro\NoHy@OrgPageRef\pageref - \DeclareRobustCommand*{\pageref}{% - \@ifstar\NoHy@OrgPageRef\NoHy@OrgPageRef - }}{} -% \end{macrocode} -% % \section{Localized nullifying of package} % Sometimes we just don't want the wretched package interfering % with us. Define an environment we can put in manually, or include @@ -9522,21 +9507,7 @@ \long\def\@gobbleopt[#1]{} \let\hyperpage\@empty % \end{macrocode} -% Ignore star from referencing macros. This is only -% needed in older formats. % \begin{macrocode} -\@ifl@t@r\fmtversion{2022-06-01} - {}% - {% - \LetLtxMacro\NoHy@OrgRef\ref - \DeclareRobustCommand*{\ref}{% - \@ifstar\NoHy@OrgRef\NoHy@OrgRef - } - \LetLtxMacro\NoHy@OrgPageRef\pageref - \DeclareRobustCommand*{\pageref}{% - \@ifstar\NoHy@OrgPageRef\NoHy@OrgPageRef - }% - } %</nohyperref> % \end{macrocode} % @@ -10993,8 +10964,8 @@ % The last point is the most complicated. Simply moving at the point \cs{refstepcounter} % is encountered into the next para hook doesn't work, as this can be in a header if there is page % break. The next item hook doesn't work for the same reason, -% also not every theorem environment actually use \cs{item} (e.g. {amsthm} and ams-classes). -% Patching (or using a hook) \cs{@begintheorem} doesn't work either as {ntheorem} +% also not every theorem environment actually use \cs{item} (e.g. \texttt{amsthm} and ams-classes). +% Patching (or using a hook) \cs{@begintheorem} doesn't work either as \texttt{ntheorem} % redefines this on the fly. % % For now we move the target creation into the item hook. This is not perfect, @@ -20085,7 +20056,7 @@ \DeclareTextCommand{\textdagger}{PD1}{\201}% U+2020 % U+2021 DOUBLE DAGGER; daggerdbl; \ddagger (LaTeX) \DeclareTextCommand{\textdaggerdbl}{PD1}{\202}% U+2021 -\DeclareTextCommand{\textddagger}{PD1}{\textddagger} +\DeclareTextCommand{\textddagger}{PD1}{\textdaggerdbl} % U+2026 HORIZONTAL ELLIPSIS; ellipsis \DeclareTextCommand{\textellipsis}{PD1}{\203}% U+2026 % U+2014 EM DASH; emdash @@ -22322,7 +22293,7 @@ % U+04EC CYRILLIC CAPITAL LETTER E WITH DIAERESIS \DeclareTextCompositeCommand{\"}{PU}{\CYREREV}{\84\354}% U+04EC % U+04ED CYRILLIC SMALL LETTER E WITH DIAERESIS -\DeclareTextCompositeCommand{\"}{PU}{\cyreref}{\84\355}% U+04ED +\DeclareTextCompositeCommand{\"}{PU}{\cyrerev}{\84\355}% U+04ED % U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON; Umacroncyrillic \DeclareTextCompositeCommand{\=}{PU}{\CYRU}{\84\356}% U+04EE % U+04EF CYRILLIC SMALL LETTER U WITH MACRON; umacroncyrillic @@ -24591,8 +24562,8 @@ % U+2752 UPPER RIGHT SHADOWED WHITE SQUARE; % \SquareCastShadowTopRight (bbding) \DeclareTextCommand{\textSquareCastShadowTopRight}{PU}{\9047\122}%* U+2752 -% U+2756 BLACK DIAMOND MINUS WHITE X; \OrnamentDiamandSolid (bbding) -\DeclareTextCommand{\textDiamandSolid}{PU}{\9047\126}%* U+2756 +% U+2756 BLACK DIAMOND MINUS WHITE X; \OrnamentDiamondSolid (bbding) +\DeclareTextCommand{\textDiamondSolid}{PU}{\9047\126}%* U+2756 % U+2758 LIGHT VERTICAL BAR; \RectangleThin (bbding) \DeclareTextCommand{\textRectangleThin}{PU}{\9047\130}%* U+2758 % U+2759 MEDIUM VERTICAL BAR; \Rectangle (bbding) @@ -26134,7 +26105,7 @@ \let\SquareTopRight\textSquareTopRight \let\SquareCastShadowBottomRight\textSquareCastShadowBottomRight \let\SquareCastShadowTopRight\textSquareCastShadowTopRight - \let\DiamandSolid\textDiamandSolid + \let\DiamondSolid\textDiamondSolid \let\RectangleThin\textRectangleThin \let\Rectangle\textRectangle \let\RectangleBold\textRectangleBold diff --git a/macros/latex/contrib/hyperref/nameref.dtx b/macros/latex/contrib/hyperref/nameref.dtx index d282f8dfd5..861af305a0 100644 --- a/macros/latex/contrib/hyperref/nameref.dtx +++ b/macros/latex/contrib/hyperref/nameref.dtx @@ -33,7 +33,7 @@ %<driver>\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2023-10-05 v2.54 Cross-referencing by name of section]% + [2023-11-09 v2.55 Cross-referencing by name of section]% % % % \iffalse @@ -110,8 +110,6 @@ % \item \cs{@ssect}: command to store the title added, % \cs{Sectionformat} is added. % -% \item \cs{M@sect} (memoir class): command to store the title added -% % \item \cs{@part}, \cs{@spart}, \cs{@chapter}, \cs{@schapter}: % command to store the title added % \item \cs{ttl@sect@i} (from the \textsf{titlesec} package): @@ -457,27 +455,6 @@ % \end{macrocode} % \end{macro} % -% Support for class memoir. -% -% \begin{macrocode} -\@ifundefined{NR@nopatch@sectioning} - {\ltx@IfUndefined{ifheadnameref}{% - }{% - \ltx@IfUndefined{M@sect}{% - }{% - \let\NRorg@M@sect\M@sect - \def\M@sect#1#2#3#4#5#6[#7][#8]{% - \ifheadnameref - \NR@gettitle{#8}% - \else - \NR@gettitle{#7}% - \fi - \NRorg@M@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]% - }% - }% - }}{} -% \end{macrocode} -% % Parts and chapters are treated differently. sigh. % \cs{@part} and \cs{@spart} are \cs{long} because of class memoir. % @@ -500,32 +477,6 @@ \NR@gettitle{#1}% \NR@chapter[{#1}]{#2}% } - \@ifclassloaded{memoir}{% - \ltx@IfUndefined{ifheadnameref}{% - }{% - \def\@chapter[#1]#2{% - \ltx@IfUndefined{ch@pt@c}{% - \NR@gettitle{#1}% - }{% - \ifx\ch@pt@c\ltx@empty - \NR@gettitle{#2}% - \else - \def\NR@temp{#1}% - \ifx\NR@temp\ltx@empty - \expandafter\NR@gettitle\expandafter{\ch@pt@c}% - \else - \ifheadnameref - \NR@gettitle{#1}% - \else - \expandafter\NR@gettitle\expandafter{\ch@pt@c}% - \fi - \fi - \fi - }% - \NR@chapter[{#1}]{#2}% - }% - }% - }{} \def\@schapter#1{% \NR@gettitle{#1}% \NR@schapter{#1}% @@ -580,71 +531,6 @@ } % \end{macrocode} % -% Compatibility for package titlesec. -% \begin{macrocode} -\AtBeginDocument{% - \@ifpackageloaded{titlesec}{% - \let\NRorg@ttl@sect@i\ttl@sect@i - \@ifundefined{NR@nopatch@titlesec} - {% - \def\ttl@sect@i#1#2[#3]#4{% - \NR@gettitle{#4}% - \NRorg@ttl@sect@i{#1}{#2}[{#3}]{#4}% - }% - }{}% - }{}% -} -% \end{macrocode} -% -% \subsubsection{Class beamer} -% -% \begin{macrocode} -\@ifclassloaded{beamer}{% - \@ifclasslater{beamer}{2022-05-17} - {}%do nothing - {% - \@ifundefined{NR@nopatch@beamer} - {% - \def\NR@PatchBeamer#1{% - \expandafter\let\csname NRorg@beamer@#1\expandafter\endcsname - \csname beamer@#1\endcsname - \begingroup - \edef\x{\endgroup - \long\def\expandafter\noexpand\csname beamer@#1\endcsname - [####1]{% hash-ok - \noexpand\NR@gettitle{####1}% - \expandafter\noexpand\csname NRorg@beamer@#1\endcsname - [{####1}]% - }% - }% - \x - }% - \AddToHook{class/beamer/after}{% - \NR@PatchBeamer{section}% - \NR@PatchBeamer{subsection}% - \NR@PatchBeamer{subsubsection}% -% \end{macrocode} -% -% Theorem names. -% \begin{macrocode} - \addtobeamertemplate{theorem begin}{% - \expandafter\NR@gettitle\expandafter{\inserttheoremaddition}% - }{}% -% \end{macrocode} -% \begin{macrocode} - \@ifdefinable{\NRorg@beamer@descriptionitem}{% - \let\NRorg@beamer@descriptionitem\beamer@descriptionitem - \renewcommand{\beamer@descriptionitem}[1]{% - \NR@gettitle{#1}% - \NRorg@beamer@descriptionitem{#1}% - }% - }% - }%Hook - }{}%@ifundefined - }%class later - }{} -% \end{macrocode} -% % \subsubsection{Theorems} % % \begin{macrocode} @@ -914,35 +800,6 @@ % \end{macrocode} % \end{macro} % -% \subsection{Package ifthen support} -% -% Package ifthen's \cmd{\isodd} does not work with -% \cmd{\pageref} because of the extra link and the -% star form. Therefore we need an expandable variant. -% -% Unfortunately there is no hook in \cmd{\ifthenelse} in order -% to provide expandable versions without link of \cmd{\ref} -% and \cmd{\pageref}. As possible target I could only find -% \cmd{\begingroup}: -% Changed/disabled 2022-04-13: ifthen takes care itself to -% change \cmd{\pageref} to an expandable version. -% \begin{macrocode} -\@ifundefined{@kernel@pageref@exp} - {\@ifpackageloaded{ifthen}{% - \let\NROrg@ifthenelse\ifthenelse - \def\ifthenelse{% - \let\begingroup\NR@TE@begingroup - \NROrg@ifthenelse - }% - \let\NROrg@begingroup\begingroup - \def\NR@TE@begingroup{% - \let\begingroup\NROrg@begingroup - \begingroup - \def\ref##1{\getrefbykeydefault{##1}{}{??}}% - \def\pageref##1{\getrefbykeydefault{##1}{page}{0}}% - }% - }{}}{} -% \end{macrocode} % % \subsection{Compatibility with varioref} % diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty index 929f1d8cdd..84c9611732 100644 --- a/macros/latex/contrib/hyperref/xr-hyper.sty +++ b/macros/latex/contrib/hyperref/xr-hyper.sty @@ -57,7 +57,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr-hyper} - [2023-11-07 v7.01e eXternal References (DPC)] + [2023-11-09 v7.01f eXternal References (DPC)] \def\externaldocument{\@testopt\XR@cite{}} \let\externalcitedocument\externaldocument diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex bbc0a4960d..511b284af0 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 60aef1b154..44ae53a48c 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -5,8 +5,8 @@ % arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') \documentclass[a4paper,french,11pt]{article} -\def\PLversion{3.00d} -\def\PLdate{5 novembre 2023} +\def\PLversion{3.00e} +\def\PLdate{10 novembre 2023} \usepackage{amsfonts} \usepackage{ProfLycee} \useproflyclib{piton,minted,pythontex,ecritures} diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 42e9227e59..555bc5c125 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/11/05 3.00d Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/11/10 3.00e Aide pour l'utilisation de LaTeX en lycee] +% 3.00e Ajout des 'machines à transformer' + Correction d'un nom de commande (cc ProfCollege ^^) % 3.00d Ajout de commandes pour des chateaux de cartes et des allumettes % 3.00c Ajout de chiffrements (César + Affine + Hill) % 3.00b Amélioration de la commande des intervalles (spécifier un label pour les bornes) diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex index 280970d88c..adcc03f028 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex @@ -328,7 +328,7 @@ columns=fullflexible,firstnumber=\CodePseudoCodeLstFirstLine,% stringstyle=\color{MotsClesPseudoCodeChaine}, classoffset=0,% - keywords={Pour,Fonction,Début,Debut,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% + keywords={Algorithme,Pour,Fonction,Début,Paramètre,Parametre,Debut,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% keywordstyle=\color{MotsClesPseudoCodeA},% classoffset=1,% morekeywords={Afficher,Retourner,Saisir},% @@ -473,7 +473,7 @@ columns=fullflexible,firstnumber=\CodePseudoCodeLstFirstLine, stringstyle=\color{MotsClesPseudoCodeChaine}, classoffset=0,% - keywords={Pour,Fonction,Debut,Début,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% + keywords={Algorithme,Pour,Fonction,Debut,Début,Paramètre,Parametre,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% keywordstyle=\color{MotsClesPseudoCodeA},% classoffset=1,% morekeywords={Afficher,Retourner,Saisir},% diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex index 89a1c83801..880ac4cbb3 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex @@ -452,7 +452,7 @@ \defKV[allumettes]{CouleurBois=\def\MatchWoodColor{#1},CouleurBout=\def\MatchEndColor{#1},Decal=\def\MatchOffset{#1}} \setKVdefault[allumettes]{CouleurBois=BoisAllumette,CouleurBout=GratteAllumette,Decal={0.8*\LongueurGratte},NoirBlanc=false} -\NewDocumentCommand\Allumette{ O{} m }{%1 offset,%2 = ptA>ptB +\NewDocumentCommand\PfLAllumette{ O{} m }{%1 offset,%2 = ptA>ptB \useKVdefault[allumettes]% \setKV[allumettes]{#1}% \ifboolKV[allumettes]{NoirBlanc}% @@ -471,13 +471,147 @@ \end{scope} } -\NewDocumentCommand\Allumettes{ O{} m }{% +\NewDocumentCommand\PfLAllumettes{ O{} m }{% \setsepchar{ }% \readlist*\listeptsalum{#2}% \xintFor* ##1 in {\xintSeq{1}{\listeptsalumlen}}\do{% \itemtomacro\listeptsalum[##1]{\diralum} - \Allumette[#1]{\diralum} + \PfLAllumette[#1]{\diralum} }% } +%====MACHINE À TRANSFORMER +\defKV[machtransf]{% + Couleur=\def\MachTransfCol{#1},% + CouleurFct=\def\MachTransfColF{#1},% + Hauteur=\def\MachTransfHt{#1},% + Largeur=\def\MachTransfWd{#1},% + Offset=\def\MachTransfOffset{#1},% + CouleurBloc=\def\MachTransfColBl{#1},% + PoliceTbl=\def\MachTransfFontTbl{#1},% + Fct=\def\MachTransfFct{#1},% + Formule=\def\MachTransfFormule{#1},% + Echelle=\def\MatchTransfScale{#1} +} + +\setKVdefault[machtransf]{% + Couleur=lightgray,% + CouleurFct=white,% + Bordure=false,% + AffFleche=true,% + Hauteur=3,% + Largeur=2,% + Offset=4pt,% + CouleurBloc=red,% + Tableau=false,% + PoliceTbl=\footnotesize,% + Logo=true,% + Fct={},% + Auto=false,% + Formule={},% + ES=false,% + Echelle=1 +} + +\NewDocumentCommand\MachineTransformer{ O{} m D<>{} }{% + \useKVdefault[machtransf]% + \setKV[machtransf]{#1}% + \tikzset{MachTransfBlocVal/.style={draw=none,fill=\MachTransfColBl,rounded corners=3pt}}% + \tikzset{MachTransfVal/.style={text=white}}% + \begin{tikzpicture}[line join=bevel,scale=\MatchTransfScale,every node/.style={scale=\MatchTransfScale},#3] + \ifboolKV[machtransf]{Bordure}% + {% + \fill[draw=black,semithick,fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + \fill[draw=black,fill=\MachTransfCol] ({0.25*\MachTransfWd},{0.3*\MachTransfHt}) --++ (150:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[draw=black,fill=\MachTransfCol] ({0.75*\MachTransfWd},{0.7*\MachTransfHt}) --++ (30:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + }% + {% + \fill[draw=none,semithick,fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + \fill[draw=none,semithick,fill=\MachTransfCol] ({0.25*\MachTransfWd},{0.3*\MachTransfHt}) --++ (150:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[draw=none,semithick,fill=\MachTransfCol] ({0.75*\MachTransfWd},{0.7*\MachTransfHt}) --++ (30:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + }% + \ifboolKV[machtransf]{Logo}% + {% + \node[scale={2*\MachTransfWd},text=\MachTransfCol!75!black] at ({0.5*\MachTransfWd},{0.5*\MachTransfHt}) {\faIcon{cog}}; + }% + {}% + \ifboolKV[machtransf]{AffFleche}% + {% + \draw[line width=2.5pt,\MachTransfColF,->,>=latex] ({0},{0.3*\MachTransfHt}) to[out=0,in=180] ({\MachTransfWd},{0.7*\MachTransfHt}) ; + }% + {}% + \ifboolKV[machtransf]{ES}% + {% + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {\phantom{9}} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {\phantom{9}} ; + }% + {}% + \ifboolKV[machtransf]{Auto}% + {% + \IfStrEq{#2}{}% + {}% + {% + \setsepchar{,}% + \readlist*\machtransflst{#2}% + %1ère valeur + \itemtomacro\machtransflst[1]\tmpvaldeb% + \IfEq{\tmpvaldeb}{}% + {\xdef\tmpvaldeb{\phantom{9}}\xdef\tmpvalfin{\phantom{9}}}% + {\StrSubstitute{\MachTransfFormule}{X}{(\tmpvaldeb)}[\tmpvalfin]} + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {$\tmpvaldeb$} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {$\xinteval{\tmpvalfin}$} ; + \ifboolKV[machtransf]{Tableau}% + {% + \node[below=\MachTransfOffset] at ({0.5*\MachTransfWd},0) {\begin{NiceTabular}[hvlines]{|c|c|} + \CodeBefore + \rowcolor{lightgray!25}{1} + \Body + \texttt{\MachTransfFontTbl{}Entrée}&\texttt{\MachTransfFontTbl{}Sortie}\\ + \xintFor* ##1 in {\xintSeq{1}{\machtransflstlen}}\do{% + \itemtomacro\machtransflst[##1]\tmpvaldeb$\tmpvaldeb$ & % + \itemtomacro\machtransflst[##1]\tmpvaldeb\IfEq{\tmpvaldeb}{}% + {\xdef\tmpvaldeb{\phantom{9}}\xdef\tmpvalfin{\phantom{9}}}% + {\StrSubstitute{\MachTransfFormule}{X}{(\tmpvaldeb)}[\tmpvalfin]\xdef\tmpvalfin{\xinteval{\tmpvalfin}}}$\tmpvalfin$ \\% + } + \end{NiceTabular}} ;% + }% + {}% + }% + }% + {% + \IfStrEq{#2}{}% + {}% + {% + \setsepchar[.]{,./}% + \readlist*\machtransflst{#2}% + %1ère valeur + \itemtomacro\machtransflst[1,1]\tmpvaldeb% + \itemtomacro\machtransflst[1,2]\tmpvalfin% + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {\IfEq{\tmpvaldeb}{}{\phantom{9}}{\tmpvaldeb}} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {\IfEq{\tmpvalfin}{}{\phantom{9}}{\tmpvalfin}} ; + \ifboolKV[machtransf]{Tableau}% + {% + \node[below=\MachTransfOffset] at ({0.5*\MachTransfWd},0) {\begin{NiceTabular}[hvlines]{|c|c|} + \CodeBefore + \rowcolor{lightgray!25}{1} + \Body + \texttt{\MachTransfFontTbl{}Entrée}&\texttt{\MachTransfFontTbl{}Sortie}\\ + \xintFor* ##1 in {\xintSeq{1}{\machtransflstlen}}\do{% + \itemtomacro\machtransflst[##1,1]{\tmpvaldeb}\tmpvaldeb & % + \itemtomacro\machtransflst[##1,2]{\tmpvalfin}\tmpvalfin\\% + } + \end{NiceTabular}} ;% + }% + {}% + }% + }% + \IfStrEq{\MachTransfFct}{}% + {}% + {% + \node[text=black,above=0pt] at ({0.5*\MachTransfWd},0) {\MachTransfFct} ; + }% + \end{tikzpicture} +} + \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md index b5a8a983e0..b9a7b50076 100644 --- a/macros/latex/contrib/tagpdf/README.md +++ b/macros/latex/contrib/tagpdf/README.md @@ -1,6 +1,6 @@ #tagpdf — A package to create tagged pdf -Packageversion: 0.98m -Packagedate: 2023/10/27 +Packageversion: 0.98n +Packagedate: 2023/11/10 Author: Ulrike Fischer ## License diff --git a/macros/latex/contrib/tagpdf/ex-AF-file.pdf b/macros/latex/contrib/tagpdf/ex-AF-file.pdf index ad143617bb..01005b4e94 100644 --- a/macros/latex/contrib/tagpdf/ex-AF-file.pdf +++ b/macros/latex/contrib/tagpdf/ex-AF-file.pdf @@ -1,11 +1,11 @@ %PDF-2.0 % 23 0 obj -<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20231027154221+02'00') /Size 151 /CheckSum (ACA3C0F12F8F866B0433C4C044C411ED) >> /Length 151 >> +<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20231110140937+01'00') /Size 151 /CheckSum (AFAB6D7630BC17F0715E512B375DAF2F) >> /Length 151 >> stream %% LaTeX2e file `example-input-file.tex' %% generated by the `filecontents' environment -%% from source `ex-AF-file' on 2023/10/27. +%% from source `ex-AF-file' on 2023/11/10. %% Additional info! @@ -15,7 +15,7 @@ endobj << /Type /Filespec /AFRelationship /Unspecified /F <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /UF <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /EF<</F 23 0 R/UF 23 0 R>> >> endobj 26 0 obj -<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231027) >> /Length 19 >> +<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231110) >> /Length 19 >> stream Bär with teh shirt endstream @@ -24,7 +24,7 @@ endobj << /Type /Filespec /AFRelationship /Supplement /F <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /UF <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /EF<</F 26 0 R/UF 26 0 R>> >> endobj 29 0 obj -<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231027) >> /Length 4 >> +<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231110) >> /Length 4 >> stream Duck endstream @@ -242,17 +242,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:42:44+02:00</rdf:li> + <rdf:li>2023-11-10T14:10:00+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-AF-file.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:42:44+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:42:44+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:42:44+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:10:00+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:10:00+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:10:00+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:38d5a844-2217-4081-87cc-b2129dc357a6</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:396e9fee-5777-4b30-8277-a876d4a46909</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:40cfed2b-246c-4f9e-8dbb-81e17b7af1cd</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -350,7 +350,7 @@ endobj << /Type /Namespace /NS (https://www.latex-project.org/ns/inline/2022) /RoleMapNS 19 0 R >> endobj 20 0 obj -<< /Type /Namespace /NS (data:,EB2B3286-C2B1-7025-F961-1B8FEB3177B1) >> +<< /Type /Namespace /NS (data:,C16FD12F-E6F4-B639-8684-B77B77C0DEAC) >> endobj 7 0 obj [ 8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R ] @@ -452,7 +452,7 @@ endobj << /Type /Catalog /Pages 37 0 R /MarkInfo 38 0 R/Lang (de-DE)/Metadata 32 0 R/StructTreeRoot 5 0 R >> endobj 47 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154244+02'00')/ModDate (D:20231027154244+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141000+01'00')/ModDate (D:20231110141000+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 48 @@ -505,7 +505,7 @@ xref 0000020422 00000 n 0000020540 00000 n trailer -<< /Size 48 /Root 46 0 R /Info 47 0 R /ID [ <C14030CFEF82565EB5A7E1E51941FD64> <C14030CFEF82565EB5A7E1E51941FD64> ] >> +<< /Size 48 /Root 46 0 R /Info 47 0 R /ID [ <0906DE5BA246761E32230059ADAEA835> <0906DE5BA246761E32230059ADAEA835> ] >> startxref 20763 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf Binary files differindex 99066ad2a9..d006c4e759 100644 --- a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf +++ b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf diff --git a/macros/latex/contrib/tagpdf/ex-attribute.pdf b/macros/latex/contrib/tagpdf/ex-attribute.pdf index 67a1a336a9..3e56bd0cce 100644 --- a/macros/latex/contrib/tagpdf/ex-attribute.pdf +++ b/macros/latex/contrib/tagpdf/ex-attribute.pdf @@ -216,17 +216,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:43:46+02:00</rdf:li> + <rdf:li>2023-11-10T14:11:06+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-attribute.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:43:46+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:43:46+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:43:46+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:11:06+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:11:06+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:11:06+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:7a9cf910-1c19-429a-8f24-339c62d8a57f</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:2224d4af-56f8-40bb-8b90-ea889de2fd42</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:2bc8027a-cfe0-4961-8490-8daa82cc99e4</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -449,7 +449,7 @@ endobj << /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de_DE)/Metadata 21 0 R/StructTreeRoot 5 0 R >> endobj 38 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20231027154346+02'00')/ModDate (D:20231027154346+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20231110141106+01'00')/ModDate (D:20231110141106+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 39 @@ -493,7 +493,7 @@ xref 0000017720 00000 n 0000017838 00000 n trailer -<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <D3968930357FEE397E019F4A160C2AE3> <D3968930357FEE397E019F4A160C2AE3> ] >> +<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <F0741ED33F8E6F5B02B6BC9CDAF134FE> <F0741ED33F8E6F5B02B6BC9CDAF134FE> ] >> startxref 18075 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf index cc1671d7f8..9c1eb39685 100644 --- a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf +++ b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf @@ -239,17 +239,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:44:17+02:00</rdf:li> + <rdf:li>2023-11-10T14:11:39+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-formula-problem.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:44:17+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:44:17+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:44:17+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:11:39+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:11:39+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:11:39+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:8eb2ce1d-b2ec-440a-8bc2-73733eb3eeb0</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:a3fd31b5-cd7b-4075-8f6d-1e64dd2b713b</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:1cb80672-7f0e-4957-82fd-a363ca4be249</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>2</prism:pageCount> </rdf:Description> @@ -425,7 +425,7 @@ endobj << /Type /Catalog /Pages 16 0 R /MarkInfo 23 0 R/Lang (de-DE)/Metadata 19 0 R/StructTreeRoot 5 0 R >> endobj 33 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154417+02'00')/ModDate (D:20231027154417+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141139+01'00')/ModDate (D:20231110141139+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 34 @@ -464,7 +464,7 @@ xref 0000018886 00000 n 0000019004 00000 n trailer -<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <18CBACCFD23D931A034DDF17EC30B3A2> <18CBACCFD23D931A034DDF17EC30B3A2> ] >> +<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <4B9E465D4F356F14AC84B182AD479F1E> <4B9E465D4F356F14AC84B182AD479F1E> ] >> startxref 19227 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-list.pdf b/macros/latex/contrib/tagpdf/ex-list.pdf index 8b8c52809e..4adf5f2655 100644 --- a/macros/latex/contrib/tagpdf/ex-list.pdf +++ b/macros/latex/contrib/tagpdf/ex-list.pdf @@ -210,17 +210,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:44:48+02:00</rdf:li> + <rdf:li>2023-11-10T14:12:11+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-list.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:44:48+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:44:48+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:44:48+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:12:11+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:12:11+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:12:11+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:4c749825-1de7-414c-879f-29e4d0bef66e</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:6465c816-cbd0-49f0-8f11-d7d38ccf3873</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:02d87685-2095-48b8-85da-5ee1c8c493fa</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -653,7 +653,7 @@ endobj << /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en-US)/Metadata 48 0 R/StructTreeRoot 5 0 R >> endobj 72 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154448+02'00')/ModDate (D:20231027154448+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141211+01'00')/ModDate (D:20231110141211+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 73 @@ -731,7 +731,7 @@ xref 0000029592 00000 n 0000029710 00000 n trailer -<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <B2A7793657FCC57463973470FB017435> <B2A7793657FCC57463973470FB017435> ] >> +<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <09DEF1FD2F764480F957BC8BD613651A> <09DEF1FD2F764480F957BC8BD613651A> ] >> startxref 29933 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf index 03d9baa245..a0a8da7c1b 100644 --- a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf +++ b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf @@ -243,17 +243,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:45:16+02:00</rdf:li> + <rdf:li>2023-11-10T14:12:40+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-mc-manual-para-split-obsolete.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:45:16+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:45:16+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:45:16+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:12:40+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:12:40+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:12:40+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:c33d64b4-96ec-4e48-8f27-0b3edc831547</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:19465596-e014-4208-8ea6-cde9c10efd13</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:52227309-b4de-4e21-891a-dad1c3eff6b8</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>2</prism:pageCount> </rdf:Description> @@ -413,7 +413,7 @@ endobj << /Type /Catalog /Pages 14 0 R /Lang (en-US)/Metadata 15 0 R >> endobj 25 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154516+02'00')/ModDate (D:20231027154516+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141240+01'00')/ModDate (D:20231110141240+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 26 @@ -444,7 +444,7 @@ xref 0000023897 00000 n 0000023978 00000 n trailer -<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <E81B8D7D57ACDFDA45EA41C58123AB8C> <E81B8D7D57ACDFDA45EA41C58123AB8C> ] >> +<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <B71915C8C17E9479FA80AC71CAF7B245> <B71915C8C17E9479FA80AC71CAF7B245> ] >> startxref 24201 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf index 75ac71bbba..647091c049 100644 --- a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf +++ b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf @@ -210,17 +210,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:45:42+02:00</rdf:li> + <rdf:li>2023-11-10T14:13:07+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-softhyphen.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:45:42+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:45:42+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:45:42+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:13:07+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:13:07+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:13:07+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:aa82e685-4098-469d-861c-3c45dfc700c7</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:0f48bcfe-bbe2-43ab-8377-9cfd9adb7d23</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:4f689acd-2072-43d3-856b-a58f6b26b13c</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -393,7 +393,7 @@ endobj << /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (en-US)/Metadata 14 0 R/StructTreeRoot 5 0 R >> endobj 30 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154542+02'00')/ModDate (D:20231027154542+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141307+01'00')/ModDate (D:20231110141307+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 31 @@ -429,7 +429,7 @@ xref 0000018116 00000 n 0000018234 00000 n trailer -<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <55E3FDBDB8E688D88AE3ECB360B2CD8D> <55E3FDBDB8E688D88AE3ECB360B2CD8D> ] >> +<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <F8EAEDE45D732AA955717061C997A6A5> <F8EAEDE45D732AA955717061C997A6A5> ] >> startxref 18457 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf index 54163da4f7..59c708eaf3 100644 --- a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf +++ b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf @@ -210,17 +210,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:46:07+02:00</rdf:li> + <rdf:li>2023-11-10T14:13:31+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-spaceglyph-listings.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:46:07+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:46:07+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:46:07+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:13:31+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:13:31+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:13:31+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:acdc2435-bf29-4e54-8d09-1c9b6dc32038</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:bfe06476-5d48-4964-8826-50562f0f9875</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:631da56a-0ec5-456d-87d4-f70bf6acbe9f</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -354,7 +354,7 @@ endobj << /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (en-US)/Metadata 10 0 R/StructTreeRoot 5 0 R >> endobj 26 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154607+02'00')/ModDate (D:20231027154607+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141331+01'00')/ModDate (D:20231110141331+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 27 @@ -386,7 +386,7 @@ xref 0000015484 00000 n 0000015602 00000 n trailer -<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <FFAF6EF252682BD0179C52AEACF1EAD0> <FFAF6EF252682BD0179C52AEACF1EAD0> ] >> +<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <F8208C53956D6B2968E58A038D143F4B> <F8208C53956D6B2968E58A038D143F4B> ] >> startxref 15825 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf index dd921f6c6a..569172f2bf 100644 --- a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf +++ b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf @@ -210,17 +210,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:46:33+02:00</rdf:li> + <rdf:li>2023-11-10T14:13:58+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-structure-obsolete.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:46:33+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:46:33+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:46:33+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:13:58+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:13:58+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:13:58+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:bf5e4a2b-cfa9-4fc5-878c-8f9d2ee95445</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:3faeed81-5075-4961-87b9-5303bf7b914e</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:d2bd8d0f-1f98-4b4c-8047-a5af0ff5747a</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -526,7 +526,7 @@ endobj << /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (en-US)/Metadata 20 0 R/StructTreeRoot 5 0 R >> endobj 43 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154633+02'00')/ModDate (D:20231027154633+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141358+01'00')/ModDate (D:20231110141358+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 44 @@ -575,7 +575,7 @@ xref 0000023426 00000 n 0000023544 00000 n trailer -<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <9BB580D33960C81880B4ED0F31B8B5B6> <9BB580D33960C81880B4ED0F31B8B5B6> ] >> +<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <C8B6F7D9B994556DD12263178F0AD592> <C8B6F7D9B994556DD12263178F0AD592> ] >> startxref 23767 %%EOF diff --git a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf index 2a6e5ac789..314850be08 100644 --- a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf +++ b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf @@ -210,17 +210,17 @@ stream </dc:language> <dc:date> <rdf:Seq> - <rdf:li>2023-10-27T15:47:00+02:00</rdf:li> + <rdf:li>2023-11-10T14:14:26+01:00</rdf:li> </rdf:Seq> </dc:date> <dc:format>application/pdf</dc:format> <dc:source>ex-tagpdf-template.tex</dc:source> <xmp:CreatorTool>LaTeX</xmp:CreatorTool> - <xmp:CreateDate>2023-10-27T15:47:00+02:00</xmp:CreateDate> - <xmp:ModifyDate>2023-10-27T15:47:00+02:00</xmp:ModifyDate> - <xmp:MetadataDate>2023-10-27T15:47:00+02:00</xmp:MetadataDate> + <xmp:CreateDate>2023-11-10T14:14:26+01:00</xmp:CreateDate> + <xmp:ModifyDate>2023-11-10T14:14:26+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2023-11-10T14:14:26+01:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:f320abfc-f6ab-4d12-8719-d176f4d947cf</xmpMM:DocumentID> - <xmpMM:InstanceID>uuid:18202c14-899a-4cda-8daf-fcc14e5f853c</xmpMM:InstanceID> + <xmpMM:InstanceID>uuid:d328b069-9e8c-4ecc-8df0-1cab14ffe29a</xmpMM:InstanceID> <prism:complianceProfile>three</prism:complianceProfile> <prism:pageCount>1</prism:pageCount> </rdf:Description> @@ -309,7 +309,7 @@ endobj << /Type /Namespace /NS (https://www.latex-project.org/ns/inline/2022) /RoleMapNS 19 0 R >> endobj 20 0 obj -<< /Type /Namespace /NS (data:,C7EF4D21-F6E9-945B-6CFB-89718A316EF8) >> +<< /Type /Namespace /NS (data:,9178B9FC-4867-FE34-58C9-EAC87DE90333) >> endobj 7 0 obj [ 8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R ] @@ -401,7 +401,7 @@ endobj << /Type /Catalog /Pages 32 0 R /MarkInfo 33 0 R/Lang (en-US)/Metadata 27 0 R/StructTreeRoot 5 0 R >> endobj 43 0 obj -<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231027154700+02'00')/ModDate (D:20231027154700+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> +<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231110141426+01'00')/ModDate (D:20231110141426+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >> endobj xref 0 44 @@ -450,7 +450,7 @@ xref 0000017567 00000 n 0000017685 00000 n trailer -<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <9D99A86289CEA95B3479F9506648B285> <9D99A86289CEA95B3479F9506648B285> ] >> +<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <13E8734E578845AFB77A1386EB367394> <13E8734E578845AFB77A1386EB367394> ] >> startxref 17908 %%EOF diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx index d6fcd70ff0..bad8cbe1fe 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*luatex> -\ProvidesExplFile {tagpdf-luatex.def} {2023-10-27} {0.98m} +\ProvidesExplFile {tagpdf-luatex.def} {2023-11-10} {0.98n} {tagpdf~driver~for~luatex} % \end{macrocode} % \section{Loading the lua} @@ -158,8 +158,8 @@ local ProvidesLuaModule = { name = "tagpdf", - version = "0.98m", --TAGVERSION - date = "2023-10-27", --TAGDATE + version = "0.98n", --TAGVERSION + date = "2023-11-10", --TAGDATE description = "tagpdf lua code", license = "The LATEX Project Public License 1.3c" } diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx index dc1456ea30..faad17d671 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \section{Commands} @@ -313,7 +313,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-checks-code} {2023-11-10} {0.98n} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -681,7 +681,7 @@ { \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1} { - \msg_warning:nnx { tag } {role-unknown-tag} {#1} + \msg_warning:nne { tag } {role-unknown-tag} {#1} } } % \end{macrocode} @@ -698,7 +698,7 @@ } } -\cs_generate_variant:Nn \@@_check_info_closing_struct:n {o,x} +\cs_generate_variant:Nn \@@_check_info_closing_struct:n {o,e} % \end{macrocode} % \end{macro} % \begin{macro}{\@@_check_no_open_struct:} @@ -785,7 +785,7 @@ { \@@_mc_if_in:T { - \msg_warning:nnx { tag } {mc-nested} { \@@_get_mc_abs_cnt: } + \msg_warning:nne { tag } {mc-nested} { \@@_get_mc_abs_cnt: } } } @@ -793,7 +793,7 @@ { \@@_mc_if_in:F { - \msg_warning:nnx { tag } {mc-not-open} { \@@_get_mc_abs_cnt: } + \msg_warning:nne { tag } {mc-not-open} { \@@_get_mc_abs_cnt: } } } % \end{macrocode} @@ -807,11 +807,11 @@ { \int_compare:nNnT { \l_@@_loglevel_int } ={ 2 } - { \msg_info:nnx {tag}{mc-#1}{#2} } + { \msg_info:nne {tag}{mc-#1}{#2} } \int_compare:nNnT { \l_@@_loglevel_int } > { 2 } { - \msg_info:nnx {tag}{mc-#1}{#2} + \msg_info:nne {tag}{mc-#1}{#2} \seq_log:N \g_@@_mc_stack_seq } } @@ -824,11 +824,11 @@ { \tl_if_empty:NT #1 { - \msg_error:nnx { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: } + \msg_error:nne { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: } } \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1} { - \msg_warning:nnx { tag } {role-unknown-tag} {#1} + \msg_warning:nne { tag } {role-unknown-tag} {#1} } } % \end{macrocode} @@ -882,7 +882,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_check_show_MCID_by_page: { - \tl_set:Nx \l_@@_tmpa_tl + \tl_set:Ne \l_@@_tmpa_tl { \@@_property_ref_lastpage:nn {abspage} @@ -913,7 +913,7 @@ ##1 } { - \seq_gput_right:Nx \l_tmpa_seq + \seq_gput_right:Ne \l_tmpa_seq { Page##1-####1- \@@_property_ref:enn @@ -1081,7 +1081,7 @@ {#1} {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl} { - \msg_warning:nnxx { tag/debug }{ struct-end-wrong } + \msg_warning:nnee { tag/debug }{ struct-end-wrong } {#1} {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl} } diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf Binary files differindex f39263a055..8ad5a96ec6 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf +++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx index 7ad2a3f327..db8d475c29 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % This files contains a various data files which are read in @@ -60,7 +60,7 @@ % It lists the new tag, the rolemap and the namespace of the rolemap. % \begin{macrocode} %<*ns-latex> -%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-11-10} {0.98n} %% {latex} {https://www.latex-project.org/ns/dflt/2022}{} title, Title, pdf2, part, Title, pdf2, @@ -92,7 +92,7 @@ text, P, pdf2, % It is bound to change % \begin{macrocode} %<*ns-latex-book> -%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-11-10} {0.98n} %% {latex-book} {https://www.latex-project.org/ns/book/2022}{} chapter, H1,pdf2, section, H2,pdf2, @@ -108,7 +108,7 @@ subparagraph, H6,pdf2, % loaded. % \begin{macrocode} %<*ns-latex-inline> -%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-11-10} {0.98n} %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{} chapter, Span, pdf2, section, Span, pdf2, @@ -122,7 +122,7 @@ P, Span, pdf2, % \section{The pdf namespace data} % \begin{macrocode} %<*ns-pdf> -%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-11-10} {0.98n} %% {pdf} {http://iso.org/pdf/ssn}{} StructTreeRoot,StructTreeRoot,pdf,D, Document,Document,pdf,D, @@ -190,7 +190,7 @@ Strong,Span,pdf,I, % \section{The pdf 2.0 namespace data} % \begin{macrocode} %<*ns-pdf2> -%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-11-10} {0.98n} %% {pdf2} {http://iso.org/pdf2/ssn}{} Document,Document,pdf2,D, Part,Part,pdf2,G, @@ -246,7 +246,7 @@ Strong,Strong,pdf2,I, % \section{The mathml namespace data} % \begin{macrocode} %<*ns-mathml> -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-11-10} {0.98n} % {mathml}{http://www.w3.org/1998/Math/MathML}{} abs,abs,mathml, and,and,mathml, @@ -481,7 +481,7 @@ xor,xor,mathml, % This will perhaps change in future. % \begin{macrocode} %<*parent-child> -%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-11-10} {0.98n} ,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅ Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅ @@ -536,7 +536,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0.. % This will perhaps change in future. % \begin{macrocode} %<*parent-child-2> -%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-10-27} {0.98m} +%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-11-10} {0.98n} ,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅ DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅ diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx index d1f6441a56..1651229013 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \end{documentation} @@ -55,11 +55,11 @@ % \begin{macrocode} %<@@=tag> %<*generic> -\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-11-10} {0.98n} {part of tagpdf - code related to marking chunks - generic mode} %</generic> %<*debug> -\ProvidesExplPackage {tagpdf-debug-generic} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-debug-generic} {2023-11-10} {0.98n} {part of tagpdf - debugging code related to marking chunks - generic mode} %</debug> % \end{macrocode} @@ -212,10 +212,10 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_mc_get_marks: { - \exp_args:NNx + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_mc_firstmarks_seq { \tex_firstmarks:D \g_@@_mc_marks } - \exp_args:NNx + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_mc_botmarks_seq { \tex_botmarks:D \g_@@_mc_marks } } @@ -235,16 +235,16 @@ %\prop_show:N \g_@@_struct_cont_mc_prop \prop_get:NnNTF \g_@@_struct_cont_mc_prop {#1} \l_@@_tmpa_tl { - \prop_gput:Nnx \g_@@_struct_cont_mc_prop {#1}{ \l_@@_tmpa_tl \@@_struct_mcid_dict:n {#2}} + \prop_gput:Nne \g_@@_struct_cont_mc_prop {#1}{ \l_@@_tmpa_tl \@@_struct_mcid_dict:n {#2}} } { - \prop_gput:Nnx \g_@@_struct_cont_mc_prop {#1}{ \@@_struct_mcid_dict:n {#2}} + \prop_gput:Nne \g_@@_struct_cont_mc_prop {#1}{ \@@_struct_mcid_dict:n {#2}} } - \prop_gput:Nxx \g_@@_mc_parenttree_prop + \prop_gput:Nee \g_@@_mc_parenttree_prop {#2} {#3} } -\cs_generate_variant:Nn \@@_mc_store:nnn {xxx} +\cs_generate_variant:Nn \@@_mc_store:nnn {eee} % \end{macrocode} % \end{macro} % @@ -272,11 +272,11 @@ %test if artifact \int_compare:nNnTF { \seq_item:cn { g_@@_mc_#1_marks_seq } {3} } = {-1} { - \tl_set:Nx \l_@@_tmpa_tl { \seq_item:cn { g_@@_mc_#1_marks_seq } {4} } + \tl_set:Ne \l_@@_tmpa_tl { \seq_item:cn { g_@@_mc_#1_marks_seq } {4} } \@@_mc_handle_artifact:N \l_@@_tmpa_tl } { - \exp_args:Nx + \exp_args:Ne \@@_mc_bdc_mcid:n { \seq_item:cn { g_@@_mc_#1_marks_seq } {4} @@ -288,7 +288,7 @@ {} { %store - \@@_mc_store:xxx + \@@_mc_store:eee { \seq_item:cn { g_@@_mc_#1_marks_seq } {2} } @@ -422,7 +422,7 @@ % bottom split marks set up. We use this to set up % \cs{l_@@_mc_firstmarks_seq} % \begin{macrocode} - \exp_args:NNx + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_mc_firstmarks_seq { \tex_splitfirstmarks:D \g_@@_mc_marks } % \end{macrocode} @@ -465,7 +465,7 @@ { Pick~ up~ new~ bot~ mark! } - \exp_args:NNx + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_mc_botmarks_seq { \tex_splitbotmarks:D \g_@@_mc_marks } } @@ -569,7 +569,7 @@ \msg_warning:nn { tagpdf} { old-engine } \@@_prop_new:N \g_@@_MCID_byabspage_prop \int_new:N \g_@@_MCID_tmp_bypage_int - \cs_generate_variant:Nn \@@_mc_bdc:nn {nx} + \cs_generate_variant:Nn \@@_mc_bdc:nn {ne} % \end{macrocode} % revert the attribute: % \begin{macrocode} @@ -578,7 +578,7 @@ \cs_new_protected:Npn \@@_mc_bdc_mcid:nn #1 #2 { \int_gincr:N \c@g_@@_MCID_abs_int - \tl_set:Nx \l_@@_mc_ref_abspage_tl + \tl_set:Ne \l_@@_mc_ref_abspage_tl { \@@_property_ref:enn %3 args { @@ -596,7 +596,7 @@ { %key already present, use value for MCID and add 1 for the next \int_gset:Nn \g_@@_MCID_tmp_bypage_int { \l_@@_mc_tmpa_tl } - \@@_prop_gput:Nxx + \@@_prop_gput:Nee \g_@@_MCID_byabspage_prop { \l_@@_mc_ref_abspage_tl } { \int_eval:n {\l_@@_mc_tmpa_tl +1} } @@ -604,7 +604,7 @@ { %key not present, set MCID to 0 and insert 1 \int_gzero:N \g_@@_MCID_tmp_bypage_int - \@@_prop_gput:Nxx + \@@_prop_gput:Nee \g_@@_MCID_byabspage_prop { \l_@@_mc_ref_abspage_tl } {1} @@ -614,7 +614,7 @@ mcid-\int_use:N \c@g_@@_MCID_abs_int } \c_@@_property_mc_clist - \@@_mc_bdc:nx + \@@_mc_bdc:ne {#1} { /MCID~\int_eval:n { \g_@@_MCID_tmp_bypage_int }~ \exp_not:n { #2 } } } @@ -633,7 +633,7 @@ % \end{macrocode} % \end{macro} -% \begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:x} +% \begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:e} % This is the handler which puts a mc into the % the current structure. The argument is the number of the mc. % Beside storing the mc into the structure, it also has to record the @@ -648,11 +648,11 @@ \@@_struct_kid_mc_gput_right:nn { \g_@@_struct_stack_current_tl } {#1} - \prop_gput:Nxx \g_@@_mc_parenttree_prop + \prop_gput:Nee \g_@@_mc_parenttree_prop {#1} { \g_@@_struct_stack_current_tl } } -\cs_generate_variant:Nn \@@_mc_handle_stash:n { x } +\cs_generate_variant:Nn \@@_mc_handle_stash:n { e } % \end{macrocode} % \end{macro} @@ -761,7 +761,7 @@ { g_@@_struct_ \g_@@_struct_stack_current_tl _prop} {S} \l_@@_tmpa_tl - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl } @@ -770,7 +770,7 @@ (struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl) } } - \@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int } + \@@_mc_handle_stash:e { \int_use:N \c@g_@@_MCID_abs_int } } } \group_end: @@ -830,12 +830,12 @@ { tag .code:n = % the name (H,P,Span) etc { - \tl_set:Nx \l_@@_mc_key_tag_tl { #1 } - \tl_gset:Nx \g_@@_mc_key_tag_tl { #1 } + \tl_set:Ne \l_@@_mc_key_tag_tl { #1 } + \tl_gset:Ne \g_@@_mc_key_tag_tl { #1 } }, raw .code:n = { - \tl_put_right:Nx \l_@@_mc_key_properties_tl { #1 } + \tl_put_right:Ne \l_@@_mc_key_properties_tl { #1 } }, alt .code:n = % Alt property { @@ -864,7 +864,7 @@ label .tl_set:N = \l_@@_mc_key_label_tl, artifact .code:n = { - \exp_args:Nnx + \exp_args:Nne \keys_set:nn { @@ / mc } { __artifact-bool, __artifact-type=#1 } diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx index 7066237b76..43d8c78283 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{implementation} % The code is splitted into three parts: code shared by all engines, @@ -86,11 +86,11 @@ % \begin{macrocode} %<@@=tag> %<*luamode> -\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-11-10} {0.98n} {tagpdf - mc code only for the luamode } %</luamode> %<*debug> -\ProvidesExplPackage {tagpdf-debug-lua} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-debug-lua} {2023-11-10} {0.98n} {part of tagpdf - debugging code related to marking chunks - lua mode} %</debug> % \end{macrocode} @@ -194,7 +194,7 @@ \cs_new:Nn \@@_mc_lua_set_mc_type_attr:n % #1 is a tag name { %TODO ltx.@@.func.get_num_from("#1") seems not to return a suitable number?? - \tl_set:Nx\l_@@_tmpa_tl{\lua_now:e{ltx.@@.func.output_num_from ("#1")} } + \tl_set:Ne\l_@@_tmpa_tl{\lua_now:e{ltx.@@.func.output_num_from ("#1")} } \lua_now:e { tex.setattribute @@ -261,7 +261,7 @@ % \end{macrocode} % \end{macro} % -%\begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:x} +%\begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:e} % This is the lua variant for the command to % put an mcid absolute number in the current structure. % \begin{macrocode} @@ -290,14 +290,14 @@ \g_@@_struct_stack_current_tl,#1 ) } - \prop_gput:Nxx + \prop_gput:Nee \g_@@_mc_parenttree_prop { #1 } { \g_@@_struct_stack_current_tl } } %</luamode|debug> %<*luamode> -\cs_generate_variant:Nn \@@_mc_handle_stash:n { x } +\cs_generate_variant:Nn \@@_mc_handle_stash:n { e } % \end{macrocode} % \end{macro} % @@ -355,7 +355,7 @@ { g_@@_struct_ \g_@@_struct_stack_current_tl _prop} {S} \l_@@_tmpa_tl - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl } @@ -365,7 +365,7 @@ (struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl) } } - \@@_mc_handle_stash:x { \@@_get_mc_abs_cnt: } + \@@_mc_handle_stash:e { \@@_get_mc_abs_cnt: } } } \group_end: @@ -432,8 +432,8 @@ { tag .code:n = % { - \tl_set:Nx \l_@@_mc_key_tag_tl { #1 } - \tl_gset:Nx \g_@@_mc_key_tag_tl { #1 } + \tl_set:Ne \l_@@_mc_key_tag_tl { #1 } + \tl_gset:Ne \g_@@_mc_key_tag_tl { #1 } \lua_now:e { ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"tag","#1") @@ -441,7 +441,7 @@ }, raw .code:n = { - \tl_put_right:Nx \l_@@_mc_key_properties_tl { #1 } + \tl_put_right:Ne \l_@@_mc_key_properties_tl { #1 } \lua_now:e { ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"raw","#1") @@ -513,11 +513,11 @@ }, artifact .code:n = { - \exp_args:Nnx + \exp_args:Nne \keys_set:nn { @@ / mc} { __artifact-bool, __artifact-type=#1, tag=Artifact } - \exp_args:Nnx + \exp_args:Nne \keys_set:nn { @@ / mc } { __artifact-store=\l_@@_mc_artifact_type_tl } diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx index e18f7bd1b0..11b5f36276 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -181,7 +181,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-11-10} {0.98n} {part of tagpdf - code related to marking chunks - code shared by generic and luamode } %</header> @@ -328,7 +328,7 @@ { \@@_check_if_active_struct:T { - \tl_set:Nx \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} } + \tl_set:Ne \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} } \tl_if_empty:NTF\l_@@_tmpa_tl { \msg_warning:nnn {tag} {mc-label-unknown} {#1} @@ -336,7 +336,7 @@ { \cs_if_free:cTF { g_@@_mc_label_\tl_to_str:n{#1}_used_tl } { - \@@_mc_handle_stash:x { \l_@@_tmpa_tl } + \@@_mc_handle_stash:e { \l_@@_tmpa_tl } \@@_mc_set_label_used:n {#1} } { @@ -395,7 +395,7 @@ { \@@_mc_if_in:TF { - \seq_gpush:Nx \g_@@_mc_stack_seq { \tag_get:n {mc_tag} } + \seq_gpush:Ne \g_@@_mc_stack_seq { \tag_get:n {mc_tag} } \@@_check_mc_pushed_popped:nn { pushed } { \tag_get:n {mc_tag} } diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx index 36b4639476..3cec0cda91 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \begin{function} @@ -98,7 +98,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-roles-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-roles-code} {2023-11-10} {0.98n} {part of tagpdf - code related to roles and structure names} %</header> % \end{macrocode} @@ -292,7 +292,7 @@ { \prop_new:c { g_@@_role_NS_#1_prop } \prop_new:c { g_@@_role_NS_#1_class_prop } - \prop_gput:Nnx \g_@@_role_NS_prop {#1}{} + \prop_gput:Nne \g_@@_role_NS_prop {#1}{} } } { @@ -311,7 +311,7 @@ \pdf_string_from_unicode:nnN{utf8/string}{#2}\l_@@_tmpa_str \tl_if_empty:NF \l_@@_tmpa_str { - \pdfdict_gput:nnx + \pdfdict_gput:nne {g_@@_role/Namespace_#1_dict} {NS} {\l_@@_tmpa_str} @@ -319,10 +319,10 @@ %RoleMapNS is added in tree \tl_if_empty:nF {#3} { - \pdfdict_gput:nnx{g_@@_role/Namespace_#1_dict} + \pdfdict_gput:nne{g_@@_role/Namespace_#1_dict} {Schema}{#3} } - \prop_gput:Nnx \g_@@_role_NS_prop {#1}{\pdf_object_ref:n{tag/NS/#1}~} + \prop_gput:Nne \g_@@_role_NS_prop {#1}{\pdf_object_ref:n{tag/NS/#1}~} } } % \end{macrocode} @@ -334,7 +334,7 @@ % % \begin{variable}{\c_@@_role_userNS_id_str} % \begin{macrocode} -\str_const:Nx \c_@@_role_userNS_id_str +\str_const:Ne \c_@@_role_userNS_id_str { data:, \int_to_Hex:n{\int_rand:n {65535}} \int_to_Hex:n{\int_rand:n {65535}} @@ -362,7 +362,7 @@ \@@_role_NS_new:nnn {latex} {https://www.latex-project.org/ns/dflt/2022}{} \@@_role_NS_new:nnn {latex-book} {https://www.latex-project.org/ns/book/2022}{} \@@_role_NS_new:nnn {latex-inline} {https://www.latex-project.org/ns/inline/2022}{} -\exp_args:Nnx +\exp_args:Nne \@@_role_NS_new:nnn {user}{\c_@@_role_userNS_id_str}{} % \end{macrocode} % @@ -462,7 +462,7 @@ \prop_get:NnN \g_@@_role_rolemap_prop {#2}\l_@@_tmpa_tl \quark_if_no_value:NTF \l_@@_tmpa_tl { - \prop_gput:Nnx \g_@@_role_rolemap_prop {#1}{\tl_to_str:n{#2}} + \prop_gput:Nne \g_@@_role_rolemap_prop {#1}{\tl_to_str:n{#2}} } { \prop_gput:NnV \g_@@_role_rolemap_prop {#1}\l_@@_tmpa_tl @@ -516,7 +516,7 @@ % \begin{macrocode} \tl_if_in:nnF {-pdf-pdf2-mathml-}{-#2-} { - \pdfdict_gput:nnx {g_@@_role/RoleMapNS_#2_dict}{#1} + \pdfdict_gput:nne {g_@@_role/RoleMapNS_#2_dict}{#1} { [ \pdf_name_from_unicode_e:n{#3} @@ -534,7 +534,7 @@ \prop_get:cnN { g_@@_role_NS_#4_prop } {#3}\l_@@_tmpa_tl \quark_if_no_value:NTF \l_@@_tmpa_tl { - \prop_gput:cnx { g_@@_role_NS_#2_prop } {#1} + \prop_gput:cne { g_@@_role_NS_#2_prop } {#1} {{\tl_to_str:n{#3}}{\tl_to_str:n{#4}}} } { @@ -560,8 +560,8 @@ { \prop_get:cnNTF {g_@@_role_NS_#2_prop} {#1}\l_@@_tmpa_tl { - \tl_set:Nx #3 {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl} - \tl_set:Nx #4 {\exp_last_unbraced:NV\use_ii:nn \l_@@_tmpa_tl} + \tl_set:Ne #3 {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl} + \tl_set:Ne #4 {\exp_last_unbraced:NV\use_ii:nn \l_@@_tmpa_tl} } { \tl_set:Nn #3 {#1} @@ -807,7 +807,7 @@ { \seq_map_indexed_inline:Nn \l_@@_tmpa_seq { - \prop_gput:Nnx\g_@@_role_index_prop + \prop_gput:Nne\g_@@_role_index_prop {##2} {\int_compare:nNnT{##1}<{10}{0}##1} } @@ -836,7 +836,7 @@ % \begin{macrocode} \seq_map_indexed_inline:Nn \l_@@_tmpa_seq { - \exp_args:Nnx + \exp_args:Nne \@@_store_parent_child_rule:nnn {##1}{\l_@@_tmpb_tl}{ ##2 } } } @@ -851,19 +851,19 @@ % Hn and mathml tags are special and need to be added explicitly % \begin{macrocode} \prop_get:NnN\g_@@_role_index_prop{StructTreeRoot}\l_@@_tmpa_tl -\prop_gput:Nnx\g_@@_role_index_prop{Root}{\l_@@_tmpa_tl} +\prop_gput:Nne\g_@@_role_index_prop{Root}{\l_@@_tmpa_tl} \prop_get:NnN\g_@@_role_index_prop{Hn}\l_@@_tmpa_tl \pdf_version_compare:NnTF < {2.0} { \int_step_inline:nn{6} { - \prop_gput:Nnx\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl} + \prop_gput:Nne\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl} } } { \int_step_inline:nn{10} { - \prop_gput:Nnx\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl} + \prop_gput:Nne\g_@@_role_index_prop{H#1}{\l_@@_tmpa_tl} } % \end{macrocode} % all mathml tags are currently handled identically @@ -908,7 +908,7 @@ % \end{macrocode} % Get the rule from the intarray % \begin{macrocode} - \tl_set:Nx#4 + \tl_set:Ne#4 { \intarray_item:Nn \g_@@_role_parent_child_intarray @@ -938,7 +938,7 @@ \tl_set:Nn \l_@@_tmpa_tl {unknown} } \tl_set:Nn \l_@@_tmpb_tl {#1} - \msg_note:nnxxx + \msg_note:nneee { tag } { role-parent-child } { #1 } @@ -953,7 +953,7 @@ } { \tl_set:Nn#4 {0} - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { #1 } @@ -1025,7 +1025,7 @@ } { \tl_set:Nn #5 {0} - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { #1 } @@ -1061,7 +1061,7 @@ } { \tl_set:Nn #3 {0} - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { #1 } @@ -1090,7 +1090,7 @@ {#1} \l_@@_tmpa_tl { - \tl_set:Nx \l_@@_tmpa_tl {\tl_head:N\l_@@_tmpa_tl} + \tl_set:Ne \l_@@_tmpa_tl {\tl_head:N\l_@@_tmpa_tl} \tl_if_empty:NT\l_@@_tmpa_tl { \tl_set:Nn \l_@@_tmpa_tl {#1} @@ -1115,7 +1115,7 @@ {#3} \l_@@_tmpb_tl { - \tl_set:Nx \l_@@_tmpb_tl { \tl_head:N\l_@@_tmpb_tl } + \tl_set:Ne \l_@@_tmpb_tl { \tl_head:N\l_@@_tmpb_tl } \tl_if_empty:NT\l_@@_tmpb_tl { \tl_set:Nn \l_@@_tmpb_tl {#3} @@ -1139,7 +1139,7 @@ } { \tl_set:Nn #5 {0} - \msg_warning:nnxxx + \msg_warning:nneee { tag } {role-parent-child} { #1 } @@ -1220,18 +1220,18 @@ { \prop_get:cVNT { g_@@_role_NS_latex-inline_prop }\l_@@_role_remap_tag_tl\l_@@_tmpa_tl { - \tl_set:Nx\l_@@_role_remap_tag_tl + \tl_set:Ne\l_@@_role_remap_tag_tl { \exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl } - \tl_set:Nx\l_@@_role_remap_NS_tl + \tl_set:Ne\l_@@_role_remap_NS_tl { \exp_last_unbraced:NV\use_ii:nn \l_@@_tmpa_tl } } \int_compare:nNnT {\l_@@_loglevel_int} > { 0 } { - \msg_note:nnx { tag } { role-remapping }{ \l_@@_role_remap_tag_tl } + \msg_note:nne { tag } { role-remapping }{ \l_@@_role_remap_tag_tl } } } } @@ -1244,7 +1244,7 @@ } \int_compare:nNnT {\l_@@_loglevel_int} > { 0 } { - \msg_note:nnx { tag } { role-remapping }{ \l_@@_role_remap_tag_tl/latex-inline } + \msg_note:nne { tag } { role-remapping }{ \l_@@_role_remap_tag_tl/latex-inline } } } } @@ -1284,8 +1284,8 @@ \tl_if_empty:NF \l_tmpa_tl { \exp_args:NNno \seq_set_split:Nnn \l_tmpa_seq { / } {\l_tmpa_tl/} - \tl_set:Nx \l_@@_role_tag_tmpa_tl { \seq_item:Nn \l_tmpa_seq {1} } - \tl_set:Nx \l_@@_role_role_tmpa_tl { \seq_item:Nn \l_tmpa_seq {2} } + \tl_set:Ne \l_@@_role_tag_tmpa_tl { \seq_item:Nn \l_tmpa_seq {1} } + \tl_set:Ne \l_@@_role_role_tmpa_tl { \seq_item:Nn \l_tmpa_seq {2} } } \tl_if_empty:NT \l_@@_role_role_namespace_tmpa_tl { diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx index 191a645b12..0798ffa995 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \begin{function}{interwordspace (setup-key)} @@ -64,7 +64,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-space-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-space-code} {2023-11-10} {0.98n} {part of tagpdf - code related to real space chars} %</header> % \end{macrocode} @@ -79,9 +79,9 @@ \keys_define:nn { @@ / setup } { interwordspace .choices:nn = { true, on } - { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} }, + { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str} }, interwordspace .choices:nn = { false, off } - { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} }, + { \msg_warning:nne {tag}{sys-no-interwordspace}{\c_sys_engine_str} }, interwordspace .default:n = true, show-spaces .bool_set:N = \l_@@_showspaces_bool } diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx index 263ae03cfa..6aeb54c3fd 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -247,7 +247,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-struct-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-struct-code} {2023-11-10} {0.98n} {part of tagpdf - code related to storing structure} %</header> % \end{macrocode} @@ -663,7 +663,7 @@ %<package>\cs_new_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum% %<debug>\cs_set_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum% { - \@@_seq_gput_right:cx + \@@_seq_gput_right:ce { g_@@_struct_kids_#1_seq } { \@@_struct_mcid_dict:n {#2} @@ -692,7 +692,7 @@ %<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct %<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct { - \@@_seq_gput_right:cx + \@@_seq_gput_right:ce { g_@@_struct_kids_#1_seq } { \pdf_object_ref:n { @@/struct/#2 } @@ -725,7 +725,7 @@ { /Type/OBJR/Obj~#2/Pg~#3 } - \@@_seq_gput_right:cx + \@@_seq_gput_right:ce { g_@@_struct_kids_#1_seq } { \pdf_object_ref_last: @@ -940,7 +940,7 @@ % \begin{verbatim} % \tag_struct_begin:n { tag=Link } % \tag_mc_begin:n { tag=Link } -% (1) \pdfannot_dict_put:nnx +% (1) \pdfannot_dict_put:nne % { link/URI } % { StructParent } % { \int_use:N\c@g_@@_parenttree_obj_int } @@ -1212,7 +1212,7 @@ \int_gincr:N \g_@@_struct_AFobj_int \pdf_object_if_exist:eF {@@/fileobj\int_use:N\g_@@_struct_AFobj_int} { - \pdffile_embed_stream:nxx + \pdffile_embed_stream:nee {#1} {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2} {@@/fileobj\int_use:N\g_@@_struct_AFobj_int} @@ -1233,13 +1233,13 @@ } } { - \cs_generate_variant:Nn \pdffile_embed_stream:nnN {nxN} + \cs_generate_variant:Nn \pdffile_embed_stream:nnN {neN} \cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2 % #1 content, #2 extension { \group_begin: \int_gincr:N \g_@@_struct_AFobj_int - \pdffile_embed_stream:nxN + \pdffile_embed_stream:neN {#1} {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2} \l_@@_tmpa_tl @@ -1318,7 +1318,7 @@ % \end{macrocode} % we set the mime type as pdfresources uses currently text/plain % \begin{macrocode} - \pdfdict_put:nnx + \pdfdict_put:nne { l_pdffile }{Subtype} { \pdf_name_from_unicode_e:n{application/x-tex} } \@@_struct_add_inline_AF:on {#1}{tex} @@ -1625,7 +1625,7 @@ { \g_@@_struct_stack_current_tl } { \@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{0} } %add the current structure to the labeled one as parents - \@@_prop_gput:cnx + \@@_prop_gput:cne { g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{0}_prop } { P } { @@ -1699,11 +1699,11 @@ { \msg_warning:nnn { tag } {struct-used-twice} {#1} } - %add the label structure as kid to the current structure (can be the root) + %add the \#1 structure as kid to the current structure (can be the root) \@@_struct_kid_struct_gput_right:ee { \g_@@_struct_stack_current_tl } { #1 } - %add the current structure to the labeled one as parents + %add the current structure to \#1 as parent \@@_struct_prop_gput:nne { #1 } { P } @@ -1812,7 +1812,7 @@ % \begin{macro} % { % \tag_struct_insert_annot:nn, -% \tag_struct_insert_annot:xx, +% \tag_struct_insert_annot:ee, % \tag_struct_insert_annot:ee % } % \begin{macro}[EXP] @@ -1848,7 +1848,7 @@ % \section{Attributes and attribute classes} % \begin{macrocode} %<*header> -\ProvidesExplPackage {tagpdf-attr-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-attr-code} {2023-11-10} {0.98n} {part of tagpdf - code related to attributes and attribute classes} %</header> % \end{macrocode} @@ -1882,6 +1882,9 @@ % two brace group, the name and the content. The content typically % needs an |/O| key for the owner. An example look like % this. +% +% TODO: consider to put them directly in the ClassMap, that is perhaps +% more effective. % \begin{verbatim} % \tagpdfsetup % { @@ -1907,18 +1910,6 @@ } % \end{macrocode} % \end{macro} -% TEMP!!!! -% we temporarly use an internal function for the mapping. This can go -% at the next update -% \begin{macrocode} -\cs_if_free:NTF \seq_set_map_e:NNn - { - \cs_new_eq:NN \@@_seq_set_map_e:NNn \seq_set_map_x:NNn - } - { - \cs_new_eq:NN \@@_seq_set_map_e:NNn \seq_set_map_e:NNn - } -% \end{macrocode} % % \begin{macro}{attribute-class (struct-key)} % attribute-class has to store the used attribute names so that @@ -1933,7 +1924,7 @@ % \end{macrocode} % we convert the names into pdf names with slash % \begin{macrocode} - \@@_seq_set_map_e:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq + \seq_set_map_e:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq { \pdf_name_from_unicode_e:n {##1} } @@ -1976,7 +1967,7 @@ % \end{macrocode} % we convert the names into pdf names with slash % \begin{macrocode} - \@@_seq_set_map_e:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq + \seq_set_map_e:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq { \pdf_name_from_unicode_e:n {##1} } diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx index 41298b2d69..af7b1d089b 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-tree-code} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-tree-code} {2023-11-10} {0.98n} {part of tagpdf - code related to writing trees and dictionaries to the pdf} %</header> % \end{macrocode} @@ -111,7 +111,7 @@ \bool_if:NT \g_@@_active_tree_bool { \pdfmanagement_add:nnn { Catalog / MarkInfo } { Marked } { true } - \pdfmanagement_add:nnx + \pdfmanagement_add:nne { Catalog } { StructTreeRoot } { \pdf_object_ref:n { @@/struct/0 } } @@ -152,34 +152,34 @@ \int_step_inline:nn {\c@g_@@_struct_abs_int} { \int_incr:N\l_@@_tmpa_int - \tl_put_right:Nx \l_@@_tmpa_tl + \tl_put_right:Ne \l_@@_tmpa_tl { \@@_struct_get_id:n{##1}~\pdf_object_ref:n{@@/struct/##1}~ } \int_compare:nNnF {\l_@@_tmpa_int}<{50} % { - \pdf_object_unnamed_write:nx {dict} + \pdf_object_unnamed_write:ne {dict} { /Limits~[\@@_struct_get_id:n{##1-\l_@@_tmpa_int+1}~\@@_struct_get_id:n{##1}] /Names~[\l_@@_tmpa_tl] } - \tl_put_right:Nx\l_@@_tmpb_tl {\pdf_object_ref_last:\c_space_tl} + \tl_put_right:Ne\l_@@_tmpb_tl {\pdf_object_ref_last:\c_space_tl} \int_zero:N \l_@@_tmpa_int \tl_clear:N \l_@@_tmpa_tl } } \tl_if_empty:NF \l_@@_tmpa_tl { - \pdf_object_unnamed_write:nx {dict} + \pdf_object_unnamed_write:ne {dict} { /Limits~ [\@@_struct_get_id:n{\c@g_@@_struct_abs_int-\l_@@_tmpa_int+1}~ \@@_struct_get_id:n{\c@g_@@_struct_abs_int}] /Names~[\l_@@_tmpa_tl] } - \tl_put_right:Nx\l_@@_tmpb_tl {\pdf_object_ref_last:} + \tl_put_right:Ne\l_@@_tmpb_tl {\pdf_object_ref_last:} } - \pdf_object_unnamed_write:nx {dict}{/Kids~[\l_@@_tmpb_tl]} - \@@_prop_gput:cnx + \pdf_object_unnamed_write:ne {dict}{/Kids~[\l_@@_tmpb_tl]} + \@@_prop_gput:cne { g_@@_struct_0_prop } { IDTree } { \pdf_object_ref_last: } @@ -195,17 +195,17 @@ { \cs_new_protected:Npn \@@_tree_write_structtreeroot: { - \@@_prop_gput:cnx + \@@_prop_gput:cne { g_@@_struct_0_prop } { ParentTree } { \pdf_object_ref:n { @@/tree/parenttree } } - \@@_prop_gput:cnx + \@@_prop_gput:cne { g_@@_struct_0_prop } { RoleMap } { \pdf_object_ref:n { @@/tree/rolemap } } \@@_struct_fill_kid_key:n { 0 } \@@_struct_get_dict_content:nN { 0 } \l_@@_tmpa_tl - \pdf_object_write:nnx + \pdf_object_write:nne { @@/struct/0 } {dict} { @@ -219,13 +219,13 @@ { \cs_new_protected:Npn \@@_tree_write_structtreeroot: { - \@@_prop_gput:cnx + \@@_prop_gput:cne { g_@@_struct_0_prop } { ParentTree } { \pdf_object_ref:n { @@/tree/parenttree } } \@@_struct_fill_kid_key:n { 0 } \@@_struct_get_dict_content:nN { 0 } \l_@@_tmpa_tl - \pdf_object_write:nnx + \pdf_object_write:nne { @@/struct/0 } {dict} { @@ -291,7 +291,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_parenttree_add_objr:nn #1 #2 %#1 StructParent number, #2 objref { - \tl_gput_right:Nx \g_@@_parenttree_objr_tl + \tl_gput_right:Ne \g_@@_parenttree_objr_tl { #1 \c_space_tl #2 ^^J } @@ -322,13 +322,13 @@ \int_compare:nT {\@@_property_ref:enn{mcid-####1}{tagabspage}{-1}=##1} %mcid is on current page {% yes - \prop_put:Nxx + \prop_put:Nee \l_@@_tmpa_prop {\@@_property_ref:enn{mcid-####1}{tagmcid}{-1}} {\prop_item:Nn \g_@@_mc_parenttree_prop {####1}} } } - \tl_put_right:Nx\l_@@_parenttree_content_tl + \tl_put_right:Ne\l_@@_parenttree_content_tl { \int_eval:n {##1-1}\c_space_tl [\c_space_tl %] @@ -340,7 +340,7 @@ { \prop_get:NnNTF \l_@@_tmpa_prop {####1} \l_@@_tmpa_tl {% page#1:mcid##1:\l_@@_tmpa_tl :content - \tl_put_right:Nx \l_@@_parenttree_content_tl + \tl_put_right:Ne \l_@@_parenttree_content_tl { \pdf_object_if_exist:eTF { @@/struct/\l_@@_tmpa_tl } { @@ -404,7 +404,7 @@ } \@@_tree_parenttree_rerun_msg: \tl_put_right:NV \l_@@_parenttree_content_tl\g_@@_parenttree_objr_tl - \pdf_object_write:nnx { @@/tree/parenttree }{dict} + \pdf_object_write:nne { @@/tree/parenttree }{dict} { /Nums\c_space_tl [\l_@@_parenttree_content_tl] } @@ -438,12 +438,12 @@ { \tl_if_eq:nnF {##1}{##2} { - \pdfdict_gput:nnx {g_@@_role/RoleMap_dict} + \pdfdict_gput:nne {g_@@_role/RoleMap_dict} {##1} {\pdf_name_from_unicode_e:n{##2}} } } - \pdf_object_write:nnx { @@/tree/rolemap }{dict} + \pdf_object_write:nne { @@/tree/rolemap }{dict} { \pdfdict_use:n{g_@@_role/RoleMap_dict} } @@ -474,7 +474,7 @@ {##1} >> } - \tl_set:Nx \l_@@_tmpa_tl + \tl_set:Ne \l_@@_tmpa_tl { \seq_use:Nn \l_@@_tmpa_seq @@ -484,11 +484,11 @@ \l_@@_tmpa_tl { \pdf_object_new:n { @@/tree/classmap } - \pdf_object_write:nnx + \pdf_object_write:nne { @@/tree/classmap } {dict} { \l_@@_tmpa_tl } - \@@_prop_gput:cnx + \@@_prop_gput:cne { g_@@_struct_0_prop } { ClassMap } { \pdf_object_ref:n { @@/tree/classmap } } @@ -514,19 +514,19 @@ { \pdfdict_if_empty:nF {g_@@_role/RoleMapNS_##1_dict} { - \pdf_object_write:nnx {@@/RoleMapNS/##1}{dict} + \pdf_object_write:nne {@@/RoleMapNS/##1}{dict} { \pdfdict_use:n {g_@@_role/RoleMapNS_##1_dict} } - \pdfdict_gput:nnx{g_@@_role/Namespace_##1_dict} + \pdfdict_gput:nne{g_@@_role/Namespace_##1_dict} {RoleMapNS}{\pdf_object_ref:n {@@/RoleMapNS/##1}} } - \pdf_object_write:nnx{tag/NS/##1}{dict} + \pdf_object_write:nne{tag/NS/##1}{dict} { \pdfdict_use:n {g_@@_role/Namespace_##1_dict} } } - \pdf_object_write:nnx {@@/tree/namespaces}{array} + \pdf_object_write:nne {@@/tree/namespaces}{array} { \prop_map_tokens:Nn \g_@@_role_NS_prop{\use_ii:nn} } @@ -568,7 +568,7 @@ { \hook_gput_code:nnn{shipout/before} { tagpdf/structparents } { - \pdfmanagement_add:nnx + \pdfmanagement_add:nne { Page } { StructParents } { \int_eval:n { \g_shipout_readonly_int} } diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx index 339d79e1db..25625e7858 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98m, released 2023-10-27} +% \date{Version 0.98n, released 2023-11-10} % \maketitle % \begin{documentation} % \section{Setup commands} @@ -250,7 +250,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-user} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-user} {2023-11-10} {0.98n} {tagpdf - user commands} %</header> % \end{macrocode} @@ -523,7 +523,7 @@ { \int_step_inline:nnn{#1}{\c@g__tag_struct_abs_int} { - \msg_term:nnxxxx + \msg_term:nneeee { tag/debug } { show-struct } { ##1 } { @@ -532,7 +532,7 @@ \msg_show_item_unbraced:nn } { } { } - \msg_term:nnxxxx + \msg_term:nneeee { tag/debug } { show-kids } { ##1 } { @@ -760,7 +760,7 @@ } \int_compare:nNnF {\g_@@_para_main_begin_int}={\g_@@_para_main_end_int} { - \msg_error:nnxxx + \msg_error:nneee {tag} {para-hook-count-wrong} {\int_use:N\g_@@_para_main_begin_int} @@ -769,7 +769,7 @@ } \int_compare:nNnF {\g_@@_para_begin_int}={\g_@@_para_end_int} { - \msg_error:nnxxx + \msg_error:nneee {tag} {para-hook-count-wrong} {\int_use:N\g_@@_para_begin_int} @@ -992,7 +992,7 @@ \tag_mc_end_push: \tag_struct_begin:n { tag=Link } \tag_mc_begin:n { tag=Link } - \pdfannot_dict_put:nnx + \pdfannot_dict_put:nne { link/URI } { StructParent } { \tag_struct_parent_int: } @@ -1002,7 +1002,7 @@ {pdfannot/link/URI/after} {tagpdf} { - \tag_struct_insert_annot:xx {\pdfannot_link_ref_last:}{\tag_struct_parent_int:} + \tag_struct_insert_annot:ee {\pdfannot_link_ref_last:}{\tag_struct_parent_int:} \tag_mc_end: \tag_struct_end: \tag_mc_begin_pop:n{} @@ -1015,7 +1015,7 @@ \tag_mc_end_push: \tag_struct_begin:n{tag=Link} \tag_mc_begin:n{tag=Link} - \pdfannot_dict_put:nnx + \pdfannot_dict_put:nne { link/GoTo } { StructParent } { \tag_struct_parent_int: } @@ -1025,7 +1025,7 @@ {pdfannot/link/GoTo/after} {tagpdf} { - \tag_struct_insert_annot:xx {\pdfannot_link_ref_last:}{\tag_struct_parent_int:} + \tag_struct_insert_annot:ee {\pdfannot_link_ref_last:}{\tag_struct_parent_int:} \tag_mc_end: \tag_struct_end: \tag_mc_begin_pop:n{} diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx index 668d085169..ed001717f9 100644 --- a/macros/latex/contrib/tagpdf/tagpdf.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf.dtx @@ -93,7 +93,7 @@ % \begin{macrocode} %<@@=tag> %<*package> -\ProvidesExplPackage {tagpdf} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf} {2023-11-10} {0.98n} { A package to experiment with pdf tagging } \bool_if:nF @@ -119,7 +119,7 @@ % \end{macrocode} %<*debug> % \begin{macrocode} -\ProvidesExplPackage {tagpdf-debug} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-debug} {2023-11-10} {0.98n} { debug code for tagpdf } \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput} % \end{macrocode} @@ -142,7 +142,7 @@ % we define a base package with dummy functions % \begin{macrocode} %<*base> -\ProvidesExplPackage {tagpdf-base} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdf-base} {2023-11-10} {0.98n} {part of tagpdf - provide base, no-op versions of the user commands } %</base> % \end{macrocode} @@ -206,7 +206,7 @@ { \legacy_if:nT { @filesw } { - \exp_args:NNnx \exp_args:NNx\iow_now:Nn \@auxout + \exp_args:NNne \exp_args:NNe\iow_now:Nn \@auxout { \token_to_str:N \new@label@record {@tag@LastPage} @@ -224,7 +224,7 @@ { \legacy_if:nT { @filesw } { - \exp_args:NNnx \exp_args:NNx\iow_now:Nn \@auxout + \exp_args:NNne \exp_args:NNe\iow_now:Nn \@auxout { \token_to_str:N \newlabeldata {@tag@LastPage} @@ -358,10 +358,10 @@ % \begin{macrocode} \prg_generate_conditional_variant:Nnn \pdf_object_if_exist:n {e}{T,F,TF} \cs_generate_variant:Nn \pdf_object_ref:n {e} -\cs_generate_variant:Nn \pdfannot_dict_put:nnn {nnx} -\cs_generate_variant:Nn \pdffile_embed_stream:nnn {nxx,oxx} -\cs_generate_variant:Nn \prop_gput:Nnn {Nxx,Nen} -\cs_generate_variant:Nn \prop_put:Nnn {Nxx} +\cs_generate_variant:Nn \pdfannot_dict_put:nnn {nne} +\cs_generate_variant:Nn \pdffile_embed_stream:nnn {nee,oee} +\cs_generate_variant:Nn \prop_gput:Nnn {Nee,Nen} +\cs_generate_variant:Nn \prop_put:Nnn {Nee} \cs_generate_variant:Nn \prop_item:Nn {No,Ne} \cs_generate_variant:Nn \seq_set_split:Nnn{Nne} \cs_generate_variant:Nn \str_set_convert:Nnnn {Nonn, Noon, Nnon } @@ -528,8 +528,8 @@ \cs_set_eq:NN \@@_seq_show:N \seq_show:N \cs_set_eq:NN \@@_prop_show:N \prop_show:N -\cs_generate_variant:Nn \@@_prop_gput:Nnn { Nxn , Nxx, Nnx , cnn, cxn, cnx, cno} -\cs_generate_variant:Nn \@@_seq_gput_right:Nn { Nx , No, cn, cx } +\cs_generate_variant:Nn \@@_prop_gput:Nnn { Nen , Nee, Nne , cnn, cen, cne, cno} +\cs_generate_variant:Nn \@@_seq_gput_right:Nn { Ne , No, cn, ce } \cs_generate_variant:Nn \@@_prop_new:N { c } \cs_generate_variant:Nn \@@_seq_new:N { c } \cs_generate_variant:Nn \@@_seq_show:N { c } @@ -645,7 +645,7 @@ log / v .code:n = { \int_set:Nn \l_@@_loglevel_int { 1 } - \cs_set_protected:Nn \@@_check_typeout_v:n { \iow_term:x {##1} } + \cs_set_protected:Nn \@@_check_typeout_v:n { \iow_term:e {##1} } }, log / vv .code:n = {\int_set:Nn \l_@@_loglevel_int { 2 }}, log / vvv .code:n = {\int_set:Nn \l_@@_loglevel_int { 3 }}, diff --git a/macros/latex/contrib/tagpdf/tagpdf.ins b/macros/latex/contrib/tagpdf/tagpdf.ins index bdb9b2d1c2..64c3b40a23 100644 --- a/macros/latex/contrib/tagpdf/tagpdf.ins +++ b/macros/latex/contrib/tagpdf/tagpdf.ins @@ -34,7 +34,7 @@ for those people who are interested. \let\MetaPrefix\relax \preamble -Copyright (C) 2019-2022 Ulrike Fischer +Copyright (C) 2019-2023 Ulrike Fischer It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf Binary files differindex 76637d6bee..76c692eb41 100644 --- a/macros/latex/contrib/tagpdf/tagpdf.pdf +++ b/macros/latex/contrib/tagpdf/tagpdf.pdf diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex index 8b07c8718e..d8bb536361 100644 --- a/macros/latex/contrib/tagpdf/tagpdf.tex +++ b/macros/latex/contrib/tagpdf/tagpdf.tex @@ -16,8 +16,8 @@ } \DebugBlocksOff \makeatletter -\def\UlrikeFischer@package@version{0.98m} -\def\UlrikeFischer@package@date{2023-10-27} +\def\UlrikeFischer@package@version{0.98n} +\def\UlrikeFischer@package@date{2023-11-10} \makeatother \documentclass[bibliography=totoc,a4paper]{article} @@ -117,27 +117,31 @@ \tagstructbegin{tag=Div} \begin{tcolorbox}[colframe=red,before upper=\tagpdfparaOn] -This package is not meant for normal document production. It is mainly a tool to \emph{research} -tagging. +This package is not meant for normal use in a document. It is on one mainly a tool to \emph{research} +tagging. On the other side it is the base of the code developed in the \texttt{latex-lab} bundle for the +Tagged PDF project \url{https://www.latex-project.org/publications/indexbytopic/pdf/}. -You need a very current \LaTeX{} format. -You need a very current L3 programming layer. -You need the new \LaTeX{} PDF management bundle. +The package develops together with the code in the \texttt{latex-lab} bundle, in the +\LaTeX{} format, in the \texttt{pdfmanagement-testphase} package (the \LaTeX{} PDF management bundle) +and the L3 programming layer. +That means you should ensure that all these components are up-to-date and in sync which each +other. -This package is incomplete, experimental and quite probably contains bugs. It is in parts -quite slow as the code prefers readability over speed. +This package quite probably contains bugs. It is in parts +quite slow as the code currently prefers readability over speed. At some time it will disappear when the code has been integrated into the \LaTeX{} format. -This package can change in an incompatible way. +This package can still change in an incompatible way. You need some knowledge about \TeX, \PDF{} and perhaps even lua to use it. \medskip -Issues, comments, suggestions should be added as issues to the github tracker: +Issues, comments, suggestions can be added as issues to these two github tracker: \medskip \centering +\url{https://github.com/latex3/tagging-project}\par \url{https://github.com/u-fischer/tagpdf} \end{tcolorbox} diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty index dd08c7e2ac..c3a5d0bd29 100644 --- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty +++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty @@ -1,5 +1,5 @@ %\RequirePackage[enable-debug]{expl3}[2018/06/14] -\ProvidesExplPackage {tagpdfdocu-patches} {2023-10-27} {0.98m} +\ProvidesExplPackage {tagpdfdocu-patches} {2023-11-10} {0.98n} {patches/commands for the tagpdf documentation} \RequirePackage{etoolbox,xpatch} diff --git a/macros/latex/contrib/tkz/tkz-elements/README.md b/macros/latex/contrib/tkz/tkz-elements/README.md index 49f16ad785..96f3746c6e 100644 --- a/macros/latex/contrib/tkz/tkz-elements/README.md +++ b/macros/latex/contrib/tkz/tkz-elements/README.md @@ -1,6 +1,6 @@ # tkz-elements — for euclidean geometry -Release 1.00b 2023/10/25 +Release 1.20b 2023/11/10 ## Description @@ -66,7 +66,27 @@ Other examples, in French, are on my site. ## History -- First version 1.00b + - Version 1.20 Memory management: tables are emptied when the tkzelements environment is opened. + + + `set_lua_to_tex` has been replaced by `tkzUseLua` to transfer data between the `tkzelements` and `tikzpicture` environments. + + New version of `inversion` with respect to a circle method. It selects the correct algorithm based on the object passed as a parameter. + + Added an `in_out_disk` method for the `circle` object, which indicates whether or not a point is in the disk. `in_out` is for the circle. + + Added two methods: `radical_center (C1,C2,C3)` radical center of three circles. + `radical_circle (C1,C2,C3)` orthogonal circle of three circles. + + Added function `circle : radius` to define a circle with a centre and a radius. + + Added methods `normalize` and `normalize_inv` for `line`. + + Added methods `translation` and `set_translation` to the `line` object. + + Added an example to illustrate combinations of methods and attributes. + + - First version 1.00b ## Author diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex index a86fe1230b..7c8c94aec4 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex @@ -31,7 +31,7 @@ This class is also defined by two points, on the one hand the center and on the \subsubsection{Example: circle attributes} % (fold) \label{ssub:example_circle_attributes} -Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\_lua\_to\_tex} (see \ref{ssub:transfer_from_lua_to_tex}) creates global macros. The |\r| macro must not already be defined. +Three attributes are used (south, west, radius). \begin{minipage}{0.5\textwidth} \begin{tkzexample}[latex=0cm,small,code only] @@ -43,7 +43,6 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ z.s = C.ab.south z.w = C.ab.west r = C.ab.radius - set_lua_to_tex{"r"} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -51,7 +50,7 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ \tkzLabelPoints(a,b,s,w) \tkzDrawCircle(a,b) \tkzDrawSegment(a,b) - \tkzLabelSegment[sloped](a,b){ab = \r} + \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}} \end{tikzpicture} \end{tkzexample} \end{minipage} @@ -64,7 +63,6 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ z.s = C.ab.south z.w = C.ab.west r = C.ab.radius - set_lua_to_tex{"r"} \end{tkzelements} \hspace*{\fill} @@ -74,7 +72,7 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ \tkzLabelPoints(a,b,s,w) \tkzDrawCircle(a,b) \tkzDrawSegment(a,b) -\tkzLabelSegment[sloped](a,b){ab = \r} +\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}} \end{tikzpicture} \hspace*{\fill} \end{minipage} @@ -95,6 +93,7 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ \textbf{Methods} & \textbf{Comments} \\ \midrule \\ \Imeth{circle}{new(O,A)} & |C.OA = circle : new (z.O,z.A)| \tkzar circle center $O$ through $A$\\ +\Imeth{circle}{radius(O,r)} & |C.OA = circle : radius (z.O,2)| \tkzar circle center $O$ radius =2 cm\\ \midrule \textbf{Points} &\\ \midrule @@ -112,22 +111,29 @@ Three attributes are used (south, west, radius). Currently, \Igfct{package}{set\ \Imeth{circle}{radical\_axis (C)} & \\ \Imeth{circle}{tangent\_at (pt)} & |z.P = C.OA: tangent_at (z.M)| $((PM) \perp (OM))$\\ \Imeth{circle}{tangent\_from (pt)}& |z.M,z.N = C.OA: tangent_from (z.P)| \\ +\Imeth{circle}{inversion (line)} & |L or C = C.AC:inversion (L.EF)|\\ \midrule \textbf{Circles} &\\ \midrule \Imeth{circle}{orthogonal\_from (pt)} & |C= C.OA: orthogonal_from (z.P)| \\ \Imeth{circle}{orthogonal\_through (pta,ptb)} & |C = C.OA: orthogonal_through (z.z1,z.z2)|\\ +\Imeth{circle}{inversion (circle)} & |L or C = C.AC:inversion (C.EF)|\\ + \midrule \textbf{Miscellaneous} &\\ \midrule \Imeth{circle}{power (pt)} &| p = C.OA: power (z.M)| \tkzar power with respect to a circle \\ \Imeth{circle}{in\_out (pt)} & |C.OA : in_out (z.M)| \tkzar boolean \\ +\Imeth{circle}{in\_out\_disk (pt)} & |C.OA : in_out_disk (z.M)| \tkzar boolean \\ \Imeth{circle}{draw ()} & for further use\\ \bottomrule % \end{tabular} \end{center} \egroup -% subsubsection methods_circle (end) +% subsection methods_circle (end) + + + \subsubsection{Altshiller} % (fold) \label{ssub:altshiller} @@ -252,6 +258,182 @@ z.R = intersection (L.tC,T.ab) \hspace*{\fill} %\caption{Lemoine line} % subsubsection lemoine (end) + + +\subsubsection{Inversion: point, line and circle} % (fold) +\label{ssub:inversion} + +The "inversion" method can be used on a point, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use. + +\subsubsection{Inversion: point} % (fold) +\label{ssub:inversion_point} + +The "inversion" method can be used on a point, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use. +\begin{tkzexample}[latex=0cm,small,code only] +\begin{tkzelements} + scale = 1.5 + z.o = point: new (-1,2) + z.a = point: new (2,1) + C.oa = circle: new (z.o,z.a) + z.c = point: new (3,4) + z.d = C.oa: inversion (z.c) + p = C.oa: power (z.c) +\end{tkzelements} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircle(o,a) + \tkzDrawSegments(o,a o,c) + \tkzDrawPoints(a,o,c,d) + \tkzLabelPoints(a,o,c,d) + \tkzLabelSegment[sloped,above=1em](c,d){La puissance de c est \tkzUseLua{p}} + \end{tikzpicture} +\end{tkzexample} + +\begin{tkzelements} + scale = 1.5 + z.o = point: new (-1,2) + z.a = point: new (2,1) + C.oa = circle: new (z.o,z.a) + z.c = point: new (3,4) + z.d = C.oa: inversion (z.c) + p = C.oa: power (z.c) +\end{tkzelements} +\hspace*{\fill} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircle(o,a) + \tkzDrawSegments(o,a o,c) + \tkzDrawPoints(a,o,c,d) + \tkzLabelPoints(a,o,c,d) + \tkzLabelSegment[sloped,above=1em](c,d){La puissance de c est \tkzUseLua{p}} + \end{tikzpicture} +\hspace*{\fill} + +\subsubsection{Inversion: line} % (fold) +\label{ssub:inversion_line} + +The result is either a straight line or a circle. + +\begin{tkzexample}[latex=0cm,small,code only] +\begin{tkzelements} + scale = 1 + z.o = point: new (-1,1) + z.a = point: new (1,3) + C.oa = circle: new (z.o,z.a) + z.c = point: new (3,2) + z.d = point: new (0,4) + L.cd = line: new (z.c,z.d) + C.OH = C.oa: inversion (L.cd) + z.O,z.H = get_points(C.OH) +\end{tkzelements} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircles(o,a O,H) + \tkzDrawLines(c,d o,H) + \tkzDrawPoints(a,o,c,d,H) + \tkzLabelPoints(a,o,c,d,H) + \end{tikzpicture} +\end{tkzexample} + + +\begin{tkzelements} + scale = 1 + z.o = point: new (-1,1) + z.a = point: new (1,3) + C.oa = circle: new (z.o,z.a) + z.c = point: new (3,2) + z.d = point: new (0,4) + L.cd = line: new (z.c,z.d) + C.OH = C.oa: inversion (L.cd) + z.O,z.H = get_points(C.OH) +\end{tkzelements} + +\hspace*{\fill} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircles(o,a O,H) + \tkzDrawLines(c,d o,H) + \tkzDrawPoints(a,o,c,d,H) + \tkzLabelPoints(a,o,c,d,H) + \end{tikzpicture} + \hspace*{\fill} + + \subsubsection{Inversion: circle} % (fold) + \label{ssub:inversion_circle} + +The result is either a straight line or a circle. + +\begin{tkzexample}[latex=0cm,small,code only] + \begin{tkzelements} + scale = 1 + z.o = point: new (-1,1) + z.a = point: new (2,3) + C.oa = circle: new (z.o,z.a) + z.c = point: new (-2,1) + z.e = point: new (-2,8) + z.d = point: new (-2,5) + C.ed = circle: new (z.e,z.d) + C.co = circle: new (z.c,z.o) + obj = C.oa: inversion (C.co) + if obj.type == "line" + then + z.p,z.q = get_points(obj) + else + z.O,z.H = get_points(obj) + end + obj = C.oa: inversion(C.ed) + if obj.type == "line" + then + z.p,z.q = get_points(obj) + else + z.O,z.H = get_points(obj) + end + \end{tkzelements} + \begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircles(o,a c,o e,d O,H) + \tkzDrawLines(p,q) + \tkzDrawPoints(a,o,c,d,e,p,q,O,H) + \tkzLabelPoints(a,o,c,d,e,p,q,O,H) + \end{tikzpicture} +\end{tkzexample} + + \begin{tkzelements} + scale = 1 + z.o = point: new (-1,1) + z.a = point: new (2,3) + C.oa = circle: new (z.o,z.a) + z.c = point: new (-2,1) + z.e = point: new (-2,8) + z.d = point: new (-2,5) + C.ed = circle: new (z.e,z.d) + C.co = circle: new (z.c,z.o) + obj = C.oa: inversion (C.co) + if obj.type == "line" + then + z.p,z.q = get_points(obj) + else + z.O,z.H = get_points(obj) + end + obj = C.oa: inversion(C.ed) + if obj.type == "line" + then + z.p,z.q = get_points(obj) + else + z.O,z.H = get_points(obj) + end + \end{tkzelements} + +\hspace*{\fill} + \begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircles(o,a c,o e,d O,H) + \tkzDrawLines(p,q) + \tkzDrawPoints(a,o,c,d,e,p,q,O,H) + \tkzLabelPoints(a,o,c,d,e,p,q,O,H) + \end{tikzpicture} + \hspace*{\fill} +% subsubsection inversion (end) % subsection methods_of_the_class_circle (end) diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex index 4480417f08..0d5c00b38c 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex @@ -56,13 +56,12 @@ The first attributes are the three points that define the ellipse : \Iattr{ellip z.S = E.south z.Co = E.covertex z.Ve = E.vertex - set_lua_to_tex {'a','b','slope'} \end{tkzelements} \begin{tikzpicture} \pgfkeys{/pgf/number format/.cd,fixed,precision=2} \tkzGetNodes \tkzDrawCircles[teal](C,A) - \tkzDrawEllipse[red](C,\a,\b,\slope) + \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b,W,S,F1,F2) \tkzLabelPoints(C,A,B) \tkzDrawLine[add = .5 and .5](A,W) @@ -94,7 +93,6 @@ z.W = E.west z.S = E.south z.Co = E.covertex z.Ve = E.vertex -set_lua_to_tex {'a','b','slope'} \end{tkzelements} \hspace*{\fill} @@ -102,11 +100,11 @@ set_lua_to_tex {'a','b','slope'} \pgfkeys{/pgf/number format/.cd,fixed,precision=2} \tkzGetNodes \tkzDrawCircles[teal](C,A) -\tkzDrawEllipse[red](C,\a,\b,\slope) +\tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b,W,S,F1,F2) \tkzLabelPoints(C,A,B) \tkzDrawLine[add = .5 and .5](A,W) -\tkzLabelSegment[pos=1.5,above,sloped](A,W){slope = \pgfmathprintnumber{\slope}} +\tkzLabelSegment[pos=1.5,above,sloped](A,W){slope = \pgfmathprintnumber{\tkzUseLua{slope}}} \tkzLabelPoint[below](S){South} \tkzLabelPoint[below left](F1){Focus 1} \tkzLabelPoint[below left](F2){Focus 2} @@ -165,12 +163,11 @@ For attributes see \ref{sec:classe_ellipse} a = E.Rx b = E.Ry slope = math.deg(E.Sl) - set_lua_to_tex {'a','b','slope'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) - \tkzDrawEllipse[red](C,\a,\b,\slope) + \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B) \tkzLabelPoints(C,A,B) \end{tikzpicture} @@ -186,12 +183,11 @@ E = ellipse: new (z.C,z.A,z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) -set_lua_to_tex {'a','b','slope'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) -\tkzDrawEllipse[red](C,\a,\b,\slope) +\tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B) \tkzLabelPoints(C,A,B) \end{tikzpicture} @@ -230,7 +226,6 @@ The first two points are the foci of the ellipse. The third one is the vertex. W z.R,z.S = intersection (L.XO,E) a,b = E.Rx,E.Ry ang = math.deg(E.slope) - set_lua_to_tex{'a','b','ang'} \end{tkzelements} \end{tkzexample} \begin{minipage}{0.6\textwidth} @@ -240,7 +235,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W \tkzDrawPolygon(A,B,C) \tkzDrawCircles[cyan](O,A N,I) \tkzDrawSegments(X,R A,X) - \tkzDrawEllipse[red](N,\a,\b,\ang) + \tkzDrawEllipse[red](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawLines[add=.2 and .5](I,H) \tkzDrawPoints(A,B,C,N,O,X,H,R,S,I) \tkzLabelPoints[above](C,X) @@ -275,14 +270,13 @@ The first two points are the foci of the ellipse. The third one is the vertex. W z.R,z.S = intersection (L.XO,E) a,b = E.Rx,E.Ry ang = math.deg(E.slope) - set_lua_to_tex{'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) \tkzDrawCircles[cyan](O,A N,I) \tkzDrawSegments(X,R A,X) -\tkzDrawEllipse[red](N,\a,\b,\ang) +\tkzDrawEllipse[red](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawLines[add=.2 and .5](I,H) \tkzDrawPoints(A,B,C,N,O,X,H,R,S,I) \tkzLabelPoints[above](C,X) @@ -321,7 +315,6 @@ The first two points are the foci of the ellipse. The third one is the vertex. W z.N = L.tb.pb L.K = E :tangent_at (z.K) z.ka,z.kb = get_points(L.K) - set_lua_to_tex {'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -329,7 +322,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W \tkzDrawLines(x,y A,M A,N ka,kb) \tkzLabelSegment(C,V){$a$} \tkzLabelSegment[right](C,CoV){$b$} - \tkzDrawEllipse[teal](C,\a,\b,\ang) + \tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawPoints(C,V,CoV,X,x,y,M,N,A,K) \tkzLabelPoints(C,V,A,M,N,K) \tkzLabelPoints[above left](CoV) @@ -356,7 +349,6 @@ z.M = L.ta.pb z.N = L.tb.pb L.K = E :tangent_at (z.K) z.ka,z.kb = get_points(L.K) -set_lua_to_tex {'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -364,7 +356,7 @@ set_lua_to_tex {'a','b','ang'} \tkzDrawLines(x,y A,M A,N ka,kb) \tkzLabelSegment(C,V){$a$} \tkzLabelSegment[right](C,CoV){$b$} -\tkzDrawEllipse[teal](C,\a,\b,\ang) +\tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawPoints(C,V,CoV,X,x,y,M,N,A,K) \tkzLabelPoints(C,V,A,M,N,K) \tkzLabelPoints[above left](CoV) diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex index de11a45a51..62ea40d1f3 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex @@ -50,7 +50,6 @@ The attributes are : z.s = L.ab.south_pb sl = L.ab.slope len = L.ab.length - set_lua_to_tex{"sl","len"} \end{tkzelements} \begin{tikzpicture} @@ -59,8 +58,8 @@ The attributes are : \tkzLabelPoints(a,b,e,r,s,w) \tkzLabelPoints[above](m) \tkzDrawLine(a,b) - \tkzLabelSegment[sloped](a,b){ab = \len} - \tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \sl} + \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{len}} + \tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \tkzUseLua{sl}} \end{tikzpicture} \end{tkzexample} @@ -76,7 +75,6 @@ z.r = L.ab.north_pa z.s = L.ab.south_pb sl = L.ab.slope len = L.ab.length -set_lua_to_tex{"sl","len"} \end{tkzelements} \hspace*{\fill} @@ -86,8 +84,8 @@ set_lua_to_tex{"sl","len"} \tkzLabelPoints(a,b,e,r,s,w) \tkzLabelPoints[above](m) \tkzDrawLine(a,b) -\tkzLabelSegment[sloped](a,b){ab = \len} -\tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \sl} +\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{len}} +\tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \tkzUseLua{sl}} \end{tikzpicture} \hspace*{\fill} % \caption{Class Line} @@ -160,6 +158,8 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit \textbf{Points} &\\ \midrule \Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| \tkzar gold ratio \\ +\Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| \tkzar AC =1 and $C\in (AB)$ \\ +\Imeth{line}{normalize_inv ()} & |z.C = L.AB : normalize_inv()| \tkzar CB =1 and $C\in (AB)$ \\ \Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ --> barycenter of |{(A,1)(B,2)}|\\ \Imeth{line}{point (t)} & |z.C = L.AB : point (2)| \tkzar $\overrightarrow{AC} = 2\overrightarrow{AB}$\\ \Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| \tkzar better is |z.M = L.AB.mid| \\ @@ -170,6 +170,9 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit \Imeth{line}{set\_projection (...)} & projection of a list of points \\ \Imeth{line}{symmetry\_axial ( pt )} & |z.Cp = L.AB : symmetry_axial (z.C)|\\ \Imeth{line}{set\_symmetry\_axial (...) }&symmetry_axial of a list of points \\ +\Imeth{line}{translation ( pt )} & |z.Cp = L.AB : translation (z.C)|\\ +\Imeth{line}{set\_translation(...) }&translation of a list of points \\ + \Imeth{line}{square ()} & |z.C,z.D = L.AB : square () | \tkzar creates 2 points to make a square.\\ \midrule \textbf{Lines} &\\ @@ -367,6 +370,50 @@ z.a,z.b = L.ab.pa,L.ab.pb % subsubsection example_combination_of_methods (end) +\subsubsection{Example: translation} % (fold) +\label{ssub:example_translation} + +\begin{minipage}{0.6\textwidth} +\begin{tkzexample}[small,code only] +\begin{tkzelements} + z.A = point: new (0,0) + z.B = point: new (1,2) + z.C = point: new (-3,2) + z.D = point: new (0,2) + L.AB = line : new (z.A,z.B) + -- z.E = L.AB : translation (z.C) + z.E,z.F = L.AB : set_translation (z.C,z.D) +\end{tkzelements} +\begin{tikzpicture} +\tkzGetNodes +\tkzDrawPoints(A,...,F) +\tkzLabelPoints(A,...,F) +\tkzDrawSegments[->,red,> =latex](C,E D,F A,B) ) +\end{tikzpicture} +\end{tkzexample} +\end{minipage} +\begin{minipage}{0.4\textwidth} +\begin{tkzelements} + z.A = point: new (0,0) + z.B = point: new (1,2) + z.C = point: new (-3,2) + z.D = point: new (0,2) + L.AB = line : new (z.A,z.B) + -- z.E = L.AB : translation (z.C) + z.E,z.F = L.AB : set_translation (z.C,z.D) +\end{tkzelements} +\hspace*{\fill} +\begin{tikzpicture} +\tkzGetNodes +\tkzDrawPoints(A,...,F) +\tkzLabelPoints(A,...,F) +\tkzDrawSegments[->,red,> =latex](C,E D,F A,B) ) +\end{tikzpicture} +\hspace*{\fill} +\end{minipage} + +% subsubsection example_translation (end) + \subsubsection{Example: distance and projection} % (fold) \label{ssub:example_distance_and_projection} @@ -379,7 +426,6 @@ z.a,z.b = L.ab.pa,L.ab.pb L.AB = line : new (z.A,z.B) d = L.AB : distance (z.C) z.H = L.AB : projection (z.C) - set_lua_to_tex{'d'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -387,7 +433,7 @@ z.a,z.b = L.ab.pa,L.ab.pb \tkzDrawPoints(A,B,C,H) \tkzLabelPoints(A,B,C,H) \tkzLabelSegment[above left, - draw](C,H){$CH = \d$} + draw](C,H){$CH = \tkzUseLua{d}$} \end{tikzpicture} \end{tkzexample} \end{minipage} @@ -399,7 +445,6 @@ z.a,z.b = L.ab.pa,L.ab.pb L.AB = line : new (z.A,z.B) d = L.AB : distance (z.C) z.H = L.AB : projection (z.C) - set_lua_to_tex{'d'} \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} @@ -407,7 +452,7 @@ z.a,z.b = L.ab.pa,L.ab.pb \tkzDrawLines(A,B C,H) \tkzDrawPoints(A,B,C,H) \tkzLabelPoints(A,B,C,H) -\tkzLabelSegment[above left,draw](C,H){$CH = \d$} +\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$} \end{tikzpicture} \hspace*{\fill} \end{minipage} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex index 9bb092ce56..65834bf78e 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex @@ -21,9 +21,13 @@ \Igfct{math}{islinear (z1,z2,z3) } & Are the points aligned? (z2-z1) $\parallel$ (z3-z1) ? \\ \Igfct{math}{isortho (z1,z2,z3)} & (z2-z1) $\perp$ (z3-z1) ? boolean\\ \Igfct{package}{set\_lua\_to\_tex (list)} & set\_lua\_to\_tex('a','n') defines |\a| and |\n| \\ +\Igfct{package}{tkzUseLua (variable)} & |\textbackslash\tkzUseLua{a}| prints the value of a\\ %parabola (a,b,c) & to get \\ -\Igfct{math}{value (v) } & apply |scale| to the value \\ +\Igfct{math}{value (v) } & apply |scale * value | \\ +\Igfct{math}{real (v) } & apply | value /scale | \\ \Igfct{math}{angle\_normalize (a) } & to get a value between 0 and $2\pi$ \\ +\Igfct{math}{radical\_center (C1,C2,C3)} & see \ref{sub:radical_center} \\ +\Igfct{math}{radical\_circle (C1,C2,C3)} & see \ref{sub:radical_circle} \\ \bottomrule \end{tabular} \end{center} @@ -108,9 +112,6 @@ % subsubsection function_islinear (end) - - - \subsubsection{Function \tkzfname{value} }% (fold) \label{ssub:function_value} @@ -118,15 +119,59 @@ value to apply scaling if necessary If |scale = 1.2| with a = value(5) the actual value of |a| will be $5\times 1.2 = 6$. - % subsubsection function_value (end) +\subsubsection{Function \tkzfname{real} }% (fold) +\label{ssub:function_real} + +If |scale = 1.2| with a = 6 then real(a) = $6 / 1.2 = 5$ . + +% subsubsection function_real (end) + + \subsubsection{Transfer from lua to \TEX} % (fold) \label{ssub:transfer_from_lua_to_tex} +It's possible to transfer variable from Lua to \TEX{} with +\Igfct{package}{\textbackslash{tkzUseLua}} in the environment "tikzpicture". + - \Igfct{package}{set\_lua\_to\_tex (list)} +\begin{tkzexample}[latex=0cm,small,code only] +\begin{tkzelements} + z.A = point : new (0 , 0) + z.B = point : new (4 , 3) + z.C = point : new (2 , 5) + L.AB = line : new (z.A,z.B) + d = L.AB : distance (z.C) + l = L.AB.length + z.H = L.AB : projection (z.C) +\end{tkzelements} +\begin{tikzpicture} +\tkzGetNodes +\tkzDrawLines(A,B C,H) +\tkzDrawPoints(A,B,C,H) +\tkzLabelPoints(A,B,C,H) +\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$} +\tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$} +\end{tikzpicture} +\end{tkzexample} -see examples \ref{ssub:get_angle}, \ref{ssub:dot_or_scalar_product} +\begin{tkzelements} + z.A = point : new (0 , 0) + z.B = point : new (4 , 3) + z.C = point : new (2 , 5) + L.AB = line : new (z.A,z.B) + d = L.AB : distance (z.C) + l = L.AB.length + z.H = L.AB : projection (z.C) +\end{tkzelements} +\begin{tikzpicture} +\tkzGetNodes +\tkzDrawLines(A,B C,H) +\tkzDrawPoints(A,B,C,H) +\tkzLabelPoints(A,B,C,H) +\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$} +\tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$} +\end{tikzpicture} % subsubsection transfer_from_lua_to_tex (end) \subsubsection{Normalized angles : Slope of lines (ab), (ac) and (ad)} % (fold) @@ -197,7 +242,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.c = point: new(0, 3) angcb = tkzround ( get_angle (z.a,z.c,z.b),3) angbc = tkzround ( get_angle (z.a,z.b,z.c),3) - set_lua_to_tex{"angcb","angbc"} \end{tkzelements} \begin{tikzpicture} @@ -206,9 +250,9 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \tkzDrawPoints(a,b,c) \tkzLabelPoints(a,b,c) \tkzMarkAngle[->](c,a,b) - \tkzLabelAngle(c,a,b){\angcb} + \tkzLabelAngle(c,a,b){\tkzUseLua{angcb}} \tkzMarkAngle[->](b,a,c) - \tkzLabelAngle(b,a,c){\angbc} + \tkzLabelAngle(b,a,c){\tkzUseLua{angbc}} \end{tikzpicture} \end{tkzexample} \end{minipage} @@ -220,7 +264,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.c = point: new(0, 3) angcb = tkzround ( get_angle (z.a,z.c,z.b),3) angbc = tkzround ( get_angle (z.a,z.b,z.c),3) - set_lua_to_tex{"angcb","angbc"} \end{tkzelements} \hspace*{\fill} @@ -230,9 +273,9 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \tkzDrawPoints(a,b,c) \tkzLabelPoints(a,b,c) \tkzMarkAngle[->](c,a,b) -\tkzLabelAngle(c,a,b){\angcb} +\tkzLabelAngle(c,a,b){\tkzUseLua{angcb}} \tkzMarkAngle[->](b,a,c) -\tkzLabelAngle(b,a,c){\angbc} +\tkzLabelAngle(b,a,c){\tkzUseLua{angbc}} \end{tikzpicture} \hspace*{\fill} \end{minipage} @@ -254,7 +297,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.B_1, z.C_1 = get_points (T.ABC: anti ()) x = dot_product (z.A,z.B,z.C) - set_lua_to_tex{"x"} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -262,6 +304,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \tkzDrawPoints(A,B,C,A_1,B_1,C_1) \tkzLabelPoints(A,B,C,A_1,B_1,C_1) \tkzDrawPolygon[blue](A_1,B_1,C_1) + \tkzText[right](0,-1){dot product =\tkzUseLua{x}} \end{tikzpicture} \end{tkzexample} \end{minipage} @@ -276,7 +319,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.B_1, z.C_1 = get_points (T.ABC: anti ()) x = dot_product (z.A,z.B,z.C) - set_lua_to_tex{"x"} \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} @@ -285,14 +327,14 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \tkzDrawPoints(A,B,C,A_1,B_1,C_1) \tkzLabelPoints(A,B,C,A_1,B_1,C_1) \tkzDrawPolygon[blue](A_1,B_1,C_1) + \tkzText[right](0,-1){dot product =\tkzUseLua{x}} \end{tikzpicture} \hspace*{\fill} \end{minipage} %\caption{Dot or scalar product} - -The scalar product of the vectors $\overrightarrow{AC}$ and $\overrightarrow{AB}$ is equal to $\x$, so these vectors are orthogonal. +The scalar product of the vectors $\overrightarrow{AC}$ and $\overrightarrow{AB}$ is equal to $\tkzUseLua{x}$, so these vectors are orthogonal. % subsubsection dot_or_scalar_product (end) \subsubsection{Alignment or orthogonality} % (fold) diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex index 311debb4a6..a9a1785ef1 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex @@ -47,7 +47,6 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name ty = z.a.type arg = z.a.argument m = z.a.modulus - set_lua_to_tex{"x","y","ty","arg","m"} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -57,7 +56,7 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name \tkzLabelPoints[above](O,a) \tkzLabelPoint[below](a){ \begin{minipage} {5cm} - x=\x\\ y=\y\\ type =\ty\\ argument = \arg \\ module = \m + x=\tkzUseLua{x}\\ y=\tkzUseLua{y}\\ type =\tkzUseLua{ty}\\ argument = \tkzUseLua{arg} \\ module = \tkzUseLua{m} \end{minipage}} \end{tikzpicture} \end{tkzexample} @@ -70,7 +69,6 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name ty = z.a.type arg = z.a.argument m = z.a.modulus - set_lua_to_tex{"x","y","ty","arg","m"} \end{tkzelements} \hspace*{\fill} @@ -82,7 +80,9 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name \tkzLabelPoints[above](O,a) \tkzLabelPoint[below right](a){ \begin{minipage} {5cm} - x=\x\\ y=\y\\ type =\ty\\ argument = \arg \\ module = \m + x=\tkzUseLua{x}\\ y=\tkzUseLua{y}\\ + type =\tkzUseLua{ty}\\ argument = \tkzUseLua{arg} \\ + module = \tkzUseLua{m} \end{minipage}} \end{tikzpicture} \hspace*{\fill} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex index 2b3056ff92..45515c3b7a 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex @@ -54,7 +54,6 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp alpha = T.abc.alpha beta = T.abc.beta gamma = T.abc.gamma - set_lua_to_tex{"a","b","c","alpha","beta","gamma"} \end{tkzelements} \begin{tikzpicture} @@ -64,8 +63,8 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \tkzLabelPoints(a,b,c,O,G,I) \tkzLabelPoints[above right](H) \tkzDrawCircles(O,a) - \tkzLabelSegment[sloped](a,b){\c} - \tkzLabelSegment[sloped,above](b,c){\a} + \tkzLabelSegment[sloped](a,b){\tkzUseLua{c}} + \tkzLabelSegment[sloped,above](b,c){\tkzUseLua{a}} \end{tikzpicture} \end{tkzexample} @@ -85,7 +84,6 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp alpha = T.abc.alpha beta = T.abc.beta gamma = T.abc.gamma - set_lua_to_tex{"a","b","c","alpha","beta","gamma"} \end{tkzelements} \hspace*{\fill} @@ -96,8 +94,8 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \tkzLabelPoints(a,b,c,O,G,I) \tkzLabelPoints[above right](H) \tkzDrawCircles(O,a) -\tkzLabelSegment[sloped](a,b){\c} -\tkzLabelSegment[sloped,above](b,c){\a} +\tkzLabelSegment[sloped](a,b){\tkzUseLua{c}} +\tkzLabelSegment[sloped,above](b,c){\tkzUseLua{a}} \end{tikzpicture} \hspace*{\fill} % \caption{Class Triangle} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex index 916e6bd1fb..444033e75b 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex @@ -20,9 +20,9 @@ More generally, with |z.A = point: new (a,b)|, we define a complex number |z.A = There are two cases. Either you want to keep the point to use it with the package that will allow you to draw, or the point is intermediate and you can abandon it. \vspace{12pt} -In the second case, simply don't store the point in the |z| table. For example, |A = point : new (1,2)| defines a point $A$ that will not be transferred. Another way of avoiding a transfer is to assign |nil| to the point: |z.A = nil| before exiting the environment \tkzNameEnv{elements}. +In the second case, simply don't store the point in the |z| table. For example, |A = point : new (1,2)| defines a point $A$ that will not be transferred. Another way of avoiding a transfer is to assign |nil| to the point: |z.A = nil| before exiting the environment \tkzNameEnv{tkzelements}. - In the first case, you must store the point in the table |z|. The points which occur in the environment \tkzNameEnv{elements} must respect a convention which is |z.name| such that |name| will be the name of the corresponding \tkzname{node}. \footnote{ However, that a point can be deleted with |z.name = nil|.} + In the first case, you must store the point in the table |z|. The points which occur in the environment \tkzNameEnv{tkzelements} must respect a convention which is |z.name| such that |name| will be the name of the corresponding \tkzname{node}. \footnote{ However, that a point can be deleted with |z.name = nil|.} What are the conventions for designating |name|? You have to respect the Lua conventions in particular cases. \begin{enumerate} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex index bcf0ccacce..68c894037c 100644..100755 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex @@ -828,7 +828,7 @@ z.O3 = L.Bpt.mid % % subsection excircle (end) -\subsection{In/Out of a circle} % (fold) +\subsection{In/Out of a circle or a disk} % (fold) \label{sub:in_out_of_a_circle} @@ -839,7 +839,7 @@ z.O3 = L.Bpt.mid z.B = point: new (1,2) z.X = point: new (-2,2) C = circle : new (z.A,z.B) - if C:in_out(z.X) + if C:in_out(z.X) -- in_out_disk then tex.print("In") else @@ -1024,14 +1024,13 @@ z.L = C: point (2) L.J,L.K = E: tangent_from (z.L) z.J = L.J.pb z.K = L.K.pb -set_lua_to_tex {'a','b'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(F1,F2,O) \tkzDrawCircles[teal](O,P) \tkzDrawPolygon(H,O,A,P) -\tkzDrawEllipse[red](O,\a,\b,0) +\tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0) \tkzDrawSegments[orange](O,P O,L L,J L,K) \tkzDrawPoints(F1,F2,O,H,A,P,L,J,K) \tkzLabelPoints(F1,F2,O,H,A,P,L,J,K) @@ -1055,7 +1054,6 @@ z.L = C: point (2) L.J,L.K = E: tangent_from (z.L) z.J = L.J.pb z.K = L.K.pb -set_lua_to_tex {'a','b'} \end{tkzelements} @@ -1065,7 +1063,7 @@ set_lua_to_tex {'a','b'} \tkzDrawPoints(F1,F2,O) \tkzDrawCircles[teal](O,P) \tkzDrawPolygon(H,O,A,P) -\tkzDrawEllipse[red](O,\a,\b,0) +\tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0) \tkzDrawSegments[orange](O,P O,L L,J L,K) \tkzDrawPoints(F1,F2,O,H,A,P,L,J,K) \tkzLabelPoints(F1,F2,O,H,A,P,L,J,K) @@ -1087,15 +1085,14 @@ set_lua_to_tex {'a','b'} d = L.AB : distance (z.C) l = L.AB.length z.H = L.AB : projection (z.C) - set_lua_to_tex{'d','l'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,H) \tkzDrawPoints(A,B,C,H) \tkzLabelPoints(A,B,C,H) - \tkzLabelSegment[above left,draw](C,H){$CH = \d$} - \tkzLabelSegment[below left,draw](C,H){$AB = \l$} + \tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$} + \tkzLabelSegment[below left,draw](C,H){$AB =\tkzUseLua{l}$} \end{tikzpicture} \end{tkzexample} @@ -1107,7 +1104,6 @@ L.AB = line : new (z.A,z.B) d = L.AB : distance (z.C) l = L.AB.length z.H = L.AB : projection (z.C) -set_lua_to_tex{'d','l'} \end{tkzelements} \hspace*{\fill} @@ -1116,8 +1112,8 @@ set_lua_to_tex{'d','l'} \tkzDrawLines(A,B C,H) \tkzDrawPoints(A,B,C,H) \tkzLabelPoints(A,B,C,H) -\tkzLabelSegment[above left,draw](C,H){$CH = \d$} -\tkzLabelSegment[below left,draw](C,H){$AB = \l$} +\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$} +\tkzLabelSegment[below left,draw](C,H){$AB =\tkzUseLua{l}$} \end{tikzpicture} \hspace*{\fill} %\caption{Distance to a line} @@ -1212,12 +1208,12 @@ z.O = C.AB: antipode (z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) - set_lua_to_tex {'a','b','slope'} + \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) - \tkzDrawEllipse[red](C,\a,\b,\slope) + \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b) \tkzLabelPoints(C,A,B) \end{tikzpicture} @@ -1234,14 +1230,13 @@ E = ellipse: new (z.C,z.A,z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) -set_lua_to_tex {'a','b','slope'} \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) - \tkzDrawEllipse[red](C,\a,\b,\slope) + \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b) \tkzLabelPoints(C,A,B) \end{tikzpicture} @@ -1264,11 +1259,10 @@ ang = math.deg(math.pi/4) E = ellipse: radii (z.C,a,b,math.pi/4) z.V = E : point (0) z.CoV = E : point (math.pi/2) -set_lua_to_tex {'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes -\tkzDrawEllipse[blue](C,\a,\b,\ang) +\tkzDrawEllipse[blue](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawPoints(C,V,CoV) \end{tikzpicture} \end{tkzexample} @@ -1283,13 +1277,12 @@ ang = math.deg(math.pi/4) E = ellipse: radii (z.C,a,b,math.pi/4) z.V = E : point (0) z.CoV = E : point (math.pi/2) -set_lua_to_tex {'a','b','ang'} \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes -\tkzDrawEllipse[blue](C,\a,\b,\ang) +\tkzDrawEllipse[blue](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawPoints(C,V,CoV) \end{tikzpicture} \hspace*{\fill} @@ -1318,13 +1311,12 @@ set_lua_to_tex {'a','b','ang'} L.ta,L.tb = E: tangent_from (z.K) z.F = L.ta.pb z.G = L.tb.pb - set_lua_to_tex{'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,B,C,K,F,G,V,cV) \tkzLabelPoints(A,B,C,K,F,G,V,cV) - \tkzDrawEllipse[teal](C,\a,\b,\ang) + \tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawLines(K,F K,G) \end{tikzpicture} \end{tkzexample} @@ -1347,7 +1339,6 @@ ang = math.deg(E.slope) L.ta,L.tb = E: tangent_from (z.K) z.F = L.ta.pb z.G = L.tb.pb -set_lua_to_tex{'a','b','ang'} \end{tkzelements} \hspace*{\fill} @@ -1355,7 +1346,7 @@ set_lua_to_tex{'a','b','ang'} \tkzGetNodes \tkzDrawPoints(A,B,C,K,F,G,V,cV) \tkzLabelPoints(A,B,C,K,F,G,V,cV) - \tkzDrawEllipse[teal](C,\a,\b,\ang) + \tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawLines(K,F K,G) \end{tikzpicture} \hspace*{\fill} @@ -2268,6 +2259,7 @@ _,z.Tp = get_points (L) L.aap = line : new (z.a,z.ap) L.bbp = line : new (z.b,z.bp) z.X = intersection (L.aap,L.bbp) +-- or z.X = radical_center(C.Ox,C.Pz,C.Opy) L.OOp = line : new (z.O,z.Op) z.H = L.OOp : projection (z.X) \end{tkzelements} @@ -2311,6 +2303,64 @@ z.H = L.OOp : projection (z.X) \hspace*{\fill} %\caption{Radical center} % subsection radical_center (end) + +\subsection{Radical circle} % (fold) +\label{sub:radical_circle} + +\begin{tkzexample}[latex=0cm,small,code only] +\begin{tkzelements} + scale = .25 + z.A = point: new (0,0) + z.B = point: new (6,0) + z.C = point: new (0.8,4) + T.ABC = triangle : new ( z.A,z.B,z.C ) + C.exa = T.ABC : ex_circle () + z.I_a,z.Xa = get_points (C.exa) + C.exb = T.ABC : ex_circle (1) + z.I_b,z.Xb = get_points (C.exb) + C.exc = T.ABC : ex_circle (2) + z.I_c,z.Xc = get_points (C.exc) + C.ortho = radical_circle (C.exa,C.exb,C.exc) + z.w,z.a = get_points (C.ortho) +\end{tkzelements} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawPolygon(A,B,C) + \tkzDrawCircles(I_a,Xa I_b,Xb I_c,Xc) + \tkzDrawCircles[red,thick](w,a) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzelements} + scale = .25 + z.A = point: new (0,0) + z.B = point: new (6,0) + z.C = point: new (0.8,4) + T.ABC = triangle : new ( z.A,z.B,z.C ) + C.exa = T.ABC : ex_circle () + z.I_a,z.Xa = get_points (C.exa) + C.exb = T.ABC : ex_circle (1) + z.I_b,z.Xb = get_points (C.exb) + C.exc = T.ABC : ex_circle (2) + z.I_c,z.Xc = get_points (C.exc) + C.ortho = radical_circle (C.exa,C.exb,C.exc) + z.w,z.a = get_points (C.ortho) +\end{tkzelements} + +\hspace*{\fill} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawPolygon(A,B,C) + \tkzDrawCircles(I_a,Xa I_b,Xb I_c,Xc) + \tkzDrawCircles[red,thick](w,a) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) +\end{tikzpicture} +\hspace*{\fill} +%\caption{Radical circle} +% subsection radical_circle (end) \subsection{Hexagram} % (fold) \label{sub:hexagram} @@ -2350,7 +2400,6 @@ z.H = L.OOp : projection (z.X) z.U = intersection (L.XO,E) _,z.V = intersection (L.YO,E) _,z.W = intersection (L.ZO,E) - set_lua_to_tex {'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -2364,7 +2413,7 @@ z.H = L.OOp : projection (z.X) \tkzLabelPoints[blue,right](O,N,G,H,I,J) \tkzDrawPoints(I,J,U,V,W) \tkzDrawPoints(A,B,C,N,G,H,O,X,Y,Z,Ma,Mb,Mc,Ha,Hb,Hc) - \tkzDrawEllipse[blue](N,\a,\b,\ang) + \tkzDrawEllipse[blue](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \end{tikzpicture} \end{tkzexample} @@ -2404,8 +2453,7 @@ L.ZO = line: new (z.Z,z.O) z.x = intersection (L.BC,L.XO) z.U = intersection (L.XO,E) _,z.V = intersection (L.YO,E) -_,z.W = intersection (L.ZO,E) -set_lua_to_tex {'a','b','ang'} +_,z.W = intersection (L.ZO,E) \end{tkzelements} \hspace*{\fill} @@ -2421,7 +2469,7 @@ set_lua_to_tex {'a','b','ang'} \tkzLabelPoints[blue,right](O,N,G,H,I,J) \tkzDrawPoints(I,J,U,V,W) \tkzDrawPoints(A,B,C,N,G,H,O,X,Y,Z,Ma,Mb,Mc,Ha,Hb,Hc) -\tkzDrawEllipse[blue](N,\a,\b,\ang) +\tkzDrawEllipse[blue](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \end{tikzpicture} \hspace*{\fill} %\caption{Hexagram Lemoine,Pascal} @@ -2573,98 +2621,78 @@ z.O = C.DC : inversion (z.W) \label{sub:apollonius_circle_v1_with_inversion} \begin{tkzexample}[code only,small] \begin{tkzelements} -scale = .75 - z.A = point: new (0,0) - z.B = point: new (6,0) - z.C = point: new (0.8,4) - T.ABC = triangle : new (z.A,z.B,z.C) - C.euler = T.ABC: euler_circle () - z.N,z.Ma = get_points (C.euler) - z.I_a,z.I_b,z.I_c = get_points (T.ABC : excentral()) - z.Ea,z.Eb,z.Ec = get_points (T.ABC : feuerbach ()) - -- The Feuerbach triangle is the triangle formed by the three points - -- of tangency of the nine-point circle with the excircles - z.S,z.p = get_points (T.ABC: spieker_circle ()) - -- z.Xa,z.Xb,z.Xc = get_points (T.ABC : extouch()) - C.exa = T.ABC : ex_circle () - z.Ia,z.Xa = get_points (C.exa) - C.exb = T.ABC : ex_circle (1) - z.Ib,z.Xb = get_points (C.exb) - C.exc = T.ABC : ex_circle (2) - z.Ic,z.Xc = get_points (C.exc) - -- S spieker point is the radical center of the last three circles - L.fa = line : new (z.S,z.Ea) - L.fb = line : new (z.S,z.Eb) - L.fc = line : new (z.S,z.Ec) - z.f_a = intersection (L.fa,C.exa) - z.f_b = intersection (L.fb,C.exb) - _,z.f_c = intersection (L.fc,C.exc) - T = triangle : new ( z.f_a, z.f_b , z.f_c ) - z.o = T.circumcenter - _,z.l = get_points (C.exa : orthogonal_from (z.S)) - -- S center of inversion !! + scale = .7 + z.A = point: new (0,0) + z.B = point: new (6,0) + z.C = point: new (0.8,4) + T.ABC = triangle : new ( z.A,z.B,z.C ) + z.N = T.ABC.eulercenter + z.Ea,z.Eb,z.Ec = get_points ( T.ABC : feuerbach () ) + z.Ja,z.Jb,z.Jc = get_points ( T.ABC : excentral () ) + z.S = T.ABC : spieker_center () + C.JaEa = circle : new (z.Ja,z.Ea) + C.ortho = circle : radius (z.S,math.sqrt(C.JaEa : power (z.S) )) + z.a = C.ortho.south + C.euler = T.ABC: euler_circle () + C.apo = C.ortho : inversion (C.euler) + z.O = C.apo.center + z.xa,z.xb,z.xc = C.ortho : set_inversion (z.Ea,z.Eb,z.Ec) \end{tkzelements} \begin{tikzpicture} \tkzGetNodes - \tkzDrawCircles[red](o,f_a N,Ma) - \tkzDrawPoints[red](f_a,f_b,f_c,Ea,Eb,Ec,o,N) - \tkzClipCircle(o,f_a) - \tkzDrawLines[add=3 and 3](A,B A,C B,C) - \tkzDrawCircles(I_a,Xa I_b,Xb I_c,Xc) - \tkzDrawCircles[cyan](S,l) - \tkzDrawPoints(A,B,C) - \tkzDrawPoints[cyan](S) - \tkzDrawSegments[dashed,red](S,f_a S,f_b S,f_c) - \tkzDrawSegments[dashed,teal](o,f_a o,f_b o,f_c) +\tkzDrawCircles[red](O,xa N,Ea) +\tkzFillCircles[green!30!black,opacity=.3](O,xa) +\tkzFillCircles[yellow!30,opacity=.7](Ja,Ea Jb,Eb Jc,Ec) +\tkzFillCircles[teal!30!black,opacity=.3](S,a) +\tkzFillCircles[green!30,opacity=.3](N,Ea) +\tkzDrawPoints[red](Ea,Eb,Ec,xa,xb,xc,N) +\tkzClipCircle(O,xa) +\tkzDrawLines[add=3 and 3](A,B A,C B,C) +\tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec) +\tkzFillCircles[lightgray!30,opacity=.7](Ja,Ea Jb,Eb Jc,Ec) +\tkzDrawCircles[teal](S,a) +\tkzDrawPoints(A,B,C,O) +\tkzDrawPoints[teal](S) +\tkzLabelPoints(A,B,C,O,S,N) \end{tikzpicture} \end{tkzexample} \begin{tkzelements} -scale = .5 -z.A = point: new (0,0) -z.B = point: new (6,0) -z.C = point: new (0.8,4) -T.ABC = triangle : new (z.A,z.B,z.C) -C.euler = T.ABC: euler_circle () -z.N,z.Ma = get_points (C.euler) -z.I_a,z.I_b,z.I_c = get_points (T.ABC : excentral()) -z.Ea,z.Eb,z.Ec = get_points (T.ABC : feuerbach ()) --- The Feuerbach triangle is the triangle formed by the three points of tangency of the nine-point circle with the excircles -z.S,z.p = get_points (T.ABC: spieker_circle ()) - -- z.Xa,z.Xb,z.Xc = get_points (T.ABC : extouch()) -C.exa = T.ABC : ex_circle () -z.Ia,z.Xa = get_points (C.exa) -C.exb = T.ABC : ex_circle (1) -z.Ib,z.Xb = get_points (C.exb) -C.exc = T.ABC : ex_circle (2) -z.Ic,z.Xc = get_points (C.exc) - --- S spieker point is the radical center of the last three circles -L.fa = line : new (z.S,z.Ea) -L.fb = line : new (z.S,z.Eb) -L.fc = line : new (z.S,z.Ec) -z.f_a = intersection (L.fa,C.exa) -z.f_b = intersection (L.fb,C.exb) -_,z.f_c = intersection (L.fc,C.exc) -T = triangle : new ( z.f_a, z.f_b , z.f_c ) -z.o = T.circumcenter -_,z.l = get_points (C.exa : orthogonal_from (z.S)) --- S center of inversion !! + scale = .5 + z.A = point: new (0,0) + z.B = point: new (6,0) + z.C = point: new (0.8,4) + T.ABC = triangle : new ( z.A,z.B,z.C ) + z.N = T.ABC.eulercenter + z.Ea,z.Eb,z.Ec = get_points ( T.ABC : feuerbach () ) + z.Ja,z.Jb,z.Jc = get_points ( T.ABC : excentral () ) + z.S = T.ABC : spieker_center () + C.JaEa = circle : new (z.Ja,z.Ea) + C.ortho = circle : radius (z.S,math.sqrt(C.JaEa : power (z.S) )) + z.a = C.ortho.south + C.euler = T.ABC: euler_circle () + C.apo = C.ortho : inversion (C.euler) + z.O = C.apo.center + z.xa,z.xb,z.xc = C.ortho : set_inversion (z.Ea,z.Eb,z.Ec) \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} -\tkzGetNodes -\tkzDrawCircles[red](o,f_a N,Ma) -\tkzDrawPoints[red](f_a,f_b,f_c,Ea,Eb,Ec,o,N) -\tkzClipCircle(o,f_a) + \tkzGetNodes +\tkzDrawCircles[red](O,xa N,Ea) +\tkzFillCircles[green!30!black,opacity=.3](O,xa) +\tkzFillCircles[yellow!30,opacity=.7](Ja,Ea Jb,Eb Jc,Ec) +\tkzFillCircles[teal!30!black,opacity=.3](S,a) +\tkzFillCircles[green!30,opacity=.3](N,Ea) +\tkzDrawPoints[red](Ea,Eb,Ec,xa,xb,xc,N) +\tkzClipCircle(O,xa) \tkzDrawLines[add=3 and 3](A,B A,C B,C) -\tkzDrawCircles(I_a,Xa I_b,Xb I_c,Xc) -\tkzDrawCircles[cyan](S,l) -\tkzDrawPoints(A,B,C) -\tkzDrawPoints[cyan](S) -\tkzDrawSegments[dashed,red](S,f_a S,f_b S,f_c) -\tkzDrawSegments[dashed,teal](o,f_a o,f_b o,f_c) +\tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec) +\tkzFillCircles[lightgray!30,opacity=.7](Ja,Ea Jb,Eb Jc,Ec) +\tkzDrawCircles[teal](S,a) +\tkzDrawPoints(A,B,C,O) +\tkzDrawPoints[teal](S) +\tkzLabelPoints(A,B,C,O,S,N) \end{tikzpicture} \hspace*{\fill} %\caption{Apollonius circle V1} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-howtouse.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-howtouse.tex index 0b94576633..5d47e005a7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-howtouse.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-howtouse.tex @@ -117,7 +117,7 @@ All points are defined and stored in the |z| table. The macro \tkzcname{tkzGetNo \subsubsection{Points transfer} % (fold) \label{ssub:points_transfer} -We use an environment \tkzname{elements} outside an environment \tkzname{tikzpicture} which allows us to carry out all the necessary calculations, then we launch the macro \tkzcname{tkzGetNodes} which transforms the affixes of the table \tkzname{z} into a list of \tkzname{Nodes}. It only remains to draw. +We use an environment \tkzname{tkzelements} outside an environment \tkzname{tikzpicture} which allows us to carry out all the necessary calculations, then we launch the macro \tkzcname{tkzGetNodes} which transforms the affixes of the table \tkzname{z} into a list of \tkzname{Nodes}. It only remains to draw. Currently the drawing program is either \TIKZ\ or \pkg{tkz-euclide}. You have the possibility to use another package to trace but for that you have to create a macro similar to \tkzcname{tkzGetNodes}. Of course, this package must be able to store the points as does \TIKZ\ or \pkg{tkz-euclide}. @@ -138,7 +138,7 @@ end} } \end{tkzexample} -The environment \tkzNameEnv{elements} allows to use the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime}. (see the next example) +The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime}. (see the next example) \begin{minipage}{0.5\textwidth} \begin{tkzexample}[latex=0cm,small,code only] diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex index db290e3447..cab5aa7aeb 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex @@ -195,14 +195,13 @@ The designation of intersection points is a little more complicated than the pre a = E.Rx b = E.Ry ang = math.deg(E.slope) - set_lua_to_tex {'a','b','ang'} \end{tkzelements} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines[red](a,b u,v) % p,s p,t \tkzDrawPoints(a,b,c,e,u,v) % \tkzLabelPoints(a,b,c,u,v) - \tkzDrawEllipse[teal](c,\a,\b,\ang) + \tkzDrawEllipse[teal](c,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzDrawSegments(c,u c,v) \tkzFillAngles[green!30,opacity=.4](e,c,v) \tkzFillAngles[green!80,opacity=.4](e,c,u) @@ -226,7 +225,6 @@ The designation of intersection points is a little more complicated than the pre a = E.Rx b = E.Ry ang = math.deg(E.slope) - set_lua_to_tex {'a','b','ang'} \end{tkzelements} \hspace*{\fill} \begin{tikzpicture} @@ -234,7 +232,7 @@ The designation of intersection points is a little more complicated than the pre \tkzDrawLines[red](a,b u,v) % p,s p,t \tkzDrawPoints(a,b,c,e,u,v) % \tkzLabelPoints(a,b,c,u,v) - \tkzDrawEllipse[teal](c,\a,\b,\ang) + \tkzDrawEllipse[teal](c,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) \tkzFillAngles[green!30,opacity=.4](e,c,v) \tkzFillAngles[green!80,opacity=.4](e,c,u) \tkzDrawSegments(c,u c,v) @@ -262,7 +260,6 @@ Other examples: \ref{ssub:function_tkzname_ellipse__foci}, \ref{sub:hexagram} % a = E.Rx % b = E.Ry % ang = math.deg(E.slope) -% set_lua_to_tex {'a','b','ang'} % \end{tkzelements} % % \begin{tikzpicture} @@ -270,7 +267,8 @@ Other examples: \ref{ssub:function_tkzname_ellipse__foci}, \ref{sub:hexagram} % \tkzDrawLines[red](a,b u,v) % p,s p,t % \tkzDrawPoints(a,b,c,e,u,v) % % \tkzLabelPoints(a,b,c,u,v) -% \tkzDrawEllipse[teal](c,\a,\b,\ang) +% \tkzDrawEllipse[teal](c,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) +% \tkzFillAngles[green!30,opacity=.4](e,c,v) % \tkzDrawSegments(c,u c,v) % \tkzFillAngles[green!30,opacity=.4,size=1.2](e,c,v) % \tkzFillAngles[green!80,opacity=.4](e,c,u) @@ -293,7 +291,6 @@ Other examples: \ref{ssub:function_tkzname_ellipse__foci}, \ref{sub:hexagram} % a = E.Rx % b = E.Ry % ang = math.deg(E.slope) -% set_lua_to_tex {'a','b','ang'} % \end{tkzelements} % % @@ -303,7 +300,8 @@ Other examples: \ref{ssub:function_tkzname_ellipse__foci}, \ref{sub:hexagram} % \tkzDrawLines[red](a,b u,v) % p,s p,t % \tkzDrawPoints(a,b,c,e,u,v) % % \tkzLabelPoints(a,b,c,u,v) -% \tkzDrawEllipse[teal](c,\a,\b,\ang) +% \tkzDrawEllipse[teal](c,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang}) +% \tkzFillAngles[green!30,opacity=.4](e,c,v) % \tkzDrawSegments(c,u c,v) % \tkzFillAngles[green!30,opacity=.4,size=1.2](e,c,v) % \tkzFillAngles[green!80,opacity=.4](e,c,u) diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex index 6fa4bc6166..202ff31ba7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex @@ -21,10 +21,10 @@ headings = small ]{tkz-doc} \gdef\tkznameofpack{tkz-elements} -\gdef\tkzversionofpack{1.00b} +\gdef\tkzversionofpack{1.20b} \gdef\tkzdateofpack{\today} \gdef\tkznameofdoc{tkz-elements.pdf} -\gdef\tkzversionofdoc{1.00b} +\gdef\tkzversionofdoc{1.20b} \gdef\tkzdateofdoc{\today} \gdef\tkzauthorofpack{Alain Matthes} \gdef\tkzadressofauthor{} @@ -93,7 +93,7 @@ \usepackage[english]{babel} \usepackage[normalem]{ulem} \usepackage{multirow,multido,booktabs,cellspace} -\usepackage{shortvrb,fancyvrb,bookmark} +\usepackage{shortvrb,bookmark} \usepackage{makeidx} %\usepackage{float} \makeindex diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf Binary files differindex 7c2839b3f4..0684fccc1f 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf +++ b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf diff --git a/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo-1.pdf b/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo-1.pdf Binary files differdeleted file mode 100644 index 0c97b2e50b..0000000000 --- a/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo-1.pdf +++ /dev/null diff --git a/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.pdf b/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.pdf Binary files differnew file mode 100644 index 0000000000..5d703157aa --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.pdf diff --git a/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.tex b/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.tex new file mode 100644 index 0000000000..3242fea11a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_4.tex @@ -0,0 +1,30 @@ +% !TEX TS-program = lualatex +% Created by Alain Matthes on 2023-02-25. +% Copyright (c) 2023 AlterMundus. + +\documentclass{standalone} +\usepackage{tkz-euclide} +\usepackage{tkz-elements} +\begin{document} + +\begin{tkzelements} + scale = 2 + z.A = point: new(0,0) + z.B = point: new(5,0) + z.C = point: new(1,4) + T.ABC = triangle: new (z.A,z.B,z.C) + T.EFG = T.ABC: medial () + z.E,z.F,z.G = get_points (T.EFG) + z.S = T.ABC: medial (): circum_circle ().south + z.O = T.ABC: medial ().circumcenter +\end{tkzelements} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawPolygons(A,B,C E,F,G) + \tkzDrawCircle(O,E) + \tkzDrawPoints(A,B,C,O,S,E,F,G) + \tkzLabelPoints(A,B,O,S,E,F,G) + \tkzLabelPoints[above](C) +\end{tikzpicture} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty index a147a045aa..80a39af083 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty @@ -1,5 +1,5 @@ % encoding : utf8 -% tkz-elements v1.00b +% tkz-elements v1.20b % Copyright 2023 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -11,13 +11,18 @@ % This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -\ProvidesPackage{tkz-elements}[2023/10/20 v1.00b Graphic Object Library] +\ProvidesPackage{tkz-elements}[2023/11/10 v1.20b Graphic Object Library] \RequirePackage{luacode} \RequirePackage{filecontents} \directlua{require "tkz_elements_main"} \newenvironment{tkzelements} - {\directlua{scale=1} + { \directlua{scale=1} + \directlua{for k,v in pairs(z) do z[k] = nil end} + \directlua{for k,v in pairs(L) do L[k] = nil end} + \directlua{for k,v in pairs(C) do C[k] = nil end} + \directlua{for k,v in pairs(T) do T[k] = nil end} + \directlua{for k,v in pairs(E) do E[k] = nil end} \luacode} {\endluacode} \def\tkzGetNodes{\directlua{% @@ -32,4 +37,12 @@ tex.print("\\coordinate ("..K..") at ("..V.re..","..V.im..") ;\\\\") end} } +\def\tkzEraseTables{ + \directlua{for k,v in pairs(z) do z[k] = nil end} + \directlua{for k,v in pairs(L) do L[k] = nil end} + \directlua{for k,v in pairs(C) do C[k] = nil end} + \directlua{for k,v in pairs(T) do T[k] = nil end} + \directlua{for k,v in pairs(E) do E[k] = nil end} +} +\def\tkzUseLua#1{\directlua{tex.print(tostring(#1))}} \endinput diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua index 52da83fc25..7af14e473c 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua @@ -1,6 +1,6 @@ -- tkz_elements-circles.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -27,18 +27,29 @@ function circle: new (c, t) -- c --> center t --> through setmetatable(new_circle, {__index = circle}) return new_circle end +-- other definition -function circle: antipode (pt) - return 2 * self.center - pt +function circle: radius (center, radius) -- c --> center r --> radius + local through + through = center + point( radius, 0 ) + return circle : new (center, through ) end - -function circle: power (pt) - local d - d = point.abs (self.center - pt) - return d * d - self.radius * self.radius +----------------------- +-- boolean -- +----------------------- +function circle: in_out (pt) + local d,epsilon + epsilon = 10^(-12) + d = point.abs (pt - self.center) + if math.abs(d-self.radius) < epsilon + then + return true + else + return false + end end -function circle: in_out (pt) +function circle: in_out_disk (pt) local d d = point.abs (pt - self.center) if d <= self.radius @@ -48,22 +59,78 @@ function circle: in_out (pt) return false end end +----------------------- +-- real -- +----------------------- --- function circle: tangent_at (pt) --- return tangent_at_ (self.center,self.through,pt) --- end +function circle: power (pt) + local d + d = point.abs (self.center - pt) + return d * d - self.radius * self.radius +end +----------------------- +-- points -- +----------------------- +function circle: antipode (pt) + return 2 * self.center - pt +end + +function circle: set_inversion (...) + local tp = table.pack(...) + local i + local t = {} + for i=1,tp.n do + table.insert( t , inversion_ ( self.center,self.through, tp[i] ) ) + end + return table.unpack ( t ) +end + +function circle: midarc (z1,z2) + local phi = 0.5 * get_angle_(self.center,z1,z2 ) + return rotation_ (self.center,phi,z1) +end + +function circle: point (phi) + return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) ) +end +function circle: random_pt(lower, upper) +local t + math.randomseed( tonumber(tostring(os.time()):reverse():sub(1,6)) ) + phi = lower + math.random() * (upper - lower) +return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) ) +end + +function circle: internal_similitude (C) + return barycenter_ ({self.center,C.radius},{C.center,self.radius}) +end + +function circle: external_similitude (C) + return barycenter_ ({C.center,self.radius},{self.center,-C.radius}) +end + + +----------------------- +-- lines -- +----------------------- function circle: tangent_at (pt) return line : new ( rotation_ (pt,math.pi/2,self.center),rotation_ (pt,-math.pi/2,self.center)) end - function circle: tangent_from (pt) local t1,t2 t1,t2 = tangent_from_ (self.center,self.through,pt) return line :new (pt,t1),line : new (pt,t2) end - + + function circle: radical_axis (C) + local t1,t2 + t1,t2 = radical_axis_ (self.center,self.through,C.center,C.through) + return line : new (t1,t2) + end + ----------------------- + -- circles -- + ----------------------- function circle: orthogonal_from (pt) local t1,t2 t1,t2 = tangent_from_ (self.center,self.through,pt) @@ -73,50 +140,44 @@ end function circle: orthogonal_through (pta,ptb) return circle : new (orthogonal_through_ (self.center,self.through,pta,ptb),pta) end - - function circle: inversion (pt) - return inversion_ (self.center,self.through,pt) - end - function circle: set_inversion (...) - local tp = table.pack(...) - local i - local t = {} - for i=1,tp.n do - table.insert( t , inversion_ ( self.center,self.through, tp[i] ) ) - end - return table.unpack ( t ) - end - - function circle: midarc (z1,z2) - local phi = 0.5 * get_angle_(self.center,z1,z2 ) - return rotation_ (self.center,phi,z1) + function circle: inversion_L (L) + local p,q + if L: in_out (self.center) then + return L + else + p = L: projection (self.center) + q = inversion_ (self.center,self.through,p) + return circle: new (midpoint_(self.center,q),q) + end end - - function circle: point (phi) - return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) ) + + function circle: inversion_C (C) + local p,q,x,y + if C: in_out (self.center) then + p = C : antipode (self.center) + q = inversion_ (self.center,self.through,p) + x = ortho_from_ ( q , self.center , p ) + y = ortho_from_ ( q , p, self.center) + return line : new (x,y) + else + x,y = intersection_lc_ (self.center,C.center,C.center,C.through) + X = inversion_ (self.center,self.through,x) + Y = inversion_ (self.center,self.through,y) + return circle : new (midpoint_(X,Y),X) + end end -function circle: random_pt(lower, upper) -local t - math.randomseed( tonumber(tostring(os.time()):reverse():sub(1,6)) ) - phi = lower + math.random() * (upper - lower) -return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) ) -end - -function circle: radical_axis (C) - local t1,t2 - t1,t2 = radical_axis_ (self.center,self.through,C.center,C.through) -return line : new (t1,t2) -end - -function circle: internal_similitude (C) - return barycenter_ ({self.center,C.radius},{C.center,self.radius}) -end - -function circle: external_similitude (C) - return barycenter_ ({C.center,self.radius},{self.center,-C.radius}) + function circle: inversion (obj) + if obj.type == "point" then + return inversion_ (self.center,self.through,obj) + elseif obj.type == "line" then + return self: inversion_L (obj) +else + return self: inversion_C (obj) end + end + function circle: draw () local x,y diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua index 0e15d5ab86..4bc34c61b7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua @@ -1,6 +1,6 @@ -- tkz_elements-ellipses.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua index e1d6b4bd53..fe9c91d2f7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_circles.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -14,23 +14,28 @@ -- define a circle by the center and a radius -function circle_cr ( c, r ) - return c + point(r,0) -end +-- function circle_cr ( c, r ) +-- return c + point(r,0) +-- end function midarc_ (o,a,b) -- a -> b local phi = 0.5 * get_angle_ ( a,o,b ) return rotation_ (o,phi,b) end ---------------------------------------------------------------------------- --- -- possible (C,p) with C.center and C.through --- function tangent_from (c,p) --- local m = midpoint_ (c.center,p) --- return intersection_cc_ (c.center,c.through,m,p) --- end ---------------------------------------------------------------------------- --- tangente à un cercle ---------------------------------------------------------------------------- + +function radical_center (C1,C2,C3) + local t1,t2,t3,t4 + t1,t2 = radical_axis_ (C3.center,C3.through,C1.center,C1.through) + t3,t4 = radical_axis_ (C3.center,C3.through,C2.center,C2.through) +return intersection_ll_ (t1,t2,t3,t4) +end + +function radical_circle (C1,C2,C3) + local rc + rc = radical_center (C1,C2,C3) + return C1 : orthogonal_from (rc) +end + function tangent_from_ (c,p,pt) local o o = midpoint_ ( c,pt ) @@ -38,7 +43,7 @@ function tangent_from_ (c,p,pt) end function tangent_at_ (a,b,p) - return rotation_ (p,math.pi/2,a),rotation_ (p,-math.pi/2,a) + return rotation_ (p,math.pi/2,a),rotation_ (p,-math.pi/2,a) end function orthogonal_from_ (a,b,p) diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua index 8c5123129d..f52c4bc2b1 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua @@ -1,6 +1,6 @@ -- tkz_elements_intersections.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua index 87ea1de043..c78004be6a 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_lines.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -15,6 +15,9 @@ --------------------------------------------------------------------------- -- Lines --------------------------------------------------------------------------- +function normalize_ (a,b) + return a+(b-a)/point.mod(b-a) +end function ortho_from_ ( p , a , b ) return p+(b-a)*point(0,1) diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua index 866912468a..f38458e1f1 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_maths.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -101,6 +101,10 @@ function value (v) return scale * v end +function real (v) + return v/scale +end + function get_angle (a,b,c) return angle_normalize(get_angle_( a,b,c )) end diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua index fcd249d891..ea468a9c6d 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_points.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -34,9 +34,9 @@ end return sum/weight end -function rotation_ (center,alpha,pt) - local z = point( math.cos(alpha) , math.sin(alpha) ) - return z*(pt-center)+center +function rotation_ (c,a,pt) + local z = point( math.cos(a) , math.sin(a) ) + return z*(pt-c)+c end function symmetry_(c,pt) diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua index b4e41104d1..166d3b7647 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_triangles.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -200,7 +200,7 @@ function incentral_tr_ (a,b,c) r = intersection_ll_ ( a,i , b,c) s = intersection_ll_ ( b,i , a,c) t = intersection_ll_ ( c,i , a,b) -return i,r,s,t +return r,s,t end function excentral_tr_ (a,b,c) diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua index 05d4196938..11d8f49d41 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua @@ -1,6 +1,6 @@ -- tkz_elements_lines.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -34,9 +34,47 @@ function line: new(za, zb) setmetatable(new_line, {__index = line}) return new_line end + +------------------- +-- Result -> real +------------------- +function line: distance (pt) + return point.mod(projection(self,pt)-pt) +end + +function line: slope () + return slope_(self.pa,self.pb) +end +------------------- +-- Result -> boolean +------------------- +function line: in_out (pt) + local sc,epsilon + epsilon = 10^(-12) + sc = math.abs ((pt-self.pa)^(pt-self.pb)) + if sc <= epsilon + then + return true + else + return false + end +end + ------------------- -- Result -> point ------------------- +function line: translation ( pt ) + return translation_ ( self.pb-self.pa,pt ) +end + +function line: set_translation ( ...) + return set_translation_ ( self.pb-self.pa,... ) +end + +function line: projection ( pt ) + return projection_ ( self.pa,self.pb,pt ) +end + function line: set_projection (...) local tp = table.pack(...) local i @@ -60,7 +98,7 @@ function line: set_symmetry_axial (...) end return table.unpack ( t ) end --- k_div ig "gold" or "phi" then + function line: barycenter (ka,kb) return barycenter_({self.pa,ka},{self.pb,kb}) @@ -89,6 +127,14 @@ end function line: gold_ratio() return self.pa + (self.pb-self.pa)*tkzinvphi end + +function line: normalize () + return self.pa+(self.pb-self.pa)/point.mod(self.pb-self.pa) +end + +function line: normalize_inv () + return normalize_ (self.pb,self.pa) +end ------------------- -- Result -> line ------------------- @@ -100,10 +146,6 @@ function line: ortho_from ( pt ) return line : new (pt,pt+(self.pb-self.pa)*point(0,1)) end -function line: projection ( pt ) - return projection_ ( self.pa,self.pb,pt ) -end - function line: mediator () local m m = midpoint_ (self.pa,self.pb) @@ -119,30 +161,7 @@ end function line: circle_swap () return circle : new (self.pb,self.pa) end -------------------- --- Result -> real -------------------- -function line: distance (pt) - return point.mod(projection(self,pt)-pt) -end -------------------- --- Result -> boolean -------------------- -function line: in_out (pt) - local sc,epsilon - epsilon = 10^(-12) - sc = math.abs ((pt-self.pa)^(pt-self.pb)) - if sc <= epsilon - then - return true - else - return false - end -end - -function line: slope () - return slope_(self.pa,self.pb) -end + ---------------------- -- Result -> triangle ---------------------- diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua index 92e006fe78..10b96d1430 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua @@ -1,6 +1,6 @@ -- tkz_elements-main.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -43,5 +43,7 @@ if obj.type == 'line' then return obj.pa,obj.pb obj.type == 'triangle' then return obj.pa,obj.pb,obj.pc elseif obj.type == 'circle' then return obj.center,obj.through + elseif + obj.type == 'ellipse' then return obj.pc,obj.pa,obj.pb end end
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua index 0b2e3dec4a..5d459e3028 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua @@ -1,6 +1,6 @@ -- tkz_elements_point.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua index bcaff010cc..74ad16a165 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua @@ -1,6 +1,6 @@ -- tkz_elements_points.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua index 1960248e50..6ea35c5b6e 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua @@ -1,6 +1,6 @@ -- tkz_elements_triangles.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -20,6 +20,7 @@ function triangle: new (za, zb ,zc) local incenter = in_center_ (za , zb , zc) local orthocenter = ortho_center_ (za , zb , zc) local eulercenter = euler_center_ (za , zb , zc) + local spiekercenter = spieker_center_ (za , zb , zc) local c = point.abs(zb-za) local a = point.abs(zc-zb) local b = point.abs(za-zc) @@ -31,8 +32,8 @@ function triangle: new (za, zb ,zc) local bc =line : new (zb,zc) local new_triangle = {pa = za, pb = zb, pc = zc, type = type, circumcenter=circumcenter,centroid=centroid,incenter=incenter, - eulercenter=eulercenter, orthocenter=orthocenter,a=a,b=b,c=c,ab=ab,ac=ac,bc=bc, - alpha=alpha,beta=beta,gamma=gamma} + eulercenter=eulercenter, orthocenter=orthocenter,spiekercenter=spiekercenter, + a=a,b=b,c=c,ab=ab,ac=ac,bc=bc,alpha=alpha,beta=beta,gamma=gamma} setmetatable(new_triangle, {__index = triangle}) return new_triangle end diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua index 44ea2f7f2e..26ec57e695 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua @@ -1,6 +1,6 @@ -- tkz_elements_vectors.lua --- date 2023/10/20 --- version 1.00b +-- date 2023/11/10 +-- version 1.20b -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/luatex/latex/gitinfo-lua/README.md b/macros/luatex/latex/gitinfo-lua/README.md new file mode 100644 index 0000000000..383cf2df33 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/README.md @@ -0,0 +1,24 @@ +# Git LaTeX + +A LaTeX package which provides macros integrated with LuaTeX and the commandline tool `git`. + +## Installation +In order to install this package the right way, one should create the release tarball first with `make package`. +Afterward be sure to unpack the contents of the release tarball anywhere where TeX will find it, i.e. `~/texmf`. + +## Documentation +The documentation can be built using `make` or manually using `lualatex`: +```bash +make build clean +# Or manually +cd doc +lualatex -shell-escape gitinfo-lua.tex +makeindex -s gind.ist gitinfo-lua.idx +lualatex -shell-escape gitinfo-lua.tex +``` + +Read [gitinfo-lua.pdf](gitinfo-lua.pdf) for more information about this package. + +## License +This project is licensed under the LPPL version 1.3c and maintained by Erik Nijenhuis. +See [LICENSE.pdf](LICENSE.pdf) for more information. diff --git a/macros/luatex/latex/gitinfo-lua/doc/git-scenario.sh b/macros/luatex/latex/gitinfo-lua/doc/git-scenario.sh new file mode 100644 index 0000000000..a3cfd179e9 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/doc/git-scenario.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -e + +PROJECT_DIR="${1:-../../git-test-project}" + +set_author() { + git config user.name $1 + git config user.email $2 + git config committer.name $1 + git config committer.email $2 + git config author.name $1 + git config author.email $2 +} + +alice() { + set_author 'Alice' 'alice@example.com' +} +bob() { + set_author 'Bob' 'bob@example.com' +} +charlie() { + set_author 'Charlie' 'charlie@example.com' +} + +if [[ -d "${PROJECT_DIR}" ]]; then + rm -rf "${PROJECT_DIR}" +fi + +mkdir "${PROJECT_DIR}" +cd "${PROJECT_DIR}" + +git init + +alice + +echo "# My project" > README.md +git add README.md +git commit -m "Add readme" --date="2017-08-04 10:32" + +bob + +echo " +Another project by Alice and Bob." >> README.md +git add README.md +git commit -m "Add intro (README.md)" --date="2017-08-05 06:12" + +alice + +GIT_COMMITTER_DATE="2017-08-05 07:11" git tag 0.0.1 + +bob + +curl https://raw.githubusercontent.com/github/gitignore/main/TeX.gitignore > .gitignore +git add .gitignore +git commit -m "Add gitignore" --date="2017-08-06 12:03" + +charlie + +export GIT_COMMITTER_DATE="2017-08-06 08:41" +git tag -a 0.1.0 -m "Version 0.1.0" diff --git a/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.pdf b/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.pdf Binary files differnew file mode 100644 index 0000000000..ad1db4e0b1 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.pdf diff --git a/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.tex b/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.tex new file mode 100644 index 0000000000..1587f72d80 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/doc/gitinfo-lua.tex @@ -0,0 +1,344 @@ +%% gitinfo-lua.tex +%% Copyright 2023 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files gitinfo-lua.sty gitinfo-lua.pdf +% gitinfo-cmd.lua and gitinfo-lua.lua +\documentclass{ltxdoc} +\usepackage[english]{babel} +\usepackage[titlepage]{gitinfo-lua} + +\usepackage{listings} + +\usepackage{calc} +\usepackage{multicol} +\usepackage{tabularx} +\usepackage{xcolor} +\usepackage{textcomp} + +\usepackage[orig,english]{isodate} + +\def\projecturl{https://github.com/Xerdi/gitinfo-lua} +\title{\textbf{Gitinfo Lua} package\thanks{This document corresponds to package \texttt{gitinfo-lua} version \gitversion{} written on \gitdate{}.}} + +\def\cmd{\lstinline[language={[LaTeX]TeX},keywordsprefix={\\}]} + +\usepackage{hyperref} +\usepackage[nonewpage]{imakeidx} + +\CodelineIndex +\EnableCrossrefs + +\makeindex[columns=1] + +\newlength\xample +\newlength\xamplesep +\setlength\xample{6cm-5pt} +\setlength\xamplesep{5pt} + +\begin{document} + \RecordChanges + + \maketitle + + \begin{abstract} + This project aims to display git project information in PDF documents. + It's mostly written in Lua for executing the \texttt{git} commands, therefore making this package only applicable for \texttt{lualatex} with \texttt{shell escape} enabled. + If \texttt{lualatex} isn't working for you, you could try \href{https://ctan.org/pkg/gitinfo2}{gitinfo2} instead. + For \LaTeX{} it provides a set of standard macros for displaying basic information or setting the project directory, and a set of advanced macros for formatting commits and tags. + \end{abstract} + + \begin{multicols}{2} + \tableofcontents +% \lstlistoflistings + \printindex + \end{multicols} + \clearpage + + + \section{Usage} + For the package to work one should work, and only work, with Lua\TeX{}. + Another prerequisite is that there is an available git repository either in the working directory, or somewhere else on your machine (see section~\ref{sub:tex-basic}). + + \subsection{Git} + For this package to work at a minimum, there has to be an initialized Git repository, and preferably, at least with one commit. + For example, the following minimal example should do the trick already: + \begin{lstlisting}[language=bash,frame=single,caption={Minimal Git setup},morekeywords={mkdir,git}] +mkdir my_project +cd my_project +echo "# My Project" > README.md +git init && git commit -am "Init" + \end{lstlisting} + + Then in order for the changelog to work, the project needs to contain either `lightweight-' or `annotated' tags. + The main difference is that a lightweight tag takes no extra options, for example: \texttt{git tag 0.1}. + See listing~\ref{lst:scenario} for more examples on authoring and versioning with \texttt{git}. + + \subsection{Lua\LaTeX{}} + + For generating the document with \LaTeX{} one must make use of \texttt{lualatex}. + For example, when having the main file `\texttt{main.tex}': + \begin{lstlisting}[language=bash,frame=single,caption={Generating the document with \LaTeX{}},morekeywords={lualatex,latexmk}] +# Generate once +lualatex -shell-escape main +# Generate and keep watching with LaTeXMK +latexmk -pvc -lualatex -shell-escape main + \end{lstlisting} + Note that in both cases option \texttt{-shell-escape} is required. + This is required for issuing \texttt{git} via the commandline. + + + \section{LaTeX Interface} + + \subsection{Package Options} + + \cmd{\usepackage}% + \oarg{opts...}% + \texttt{\textbraceleft gitinfo-lua\textbraceright}\index[pkgopts]{gitinfo-lua(.sty)} + This package provides some options for default formatting purposes. + The author sorting is one of them. + If the options contain \meta{contrib} the authors will be sorted based on their contributions, otherwise the authors will be sorted alphabetically, which is the default option \meta{alpha}. + Another option is the \meta{titlepage} option, which sets the \cmd{\author} and \cmd{\date} macros accordingly. + By default, it sets the local git author, equivalent to option \meta{author}. + Pass option \meta{authors} to set all git authors of the project instead. + + \subsection{Basic macros}\label{sub:tex-basic} + By default the main file's directory is used as git project directory. + This directory can be manipulated with \DescribeMacro{\gitdirectory}\cmd{\gitdirectory}\marg{path}. + This is only tested with relative paths on Linux. + \DescribeMacro{\gitunsetdirectory} To undo this operation and switch back to the main file's directory use \cmd{\gitunsetdirectory}.\\ + + \noindent + \DescribeMacro{\gitversion} The current version can be display by using \cmd{\gitversion} and is equivalent to \texttt{git describe --tags --always}, working for both lightweight and annotated tags. + For this project \cmd{\gitversion} results in \gitversion. + When the version is dirty it will be post fixed with \texttt{-<commit count>-<short ref>}. + For example, when this paragraph was written, the version was displaying 0.0.1-14-gcc2bc30.\\ + + The \DescribeMacro{\gitdate}\cmd{\gitdate} macro gets the most recent date from the git log. + Meaning, the last `short date' variant is picked from the last commit. + This short date is formatted ISO based and is already suitable for use in packages like \texttt{isodate} for more advanced date formatting.\\ + + + The author's name and email can be accessed using \cmd{\gitauthor} and \cmd{\gitemail}\DescribeMacro{\gitauthor}\DescribeMacro{\gitemail}. + These values are based on \texttt{git config user.name} and \texttt{git config user.email}. + + \subsection{Multiple Authors} + When projects having multiple authors this package can help with the \DescribeMacro{\dogitauthors}\break\cmd{\dogitauthors}\oarg{conj} and \DescribeMacro{\forgitauthors}\cmd{\forgitauthors}\oarg{conj}\marg{csname} macro. + Where \cmd{\dogitauthors} executes a default formatting implementation of \break\cmd{\git@format@author} and \cmd{\forgitauthors} executes the given \meta{csname} for every author available. + The optional \meta{conj} conjunction makes it possible to even integrate it further. + For example, when setting the authors in pdfx, the conjunction would be \texttt{[\textbackslash\textbackslash sep\textasciitilde]}, so that the authors are properly separated in the document properties\footnote{See package documentation of \texttt{pdfx}: \url{https://ctan.org/pkg/pdfx}}. + + \gitdirectory{../../git-test-project}% + \setlength\xample{4.6cm-5pt}% + \setlength\xamplesep{5pt}% + \noindent% + \begin{minipage}[t]{\linewidth-\xample-\xamplesep}% + \begin{lstlisting}[language={[LaTeX]TeX},numbers=left,caption={Formatting authors},captionpos=t,morekeywords={myauthorformat,href,forgitauthors,dogitauthors}] +\newcommand{\myauthorformat}[2]{#1 \href{mailto:#2}{#2}} +\forgitauthors[\\]{myauthorformat} +% Or using standard format +\dogitauthors[\\] + \end{lstlisting} + \end{minipage}\hfill% + \begin{minipage}[t]{\xample} + \noindent + \begin{center} + Results in + \end{center} + + \noindent + \setlength{\fboxsep}{5pt}% + \fbox{\parbox{\linewidth-2\fboxsep}{\dogitauthors[\\\\]}} + \end{minipage}\\ + + This example is generated with the history of the \texttt{git-test-project} (see section~\ref{sec:project}) and is alphabetically sorted with package option \texttt{alpha}. + \gitunsetdirectory + + \subsection{Commits} + For this section the git project of this document is used due to the fact that there are references to revisions. + The test project's revisions change for every user, since they get recreated every time \texttt{test-scenario.sh} is executed (see section~\ref{sec:project}).\\ + + \noindent + \DescribeMacro{\gitcommit}\oarg{format}\marg{csname}\marg{revision}\\ + For displaying commit data \cmd{\gitcommit} can be used. + The optional \texttt{format} takes variables separated by a comma. + The default \texttt{format} is \texttt{h,an,ae,as,s,b}. + The \texttt{csname} is a user defined command accepting every variable as argument. + \setlength\xample{3.5cm}% + \setlength\xamplesep{0pt}% + \noindent% + \begin{minipage}[t]{\linewidth-\xample-\xamplesep} + \begin{lstlisting}[language={[LaTeX]TeX},numbers=left,caption={Formatting a commit},captionpos=t,morekeywords={formatcommit,printdate,gitcommit}] +\newcommand{\formatcommit}[3]{#1, by #2 on \printdate{#3}} + +\gitcommit[s,an,as]{formatcommit}{75dc036} + \end{lstlisting} + \end{minipage}\hfill% + \begin{minipage}[t]{\xample} + \noindent + \begin{center} + Results in + \end{center} + + \noindent + \setlength{\fboxsep}{5pt}% + \newcommand\formatcommit[3]{#1, by #2 on \printdate{#3}}% + \fbox{\parbox{\linewidth-2\fboxsep}{\gitcommit[s,an,as]{formatcommit}{75dc036}\footnotemark}} + \end{minipage}\\ + \footnotetext{\cs{printdate} from \texttt{isodate}: \url{https://www.ctan.org/pkg/isodate}} + + Consult \texttt{man git-log} for possible format variables and omit the \% for every variable.\\ + + \noindent + \DescribeMacro{\forgitcommit}\oarg{format}\marg{csname}\marg{rev\_spec}\\ + For displaying multiple commits the~\cmd{\forgitcommit} is used, which has the same arguments as \cmd{\gitcommit}, but only this time the \texttt{csname} is executed for every commit. + The last argument \texttt{rev\_spec} this time, however, can have no argument or a sequence. + + \noindent\setlength\xample{4.5cm}\setlength\xamplesep{0pt} + \begin{minipage}[t]{\linewidth-\xample-\xamplesep} + \noindent + \begin{lstlisting}[language={[LaTeX]TeX},numbers=left,captionpos=t,caption={Formatting commits},morekeywords={formatcommits,forgitcommit}] +\newcommand{\formatcommits}[2]{\item #1\\\quad —#2} + +\begin{itemize} + \forgitcommit[s,an]{formatcommits}{75dc036...e51c481} +\end{itemize} + \end{lstlisting} + \end{minipage}\hfill% + \begin{minipage}[t]{\xample} + \noindent + \begin{center} + Results in + \end{center} + + \noindent + \newcommand\formatcommits[2]{\item #1\\\quad —#2}% + \setlength{\fboxsep}{0pt}% + \fbox{\parbox{\linewidth}{% + \begin{itemize} + \forgitcommit[s,an] + {formatcommits} + {75dc036...e51c481} + \end{itemize} + }} + \end{minipage}\\ + \gitdirectory{../../git-test-project} + + \clearpage + \subsection{Tags} + In this section the \texttt{git-test-project} is used. + + The tags are mostly useful for generating changelogs. + For formatting tags, there's a \DescribeMacro{\forgittag}\cmd{\forgittag}\oarg{format}\marg{csname}. + Again, like \cmd{\forgitcommit} it takes a format, however, this time more complex, since the formatting options differ between \texttt{git log} and \texttt{git for-each-ref}. + For more info regarding these formatting options consult the man page of \texttt{git-for-each-ref}. + + \noindent\setlength\xample{3.5cm}\setlength\xamplesep{0pt} + \begin{minipage}[t]{\linewidth-\xample-\xamplesep} + \noindent + \begin{lstlisting}[language={[LaTeX]TeX},numbers=left,captionpos=t,caption={Formatting tags},morekeywords={formattags,forgittag}] +\newcommand{\formattags}[2]{\item Version #1\\type: #2} + +\begin{itemize} + \forgittag[refname:short,objecttype]{formattags} +\end{itemize} + \end{lstlisting} + \end{minipage}\hfill% + \begin{minipage}[t]{\xample} + \noindent + \begin{center} + Results in + \end{center} + + \noindent + \newcommand\formattags[2]{\item Version #1\\type: #2}% + \setlength{\fboxsep}{0pt}% + \fbox{\parbox{\linewidth}{% + \begin{itemize} + \forgittag[refname:short,objecttype] + {formattags} + \end{itemize} + }} + \end{minipage}\\ + This example shows that the versions used are mixed. + This is, of course, a horrible way to manage a project's version, though, we'll continue on with this hard objective. + For example, if we wish to display the author of the lightweight and annotated tag, we can do so by specifying a format using the if-then-else feature of the format specification. + The format would be: \texttt{(taggername)(taggername)(authorname)}. + Here the \texttt{taggername} will show up, or if not present, the \texttt{authorname} will be shown instead. + + The default format specification is like the \cmd{\forgitcommit} format, but then again, some bit more complex:\\ + \texttt{refname:short,(taggername)(taggername,taggeremail,taggerdate:short)\\(authorname,authoremail,authordate:short),subject,body}. + This is a robust example of getting all information, being it a lightweight- or annotated tag.\\ + + For displaying commits in between tags, there's a \DescribeMacro{\forgittagseq}\cmd{\forgittagseq}\marg{csname}. + The \meta{csname} takes exactly three arguments, namely, the \meta{current}, \meta{next tag} and \meta{rev spec}. + The last iteration gives an empty value for \meta{next tag} and the \meta{rev spec} is identical to \meta{current}. + + Afterward tag info get be fetched using the \DescribeMacro{\gittag} \cmd{\gittag}\oarg{format}\marg{csname}\marg{tag}. + This macro takes the same formatting specification as \cmd{\fotgittag}. + Beware of using \cmd{\gittag} for the \meta{next tag} parameter in \cmd{\forgittagseq}. + + All these macros put together are demonstrated in listing~\ref{lst:changelog} (see next page). + \clearpage + \subsection{Changelog} + This example demonstrates the generation of a changelog. + For simplicity’s sake, every tag is displayed in a \texttt{description} environment's item and within an \texttt{enumerate} environment displaying commits in between. + \begin{lstlisting}[language={[LaTeX]TeX},numbers=left,captionpos=t,caption={Formatting a changelog},label={lst:changelog},morekeywords={commitline,formatversion,gittag,forgitcommit,forgittagseq,printdate}] +\section*{Changelog} +\newcommand{\commitline}[1]{\item #1} +\newcommand{\formatversion}[3]{% + \item[#1] + \gittag[(taggerdate)(taggerdate:short)(authordate:short)]{printdate}{#1} + \begin{itemize} + \forgitcommit[s]{commitline}{#3} + \end{itemize} +}% +\begin{description} + \forgittagseq{formatversion} +\end{description} + \end{lstlisting} + \noindent + \newcommand\commitline[1]{\item #1} + \newcommand\formatversion[3]{% + \item[#1] \gittag[(taggerdate)(taggerdate:short)(authordate:short)]{printdate}{#1} + \begin{itemize} + \forgitcommit[s]{commitline}{#3} + \end{itemize}% + }% + \setlength{\fboxsep}{16pt}% + \begin{center}Results in\end{center} + + \noindent + \fbox{ + \parbox{\linewidth-8pt-2\fboxsep}{ + {\bfseries\Large Changelog} + \begin{description} + \forgittagseq{formatversion}% + \end{description} + } + }\\ + + For displaying the tagline (see line 5) we use the existing \cmd{\printdate} macro of package \texttt{isodate}, which also takes exactly one argument + For every version sequence the commits in between are displayed (see line 7), where the last sequence having the initial commit as second argument plays well with the \cmd{\forgitcommit} macro and makes it possible to show the whole sequence of history. + + \clearpage + \section{Project Example}\label{sec:project} + This documentation uses an example \texttt{project} which gets created by the \texttt{git-scenario.sh} script (see listing~\ref{lst:scenario}). + It creates some commits having dates in the past and different authors set. + Lastly it creates a `lightweight-' and `annotated' tag. + + To set up this scenario either do \texttt{make scenario} or \texttt{bash scenario.sh}. + + \lstinputlisting[language=bash,numbers=left,frame=single,label={lst:scenario},caption={git-scenario.sh},captionpos=t,morekeywords={git,alice,bob,charlie,mkdir,rm,curl,set\_author}]{git-scenario.sh} +\end{document} diff --git a/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua-cmd.lua b/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua-cmd.lua new file mode 100644 index 0000000000..7e27bc05ba --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua-cmd.lua @@ -0,0 +1,186 @@ +-- gitinfo-lua-cmd.lua +-- Copyright 2023 E. Nijenhuis +-- +-- This work may be distributed and/or modified under the +-- conditions of the LaTeX Project Public License, either version 1.3c +-- of this license or (at your option) any later version. +-- The latest version of this license is in +-- http://www.latex-project.org/lppl.txt +-- and version 1.3c or later is part of all distributions of LaTeX +-- version 2005/12/01 or later. +-- +-- This work has the LPPL maintenance status ‘maintained’. +-- +-- The Current Maintainer of this work is E. Nijenhuis. +-- +-- This work consists of the files gitinfo-lua.sty gitinfo-lua.pdf +-- gitinfo-cmd.lua and gitinfo-lua.lua + +local api = { + cwd = nil, + executable = 'git', + default_sort = '', + attribute_separator = '\\pop', + record_separator = '\\end' +} +local cache = {} +function cache:seek(_key) + for key, value in pairs(self) do + if key == _key then + return true, value + end + end + return false, nil +end + +function api.trim(s) + return (s:gsub("^%s*(.-)%s*$", "%1")) +end + +function api:exec(command, do_caching, target_dir) + local cmd = self.executable .. ' ' .. command + local cwd = target_dir or self.cwd + if cwd then + cmd = 'cd ' .. cwd .. ';' .. cmd + end + if do_caching then + local found, result = cache:seek(cmd) + if found then + return result + end + end + local f = io.popen(cmd) + if f == nil then + return nil, "Couldn't execute git command.\n\tIs option '-shell-escape' turned on?" + end + local s = f:read('*a') + if f:close() then + if do_caching then + cache[cmd] = s + end + return s + else + return nil, 'Error executing git command' + end +end + +function api:shortlog(sort_by_contrib, include_email, target_dir) + local cmd = 'shortlog -s' + if sort_by_contrib then + cmd = cmd .. 'n' + end + if include_email then + cmd = cmd .. 'e' + end + cmd = cmd .. ' HEAD' + return self:exec(cmd, true, target_dir) +end + +function api:parse_opts(options) + if options then + for idx, opt in ipairs(options) do + options[idx] = '--' .. opt + end + return table.concat(options, ' ') + end +end + +function api:format_attribute(attribute, no_separator, with_parenthesis) + if with_parenthesis then + attribute = '%(' .. attribute .. ')' + else + attribute = '%' .. attribute + end + if not no_separator then + attribute = attribute .. self.attribute_separator + end + return attribute +end + +function api:_parse_format_spec(spec, idx, with_parenthesis) + local format = '' + local above_limit = #spec + 1 + while idx and idx <= #spec do + local attr_idx, attr_size, attr = string.find(spec, '([a-z:]+)', idx) + local if_idx, if_size, if_block, if_then, if_else = string.find(spec, '%((.-)%)%((.-)%)%((.-)%)', idx) + if if_idx or attr_idx then + if (if_idx or above_limit) > (attr_idx or above_limit) then + format = format .. self:format_attribute(attr, false, with_parenthesis) + idx = attr_size and (attr_size + 1) + else + local if_token = self:format_attribute(if_block, true, with_parenthesis) + local then_result = self:_parse_format_spec(if_then, idx, with_parenthesis) + local else_result = self:_parse_format_spec(if_else, idx, with_parenthesis) + format = format .. '%(if)' .. if_token .. '%(then)' .. then_result + format = format .. '%(else)' .. else_result .. '%(end)' + idx = if_size and (if_size + 1) + end + end + end + return format +end + +function api:parse_format_spec(spec, with_parenthesis) + if type(spec) ~= 'string' then + return nil, 'Pass the attribute format spec separated by "," in a string en enclosed in three parentheses for if statements' + end + local format = self:_parse_format_spec(spec, 1, with_parenthesis) + return format .. self.record_separator +end + +function api:parse_response(buffer) + local results = {} + for record_buffer in string.gmatch(buffer, '(.-)' .. self.record_separator) do + local record = {} + for attr in string.gmatch(record_buffer, '(.-)' .. self.attribute_separator) do + table.insert(record, self.trim(attr)) + end + table.insert(results, record) + end + return results +end + +function api:log(format_spec, revision, options, target_dir) + local format, err = self:parse_format_spec(format_spec) + if err then + return nil, err + end + local cmd = 'log --pretty=format:"' .. format .. '"' + local opts = self:parse_opts(options) + if opts then + cmd = cmd .. ' ' .. opts + end + if revision and revision ~= '' then + cmd = cmd .. ' ' .. revision + end + local response, err = self:exec(cmd, true, target_dir) + if not response then + return nil, err + end + return self:parse_response(response) +end + +function api:for_each_ref(format_spec, revision_type, options, target_dir) + local err, format, response + format, err = self:parse_format_spec(format_spec, true) + if err then return nil, err end + local cmd = 'for-each-ref --format="' .. format .. '"' + local opts = self:parse_opts(options) + if opts then + cmd = cmd .. ' ' .. opts + end + cmd = cmd .. ' ' .. revision_type + response, err = self:exec(cmd, true, target_dir) + if err then return nil, err end + return self:parse_response(response) +end + +local gitinfo_cmd = {} +local gitinfo_cmd_mt = { + __index = api, + __newindex = nil +} + +setmetatable(gitinfo_cmd, gitinfo_cmd_mt) + +return gitinfo_cmd diff --git a/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua.lua b/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua.lua new file mode 100644 index 0000000000..4cb0f0f467 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/scripts/gitinfo-lua.lua @@ -0,0 +1,345 @@ +-- gitinfo-lua.lua +-- Copyright 2023 E. Nijenhuis +-- +-- This work may be distributed and/or modified under the +-- conditions of the LaTeX Project Public License, either version 1.3c +-- of this license or (at your option) any later version. +-- The latest version of this license is in +-- http://www.latex-project.org/lppl.txt +-- and version 1.3c or later is part of all distributions of LaTeX +-- version 2005/12/01 or later. +-- +-- This work has the LPPL maintenance status ‘maintained’. +-- +-- The Current Maintainer of this work is E. Nijenhuis. +-- +-- This work consists of the files gitinfo-lua.sty gitinfo-lua.pdf +-- gitinfo-cmd.lua and gitinfo-lua.lua + +if not modules then + modules = {} +end + +local module = { + name = 'gitinfo-lua', + info = { + version = 1.0, + comment = "Git info Lua — Git integration with LaTeX", + author = "Erik Nijenhuis", + license = "free" + } +} + +modules[module.name] = module.info + +local api = { + cur_tok = nil, + cmd = require('gitinfo-lua-cmd'), + escape_chars = { + ['&'] = '\\&', + ['%%'] = '\\%%', + ['%$'] = '\\$', + ['#'] = '\\#', + ['_'] = '\\_', + ['{'] = '\\{', + ['}'] = '\\}', + ['~'] = '\\textasciitilde', + ['%^'] = '\\textasciicircum' + } +} +local mt = { + __index = api, + __newindex = nil +} +local gitinfo = {} +setmetatable(gitinfo, mt) + +function api.trim(s) + return (s:gsub("^%s*(.-)%s*$", "%1")) +end + +function api:set_date() + local date, err = self.cmd:log('cs', '-1', {'max-count=1'}) + if date and #date == 1 then + local _, _, year, month, day = date[1][1]:find('(%d+)[-/](%d+)[-/](%d+)') + tex.year = tonumber(year) + tex.month = tonumber(month) + tex.day = tonumber(day) + else + return nil, (err or 'Length of output doesn\'t match one (attempt to set git date)') + end +end + +function api:escape_str(value) + local buf = string.gsub(value, '\\', '\\textbackslash') + for search, replace in pairs(self.escape_chars) do + buf = string.gsub(buf, search, replace) + end + return buf +end + +-- experimental +function api:get_tok() + if self.cur_tok == nil then + self.cur_tok = token.get_next() + end + return self.cur_tok +end + +-- experimental +function api:parse_opts() + local tok = self:get_tok() + if tok.cmdname == 'other_char' then + --token.put_next(tok) + local opts = token.scan_word() + self.cur_tok = nil + -- todo: parse [] + return opts + end +end + +-- experimental +function api:parse_arguments(argc) + local result_list = {} + for _ = 1, argc do + local tok = self:get_tok() + if tok.cmdname == 'left_brace' then + token.put_next(tok) + table.insert(result_list, token.scan_argument()) + self.cur_tok = nil + else + tex.error("Expected left brace") + return + end + end + return table.unpack(result_list) +end + +-- experimental +function api:parse_macro() + --tex.print('\\noexpand') + local tok = self:get_tok() + if (tok.cmdname == 'call') or tok.cmdname == 'long_call' then + self.cur_tok = nil + return tok + else + tex.error("Expected Macro") + for i = 1, 5 do + local _tok = token.get_next() + end + end +end + +function api:dir(path) + self.cmd.cwd = path +end + +function api:version() + return self.trim(self.cmd:exec('describe --tags --always', true)) +end + +function api:write_version() + local version, err = self:version() + if version then + tex.write(version) + else + tex.error(err) + end +end + +-- todo: prevent output to stderr +-- todo: add write variant +-- experimental +function api:is_dirty() + local ok, _ = self.cmd:exec('describe --tags --exact-match') + return ok == nil +end + +function api:local_author() + return self.trim(self.cmd:exec('config user.name', true)) +end + +function api:write_local_author() + local name, err = self:local_author() + if name then + tex.write(name) + else + tex.error(err) + end +end + +function api:local_email() + return self.trim(self.cmd:exec('config user.email', true)) +end + +function api:write_local_email() + local name, err = self:local_email() + if name then + tex.write(name) + else + tex.error(err) + end +end + +function api:authors(sort_by_contrib) + local authors, err = self.cmd:shortlog(sort_by_contrib, true) + if authors then + local author_list = {} + for line in authors:gmatch('(.-)\n') do + local contributions, name, email = line:match("^%s-(%d+)%s-(.-)%s-<(.-)>%s-$") + table.insert(author_list, { + contributions = contributions, + name = name, + email = email + }) + end + return author_list + else + return nil, err + end +end + +function api:cs_for_authors(csname, conjunction, sort_by_contrib) + if token.is_defined(csname) then + local tok = token.create(csname) + local authors, err = self:authors(sort_by_contrib) + if authors then + local next_conj + for _, author in ipairs(authors) do + if next_conj then + tex.print(next_conj) + end + next_conj = conjunction + tex.print(tok, '{' .. self:escape_str(self.trim(author.name)) .. '}', '{' .. self:escape_str(self.trim(author.email)) .. '}') + end + else + tex.error(err) + end + else + tex.error('ERROR: \\' .. csname .. ' not defined') + end +end + +function api:cs_commit(csname, rev, format) + if token.is_defined(csname) then + local tok = token.create(csname) + local log, err = self.cmd:log(format, rev, {'max-count=1'}) + if log then + if #log == 1 then + tex.print(tok) + for _, value in ipairs(log[1]) do + tex.print('{' .. self:escape_str(value) .. '}') + end + else + texio.write_nl('Warning: commit returned none') + end + else + tex.error('ERROR: ' .. (err or 'nil')) + end + else + tex.error('ERROR: \\' .. csname .. ' not defined') + end +end + +function api:cs_last_commit(csname, format) + return self:cs_commit(csname, '-1', format) +end + +function api:cs_for_commit(csname, rev_spec, format) + if token.is_defined(csname) then + local tok = token.create(csname) + local log, err = self.cmd:log(format, rev_spec) + if log then + for _, commit in ipairs(log) do + tex.print(tok) + for _, value in ipairs(commit) do + tex.print('{' .. self:escape_str(value) .. '}') + end + end + else + tex.error('ERROR:\\' .. err) + end + else + tex.error('ERROR: \\' .. csname .. ' not defined') + end +end + +function api:tag_info(format_spec, tag, target_dir) + local err, info + info, err = self.cmd:for_each_ref(format_spec, 'refs/tags', {'count=1', 'contains=' .. tag}, target_dir) + if info and #info == 1 then + return info[1] + else + tex.error(err or 'Result count didn\'t match. (in tag_info)') + end +end + +function api:tags(target_dir) + local tag_list = {} + local tags, err = self.cmd:exec('tag -l --sort=-v:refname', true, target_dir) + if tags then + for tag in tags:gmatch('(.-)\n') do + table.insert(tag_list, self.trim(tag)) + end + else + return nil, err + end + return tag_list +end + +function api:cs_tag(csname, format_spec, tag, target_dir) + if token.is_defined(csname) then + local tok = token.create(csname) + local info = self:tag_info(format_spec, tag, target_dir) + if info then + tex.print(tok) + for _, value in ipairs(info) do + tex.print('{' .. self:escape_str(value) .. '}') + end + end + else + tex.error('ERROR:\\' .. csname .. ' not defined') + end +end + +function api:cs_for_tag(csname, format_spec, target_dir) + if token.is_defined(csname) then + local tok = token.create(csname) + local tags, err = self.cmd:for_each_ref(format_spec, 'refs/tags', {'sort=-authordate'}, target_dir) + if tags then + for _, info in ipairs(tags) do + tex.print(tok) + for _, value in ipairs(info) do + tex.print('{' .. self:escape_str(value) .. '}') + end + end + else + tex.error('ERROR:\\' .. err) + end + else + tex.error('ERROR:\\' .. csname .. ' not defined') + end +end + +function api:cs_for_tag_sequence(csname, target_dir) + if token.is_defined(csname) then + local tok = token.create(csname) + local seq, err = self:tags(target_dir) + if seq then + for idx, tag in ipairs(seq) do + if idx < #seq then + local next = seq[idx + 1] + tex.print(tok, '{' .. tag .. '}{' .. next .. '}{' .. tag .. '...' .. next .. '}') + else + tex.print(tok, '{' .. tag .. '}{}{' .. tag .. '}') + end + end + else + tex.error('ERROR:\\' .. (err or 'Unknown error')) + end + else + tex.error('ERROR:\\' .. csname .. ' not defined') + end +end + +return gitinfo diff --git a/macros/luatex/latex/gitinfo-lua/tex/gitinfo-lua.sty b/macros/luatex/latex/gitinfo-lua/tex/gitinfo-lua.sty new file mode 100644 index 0000000000..405c668901 --- /dev/null +++ b/macros/luatex/latex/gitinfo-lua/tex/gitinfo-lua.sty @@ -0,0 +1,94 @@ +%% gitinfo-lua.sty +%% Copyright 2023 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files gitinfo-lua.sty gitinfo-lua.pdf +% gitinfo-cmd.lua and gitinfo-lua.lua +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{gitinfo-lua}[2023/11/10 Xerdi's Git Package] + +\RequirePackage{luacode} + +\directlua{git = require('gitinfo-lua')} + +\RequirePackage{pgfopts} + +\newif\ifgit@multipleauthors +\newif\ifgit@setmacros +\pgfkeys{/gitinfo-lua/.is family, + /gitinfo-lua, + author sort/.default=false, + author sort/.store in=\git@author@sort, + author sort, + contrib/.style = {/git/author sort=true}, + alpha/.style = {/git/author sort=false}, + multiple authors/.is if=git@multipleauthors, + multiple authors=false, + author/.style={multiple authors=false}, + authors/.style={multiple authors=true}, + set title page macros/.is if=git@setmacros, + set title page macros=false, + titlepage/.style={set title page macros=true} +} + +\ProcessPgfPackageOptions* + +\newcommand*\git@single@arg[1]{#1} + +\newcommand*\gitversion{\directlua{git:write_version()}} +\newcommand*\gitauthor{\directlua{git:write_local_author()}} +\newcommand*\gitemail{\directlua{git:write_local_email()}} +\newcommand*\gitdate{\directlua{git:cs_last_commit('git@single@arg', 'cs')}} +\newcommand*\gitdirectory[1]{\directlua{git:dir('#1')}} +\newcommand*\gitunsetdirectory{\directlua{git:dir(nil)}} + +\newcommand\git@format@author[2]{% + #1 + \ifcsname href\endcsname% + \textlangle\href{mailto:#2}{#2}\textrangle% + \else% + \textlangle\texttt{#2}\textrangle% + \fi% +} + +\newcommand*\dogitauthors[1][,~]{% + \directlua{git:cs_for_authors('git@format@author', '#1', \git@author@sort)}% +} + +\newcommand*\forgitauthors[2][\authorconjunction]{% + \directlua{git:cs_for_authors('#2', '#1', \git@author@sort)}% +} + +\def\git@default@tag@format{refname:short,(taggername)(taggername,taggeremail,taggerdate:short)(authorname,authoremail,authordate:short),subject,body} +\newcommand{\gitcommit}[3][h,an,ae,as,s,b]{\directlua{git:cs_commit('#2', '#3', '#1')}} +\newcommand{\forgitcommit}[3][h,an,ae,as,s,b]{\directlua{git:cs_for_commit('#2', '#3', '#1')}} +\newcommand{\gittag}[3][\git@default@tag@format]{% + \directlua{git:cs_tag('#2', '#1', '#3')}% +} +\newcommand{\forgittag}[2][\git@default@tag@format]{% + \directlua{git:cs_for_tag('#2', '#1')}% +} +\newcommand{\forgittagseq}[1]{\directlua{git:cs_for_tag_sequence('#1')}} + +\ifgit@setmacros + \ifgit@multipleauthors + \author{\dogitauthors[\\\\]} + \else + \author{\gitauthor} + \fi + \directlua{git:set_date()} + \date{\today} +\fi + +\endinput |