From ad039421fb07e7d4162c8b744b2f5c351194c829 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Thu, 9 Jun 2022 15:37:32 +0800 Subject: [PATCH 01/57] fix: incorrectly placed matrix delimiters Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 1 + testfiles/gh-issue-1102.lvt | 76 +++++++++++++++ testfiles/gh-issue-1102.tlg | 30 ++++++ testfiles/support/pgf-regression-test.tex | 97 +++++++++++++++++++ .../tikz/libraries/tikzlibrarymatrix.code.tex | 2 +- 5 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 testfiles/gh-issue-1102.lvt create mode 100644 testfiles/gh-issue-1102.tlg diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 5b4cff84c..0aef99f64 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -81,6 +81,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Make `graphdrawing` work with `name prefix` and `name suffix` options #1087 - pgfkeys was a bit too relaxed around `\relax` #1132 - Remove spurious spaces for `3d view` #1151 +- Fix incorrectly placed matrix delimiters for implicitly positioned nodes #1102 ### Changed diff --git a/testfiles/gh-issue-1102.lvt b/testfiles/gh-issue-1102.lvt new file mode 100644 index 000000000..25aee24b1 --- /dev/null +++ b/testfiles/gh-issue-1102.lvt @@ -0,0 +1,76 @@ +\documentclass{minimal} +\input{pgf-regression-test} + +\RequirePackage{tikz} +\usetikzlibrary{calc, matrix} + +\begin{document} + +\setbox0=\hbox{$()$} % avoid logging font info cmex10 at test for "matrix delimiters" + +\START + +\SEPARATOR +\TYPE{Testing that special nodes are placed at expected position^^J% + when main nodes are implicitly positioned.} +\SEPARATOR + +\BEGINTEST{labels} +% adapted from https://github.com/pgf-tikz/pgf/issues/126 +\begin{tikzpicture}[L/.style={label={[name=#1]above:{.}}}] + \draw (0,4) -- (3,4) node[midway, L=a] (A) {A}; + \draw (0,3) -- node[L=b] (B) {B} (3,3); + + \draw (0,2) -- (3,2) node[near end, L=c] (C) {C}; + \draw (0,1) -- node[near end, L=d] (D) {D} (3,1); + + % `label distance` is initially 0pt + \AssertTikzPointEquals{(a.south)}{(A.north)} + \AssertTikzPointEquals{(b.south)}{(B.north)} + \AssertTikzPointEquals{(c.south)}{(C.north)} + \AssertTikzPointEquals{(d.south)}{(D.north)} +\end{tikzpicture} +\ENDTEST + +\BEGINTEST{pins} +\catcode`\@=11\relax +\def\distance{\tikz@pin@distance} +\catcode`\@=12\relax + +\begin{tikzpicture}[P/.style={pin={[name=#1]above:{.}}}] + \draw (0,4) -- (3,4) node[midway, P=a] (A) {A}; + \draw (0,3) -- node[P=b] (B) {B} (3,3); + + \draw (0,2) -- (3,2) node[near end, P=c] (C) {C}; + \draw (0,1) -- node[near end, P=d] (D) {D} (3,1); + + \AssertTikzPointEquals{(a.south)}{($ (A.north) + (0pt,\distance) $)} + \AssertTikzPointEquals{(b.south)}{($ (B.north) + (0pt,\distance) $)} + \AssertTikzPointEquals{(c.south)}{($ (C.north) + (0pt,\distance) $)} + \AssertTikzPointEquals{(d.south)}{($ (D.north) + (0pt,\distance) $)} +\end{tikzpicture} +\ENDTEST + +\BEGINTEST{matrix delimiters} +% adapted from https://github.com/pgf-tikz/pgf/issues/1102 +\begin{tikzpicture}[ampersand replacement=\&, + every left delimiter/.style={name=left}, + every right delimiter/.style={name=right}, + every above delimiter/.style={name=above}, + every below delimiter/.style={name=below}] + + \draw[->] (0, 0) -- + node[matrix of math nodes, anchor=north, + left delimiter=(, right delimiter=), + above delimiter=\{, below delimiter=\}] (M) + {0 \& -1 \\ 1 \& 0 \\} + (1, 0); + + \AssertTikzPointEquals{(M.south west)}{(left.south east)} + \AssertTikzPointEquals{(M.south east)}{(right.south west)} + \AssertTikzPointEquals{(M.north west)}{(above.south east)} + \AssertTikzPointEquals{(M.south west)}{(below.south west)} +\end{tikzpicture} +\ENDTEST + +\END diff --git a/testfiles/gh-issue-1102.tlg b/testfiles/gh-issue-1102.tlg new file mode 100644 index 000000000..230b48c4c --- /dev/null +++ b/testfiles/gh-issue-1102.tlg @@ -0,0 +1,30 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +============================================================ +Testing that special nodes are placed at expected position +when main nodes are implicitly positioned. +============================================================ +============================================================ +TEST 1: labels +============================================================ +PASSED +PASSED +PASSED +PASSED +============================================================ +============================================================ +TEST 2: pins +============================================================ +PASSED +PASSED +PASSED +PASSED +============================================================ +============================================================ +TEST 3: matrix delimiters +============================================================ +PASSED +PASSED +PASSED +PASSED +============================================================ diff --git a/testfiles/support/pgf-regression-test.tex b/testfiles/support/pgf-regression-test.tex index 9b2aa9573..10ac9bceb 100644 --- a/testfiles/support/pgf-regression-test.tex +++ b/testfiles/support/pgf-regression-test.tex @@ -1,6 +1,7 @@ \input regression-test.tex \OMIT +\catcode`\@=11\relax \newbox\PGFTESTBOX @@ -38,4 +39,100 @@ \ENDTEST } +% more typeout commands +\def\PASSED {\TYPE{PASSED}} +\def\FAILED {\TYPE{FAILED}} +\long\def\FAILEDAT#1{\TYPE{FAILED at #1}} + +% more assert commands, which if fails will typeout more diagnostic info +\newif\ifassert@return +\newdimen\assert@equals@tolerance + +% \AssertPointEquals[]{}{} +% [] omitted -> assert equiality within 0.001pt +% ::= | +\protected\long\def\AssertTikzPointEquals{% + \begingroup + \pgfutil@ifnextchar[%] + {\AssertTikzPointEquals@opt} + {\AssertTikzPointEquals@}% +} + +\protected\long\def\AssertTikzPointEquals@opt[#1]#2#3{% + \edef\assert@input{% + \string\AssertTikzPointEquals\unexpanded{[#1]{#2}{#3}}}% + \AssertTikzPointEquals@@[{#1}]{#2}{#3}% +} + +\protected\long\def\AssertTikzPointEquals@#1#2{% + \edef\assert@input{% + \string\AssertTikzPointEquals\unexpanded{{#1}{#2}}}% + \AssertTikzPointEquals@@[.001pt]{#1}{#2}% +} + +\protected\long\def\AssertTikzPointEquals@@[#1]#2#3{% + \assert@equals@tolerance=\dimexpr#1\relax + \ifdim\assert@equals@tolerance<0pt + \TYPE{\string\AssertTikzPointEquals: negative tolerance \the\assert@equals@tolerance}% + \fi + \expandafter\TikzGetOnePoint\expandafter{#2}\assert@tempa + \expandafter\TikzGetOnePoint\expandafter{#3}\assert@tempb + \assert@returntrue + \ifx\assert@tempa\assert@tempb + \else + \assert@tempa\pgf@xa=\pgf@x\pgf@ya=\pgf@y + \assert@tempb%\pgf@xb=\pgf@x\pgf@yb=\pgf@y + % + \ifdim\pgf@x>\dimexpr\pgf@xa+\assert@equals@tolerance\relax + \else + \ifdim\pgf@x<\dimexpr\pgf@xa-\assert@equals@tolerance\relax + \assert@returnfalse + \else + \ifdim\pgf@y>\dimexpr\pgf@ya+\assert@equals@tolerance\relax + \assert@returnfalse + \else + \ifdim\pgf@y<\dimexpr\pgf@ya-\assert@equals@tolerance\relax + \assert@returnfalse + \fi + \fi + \fi + \fi + \fi + \ifassert@return + \PASSED + \else + \FAILEDAT{\assert@input}% + \TYPE{% + - Expected: \detokenize\expandafter{#2} => (\the\pgf@xa, \the\pgf@ya)^^J% + - Actual: \space\space\detokenize\expandafter{#3} => (\the\pgf@x, \the\pgf@y)^^J% + - Tolerance: \the\assert@equals@tolerance + }% + \fi + \endgroup +} + +% pgf or tikz specific testing commands + +% \TikzGetOnePoint{}{} +% ::= | +\protected\long\def\TikzGetOnePoint#1#2{% + \pgfutil@ifnextchar\pgfqpoint + {\TikzGetOnePoint@{#2}} + {\def\assert@tempc{\TikzGetOnePoint@@{#2}}% + \tikz@scan@one@point\assert@tempc}% + #1% +} + +% \TikzGetOnePoint@{}\pgfqpoint{}{} +\protected\long\def\TikzGetOnePoint@#1#2#3#4{% + \TikzGetOnePoint@@{#1}{\pgfqpoint{#3}{#4}}% +} + +% \TikzGetOnePoint@@{}{} +\protected\long\def\TikzGetOnePoint@@#1#2{% + \pgf@process{#2}% + \edef#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% +} + +\catcode`\@=12\relax \TIMO diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex index 507ac7a40..511818937 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex @@ -125,7 +125,7 @@ \def\tikz@delimiter#1#2#3#4#5#6#7#8{% \bgroup - \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name}% + \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse}% node[outer sep=0pt,inner sep=0pt,draw=none,fill=none,anchor=#1,at=(\tikz@last@fig@name.#2),#3] {% {\nullfont\pgf@process{\pgfpointdiff{\pgfpointanchor{\tikz@last@fig@name}{#4}}{\pgfpointanchor{\tikz@last@fig@name}{#5}}}}% From 937b354eaed903b5a8474b987aa0c89114d502ae Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Sun, 3 Jul 2022 07:52:06 +0800 Subject: [PATCH 02/57] docs: ensure `doc` v2 is loaded Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-test.tex | 2 +- doc/generic/pgf/pgfmanual.tex | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 0aef99f64..43162ce45 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -93,6 +93,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Flatten the doc tree - Ensure `\tracinglostchars<3` in `\pgf@picture` - Use descriptive workflow job ids +- Ensure `doc` v2 is loaded for pgfmanual ### Contributors diff --git a/doc/generic/pgf/pgfmanual-test.tex b/doc/generic/pgf/pgfmanual-test.tex index d11d7a164..ca7224e1e 100644 --- a/doc/generic/pgf/pgfmanual-test.tex +++ b/doc/generic/pgf/pgfmanual-test.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\documentclass[a4paper]{ltxdoc} +\documentclass[a4paper,doc2]{ltxdoc} % pgf version is defined in \pgfversion in file % generic/pgf/utilities/pgfrcs.code.tex diff --git a/doc/generic/pgf/pgfmanual.tex b/doc/generic/pgf/pgfmanual.tex index 12ebb6b37..3ca876c72 100644 --- a/doc/generic/pgf/pgfmanual.tex +++ b/doc/generic/pgf/pgfmanual.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\documentclass[a4paper]{ltxdoc} +\documentclass[a4paper,doc2]{ltxdoc} % pgf version is defined in \pgfversion in file % generic/pgf/utilities/pgfrcs.code.tex From 5d9860258121cf88fbe70ff252369d106c5d30b7 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 4 Jul 2022 10:17:17 +0800 Subject: [PATCH 03/57] docs: ensure active `^^M` is non-expandable Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 1 + tex/latex/pgf/doc/pgfmanual-en-macros.tex | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 43162ce45..8e4fa23e4 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -94,6 +94,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Ensure `\tracinglostchars<3` in `\pgf@picture` - Use descriptive workflow job ids - Ensure `doc` v2 is loaded for pgfmanual +- Ensure active `^^M` is non-expandable in `codeexample` ### Contributors diff --git a/tex/latex/pgf/doc/pgfmanual-en-macros.tex b/tex/latex/pgf/doc/pgfmanual-en-macros.tex index 53cc74e0d..68ecfffc4 100644 --- a/tex/latex/pgf/doc/pgfmanual-en-macros.tex +++ b/tex/latex/pgf/doc/pgfmanual-en-macros.tex @@ -1711,6 +1711,9 @@ {% \returntospace% \commenthandler% + % ensures the active ^^M is protected thus won't be expanded in the + % following \xdef\code@temp{#1} + \obeylines% \xdef\code@temp{#1}% removes returns and comments }% \edef\pgfmanualmcatcode{\the\catcode`\^^M}% @@ -1727,6 +1730,9 @@ {% \returntospace% \commenthandler% + % ensures the active ^^M is protected thus won't be expanded in the + % following \xdef\code@temp{#1} + \obeylines% \xdef\code@temp{#1}% removes returns and comments }% \catcode`\^^M=9% From de96d67454d6060cfbf859a71a0f6b605dcf643c Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 29 Aug 2022 12:04:41 +0800 Subject: [PATCH 04/57] docs: fix typo (close #1185) --- doc/generic/pgf/pgfmanual-en-tikz-paths.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-paths.tex b/doc/generic/pgf/pgfmanual-en-tikz-paths.tex index 897c75d76..8d4e1bf92 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-paths.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-paths.tex @@ -450,7 +450,7 @@ \subsection{The Circle and Ellipse Operations} % \begin{key}{/tikz/x radius=\meta{value}} Sets the horizontal radius of the circle (which, when this value is - different form the vertical radius, is actually an ellipse). The + different from the vertical radius, is actually an ellipse). The \meta{value} may either be a dimension or a dimensionless number. In the latter case, the number is interpreted in the $xy$-coordinate system (if the $x$-unit is set to, say, |2cm|, then |x radius=3| will From 4240ad6a61d1348bbda2078133f0ef1ca546e25d Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Wed, 7 Sep 2022 09:05:38 +0200 Subject: [PATCH 05/57] fix: additional braces in description of key handler `.append code` --- doc/generic/pgf/pgfmanual-en-pgfkeys.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex index ba0f6267a..aee930a29 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex @@ -1107,7 +1107,7 @@ \subsubsection{Defining Key Codes} \begin{handler}{{.append code}|=|\meta{append code}} This handler is a shortcut for \meta{key}|/.add code={}{|\meta{append - code}|}{}|. + code}|}|. \end{handler} @@ -1249,7 +1249,7 @@ \subsubsection{Defining Value-, Macro-, If- and Choice-Keys} and, thus, |\pgfkeysnovalue| will be stored in |/my key|. To retrieve the value stored in a key, the handler |/.get| is used. - + \medskip \emph{Remark:} A key can both store a value and execute commands% \footnote{This behavior was partially changed in \pgfname{} 3.1.6 and then From 4f0b7098645d492044fd583e96c8f233cc7e4dfa Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 23 Sep 2022 21:41:48 +0200 Subject: [PATCH 06/57] fix: guard against LuaMetaTeX's changed \meaning Fixes #1193 Co-authored-by: Leah Neukirchen --- .../tikz/libraries/graphs/tikzlibrarygraphs.code.tex | 8 ++++---- .../tikz/libraries/tikzlibraryanimations.code.tex | 2 +- .../tikz/libraries/tikzlibraryquotes.code.tex | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex index ac65e119b..20a173580 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex @@ -1195,8 +1195,8 @@ }% \def\tikzlibignorecomparisonsINTERNAL{% \pgfkeys{/handlers/first char syntax=true} - \pgfkeyssetvalue{/handlers/first char syntax/the character >}{\pgfutil@gobble}% - \pgfkeyssetvalue{/handlers/first char syntax/the character <}{\pgfutil@gobble}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string>}{\pgfutil@gobble}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string<}{\pgfutil@gobble}% }% \def\tikz@lib@layout@node@options@prefix{graphs/.cd,}% @@ -1222,8 +1222,8 @@ \def\tikz@lib@activate@source@target@edge@syntax{% \pgfkeys{/handlers/first char syntax=true} - \pgfkeyssetvalue{/handlers/first char syntax/the character >}{\tikz@lg@parse@more}% - \pgfkeyssetvalue{/handlers/first char syntax/the character <}{\tikz@lg@parse@less}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string>}{\tikz@lg@parse@more}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string<}{\tikz@lg@parse@less}% }% \def\tikz@lg@parse@less#1{\tikz@lg@parse@less@#1\pgf@stop}% diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex index 9a770a8e3..7b3fc12bf 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex @@ -47,7 +47,7 @@ \tikzanimateset{ .code={ \pgfkeys{/handlers/first char syntax=true} - \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@animation@value}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string"}{\tikz@animation@value}% \def\tikz@anim@t{0}% \def\tikz@anim@t@base{0}% \def\tikz@anim@t@current{0}% diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex index bbd109bcb..41ce3faaf 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex @@ -38,15 +38,15 @@ \pgfkeys{/handlers/first char syntax=true}% \def\tikz@enable@node@quotes{% - \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string"}{\tikz@quote@parser}% \let\tikz@quotes@as\tikz@node@quotes@as% }% \def\tikz@enable@edge@quotes{% - \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string"}{\tikz@quote@parser}% \let\tikz@quotes@as\tikz@edge@quotes@as% }% \def\tikz@enable@pic@quotes{% - \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}% + \pgfkeyssetvalue{/handlers/first char syntax/\expandafter\meaning\string"}{\tikz@quote@parser}% \let\tikz@quotes@as\tikz@pic@quotes@as% }% From f39dd0dae01c6d41a4423be5ccebc246e9d952c8 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Thu, 13 Oct 2022 17:03:42 +0800 Subject: [PATCH 07/57] docs: use handler `/.append` to avoid a subtle constraint of `/.add` that /.add={}{} % and /.add={} {} are different and the second is, in most cases, wrong usage. Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-en-library-external.tex | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8e4fa23e4..93d5b9faf 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -82,6 +82,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - pgfkeys was a bit too relaxed around `\relax` #1132 - Remove spurious spaces for `3d view` #1151 - Fix incorrectly placed matrix delimiters for implicitly positioned nodes #1102 +- Use `/.append` to fix a wrong usage of `/.add` in pgfmanual #1201 ### Changed diff --git a/doc/generic/pgf/pgfmanual-en-library-external.tex b/doc/generic/pgf/pgfmanual-en-library-external.tex index f96dd42d6..e7ddea783 100644 --- a/doc/generic/pgf/pgfmanual-en-library-external.tex +++ b/doc/generic/pgf/pgfmanual-en-library-external.tex @@ -1088,8 +1088,7 @@ \subsection{Bitmap Graphics Export} % This style is not pre-defined, you may need to copy-paste and % adjust it. png export/.style={ - external/system call/.add= - {} + external/system call/.append= {; convert -density 300 -transparent white "\image.pdf" "\image.png"}, % /pgf/images/external info, From 1f857617d9fea28695de447627c3744a81ecc3aa Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Fri, 21 Oct 2022 06:06:44 +0800 Subject: [PATCH 08/57] chore: add dependabot to keep actions up-to-date Signed-off-by: muzimuzhi --- .github/dependabot.yml | 8 ++++++++ doc/generic/pgf/CHANGELOG.md | 1 + 2 files changed, 9 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..df4d15b35 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 93d5b9faf..a97c182df 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -43,6 +43,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Add Developer Certificate of Origin (DCO) to Pull Request template and enforce - Add test set for `graphdrawing` (gd) - pgfkeys gained support for loading libraries +- Add dependabot to keep GitHub Actions up to date ### Fixed From 1c843a9de89e873994704e341fdbf7e78765a3cd Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Sat, 12 Nov 2022 11:13:18 +0100 Subject: [PATCH 09/57] chore: Update GitHub Actions --- .github/workflows/check.yml | 4 ++-- .github/workflows/dco.yml | 2 +- .github/workflows/doc.yml | 4 ++-- .github/workflows/main.yml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 089beec13..7e14ed92b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,7 +9,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -28,7 +28,7 @@ jobs: - name: Archive failed test output if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: test-diff-files path: build/test*/*.diff diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index 5b017630c..02534c38f 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index dedb9f6b2..4614c4a87 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,7 +9,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -26,7 +26,7 @@ jobs: run: | l3build doc -q - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: pgfmanual path: build/doc/pgfmanual.pdf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 815d2e46d..b9e5e30b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -48,7 +48,7 @@ jobs: run: | l3build ctan - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: pgfmanual path: build/doc/pgfmanual.pdf @@ -86,7 +86,7 @@ jobs: body_path: RELEASE_NOTES.md - name: "Release: upload assets" - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | From bd9613bf20ba93e71bb266449e44cad56999c6b7 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 13 Jan 2023 14:13:53 +0100 Subject: [PATCH 10/57] fix(ci): disable git safe.directory --- .github/workflows/check.yml | 3 +++ .github/workflows/doc.yml | 3 +++ .github/workflows/main.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7e14ed92b..efcce3e34 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,6 +13,9 @@ jobs: with: fetch-depth: 0 + - name: Fixup Run actions/checkout + run: git config --global --add safe.directory '*' + - name: Generate the revision file run: | export tagname=$(git describe --abbrev=0 --tags) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 4614c4a87..0697432d1 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -13,6 +13,9 @@ jobs: with: fetch-depth: 0 + - name: Fixup Run actions/checkout + run: git config --global --add safe.directory '*' + - name: Generate the revision file run: | export tagname=$(git describe --abbrev=0 --tags) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9e5e30b3..8f63dd8d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,9 @@ jobs: with: fetch-depth: 0 + - name: Fixup Run actions/checkout + run: git config --global --add safe.directory '*' + - name: Generate the revision file run: | export tagname=$(git describe --abbrev=0 --tags) From f49f0c9d42893feaddb74f3c62bb4469f2808271 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 13 Jan 2023 15:38:07 +0100 Subject: [PATCH 11/57] fix(doc): replace uses of \cs{...} with |\...| https://github.com/latex3/latex2e/issues/962 --- .../pgf/pgfmanual-en-base-shadings.tex | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-base-shadings.tex b/doc/generic/pgf/pgfmanual-en-base-shadings.tex index a091bc31b..0d5497362 100644 --- a/doc/generic/pgf/pgfmanual-en-base-shadings.tex +++ b/doc/generic/pgf/pgfmanual-en-base-shadings.tex @@ -64,8 +64,8 @@ \subsubsection{Color models} \textbf{Note:} The color model chosen for a shading is based on the |xcolor| color model \emph{at the time the shading is created}. This is either when -\cs{pgfdeclare*shading} is called with no optional argument or when -\cs{pgfuseshading} is called if \cs{pgfdeclare*shading} was called with an +|\pgfdeclare*shading| is called with no optional argument or when +|\pgfuseshading| is called if |\pgfdeclare*shading| was called with an optional argument. If the |xcolor| package |natural| color model is in use then the shading color @@ -422,7 +422,7 @@ \subsubsection{General (Functional) Shadings} By nature, the PostScript code used in functional shadings must output one of \textsc{rgb}, \textsc{cmyk}, or grayscale data. Therefore, -\cs{pgfdeclarefunctionalshading} is \emph{not} portable across color models. +|\pgfdeclarefunctionalshading| is \emph{not} portable across color models. Take particular care that the same color model is in use at declaration time and use time for functional shadings declared with an optional argument as @@ -431,9 +431,9 @@ \subsubsection{General (Functional) Shadings} Having said this, it \emph{is} possible to create portable functional shadings by providing conditional code to append color transformations to the -PostScript data. A variety of \cs{pgffuncshading*to*} (e.g., -\cs{pgffuncshadingrgbtocmyk}) macros along with \cs{ifpgfshadingmodel*} (e.g., -\cs{ifpgfshadingmodelcmyk}) conditionals are provided to assist with these +PostScript data. A variety of |\pgffuncshading*to*| (e.g., +|\pgffuncshadingrgbtocmyk|) macros along with |\ifpgfshadingmodel*| (e.g., +|\ifpgfshadingmodelcmyk|) conditionals are provided to assist with these transformations. Obviously, this will make the PostScript code less efficient than if you work in your intended color model. @@ -498,51 +498,51 @@ \subsubsection{General (Functional) Shadings} \begin{command}{\pgffuncshadingrgbtocmyk} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top 3 elements on the stack from \textsc{rgb} to \textsc{cmyk}. In - combination with the \cs{ifpgfshadingmodelcmyk} conditional this macro can + combination with the |\ifpgfshadingmodelcmyk| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} \begin{command}{\pgffuncshadingrgbtogray} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top 3 elements on the stack from \textsc{rgb} to grayscale. In combination - with the \cs{ifpgfshadingmodelgray} conditional this macro can be used to + with the |\ifpgfshadingmodelgray| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} \begin{command}{\pgffuncshadingcmyktorgb} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top 4 elements on the stack from \textsc{cmyk} to \textsc{rgb}. In - combination with the \cs{ifpgfshadingmodelrgb} conditional this macro can be + combination with the |\ifpgfshadingmodelrgb| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} \begin{command}{\pgffuncshadingcmyktogray} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top 4 elements on the stack from \textsc{cmyk} to grayscale. In combination - with the \cs{ifpgfshadingmodelgray} conditional this macro can be used to + with the |\ifpgfshadingmodelgray| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} \begin{command}{\pgffuncshadinggraytorgb} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top element on the stack from grayscale to \textsc{rgb}. In combination with - the \cs{ifpgfshadingmodelrgb} conditional this macro can be used to make + the |\ifpgfshadingmodelrgb| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} \begin{command}{\pgffuncshadinggraytocmyk} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to convert the + |\pgfdeclarefunctionalshading|, this command can be used to convert the top element on the stack from grayscale to \textsc{cmyk}. In combination - with the \cs{ifpgfshadingmodelcmyk} conditional this macro can be used to + with the |\ifpgfshadingmodelcmyk| conditional this macro can be used to make functional shading declarations more portable across color models. \end{command} @@ -551,7 +551,7 @@ \subsubsection{General (Functional) Shadings} \let\ifpgfshadingmodelgray=\relax \begin{command}{\ifpgfshadingmodelrgb} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to test if the + |\pgfdeclarefunctionalshading|, this command can be used to test if the |xcolor| color model is |rgb| \emph{at the time the shading is created}. This can be used to ensure that the data output in the \meta{type 4 function} correctly matches the active color model. @@ -559,7 +559,7 @@ \subsubsection{General (Functional) Shadings} \begin{command}{\ifpgfshadingmodelcmyk} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to test if the + |\pgfdeclarefunctionalshading|, this command can be used to test if the |xcolor| color model is |cmyk| \emph{at the time the shading is created}. This can be used to ensure that the data output in the \meta{type 4 function} correctly matches the active color model. @@ -567,7 +567,7 @@ \subsubsection{General (Functional) Shadings} \begin{command}{\ifpgfshadingmodelgray} Within the \meta{type 4 function} argument of - \cs{pgfdeclarefunctionalshading}, this command can be used to test if the + |\pgfdeclarefunctionalshading|, this command can be used to test if the |xcolor| color model is |gray| \emph{at the time the shading is created}. This can be used to ensure that the data output in the \meta{type 4 function} correctly matches the active color model. From a85413f1e8f2d2e3929a1fbf74b5eaaf25947e75 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 13 Jan 2023 17:52:03 +0100 Subject: [PATCH 12/57] fix(build): license is a multi field --- build.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.lua b/build.lua index cffe654b9..7bf4f678a 100644 --- a/build.lua +++ b/build.lua @@ -63,7 +63,7 @@ uploadconfig = { ctanPath = "/graphics/pgf/base", description = [[

PGF is a macro package for creating graphics. It is platform- and format-independent and works together with the most important TeX backend drivers, including pdfTeX and dvips. It comes with a user-friendly syntax layer called TikZ.

Its usage is similar to pstricks and the standard picture environment. PGF works with plain (pdf-)TeX, (pdf-)LaTeX, and ConTeXt. Unlike pstricks, it can produce either PostScript or PDF output.

]], email = "pgf-tikz@tug.org", - license = "fdl;gpl2;lppl1.3c", + license = { "fdl", "gpl2", "lppl1.3c" }, note_file = "CTAN_NOTES.md", pkg = "pgf", repository = "https://github.com/pgf-tikz/pgf", From 27ad7c4c10c9af0712cce0e192235c377ef3a2da Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Sun, 15 Jan 2023 12:25:46 +0800 Subject: [PATCH 13/57] fix(ci): automate CTAN validation and uploading --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f63dd8d6..3676c7c29 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -124,9 +124,13 @@ jobs: - name: "CTAN: Validate" run: | - l3build upload --dry-run --date "$tagdate" "$tagname" + # temp workaround for l3build 2022-11-10 + # see https://github.com/latex3/l3build/issues/264 + echo "n" | l3build upload --dry-run --date "$tagdate" "$tagname" - name: "CTAN: Upload" if: github.repository == 'pgf-tikz/pgf' run: | - l3build upload --date "$tagdate" "$tagname" + # temp workaround for l3build 2022-11-10 + # https://github.com/latex3/l3build/issues/265 + echo "y" | l3build upload --date "$tagdate" "$tagname" From 9e0d878eaea17975d5312ec4a53b00ccc4178ede Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 13 Jan 2023 14:07:09 +0100 Subject: [PATCH 14/57] Release 3.1.10 --- doc/generic/pgf/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index a97c182df..8b52f7262 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [3.1.10] - 2023-01-13 Henri Menke Even though this release is not too heavy on user-facing additions it has seen a lot of contributed changes. Thanks to everyone who volunteered their time! @@ -3295,7 +3295,7 @@ will be the stable version. - Created ChangeLog - Added pgfshade.sty -[Unreleased]: https://github.com/pgf-tikz/pgf/compare/3.1.9a...HEAD +[3.1.10]: https://github.com/pgf-tikz/pgf/compare/3.1.9a...3.1.10 [3.1.9a]: https://github.com/pgf-tikz/pgf/compare/3.1.9...3.1.9a [3.1.9]: https://github.com/pgf-tikz/pgf/compare/3.1.8b...3.1.9 [3.1.8b]: https://github.com/pgf-tikz/pgf/compare/3.1.8a...3.1.8b From f6c7d00af81d333988e2f06a107d568cca449788 Mon Sep 17 00:00:00 2001 From: quark67 Date: Wed, 15 Mar 2023 20:44:58 +0100 Subject: [PATCH 15/57] Typo 1in=72.27pt, not 72.72pt. --- doc/generic/pgf/pgfmanual-en-tikz-transformations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-transformations.tex b/doc/generic/pgf/pgfmanual-en-tikz-transformations.tex index baa38cb43..29cfc6448 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-transformations.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-transformations.tex @@ -146,7 +146,7 @@ \subsection{Coordinate Transformations} transformations}. Whenever you specify a coordinate as in |(1,0)| or |(1cm,1pt)| or |(30:2cm)|, this coordinate is first ``reduced'' to a position of the form ``$x$ points to the right and $y$ points upwards''. For example, -|(1in,5pt)| is reduced to ``$72\frac{72}{100}$ points to the right and 5 points +|(1in,5pt)| is reduced to ``$72\frac{27}{100}$ points to the right and 5 points upwards'' and |(90:100pt)| means ``0pt to the right and 100 points upwards''. The next step is to apply the current \emph{coordinate transformation matrix} From aee5b41dd00a34c6e945f4be62ff553f4ae2d53a Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Tue, 4 Apr 2023 12:17:52 +0200 Subject: [PATCH 16/57] Fixing typos --- doc/generic/pgf/pgfmanual-en-base-arrows.tex | 2 +- doc/generic/pgf/pgfmanual-en-base-scopes.tex | 2 +- doc/generic/pgf/pgfmanual-en-gd-algorithm-layer.tex | 2 +- doc/generic/pgf/pgfmanual-en-guidelines.tex | 2 +- doc/generic/pgf/pgfmanual-en-library-fpu.tex | 6 +++--- doc/generic/pgf/pgfmanual-en-math-numberprinting.tex | 4 ++-- doc/generic/pgf/pgfmanual-en-math-parsing.tex | 4 ++-- doc/generic/pgf/pgfmanual-en-tikz-actions.tex | 2 +- doc/generic/pgf/pgfmanual-en-tikz-graphs.tex | 2 +- doc/generic/pgf/pgfmanual-en-tikz-shapes.tex | 2 +- .../c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.c | 2 +- tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex | 8 ++++---- tex/generic/pgf/basiclayer/pgfcoreshade.code.tex | 4 ++-- .../tikz/libraries/graphs/tikzlibrarygraphs.code.tex | 2 +- tex/generic/pgf/frontendlayer/tikz/tikz.code.tex | 2 +- .../pgflibrarydatavisualization.barcharts.code.tex | 2 +- tex/generic/pgf/libraries/pgflibraryarrows.code.tex | 2 +- tex/generic/pgf/libraries/pgflibraryfpu.code.tex | 2 +- .../libraries/shapes/pgflibraryshapes.geometric.code.tex | 6 +++--- tex/generic/pgf/math/pgfmathcalc.code.tex | 4 ++-- tex/generic/pgf/math/pgfmathfunctions.random.code.tex | 2 +- .../pgf/modules/pgfmoduledatavisualization.code.tex | 4 ++-- tex/generic/pgf/modules/pgfmoduleshapes.code.tex | 2 +- tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex | 2 +- tex/generic/pgf/utilities/pgfutil-common.tex | 2 +- 25 files changed, 37 insertions(+), 37 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-base-arrows.tex b/doc/generic/pgf/pgfmanual-en-base-arrows.tex index 4fd20d425..285d89753 100644 --- a/doc/generic/pgf/pgfmanual-en-base-arrows.tex +++ b/doc/generic/pgf/pgfmanual-en-base-arrows.tex @@ -484,7 +484,7 @@ \subsection{Declaring an Arrow Tip Kind} these ways is use can be configured by setting \meta{mode} to either |orthogonal| or to |polar|. It is best to try simply try out both when designing an arrow tip to see which works better. Since - |orthogonal| is quicker and often gives good oder even better + |orthogonal| is quicker and often gives good or even better results, it is the default. Some arrow tips, however, profit from saying |bending mode=polar|. \item \declare{|defaults|}|=|\meta{arrow keys} diff --git a/doc/generic/pgf/pgfmanual-en-base-scopes.tex b/doc/generic/pgf/pgfmanual-en-base-scopes.tex index 070bfffc0..6e533b44e 100644 --- a/doc/generic/pgf/pgfmanual-en-base-scopes.tex +++ b/doc/generic/pgf/pgfmanual-en-base-scopes.tex @@ -278,7 +278,7 @@ \subsubsection{The Main Environment} Sometimes, you may need more fine-grained control over the size of the bounding box. For example, the computed bounding box may be too large or - you intensionally wish the box to be ``too small''. In these cases, you can + you intentionally wish the box to be ``too small''. In these cases, you can use the command |\pgfusepath{use as bounding box}|, as described in Section~\ref{section-using-bb}. diff --git a/doc/generic/pgf/pgfmanual-en-gd-algorithm-layer.tex b/doc/generic/pgf/pgfmanual-en-gd-algorithm-layer.tex index c4f8c4ed6..1c7eb7e92 100644 --- a/doc/generic/pgf/pgfmanual-en-gd-algorithm-layer.tex +++ b/doc/generic/pgf/pgfmanual-en-gd-algorithm-layer.tex @@ -494,7 +494,7 @@ \subsubsection{Adding External Documentation} documentation [[ This key can be used together with |very simple example layout|. An -important feature ist that... +important feature is that... ]] example [[ diff --git a/doc/generic/pgf/pgfmanual-en-guidelines.tex b/doc/generic/pgf/pgfmanual-en-guidelines.tex index 9511d88cd..d405d69b4 100644 --- a/doc/generic/pgf/pgfmanual-en-guidelines.tex +++ b/doc/generic/pgf/pgfmanual-en-guidelines.tex @@ -645,7 +645,7 @@ \subsection{Attention and Distraction} \item Background patterns filling an area using diagonal lines or horizontal and vertical lines or just dots are almost always distracting and, usually, serve no real purpose. - \item Background images and shadings distract and only seldomly add + \item Background images and shadings distract and only seldom add anything of importance to a graphic. \item Cute little clip arts can easily draw attention away from the data. \end{itemize} diff --git a/doc/generic/pgf/pgfmanual-en-library-fpu.tex b/doc/generic/pgf/pgfmanual-en-library-fpu.tex index b6fa99112..f99228d90 100644 --- a/doc/generic/pgf/pgfmanual-en-library-fpu.tex +++ b/doc/generic/pgf/pgfmanual-en-library-fpu.tex @@ -184,7 +184,7 @@ \subsection{Usage} \end{key} -\subsection{Comparison to the fixed point arithmetics library} +\subsection{Comparison to the fixed point arithmetic library} There are other ways to increase the data range and/or the precision of \pgfname's math parser. One of them is the |fp| package, preferable combined @@ -618,7 +618,7 @@ \subsubsection{Math Operations Commands} \begin{command}{\pgfmathfloatmultiplyfixed\marg{float}\marg{fixed}} Defines |\pgfmathresult| to be $\meta{float} \cdot \meta{fixed}$ where \meta{float} is a floating point number and \meta{fixed} is a fixed point - number. The computation is performed in floating point arithmetics, that + number. The computation is performed in floating point arithmetic, that means we compute $m \cdot \meta{fixed}$ and renormalize the result where $m$ is the mantissa of \meta{float}. @@ -674,7 +674,7 @@ \subsubsection{Math Operations Commands} \begin{command}{\pgfmathlog{\marg{x}}} Defines |\pgfmathresult| to be the natural logarithm of \meta{x}, $\ln(\meta{x})$. This method is logically the same as |\pgfmathln|, but it - applies floating point arithmetics to read number \meta{x} and employs the + applies floating point arithmetic to read number \meta{x} and employs the logarithm identity \[ \ln(m \cdot 10^e) = \ln(m) + e \cdot \ln(10) \] to get the result. The factor $\ln(10)$ is a constant, so only $\ln(m)$ with $1 \le m < 10$ needs to be computed. This is done using standard pgf math diff --git a/doc/generic/pgf/pgfmanual-en-math-numberprinting.tex b/doc/generic/pgf/pgfmanual-en-math-numberprinting.tex index 72b60ef6d..30f9d46ec 100644 --- a/doc/generic/pgf/pgfmanual-en-math-numberprinting.tex +++ b/doc/generic/pgf/pgfmanual-en-math-numberprinting.tex @@ -184,7 +184,7 @@ \section{Number Printing} \paragraph{Second use-case:} improve rounding in the presence of \emph{inaccurate} numbers. Let us - suppose that some limited-precision arithmetics resulted in the result + suppose that some limited-precision arithmetic resulted in the result |123456999| (like the |fpu| of \pgfname). You know that its precision is about five or six significant digits. And you want to provide a fixed point output. In this case, the trailing digits |....999| are a numerical @@ -398,7 +398,7 @@ \section{Number Printing} \begin{key}{/pgf/number format/frac shift=\marg{integer} (initially 4)} In case you experience problems because of stability problems, try experimenting with a different |frac shift|. Higher shift values $k$ - yield higher sensitivity to inaccurate data or inaccurate arithmetics. + yield higher sensitivity to inaccurate data or inaccurate arithmetic. Technically, the following happens. If $r < 1$ is the fractional part of the mantissa, then a scale $i = 1/r \cdot 10^k$ is computed where diff --git a/doc/generic/pgf/pgfmanual-en-math-parsing.tex b/doc/generic/pgf/pgfmanual-en-math-parsing.tex index 4dd79cbc6..b6b60ad2c 100644 --- a/doc/generic/pgf/pgfmanual-en-math-parsing.tex +++ b/doc/generic/pgf/pgfmanual-en-math-parsing.tex @@ -809,8 +809,8 @@ \subsubsection{Rounding functions} \end{math-function} -\subsubsection{Integer arithmetics functions} -\label{pgfmath-functions-integerarithmetics} +\subsubsection{Integer arithmetic functions} +\label{pgfmath-functions-integerarithmetic} \begin{math-function}{gcd(\mvar{x},\mvar{y})} \mathcommand diff --git a/doc/generic/pgf/pgfmanual-en-tikz-actions.tex b/doc/generic/pgf/pgfmanual-en-tikz-actions.tex index 2cd528bfa..2eb198e63 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-actions.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-actions.tex @@ -1296,7 +1296,7 @@ \subsection{Doing Multiple Actions on a Path} \end{tikzpicture} \end{codeexample} - Note that when the preactions are preformed, then the path is already + Note that when the preactions are performed, then the path is already ``finished''. In particular, applying a coordinate transformation to the path has no effect. By comparison, applying a canvas transformation does have an effect. Let us use this to add a ``shadow'' to a path. For this, we diff --git a/doc/generic/pgf/pgfmanual-en-tikz-graphs.tex b/doc/generic/pgf/pgfmanual-en-tikz-graphs.tex index 0135679c6..9ff8228a7 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-graphs.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-graphs.tex @@ -2773,7 +2773,7 @@ \subsubsection{Placement on a Grid} rows needed to lay out the graph in a grid with $M$ columns. % \begin{codeexample}[preamble={\usetikzlibrary{graphs.standard}}] -% An example with 6 nodes, 3 columns and therefor 2 rows +% An example with 6 nodes, 3 columns and therefore 2 rows \tikz \graph [grid placement] { subgraph I_n[n=6, wrap after=3] }; \end{codeexample} % diff --git a/doc/generic/pgf/pgfmanual-en-tikz-shapes.tex b/doc/generic/pgf/pgfmanual-en-tikz-shapes.tex index f30010976..2490fa6fa 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-shapes.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-shapes.tex @@ -59,7 +59,7 @@ \subsection{Nodes and Their Shapes} parentheses. Lastly, for the |node| operation you must provide some label text for the node in curly braces, while for the |coordinate| operation you may not. The node is placed at the current position of the path either \emph{after the -path has been drawn} or (more seldomly and only if you add the |behind path| +path has been drawn} or (more seldom and only if you add the |behind path| option) \emph{just before the path is drawn.} Thus, all nodes are drawn ``on top'' or ``behind'' the path and are retained until the path is complete. If there are several nodes on a path, perhaps some behind and some on top of the diff --git a/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.c b/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.c index b5606f2f3..40c9dca84 100644 --- a/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.c +++ b/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.c @@ -225,7 +225,7 @@ static char* make_string_from(lua_State* L, const char* name) { lua_getfield(L, -1, name); if (lua_isnil(L, -1)) { - // Field not set; return emtpy string. + // Field not set; return empty string. lua_pop(L, 1); return (char*) calloc(1, sizeof(char)); } diff --git a/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex b/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex index e33f0653c..55661bd6b 100644 --- a/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex +++ b/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex @@ -70,10 +70,10 @@ \def\pgfprocesssplitsubpath#1{% % First, we need to find the end: - \let\pgf@tempa\pgfutil@emtpy% - \let\pgf@tempb\pgfutil@emtpy% - \let\pgf@tempc\pgfutil@emtpy% - \let\pgf@tempd\pgfutil@emtpy% + \let\pgf@tempa\pgfutil@empty% + \let\pgf@tempb\pgfutil@empty% + \let\pgf@tempc\pgfutil@empty% + \let\pgf@tempd\pgfutil@empty% \let\pgfprocessresultsubpathprefix\pgfutil@empty% \let\pgfprocessresultsubpathsuffix\pgfutil@empty% \let\pgf@next\pgf@split@subpath% diff --git a/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex b/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex index 39a40c54e..94ecb1a35 100644 --- a/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex +++ b/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex @@ -723,7 +723,7 @@ } \def\pgffuncshadingcmyktorgb{% - % covert to CMY + % convert to CMY dup 3 1 roll add 1.0 2 copy gt { exch } if pop 4 1 roll @@ -733,7 +733,7 @@ add 1.0 2 copy gt { exch } if pop 3 1 roll - % covert to RGB + % convert to RGB 1.0 exch sub 3 1 roll 1.0 exch sub diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex index 20a173580..964e26804 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex @@ -2053,7 +2053,7 @@ % it resets the length and normal counters. It will setup a completely % new counting of lengths and counters inside the current scope. % -% The placmenet/place key is executed automatically whenever a new +% The placement/place key is executed automatically whenever a new % node is automatically created. Furthermore, placement strategies % will call this key. diff --git a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index 9b76858b3..d9b1743b9 100644 --- a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2497,7 +2497,7 @@ \global\let\tikz@expand@last@token=\pgf@let@token \tikz@finish% % - % To be combatible with `scopes` lib, which uses a redefined + % To be compatible with `scopes` lib, which uses a redefined % \tikz@lib@scope@check to check the next token, the reinsertion is done % here, not at the end of (every) \tikz@finish. % diff --git a/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex b/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex index 3ac0d476f..c3149c5e3 100644 --- a/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex +++ b/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex @@ -85,7 +85,7 @@ \pgfkeyssetvalue{/data point/\pgf@lib@attribute}\pgf@lib@low \pgfcanvaspositionofdatapoint% \pgfsettocanvasposition\pgf@dv@lib@lowpoint% - % Ok, compute hight point + % Ok, compute high point \pgfkeyssetvalue{/data point/\pgf@lib@attribute}\pgf@lib@high \pgfcanvaspositionofdatapoint% \pgfsettocanvasposition\pgf@dv@lib@highpoint% diff --git a/tex/generic/pgf/libraries/pgflibraryarrows.code.tex b/tex/generic/pgf/libraries/pgflibraryarrows.code.tex index 96216c5f2..f78bb3cb0 100644 --- a/tex/generic/pgf/libraries/pgflibraryarrows.code.tex +++ b/tex/generic/pgf/libraries/pgflibraryarrows.code.tex @@ -617,7 +617,7 @@ -% The halfs of the $\to$ arrow reversed +% The halves of the $\to$ arrow reversed \pgfarrowsdeclare{left to reversed}{left to reversed} { diff --git a/tex/generic/pgf/libraries/pgflibraryfpu.code.tex b/tex/generic/pgf/libraries/pgflibraryfpu.code.tex index a93fa7f90..b72d5102a 100644 --- a/tex/generic/pgf/libraries/pgflibraryfpu.code.tex +++ b/tex/generic/pgf/libraries/pgflibraryfpu.code.tex @@ -2097,7 +2097,7 @@ \pgfmathfloatshift@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@k}% }% % determine 'k'. This is a heuristics. The exponential series -% converges best for |x| <= 1. However, the fixed point arithmetics +% converges best for |x| <= 1. However, the fixed point arithmetic % for tex results in best results for large |x|. Well, I'll need to % tune this here. \def\pgfmathfloatexp@@toint#1.#2\relax{% diff --git a/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex b/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex index 71d03f953..d7b42b5d6 100644 --- a/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex +++ b/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex @@ -1087,7 +1087,7 @@ \edef\outersep{\the\pgf@x}% % % The \externalradius is a length that is - % guarenteed to produce a point outside the trapezium. + % guaranteed to produce a point outside the trapezium. % \advance\pgf@xc2.0\pgf@x% \pgf@yc\halfheight\relax% @@ -1099,7 +1099,7 @@ \edef\externalradius{\the\pgf@xc}% \fi% % - % Calculate the centre base and mid poins of the node. + % Calculate the centre base and mid points of the node. % \pgfextract@process\centerpoint{% \pgf@x.5\wd\pgfnodeparttextbox% @@ -1462,7 +1462,7 @@ \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}% % % *Subtract* the rotation from the external angle. This is - % why the border point angles do not neeed to be rotated. + % why the border point angles do not need to be rotated. % \pgfmathsubtract@{\pgfmathresult}{\rotate}% \ifdim\pgfmathresult pt<0pt\relax% diff --git a/tex/generic/pgf/math/pgfmathcalc.code.tex b/tex/generic/pgf/math/pgfmathcalc.code.tex index 1e854864d..4524326e6 100755 --- a/tex/generic/pgf/math/pgfmathcalc.code.tex +++ b/tex/generic/pgf/math/pgfmathcalc.code.tex @@ -353,12 +353,12 @@ % % A bit experimental at the moment: % -% Locates the point where a line crosses an eliptical arc. If the line +% Locates the point where a line crosses an elliptical arc. If the line % does not cross the arc, a meaningless point will result. % % #1 the point of the line on the "convex" side of the arc. % #2 the point of the line on the "concave" side of the arc. -% #3 the center of the eliptical arc. +% #3 the center of the elliptical arc. % #4 start angle of the arc. % #5 end angle of the arc. % #6 radii of the arc. diff --git a/tex/generic/pgf/math/pgfmathfunctions.random.code.tex b/tex/generic/pgf/math/pgfmathfunctions.random.code.tex index 969762c6c..8f3668425 100644 --- a/tex/generic/pgf/math/pgfmathfunctions.random.code.tex +++ b/tex/generic/pgf/math/pgfmathfunctions.random.code.tex @@ -17,7 +17,7 @@ % \book@{pressetal1992, % author = {William H. Press and Brian P. Flannery and Saul A. % Teukolsky and William T. Vetterling}, -% title = {Numerical Recipies in C}, +% title = {Numerical Recipes in C}, % edition = {Second}, % publisher = {Cambridge University Press} % } diff --git a/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex b/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex index 96686aa73..1c79ba748 100644 --- a/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex +++ b/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex @@ -2657,14 +2657,14 @@ % \legend.add entry(seventh) % \legend.get arrangement(\arrangement) % - % Then \arrangment will expand to + % Then \arrangement will expand to % % first \pgfdvnextcell fourth \pgfdvnextcell seventh \pgfdvendrow % second \pgfdvnextcell fifth \pgfdvnextcell third \pgfdvendrow % third \pgfdvendrow sixth \pgfdvnextcell \pgfdvendrow % % By saying \let\pgfdvendrow=\\ and \let\pgfdvnextcell=&, you - % can use \arrangment inside a table. + % can use \arrangement inside a table. \attribute entries;% diff --git a/tex/generic/pgf/modules/pgfmoduleshapes.code.tex b/tex/generic/pgf/modules/pgfmoduleshapes.code.tex index 6be10d146..438f7b722 100644 --- a/tex/generic/pgf/modules/pgfmoduleshapes.code.tex +++ b/tex/generic/pgf/modules/pgfmoduleshapes.code.tex @@ -237,7 +237,7 @@ % \pgfpositionnodelaterminy % \pgfpositionnodelatermaxy % These four macros store the bounding box as dimensions that are -% guarenteed to end with "pt". +% guaranteed to end with "pt". % % By setting #1 to \relax (which is the default), you can switch off % the whole mechanism diff --git a/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex b/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex index 37972ba7e..14ae885ed 100644 --- a/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex +++ b/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex @@ -472,7 +472,7 @@ \pgfkeys{% /errors/family unknown/.code=\pgfkeys@error{% - Sorry, I do not know family '#1' and can't work with any assoicated family handling. Perhaps you misspelled it?}, + Sorry, I do not know family '#1' and can't work with any associated family handling. Perhaps you misspelled it?}, /errors/no such key filter/.code 2 args=\pgfkeys@error{Sorry, there is no such key filter '#1'.}, /errors/no such key filter handler/.code 2 args=\pgfkeys@error{Sorry, there is no such key filter handler '#1'.}, % HANDLERS: diff --git a/tex/generic/pgf/utilities/pgfutil-common.tex b/tex/generic/pgf/utilities/pgfutil-common.tex index 0ecdc6888..39ab1c9fd 100644 --- a/tex/generic/pgf/utilities/pgfutil-common.tex +++ b/tex/generic/pgf/utilities/pgfutil-common.tex @@ -728,7 +728,7 @@ }% % Same as \pgfutilsolvetwotwoleq, but using floating point -% arithmetics. The return value is still in fixed point. +% arithmetic. The return value is still in fixed point. \def\pgfutilsolvetwotwoleqfloat#1#2{% \begingroup \pgfmathfloatcreate{1}{1.0}{-4}% FIXME : use a smaller threshold for FPU? From a78e964eb6c75976f330a2cdb18864472516f2f6 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Thu, 27 Apr 2023 21:55:40 +0800 Subject: [PATCH 17/57] docs: fix typos (#1257) * docs: fix typos Signed-off-by: muzimuzhi --- doc/generic/pgf/pgfmanual-en-base-quick.tex | 2 +- doc/generic/pgf/pgfmanual-en-dv-main.tex | 2 +- doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex | 2 +- doc/generic/pgf/pgfmanual-en-library-decorations.tex | 6 +++--- doc/generic/pgf/pgfmanual-en-library-edges.tex | 2 +- doc/generic/pgf/pgfmanual-en-library-patterns.tex | 1 - doc/generic/pgf/pgfmanual-en-math-parsing.tex | 3 +-- doc/generic/pgf/pgfmanual-en-pgfkeys.tex | 2 +- doc/generic/pgf/pgfmanual-en-tikz-arrows.tex | 6 +++--- 9 files changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-base-quick.tex b/doc/generic/pgf/pgfmanual-en-base-quick.tex index 3813556b9..b3b2f3c2f 100644 --- a/doc/generic/pgf/pgfmanual-en-base-quick.tex +++ b/doc/generic/pgf/pgfmanual-en-base-quick.tex @@ -100,7 +100,7 @@ \subsection{Quick Path Construction Commands} \begin{command}{\pgfpathqcircle\marg{radius}} Adds a radius around the origin of the given \meta{radius}. This command is - orders of magnitude faster than |\pgfcircle{\pgfpointorigin}{|\meta{radius}|}|. + orders of magnitude faster than |\pgfpathcircle{\pgfpointorigin}{|\meta{radius}|}|. % \begin{codeexample}[] \colorlet{examplefill}{yellow!80!black} diff --git a/doc/generic/pgf/pgfmanual-en-dv-main.tex b/doc/generic/pgf/pgfmanual-en-dv-main.tex index 3502d4610..af25dcd75 100644 --- a/doc/generic/pgf/pgfmanual-en-dv-main.tex +++ b/doc/generic/pgf/pgfmanual-en-dv-main.tex @@ -531,7 +531,7 @@ \subsection{Usage} defined data group \meta{name} is inserted. The \meta{options} are also executed. - Let is now first create a data group. Note that nothing is drawn since the + Let us now first create a data group. Note that nothing is drawn since the ``dummy'' data visualization is empty and used only for the definition of the data group. % diff --git a/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex b/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex index 91ca8d1b8..0bed352e7 100644 --- a/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex +++ b/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex @@ -626,7 +626,7 @@ \subsection{Events} graph that is actually a tree in which some node ``misses'' its first child. In this case, the information that the child is missing is neither part of any node (because the node is missing, after all) nor is it an option of the whole -graph. However, events are created by the parser the allow an algorithm to +graph. However, events are created by the parser to allow an algorithm to reconstruct the fact that the child is missing. Naturally, graph drawing algorithms may choose to ignore events and most will. diff --git a/doc/generic/pgf/pgfmanual-en-library-decorations.tex b/doc/generic/pgf/pgfmanual-en-library-decorations.tex index ca6e67a37..c03007ce8 100644 --- a/doc/generic/pgf/pgfmanual-en-library-decorations.tex +++ b/doc/generic/pgf/pgfmanual-en-library-decorations.tex @@ -605,10 +605,10 @@ \subsection{Path Replacing Decorations} } } -\tikzpicture +\begin{tikzpicture} \draw [postaction=show curve controls, thick] (0,2) .. controls (2.5,1.5) and (0.5,0.5) .. (3,0); -\endtikzpicture +\end{tikzpicture} \end{codeexample} }% % @@ -651,7 +651,7 @@ \subsection{Arbitrary Markings} % If we use this code as a marking at position |2cm| on a path, then the following happens: \pgfname\ determines the position on the path that is - 2cm along the path. Then is translates the coordinate system to this + 2cm along the path. Then it translates the coordinate system to this position and rotates it such that the positive $x$-axis is tangent to the path. Then a protective scope is created, inside which the above code is executed -- resulting in a little cross on the path. diff --git a/doc/generic/pgf/pgfmanual-en-library-edges.tex b/doc/generic/pgf/pgfmanual-en-library-edges.tex index 51332af0c..a37c75a8c 100644 --- a/doc/generic/pgf/pgfmanual-en-library-edges.tex +++ b/doc/generic/pgf/pgfmanual-en-library-edges.tex @@ -178,7 +178,7 @@ \subsection{Curves} target coordinates. The fixed factor has been chosen in such a way that if \meta{number} is - |1|, if the |in| and |out| angles differ by 90$\circ$, then a quarter + |1|, if the |in| and |out| angles differ by 90$^\circ$, then a quarter circle results: % \begin{codeexample}[] diff --git a/doc/generic/pgf/pgfmanual-en-library-patterns.tex b/doc/generic/pgf/pgfmanual-en-library-patterns.tex index 40a370d3f..5a36c9217 100644 --- a/doc/generic/pgf/pgfmanual-en-library-patterns.tex +++ b/doc/generic/pgf/pgfmanual-en-library-patterns.tex @@ -150,7 +150,6 @@ \subsection{User-Defined Patterns} % \begin{key}{/pgf/patterns/tile size=\meta{pgfpoint}} Width and height of a single of the pattern as a \pgfname\ point - specification, i.e. the $x$ coordinate is the width and the $y$ specification, i.e.\ the $x$ coordinate is the width and the $y$ coordinate is the height, e.g.\ |\pgfqpoint{3pt}{3pt}|. \end{key} diff --git a/doc/generic/pgf/pgfmanual-en-math-parsing.tex b/doc/generic/pgf/pgfmanual-en-math-parsing.tex index b6b60ad2c..50466e9e1 100644 --- a/doc/generic/pgf/pgfmanual-en-math-parsing.tex +++ b/doc/generic/pgf/pgfmanual-en-math-parsing.tex @@ -203,8 +203,7 @@ \subsubsection{Commands} \end{command} \begin{command}{\pgfmathsetlengthmacro\marg{macro}\marg{expression}} - Defines \meta{macro} as the value of \meta{expression} \LaTeX{} \emph{in - points}. + Defines \meta{macro} as the value of \meta{expression} \emph{in points}. \end{command} \begin{command}{\pgfmathtruncatemacro\marg{macro}\marg{expression}} diff --git a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex index aee930a29..906ff0588 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex @@ -1289,7 +1289,7 @@ \subsubsection{Defining Value-, Macro-, If- and Choice-Keys} \end{handler} \begin{handler}{{.prefix}|=|\marg{prefix value}} - Adds the \meta{prefix value} and the beginning of the value stored in + Adds the \meta{prefix value} at the beginning of the value stored in \meta{key}. \end{handler} diff --git a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex index 91bf2477d..f691e350a 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex @@ -544,7 +544,7 @@ \subsubsection{Scaling} want it to be a little bit larger than usual''. In such cases, the following keys are useful: -\begin{key}{/pgf/arrows keys/scale=\meta{factor} (initially 1)} +\begin{key}{/pgf/arrow keys/scale=\meta{factor} (initially 1)} After all the other options listed in the previous (and also the following sections) have been processed, \tikzname\ applies a \emph{scaling} to the computed length, inset, and width of the arrow tip (and, possibly, to other @@ -567,7 +567,7 @@ \subsubsection{Scaling} keys (the |scale| key is just a shorthand for setting both of the following keys simultaneously): -\begin{key}{/pgf/arrows keys/scale length=\meta{factor} (initially 1)} +\begin{key}{/pgf/arrow keys/scale length=\meta{factor} (initially 1)} This factor works like |scale|, only it is applied only to dimensions ``along the axis of the arrow'', that is, to the length and to the inset, but not to the width. @@ -582,7 +582,7 @@ \subsubsection{Scaling} % \end{key} -\begin{key}{/pgf/arrows keys/scale width=\meta{factor} (initially 1)} +\begin{key}{/pgf/arrow keys/scale width=\meta{factor} (initially 1)} Like |scale length|, but for dimensions related to the width. % \begin{codeexample}[preamble={\usetikzlibrary{arrows.meta}}] From b184f93cd07aab3d01bd77f754f64d529f67fc19 Mon Sep 17 00:00:00 2001 From: Matthias Hetzenberger Date: Thu, 25 May 2023 16:14:06 +0200 Subject: [PATCH 18/57] Update pgfmanual-en-pgfkeys.tex (#1261) Fix typo in pgfkeys manual --- doc/generic/pgf/pgfmanual-en-pgfkeys.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex index 906ff0588..2ea13db26 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex @@ -995,7 +995,7 @@ \subsubsection{Defining Key Codes} special value |\pgfkeysnovalue|. It is permissible that \meta{code} calls the command |\pgfkeys|. It is also - permissible the \meta{code} calls the command |\pgfkeysalso|, which is + permissible that \meta{code} calls the command |\pgfkeysalso|, which is useful for styles, see below. % \begin{codeexample}[code only] From e09607ff77d9b78dd4c895e3e153253edb4d44d4 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Thu, 25 May 2023 22:19:45 +0800 Subject: [PATCH 19/57] docs: update contributors Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8b52f7262..8221548be 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## Unreleased + +### Changed + +- Typo fixes in the manual + +### Contributors + +- Andreas Deininger +- Matthias Hetzenberger +- quark67 +- Yukai Chou (muzimuzhi) + ## [3.1.10] - 2023-01-13 Henri Menke Even though this release is not too heavy on user-facing additions it has seen a From f2399b3793b0d4cd79572c2dc40d9ae679ff7ba1 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Fri, 26 May 2023 21:49:05 +0800 Subject: [PATCH 20/57] fix: use corresponding line cap cmd #808 --- doc/generic/pgf/pgfmanual-en-pgfkeys.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex index 2ea13db26..88ac69365 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex @@ -1374,8 +1374,8 @@ \subsubsection{Defining Value-, Macro-, If- and Choice-Keys} % \begin{codeexample}[code only] \pgfkeys{/line cap/.is choice} -\pgfkeys{/line cap/round/.code={\pgfsetbuttcap}} -\pgfkeys{/line cap/butt/.code={\pgfsetroundcap}} +\pgfkeys{/line cap/round/.code={\pgfsetroundcap}} +\pgfkeys{/line cap/butt/.code={\pgfsetbuttcap}} \pgfkeys{/line cap/rect/.code={\pgfsetrectcap}} \pgfkeys{/line cap/rectangle/.style={/line cap=rect}} ... From 2580e3058f9e61a0e34800638c461713d33151e3 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Wed, 26 Jul 2023 23:01:14 +0800 Subject: [PATCH 21/57] chore(git): ignore .synctex.gz files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e2f0d201a..36b8097e3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ *.out *.pdf *.svg +*.synctex.gz *.toc -*.zip +*.zip build/* From 467766f42e26eab4857ba693fb4c7e6e1b7e7aca Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Sun, 3 Sep 2023 18:22:51 +0200 Subject: [PATCH 22/57] fix: typo in animations #1273 Co-authored-by: Qrrbrbirlbel --- .../frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex index 7b3fc12bf..90b868771 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex @@ -484,7 +484,7 @@ begin/.code=\tikz@anim@add@once{\pgfanimationset{begin={#1}}}, end/.code=\tikz@anim@add@once{\pgfanimationset{end={#1}}}, begin on/.code=\tikz@anim@event{begin}{#1}, - end on/.code=\tikz@anim@event{begin}{#1}, + end on/.code=\tikz@anim@event{end}{#1}, begin snapshot/.code=\tikz@anim@add{\pgfanimationset{begin snapshot={#1}}}, origin/.code=\tikz@anim@parse@origin{#1}, transform/.code=\tikz@anim@add{\pgfanimationset{transform={\let\tikz@transform\relax\tikzset{#1}}}}, From b6734d92b0558921b505a8409e63505756bd0d0d Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 4 Sep 2023 06:18:03 +0800 Subject: [PATCH 23/57] test: update testfile Caused by luaotfload v3.24, the first "bad" commit is https://github.com/latex3/luaotfload/commit/ca496854abb3e51c498a6bc01c747bcc45dd94cd Signed-off-by: muzimuzhi --- testfiles/pgf002.latexdvisvgm.tlg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testfiles/pgf002.latexdvisvgm.tlg b/testfiles/pgf002.latexdvisvgm.tlg index 7fcf81f6f..f338f0d1a 100644 --- a/testfiles/pgf002.latexdvisvgm.tlg +++ b/testfiles/pgf002.latexdvisvgm.tlg @@ -47,7 +47,7 @@ TEST 1: tikz: matrix .................\special{dvisvgm:raw {?nl} } .................\special{dvisvgm:raw } .................\hbox(4.48+0.11)x5.0, direction TLT -..................\FONT16 ^^\ +..................\TU/lmr/m/n/10 a .................\special{dvisvgm:raw } .................\special{dvisvgm:raw {?nl} } ...............\special{dvisvgm:raw } @@ -83,7 +83,7 @@ TEST 1: tikz: matrix .................\special{dvisvgm:raw {?nl} } .................\special{dvisvgm:raw } .................\hbox(6.83+0.0)x7.5, direction TLT -..................\FONT16 s +..................\TU/lmr/m/n/10 X .................\special{dvisvgm:raw } .................\special{dvisvgm:raw {?nl} } ...............\special{dvisvgm:raw } @@ -119,7 +119,7 @@ TEST 1: tikz: matrix .................\special{dvisvgm:raw {?nl} } .................\special{dvisvgm:raw } .................\hbox(4.53+2.06)x5.0, direction TLT -..................\FONT16 ; +..................\TU/lmr/m/n/10 g .................\special{dvisvgm:raw } .................\special{dvisvgm:raw {?nl} } ...............\special{dvisvgm:raw } From d2b1d228dd1da399280abe85a8ea2dc36a000457 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 4 Sep 2023 06:22:00 +0800 Subject: [PATCH 24/57] docs: update CI badge [ci skip] doc: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge Signed-off-by: muzimuzhi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd2d79518..00d578bd5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pgf – A Portable Graphic Format for TeX -![CI](https://github.com/pgf-tikz/pgf/workflows/CI/badge.svg) +![Test suite](https://github.com/pgf-tikz/pgf/actions/workflows/check.yml/badge.svg?branch=master) PGF is a TeX macro package for generating graphics. It is platform- and format-independent and works together with the most important TeX From 0963b67e6fc25e09b6b98b1f1d970be50f733444 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 4 Sep 2023 06:47:43 +0800 Subject: [PATCH 25/57] docs: add changelog entry for #1273 [ci skip] Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8221548be..bf7eefaf9 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### BREAKING CHANGES + +### Added + +### Fixed + +- Typo in animations `end on` key #1273 + ### Changed - Typo fixes in the manual @@ -14,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Andreas Deininger - Matthias Hetzenberger +- Qrrbrbirlbel - quark67 - Yukai Chou (muzimuzhi) From 12a38a93c3edc9e3ee39be3f0e438d5b115e36b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 06:30:53 +0000 Subject: [PATCH 26/57] chore(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/check.yml | 2 +- .github/workflows/dco.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index efcce3e34..fa4f079f2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,7 +9,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index 02534c38f..6523cd1ab 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0697432d1..0dd02a6c8 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,7 +9,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3676c7c29..0bb40e15b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: image: registry.gitlab.com/islandoftex/images/texlive:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 From e988e66dac2ae26d7a270931ff18e9e80cc7c96c Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Sat, 23 Sep 2023 00:18:49 +0800 Subject: [PATCH 27/57] docs: simplify the stripe-pattern matrix example Signed-off-by: muzimuzhi --- .../pgf/pgfmanual-en-tikz-matrices.tex | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-matrices.tex b/doc/generic/pgf/pgfmanual-en-tikz-matrices.tex index f46ad79b7..4391792ec 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-matrices.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-matrices.tex @@ -486,24 +486,28 @@ \subsubsection{Cell Styles and Options} \begin{codeexample}[preamble={\usetikzlibrary{matrix,fit}}] \begin{tikzpicture}[ font=\sffamily, - striped col/.style={column #1/.append style={ - every even row/.style={nodes={fill=olive!50}}}}, - head color/.style args={#1/#2}{column #1/.append style={ - row 1/.append style={nodes={fill=#2}}}} + head color/.style args={#1/#2}{ + row 1 column #1/.append style={nodes={fill=#2}}}, + % swap order of row and column styles + matrix/inner style order={ + every cell, + row, even odd row, + column, even odd column, + cell + } ] \matrix [ matrix of nodes, nodes in empty cells, nodes={text width=2cm, align=center, minimum height=1.5em, anchor=center}, - striped col/.list={1,...,5}, % add striped col style to all cols - column 1/.style={ % Override stripes and modify the feature column - row 1 column 1/.style={nodes={fill=none, draw=none}}, - nodes={fill=olive, inner ysep=0}, - }, - % modify headers first via common styles and then specific colors - row 1/.style={nodes={text depth=0.2ex, text width=2cm, text=white}}, - head color/.list={2/orange,3/teal,4/cyan,5/magenta} + % add striped row style + every even row/.style={nodes={fill=olive!50}}, + % modify the feature column and header row + column 1/.style= {nodes={fill=olive, inner ysep=0}}, + row 1/.style= {nodes={text depth=0.2ex, text=white}}, + row 1 column 1/.style={nodes={fill=none, draw=none}}, + head color/.list={2/orange,3/teal,4/cyan,5/magenta} % specify header colors ] (m) { & Basic & Standard & Professional & Enterprise \\ @@ -515,7 +519,7 @@ \subsubsection{Cell Styles and Options} }; % Add emphasis on selection by the use of "fit" library \node[fit={(m-1-4.north west) (m-6-4.south east)}, - ultra thick, inner sep=0, rounded corners=1mm, + ultra thick, inner sep=0pt, rounded corners=1mm, draw=cyan, label={[cyan,align=center]270:Popular\\Choice!}]{}; \end{tikzpicture} \end{codeexample} From 8b6ee86bcb2b78e48f26cfa7c77455055684a883 Mon Sep 17 00:00:00 2001 From: Alexander Grahn Date: Tue, 12 Sep 2023 15:05:46 +0200 Subject: [PATCH 28/57] fix conflicting bbox setting between pgfsys-dvisvgm and dvisvgm command; fixes #1275 Signed-off-by: Alexander Grahn --- doc/generic/pgf/CHANGELOG.md | 2 ++ testfiles/pgf001.latexdvisvgm.tlg | 4 ++++ testfiles/pgf002.latexdvisvgm.tlg | 2 ++ tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index bf7eefaf9..d559c9f6e 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Typo in animations `end on` key #1273 +- Output bounding box adjustment in pgfsys-dvisvgm.def #1275 ### Changed @@ -25,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Qrrbrbirlbel - quark67 - Yukai Chou (muzimuzhi) +- Alexander Grahn ## [3.1.10] - 2023-01-13 Henri Menke diff --git a/testfiles/pgf001.latexdvisvgm.tlg b/testfiles/pgf001.latexdvisvgm.tlg index 39c95113d..8d3b0f6ec 100644 --- a/testfiles/pgf001.latexdvisvgm.tlg +++ b/testfiles/pgf001.latexdvisvgm.tlg @@ -7,6 +7,7 @@ TEST 1: pgf: \pgfpathmoveto \hbox(0.0+0.0)x0.0, direction TLT .\hbox(0.0+0.0)x0.0, direction TLT ..\special{dvisvgm:bbox 0.0 0.0} +..\special{dvisvgm:bbox lock} ..\hbox(0.0+0.0)x0.0, direction TLT ...\glue -28.45274 ...\hbox(0.0+0.0)x0.0, shifted 28.45274, direction TLT @@ -25,6 +26,7 @@ TEST 1: pgf: \pgfpathmoveto ....\special{dvisvgm:raw } ....\special{color pop} ....\glue 0.0 plus 1.0fil minus 1.0fil +..\special{dvisvgm:bbox unlock} ! OK. \ENDPGFTEST ...th =\maxdimen \showbox \PGFTESTBOX \endgroup \ENDTEST @@ -37,6 +39,7 @@ TEST 2: pgf: \pgfpathlineto \hbox(0.0+0.0)x0.0, direction TLT .\hbox(0.0+0.0)x0.0, direction TLT ..\special{dvisvgm:bbox 0.0 0.0} +..\special{dvisvgm:bbox lock} ..\hbox(0.0+0.0)x0.0, direction TLT ...\glue -28.45274 ...\hbox(0.0+0.0)x0.0, shifted 28.45274, direction TLT @@ -55,6 +58,7 @@ TEST 2: pgf: \pgfpathlineto ....\special{dvisvgm:raw } ....\special{color pop} ....\glue 0.0 plus 1.0fil minus 1.0fil +..\special{dvisvgm:bbox unlock} ! OK. \ENDPGFTEST ...th =\maxdimen \showbox \PGFTESTBOX \endgroup \ENDTEST diff --git a/testfiles/pgf002.latexdvisvgm.tlg b/testfiles/pgf002.latexdvisvgm.tlg index f338f0d1a..6bb8d40b9 100644 --- a/testfiles/pgf002.latexdvisvgm.tlg +++ b/testfiles/pgf002.latexdvisvgm.tlg @@ -7,6 +7,7 @@ TEST 1: tikz: matrix \hbox(20.1619+0.0)x44.16382, direction TLT .\hbox(20.1619+0.0)x44.16382, direction TLT ..\special{dvisvgm:bbox 44.16382 20.1619} +..\special{dvisvgm:bbox lock} ..\hbox(20.1619+0.0)x44.16382, direction TLT ...\glue 22.08191 ...\hbox(0.0+0.0)x0.0, shifted -10.08095, direction TLT @@ -144,6 +145,7 @@ TEST 1: tikz: matrix ....\special{dvisvgm:raw } ....\special{color pop} ....\glue 0.0 plus 1.0fil minus 1.0fil +..\special{dvisvgm:bbox unlock} ! OK. \ENDTIKZTEST ...h =\maxdimen \showbox \PGFTESTBOX \endgroup \ENDTEST diff --git a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def index a08960118..428ff155d 100644 --- a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def +++ b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def @@ -127,7 +127,7 @@ \dp#1=0pt% \leavevmode% \pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% - \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\fi\box#1}% + \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\box#1\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\special{dvisvgm:bbox lock}\box#1\special{dvisvgm:bbox unlock}\fi}% \pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% } From 1d3535fc27eeba9997bba7643d1ba02c2eba2e26 Mon Sep 17 00:00:00 2001 From: agrahn Date: Wed, 20 Sep 2023 17:09:53 +0200 Subject: [PATCH 29/57] Update tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def Co-authored-by: Yukai Chou --- tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def index 428ff155d..3df6de6d6 100644 --- a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def +++ b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def @@ -127,7 +127,15 @@ \dp#1=0pt% \leavevmode% \pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% - \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\box#1\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\special{dvisvgm:bbox lock}\box#1\special{dvisvgm:bbox unlock}\fi}% + \raise-\pgf@ya\hbox{% + \ifpgf@sys@svg@inpicture + \box#1% + \else + \special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}% + \special{dvisvgm:bbox lock}% + \box#1% + \special{dvisvgm:bbox unlock}% + \fi}% \pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% } From 7371bd4749f54f3855f53646961790ef1e374e12 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Wed, 26 Jul 2023 23:25:54 +0800 Subject: [PATCH 30/57] docs: simplify short verb `|...|` (#1267) Signed-off-by: muzimuzhi --- doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex index bf6047fc1..aedf0f648 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex @@ -380,11 +380,11 @@ \subsubsection{Node Coordinate System} Specifies an anchor of the node. Here is an example: % \begin{codeexample}[preamble={\usetikzlibrary{arrows.meta}}] -\begin{tikzpicture} - \node (shape) at (0,2) [draw] {|class Shape|}; - \node (rect) at (-2,0) [draw] {|class Rectangle|}; - \node (circle) at (2,0) [draw] {|class Circle|}; - \node (ellipse) at (6,0) [draw] {|class Ellipse|}; +\begin{tikzpicture}[node font=\ttfamily] + \node (shape) at (0,2) [draw] {class Shape}; + \node (rect) at (-2,0) [draw] {class Rectangle}; + \node (circle) at (2,0) [draw] {class Circle}; + \node (ellipse) at (6,0) [draw] {class Ellipse}; \draw (node cs:name=circle,anchor=north) |- (0,1); \draw (node cs:name=ellipse,anchor=north) |- (0,1); From 742ce718fe5d870cdedcc8193b596f44a0c8afba Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Wed, 26 Jul 2023 23:26:50 +0800 Subject: [PATCH 31/57] docs: add codeexample preambles for short verb Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-en-base-shadings.tex | 2 +- doc/generic/pgf/pgfmanual-en-pgfkeys.tex | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index d559c9f6e..b6342803a 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Typo fixes in the manual +- Simplify short verb `|...|` or add required preamble for it ### Contributors diff --git a/doc/generic/pgf/pgfmanual-en-base-shadings.tex b/doc/generic/pgf/pgfmanual-en-base-shadings.tex index 0d5497362..08985d819 100644 --- a/doc/generic/pgf/pgfmanual-en-base-shadings.tex +++ b/doc/generic/pgf/pgfmanual-en-base-shadings.tex @@ -357,7 +357,7 @@ \subsubsection{General (Functional) Shadings} defined, which store the individual components of \meta{color name}. These can also be used in the \meta{type 4 function} argument. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}] \pgfshadecolortorgb{orange}{\mycol} |\mycol|=\mycol |\mycolred|=\mycolred |\mycolgreen|=\mycolgreen |\mycolblue|=\mycolblue \end{codeexample} diff --git a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex index 88ac69365..f922ec351 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfkeys.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfkeys.tex @@ -565,12 +565,12 @@ \subsubsection{Keys That Execute Commands} ``\meta{text}|+|\meta{more text}'' and wishes to store \meta{text} and \meta{more text} in two different macros. This can be achieved as follows: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}] \def\mystore#1+#2\pgfeov{\def\a{#1}\def\b{#2}} \pgfkeyslet{/my key/.@cmd}{\mystore} \pgfkeys{/my key=hello+world} -|\a| is \a, |\b| is \b. +|\a| is `\a', |\b| is `\b'. \end{codeexample} Naturally, defining the code to be stored in a key in the above manner is too @@ -604,7 +604,7 @@ \subsubsection{Keys That Execute Commands} This command works like |\pgfkeysdef|, but it allows you to provide an arbitrary \meta{argument count} between $0$ and $9$ (inclusive). % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}] \pgfkeysdefnargs{/my key}{2}{\def\a{#1}\def\b{#2}} \pgfkeys{/my key= {hello} @@ -624,11 +624,11 @@ \subsubsection{Keys That Execute Commands} This command works like |\pgfkeysdefnargs|, but it allows you to provide an arbitrary \meta{argument pattern} rather than just a number of arguments. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}] \pgfkeysdefargs{/my key}{#1+#2}{\def\a{#1}\def\b{#2}} \pgfkeys{/my key=hello+world} -|\a| is \a, |\b| is \b. +|\a| is `\a', |\b| is `\b'. \end{codeexample} % Note that |\pgfkeysdefnargs| is \emph{better} when it comes to simple From 987e8511f9e58226c65252a6b7c8009647c99301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Sat, 5 Nov 2022 11:53:32 +0100 Subject: [PATCH 32/57] Fix shadings on LuaMetaTeX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Fabian Krüger --- doc/generic/pgf/CHANGELOG.md | 1 + tex/generic/pgf/systemlayer/pgfsys-luatex.def | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index b6342803a..8db79bd21 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -109,6 +109,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Remove spurious spaces for `3d view` #1151 - Fix incorrectly placed matrix delimiters for implicitly positioned nodes #1102 - Use `/.append` to fix a wrong usage of `/.add` in pgfmanual #1201 +- Fix shadings under LuaMetaTeX ### Changed diff --git a/tex/generic/pgf/systemlayer/pgfsys-luatex.def b/tex/generic/pgf/systemlayer/pgfsys-luatex.def index e60b1913a..2ab6ce28e 100644 --- a/tex/generic/pgf/systemlayer/pgfsys-luatex.def +++ b/tex/generic/pgf/systemlayer/pgfsys-luatex.def @@ -80,11 +80,17 @@ \immediate\saveimageresource attr \pgf@attr {\pgf@filename}% \edef\pgf@mask{/SMask \the\lastsavedimageresourceindex\space 0 R}% } + +\ifnum\luatexversion<200 + \def\pgfsys@TLT{dir TLT}% +\else + \def\pgfsys@TLT{direction 0}% +\fi \def\pgfsys@horishading#1#2#3{% {% \pgf@parsefunc{#3}% \pgfmathparse{#2}% - \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgf@max{\vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% + \setbox\pgfutil@tempboxa=\hbox \pgfsys@TLT to\pgf@max{\vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% \pgf@process{\pgfpoint{\pgf@max}{#2}}% \immediate\saveboxresource resources {% /Shading << /Sh << /ShadingType 2 @@ -101,7 +107,7 @@ {% \pgf@parsefunc{#3}% \pgfmathparse{#2}% - \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgfmathresult pt{\vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% + \setbox\pgfutil@tempboxa=\hbox \pgfsys@TLT to\pgfmathresult pt{\vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% \pgf@process{\pgfpoint{#2}{\pgf@max}}% \immediate\saveboxresource resources {% /Shading << /Sh << /ShadingType 2 @@ -117,7 +123,7 @@ \def\pgfsys@radialshading#1#2#3{% {% \pgf@parsefunc{#3}% - \setbox\pgfutil@tempboxa=\hbox dir TLT to2\pgf@max{\vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% + \setbox\pgfutil@tempboxa=\hbox \pgfsys@TLT to2\pgf@max{\vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% \pgf@process{#2}% \pgf@xa=\pgf@x% \pgf@ya=\pgf@y% @@ -149,7 +155,7 @@ \pgf@yb=\pgf@y% \advance\pgf@x by-\pgf@xa% \advance\pgf@y by-\pgf@ya% - \setbox\pgfutil@tempboxa=\hbox dir TLT to\pgf@x{\vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% + \setbox\pgfutil@tempboxa=\hbox \pgfsys@TLT to\pgf@x{\vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}% \pgf@sys@bp@correct{\pgf@xa}% \pgf@sys@bp@correct{\pgf@ya}% \pgf@sys@bp@correct{\pgf@xb}% From 6ce87054601cbd043a2abda1ca7ef5b8905ee04a Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:11:45 +0000 Subject: [PATCH 33/57] Harden pgfmathparser against active chars In general, the grabbed token could always be active, so precautions are needed. Signed-off-by: Joseph Wright --- tex/generic/pgf/math/pgfmathparser.code.tex | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tex/generic/pgf/math/pgfmathparser.code.tex b/tex/generic/pgf/math/pgfmathparser.code.tex index 8a560ff11..d2aafa35a 100755 --- a/tex/generic/pgf/math/pgfmathparser.code.tex +++ b/tex/generic/pgf/math/pgfmathparser.code.tex @@ -428,7 +428,7 @@ \expandafter\pgfmath@stack@push@operand\expandafter{\pgfmath@number}% \let\pgfmath@parse@next=\pgfmath@parse@@@operator% \else% - \expandafter\ifcat\pgfmath@token\relax% A CS? + \expandafter\ifcat\expandafter\noexpand\pgfmath@token\relax% A CS? \expandafter\ifx\csname pgfmath@token@dimexpr@\expandafter\string\pgfmath@token\endcsname\relax% \expandafter\ifx\pgfmath@token\numexpr% \let\pgfmath@parse@next=\pgfmath@parse@numexpr% @@ -448,7 +448,7 @@ \else% A count register. \pgfmath@count=\pgfmath@token% \expandafter\def\expandafter\pgfmath@number\expandafter{\the\pgfmath@count}% - \expandafter\ifcat\pgfmath@token@next\relax% + \expandafter\ifcat\expandafter\noexpand\pgfmath@token@next\relax% % A CS following a count register should be \wd, \ht or \dp. \let\pgfmath@parse@next=\pgfmath@parse@number% \else% @@ -475,15 +475,15 @@ \expandafter\ifx\csname pgfmath@token@numeric@\expandafter\string\pgfmath@token\endcsname\relax% % It isn't numeric (i.e., 012345679.), so it might be units... % first double-character units... - \expandafter\ifx\csname pgfmath@token@unit@\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% + \expandafter\ifx\csname pgfmath@token@unit@\expandafter\string\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% % then single-character units... - \expandafter\ifx\csname pgfmath@token@unit@\pgfmath@token\endcsname\relax% + \expandafter\ifx\csname pgfmath@token@unit@\expandafter\string\pgfmath@token\endcsname\relax% % ...or the exponent characters... - \expandafter\ifx\csname pgfmath@token@exponent@\pgfmath@token\endcsname\relax% + \expandafter\ifx\csname pgfmath@token@exponent@\expandafter\string\pgfmath@token\endcsname\relax% % ...or a base prefix... - \expandafter\ifx\csname pgfmath@base@\pgfmath@number\pgfmath@token\endcsname\relax% + \expandafter\ifx\csname pgfmath@base@\expandafter\pgfmath@number\expandafter\string\pgfmath@token\endcsname\relax% % ...or a math unit... - \expandafter\ifx\csname pgfmath@token@mathunit@\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% + \expandafter\ifx\csname pgfmath@token@mathunit@\expandafter\string\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% % ...none of the above... \ifx\pgfmath@base\pgfmath@empty% \let\pgfmathresult=\pgfmath@number% @@ -509,7 +509,7 @@ \else% % ...here, it is a base prefix 0x, 0X, 0b or 0B \expandafter\let\expandafter\pgfmath@base\expandafter=% - \csname pgfmath@base@\pgfmath@number\pgfmath@token\endcsname% + \csname pgfmath@base@\expandafter\pgfmath@number\expandafter\string\pgfmath@token\endcsname% \let\pgfmath@parse@next=\pgfmath@parse@base% \fi% \else% ... and here, it is the exponent characters. @@ -583,7 +583,7 @@ \def\pgfmath@parse@numexpr@#1{% \expandafter\def\expandafter\pgfmath@number\expandafter{\the\pgfmath@count}% \def\pgfmath@token@next{#1}% - \expandafter\ifcat\pgfmath@token@next\relax% + \expandafter\ifcat\expandafter\noexpand\pgfmath@token@next\relax% % A CS following a count register should be \wd, \ht or \dp. \let\pgfmath@parse@next=\pgfmath@parse@number% \else% @@ -715,9 +715,9 @@ \pgfmath@parse@@@operator} \def\pgfmath@parse@@@operator{% - \expandafter\ifx\csname pgfmath@operator@\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% + \expandafter\ifx\csname pgfmath@operator@\expandafter\string\pgfmath@token\expandafter\string\pgfmath@token@next\endcsname\relax% % Not a double character operator. - \expandafter\ifx\csname pgfmath@operator@\pgfmath@token\endcsname\relax% + \expandafter\ifx\csname pgfmath@operator@\expandafter\string\pgfmath@token\endcsname\relax% % Not a single character operator. \pgfmath@error{Unknown operator `\pgfmath@token' or `\pgfmath@token\pgfmath@token@next'}{}% \def\pgfmathresult{0}% @@ -727,7 +727,7 @@ \ifx\pgfmath@token\pgfmath@text@@% \let\pgfmath@parse@next=\pgfmath@parse@end% \else% - \expandafter\ifx\csname pgfmath@operation@\pgfmath@token @postfix\endcsname\pgfmath@token% + \expandafter\ifx\csname pgfmath@operation@\expandafter\string\pgfmath@token @postfix\endcsname\pgfmath@token% % Postfix operators are followed by an operator. \ifx\pgfmath@token@next\pgfmath@char@leftbracket% Except [. \let\pgfmath@parse@next=\pgfmath@parse@operand% From ece59e9f2c269c35d295dbaa1008ba761c5f8778 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:19:01 +0000 Subject: [PATCH 34/57] Update ChangeLog Signed-off-by: Joseph Wright --- doc/generic/pgf/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8db79bd21..a219cc471 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -123,6 +123,7 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Use descriptive workflow job ids - Ensure `doc` v2 is loaded for pgfmanual - Ensure active `^^M` is non-expandable in `codeexample` +- Harden parser for math expressions against active chars ### Contributors From d43649284f38699c4da4a317c0be6b69b046575a Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:23:34 +0000 Subject: [PATCH 35/57] On additional conditional updated Signed-off-by: Joseph Wright --- tex/generic/pgf/math/pgfmathparser.code.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tex/generic/pgf/math/pgfmathparser.code.tex b/tex/generic/pgf/math/pgfmathparser.code.tex index d2aafa35a..379aa9952 100755 --- a/tex/generic/pgf/math/pgfmathparser.code.tex +++ b/tex/generic/pgf/math/pgfmathparser.code.tex @@ -352,7 +352,7 @@ \expandafter\ifx\csname pgfmath@token@functional@\string#1\endcsname\relax% \let\pgfmath@base=\pgfmath@empty% \let\pgfmath@token@next=\pgfmath@token% - \if#10% Check for octal prefix. + \if\noexpand#10% Check for octal prefix. \ifpgfmath@octalparsing% \def\pgfmath@base{8}% \fi% From ae9d592b186846488a96b0de4416b405b6062cf2 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 23 Oct 2023 17:55:47 +0800 Subject: [PATCH 36/57] docs: tidy ChangeLog for #1214 [ci skip] Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index a219cc471..8133c39a4 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Typo in animations `end on` key #1273 - Output bounding box adjustment in pgfsys-dvisvgm.def #1275 +- Fix shadings under LuaMetaTeX ### Changed @@ -23,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Contributors - Andreas Deininger +- Marcel Krüger - Matthias Hetzenberger - Qrrbrbirlbel - quark67 @@ -109,7 +111,6 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Remove spurious spaces for `3d view` #1151 - Fix incorrectly placed matrix delimiters for implicitly positioned nodes #1102 - Use `/.append` to fix a wrong usage of `/.add` in pgfmanual #1201 -- Fix shadings under LuaMetaTeX ### Changed From a1a947c5cf5aea2fe14ae702be3332e90951a9f0 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 23 Oct 2023 17:56:58 +0800 Subject: [PATCH 37/57] docs: tidy ChangeLog for #1221 [ci skip] Signed-off-by: muzimuzhi --- doc/generic/pgf/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8133c39a4..d08a6e9ab 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -20,10 +20,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Typo fixes in the manual - Simplify short verb `|...|` or add required preamble for it +- Harden parser for math expressions against active chars ### Contributors - Andreas Deininger +- Joseph Wright - Marcel Krüger - Matthias Hetzenberger - Qrrbrbirlbel @@ -124,7 +126,6 @@ lot of contributed changes. Thanks to everyone who volunteered their time! - Use descriptive workflow job ids - Ensure `doc` v2 is loaded for pgfmanual - Ensure active `^^M` is non-expandable in `codeexample` -- Harden parser for math expressions against active chars ### Contributors From 73ea5081d77916ec8256684d9c750ca849182165 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 06:18:59 +0000 Subject: [PATCH 38/57] chore(deps): bump actions/github-script from 6 to 7 Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0bb40e15b..39ea66f94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -89,7 +89,7 @@ jobs: body_path: RELEASE_NOTES.md - name: "Release: upload assets" - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | From 67d93262103d2104d2da92f2c509f9950f6df926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A1=94=E5=93=A5=20=28CHEN=20Deng-Ta=29?= Date: Wed, 29 Nov 2023 09:20:07 +0800 Subject: [PATCH 39/57] Update pgfmanual-en-tikz-coordinates.tex --- doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex index aedf0f648..0128ec2af 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex @@ -774,7 +774,7 @@ \subsubsection{Intersections of Arbitrary Paths} To find the intersections of two paths in \tikzname, they must be ``named''. A ``named path'' is, quite simply, a path that has been named using the following key (note that this is a \emph{different} key from the |name| key, which only -attaches a hyperlink target to a path, but does not store the path in a way the +attaches a hyperlink target to a path, but does not store the path in a way that is useful for the intersection computation): \begin{keylist}{% From 810f682ef06d597eadc5f0098af40a6cc3b11acd Mon Sep 17 00:00:00 2001 From: Toni Dietze Date: Wed, 13 Dec 2023 11:12:11 +0100 Subject: [PATCH 40/57] docs: fix default for isosceles triangle stretches Signed-off-by: Toni Dietze --- doc/generic/pgf/pgfmanual-en-library-shapes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-library-shapes.tex b/doc/generic/pgf/pgfmanual-en-library-shapes.tex index 26055b271..e94ec5ca8 100644 --- a/doc/generic/pgf/pgfmanual-en-library-shapes.tex +++ b/doc/generic/pgf/pgfmanual-en-library-shapes.tex @@ -461,7 +461,7 @@ \subsection{Geometric Shapes} Sets the angle of the apex of the isosceles triangle. \end{key} - \begin{key}{/pgf/isosceles triangle stretches=\meta{boolean} (default true)} + \begin{key}{/pgf/isosceles triangle stretches=\meta{boolean} (default false)} By default \meta{boolean} is |false|. This means, that when applying any minimum width or minimum height requirements, increasing the height will increase the width (and vice versa), in order to keep the apex From 41c0ceafc14fcdd7249a16ea5face0edb8dd1d05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 00:54:29 +0800 Subject: [PATCH 41/57] chore(deps): bump actions/upload-artifact from 3 to 4 (#1299) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/main.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fa4f079f2..3ab9b82a0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -31,7 +31,7 @@ jobs: - name: Archive failed test output if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-diff-files path: build/test*/*.diff diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0dd02a6c8..74def94df 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -29,7 +29,7 @@ jobs: run: | l3build doc -q - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: pgfmanual path: build/doc/pgfmanual.pdf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39ea66f94..9f3c9197d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: run: | l3build ctan - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: pgfmanual path: build/doc/pgfmanual.pdf From 07a5d00a972734c7484027142e5fa2d32a91ac8f Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 22 Dec 2023 04:53:50 +0800 Subject: [PATCH 42/57] build: drop unneeded `maxprintline` setting `maxprintline` defaults to 9999 since l3build 2023-03-22. https://github.com/latex3/l3build/blob/main/CHANGELOG.md#2023-03-22 Signed-off-by: Yukai Chou --- build.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.lua b/build.lua index 7bf4f678a..8ce39d221 100644 --- a/build.lua +++ b/build.lua @@ -43,9 +43,6 @@ checkengines = {"pdftex", "latexdvips", "latexdvisvgm", "luatex", "xetex"} -- Use multiple sets of tests checkconfigs = { "build", "config-gd" } ---- Keep all \special data (may one day be the l3build default) -maxprintline = 9999 - -- For release ctanzip = "pgf.ctan.flatdir" packtdszip = true From 37d73a2a491dbc5b056065df2864309f0baa44f2 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 22 Dec 2023 06:43:00 +0800 Subject: [PATCH 43/57] docs: cleanup pgfmanual preamble (#1300) - Replace deprecated `ifluatex` package with `iftex` - Drop setting input encoding to `utf8` `utf8` has been the new default since LaTeX2e release 2018-04-01. - Drop setting `T1` font encoding for `dvisvgm` `dvisvgm` has supported OpenType fonts for years. Signed-off-by: Yukai Chou --- doc/generic/pgf/pgfmanual-en-main-preamble.tex | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-main-preamble.tex b/doc/generic/pgf/pgfmanual-en-main-preamble.tex index 8e04c8768..f500f11f4 100644 --- a/doc/generic/pgf/pgfmanual-en-main-preamble.tex +++ b/doc/generic/pgf/pgfmanual-en-main-preamble.tex @@ -100,7 +100,7 @@ perspective, } -\usepackage{ifluatex} +\usepackage{iftex} \newif\ifgdccodebasic \newif\ifgdccodeogdf @@ -168,14 +168,7 @@ % required by luatextra. Needs to be \relaxed since % pgfmanual-en-macros.tex defines an environment named filedescription \let\filedescription\relax - \usepackage[utf8]{luainputenc} - % dvisvgm does not support OpenType fonts so we have to bite the bullet and - % use T1 where quotes are weird. In LuaTeX \outputmode=0 means DVI. - \ifnum\outputmode=0 - \usepackage[T1]{fontenc} - \fi \else - \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \fi From 134da12c79558d4ebc1230b44d0f5d03839a4a3f Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 21 Oct 2022 07:01:56 +0800 Subject: [PATCH 44/57] ci: analyse and show overfull hbox(es) and upload a second artifact containing pdf and all aux files Signed-off-by: Yukai Chou --- .github/workflows/doc.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 74def94df..9052eb07c 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -29,11 +29,32 @@ jobs: run: | l3build doc -q - - uses: actions/upload-artifact@v4 + - name: Analyze manual log + run: | + # set a notice message + # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions?tool=bash#setting-a-notice-message + # create multiline annotations by using URL-encoded newline "%0A" + # https://github.com/actions/toolkit/issues/193#issuecomment-605394935 + OVERFULL_HBOX=$( + grep -r '^Overfull \\hbox' build/doc/pgfmanual.log | + awk 'BEGIN {RS=""}{gsub(/\n/,"%0A",$0); print $0}' + ) + echo "::notice file=build/doc/pgfmanual.log,title=Overfull hbox(es)::$OVERFULL_HBOX" + + - name: Upload manual + uses: actions/upload-artifact@v4 with: name: pgfmanual path: build/doc/pgfmanual.pdf + - name: Upload manual with aux + uses: actions/upload-artifact@v4 + with: + name: pgfmanual-with-aux + path: | + build/doc/pgfmanual.* + !build/doc/pgfmanual.tex + - name: Deploy tlcontrib env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 503dc633fd95391cefe2e66742c10925d5207bf9 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sat, 16 Jan 2021 07:44:06 +0800 Subject: [PATCH 45/57] docs: resolve overfull hboxes >=20pt Signed-off-by: Yukai Chou --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex | 6 +++--- doc/generic/pgf/pgfmanual-en-library-automata.tex | 11 ++++++----- doc/generic/pgf/pgfmanual-en-library-circuits.tex | 2 +- doc/generic/pgf/pgfmanual-en-library-patterns.tex | 5 +++-- doc/generic/pgf/pgfmanual-en-library-rdf.tex | 10 +++++----- doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex | 6 +++++- doc/generic/pgf/pgfmanual-en-tikz-transparency.tex | 11 ++++++----- 8 files changed, 30 insertions(+), 22 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index d08a6e9ab..b068edb9b 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Typo fixes in the manual - Simplify short verb `|...|` or add required preamble for it - Harden parser for math expressions against active chars +- Resolve overfull hboxes >=20pt in the manual ### Contributors diff --git a/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex b/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex index 0bed352e7..63af27c8f 100644 --- a/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex +++ b/doc/generic/pgf/pgfmanual-en-gd-usage-pgf.tex @@ -410,9 +410,9 @@ \subsubsection{Graph Drawing Scopes} |(10pt,20pt)--(30pt,40pt)| in \tikzname-syntax and may include the path commands |--|, |..| (followed by Bézier coordinates), and |--cycle|. - The parameter \meta{animations} contains algorithmically-generated - animation commands (calls to |\pgfanimateattribute|. The |whom| will be set - to |pgf@gd|. + The last parameter \meta{animations} contains algorithmically-generated + animation commands (calls to |\pgfanimateattribute|). The |whom| + will be set to |pgf@gd|. The default \meta{macro} simply draws a line between the nodes. When the |graphdrawing| library of the \tikzname\ layer is loaded, a more fancy diff --git a/doc/generic/pgf/pgfmanual-en-library-automata.tex b/doc/generic/pgf/pgfmanual-en-library-automata.tex index c56bb6fd1..7fc516f9b 100644 --- a/doc/generic/pgf/pgfmanual-en-library-automata.tex +++ b/doc/generic/pgf/pgfmanual-en-library-automata.tex @@ -284,10 +284,11 @@ \subsection{Examples} are orange. Then, we must find a path from a red state to a green state. % \begin{codeexample}[preamble={\usetikzlibrary{arrows.meta,automata,positioning,shadows}}] -\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,>={Stealth[round]},thick, - every state/.style={fill,draw=none,orange,text=white,circular drop shadow}, - accepting/.style ={green!50!black,text=white}, - initial/.style ={red,text=white}] +\begin{tikzpicture} + [shorten >=1pt,node distance=2cm,on grid,>={Stealth[round]},thick, + every state/.style={fill,draw=none,orange,text=white,circular drop shadow}, + accepting/.style ={green!50!black,text=white}, + initial/.style ={red,text=white}] \node[state,initial] (q_0) {$q_0$}; \node[state] (q_1) [above right=of q_0] {$q_1$}; @@ -306,7 +307,7 @@ \subsection{Examples} The next example is the current candidate for the five-state busiest beaver: % \begin{codeexample}[preamble={\usetikzlibrary{arrows.meta,automata,positioning}}] -\begin{tikzpicture}[->,>={Stealth[round]},shorten >=1pt,% +\begin{tikzpicture}[->,>={Stealth[round]},shorten >=1pt, auto,node distance=2cm,on grid,semithick, inner sep=2pt,bend angle=45] \node[initial,state] (A) {$q_a$}; diff --git a/doc/generic/pgf/pgfmanual-en-library-circuits.tex b/doc/generic/pgf/pgfmanual-en-library-circuits.tex index a0d29f60a..7595a0fd3 100644 --- a/doc/generic/pgf/pgfmanual-en-library-circuits.tex +++ b/doc/generic/pgf/pgfmanual-en-library-circuits.tex @@ -90,7 +90,7 @@ \subsubsection{A First Example} \emph{exactly the same source code}, with only the options of the |{tikzpicture}| environment replaced by |[rotate=-90,circuit ee IEC,x=3.25cm,y=2.25cm]|: -% + \begin{tikzpicture}[rotate=-90,circuit ee IEC,x=3cm,y=2.25cm] % Let us start with some contacts: \foreach \contact/\y in {1/1,2/2,3/3.5,4/4.5,5/5.5} diff --git a/doc/generic/pgf/pgfmanual-en-library-patterns.tex b/doc/generic/pgf/pgfmanual-en-library-patterns.tex index 5a36c9217..3fcdd413d 100644 --- a/doc/generic/pgf/pgfmanual-en-library-patterns.tex +++ b/doc/generic/pgf/pgfmanual-en-library-patterns.tex @@ -221,8 +221,9 @@ \subsection{User-Defined Patterns} just rotate in the drawing code. \begin{pattern}{Lines} - The |Lines| pattern replaces the |horizontal lines|, |vertical lines|, - |north east lines|, and |north west lines| patterns. Unfortunately, due to + The |Lines| pattern replaces four patterns: |horizontal lines|, + |vertical lines|, |north east lines|, and |north west lines|. + Unfortunately, due to the way the old patterns are constructed, namely that they are not simply related to each other by rotation, the |Lines| pattern cannot be used as a drop-in replacement. diff --git a/doc/generic/pgf/pgfmanual-en-library-rdf.tex b/doc/generic/pgf/pgfmanual-en-library-rdf.tex index 0e8a88de6..e582f3321 100644 --- a/doc/generic/pgf/pgfmanual-en-library-rdf.tex +++ b/doc/generic/pgf/pgfmanual-en-library-rdf.tex @@ -254,16 +254,16 @@ \subsection{Creating Statements} \item As for |subject| and |predicate|, you can use the syntax |(|\meta{name of node or scope}|)| to create and use a curie for the node or scope. - \item If the \meta{object} starts with |"|, it must have the syntax - |"|\meta{literals}|"|. In this case, the object of the + \item If the \meta{object} starts with |"| and is of the form + |"|\meta{literals}|"|, the object of the statement is not a curie (not a normal ``resource'') but the string of \meta{literals} given. \item If the \meta{object} is the text ``|scope content|'', the object of the statement is actually the whole contents of the scope to which this statement is attached. - \item The two previous cases can be combined in the form of an - object of the form |"|\meta{literals}|" and scope content|. In - this case, the contents of the scope is ``normally'' the + \item Finally if the \meta{object} is of the form + |"|\meta{literals}|" and scope content|, the contents of the + scope is ``normally'' the object, but this gets ``overruled'' by the \meta{literals}. Formally, this means that the object is the \meta{literals}, but the intended semantics is that the object is the scope diff --git a/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex b/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex index 03d697b98..dd80accf0 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex @@ -922,10 +922,14 @@ \subsection{Transparency System Commands} transformation should not apply to the following graphics, however. \end{command} +\pagebreak[2] \begin{command}{\pgfsys@clipfading} This command has a default implementation and need not be implemented by driver files other than |pgfsys-dvips.def|. The macro is called - in |\pgfsetfadingforcurrentpath| and |\pgfsetfadingforcurrentpathstroked| + in + \begin{quote} + |\pgfsetfadingforcurrentpath| and |\pgfsetfadingforcurrentpathstroked| + \end{quote} of the basic layer, where it invokes the current path for clipping the shading just before installing it as an opacity mask for fading. The default implementation is actually a non-operation, but with |dvips| it diff --git a/doc/generic/pgf/pgfmanual-en-tikz-transparency.tex b/doc/generic/pgf/pgfmanual-en-tikz-transparency.tex index 1e2a20aba..54cd7839f 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-transparency.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-transparency.tex @@ -455,9 +455,9 @@ \subsubsection{Creating Fadings} % \begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzfadingfrompicture}[name=tikz] - \node [text=transparent!20] - {\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries\selectfont - Ti\emph{k}Z}; + \node [text=transparent!20, + font=\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries] + {Ti\emph{k}Z}; \end{tikzfadingfrompicture} % Now we use the fading in another picture: @@ -856,8 +856,9 @@ \subsection{Transparency Groups} \shade [left color=red,right color=blue] (-2,-1) rectangle (2,1); \begin{scope}[transparency group=knockout] \fill [white] (-1.9,-.9) rectangle (1.9,.9); - \node [opacity=0,font=\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries] - {Ti\emph{k}Z}; + \node [opacity=0, + font=\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries] + {Ti\emph{k}Z}; \end{scope} \end{tikzpicture} \end{codeexample} From 31004541b73b194110de3df6d521295014b130dd Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 05:32:34 +0800 Subject: [PATCH 46/57] build(fix): respect directory structure when copying `docfiles` Signed-off-by: Yukai Chou --- build.lua | 8 +------- doc/generic/pgf/CHANGELOG.md | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/build.lua b/build.lua index 8ce39d221..e54dbc4a5 100644 --- a/build.lua +++ b/build.lua @@ -12,19 +12,13 @@ docfiledir = "./doc/generic/pgf" docfiles = { "RELEASE_NOTES.md", "description.html", -- Part of the release script - "color.cfg", "pgfmanual.cfg", "images/*.jpg", "*.tex" -- Build the PDF + "color.cfg", "pgfmanual.cfg", "images", "plots", "*.tex" -- Build the manual } tdsroot = "generic" typesetfiles = {"pgfmanual.tex"} typesetexe = "lualatex" flatten = false --- To allow writing -function docinit_hook() - mkdir(typesetdir .. "/plots") - return 0 -end - -- Set up to allow testing dvips, etc. specialformats = specialformats or {} specialformats["latex"] = specialformats["latex"] or diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index b068edb9b..f2f9b93ee 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Typo in animations `end on` key #1273 - Output bounding box adjustment in pgfsys-dvisvgm.def #1275 - Fix shadings under LuaMetaTeX +- Resolve missing `gnuplot` plots in manual #1238 ### Changed @@ -31,7 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Matthias Hetzenberger - Qrrbrbirlbel - quark67 -- Yukai Chou (muzimuzhi) +- Yukai Chou (@muzimuzhi) - Alexander Grahn ## [3.1.10] - 2023-01-13 Henri Menke From 5c26f952a4137015bfeb2441afc16756f28f74f2 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 06:54:11 +0800 Subject: [PATCH 47/57] refactor(doc): adapt `\graphicspath` for flattened doc tree Signed-off-by: Yukai Chou --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-en-main-preamble.tex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index f2f9b93ee..520cebee4 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Simplify short verb `|...|` or add required preamble for it - Harden parser for math expressions against active chars - Resolve overfull hboxes >=20pt in the manual +- Adapt `\graphicspath` setting for flattened doc tree #1191 ### Contributors diff --git a/doc/generic/pgf/pgfmanual-en-main-preamble.tex b/doc/generic/pgf/pgfmanual-en-main-preamble.tex index f500f11f4..b5f5b11b1 100644 --- a/doc/generic/pgf/pgfmanual-en-main-preamble.tex +++ b/doc/generic/pgf/pgfmanual-en-main-preamble.tex @@ -176,7 +176,7 @@ % require texlive 2021 or above \tracinglostchars=3 -\graphicspath{{../../images/}} +\graphicspath{{images/}} \input{pgfmanual-en-macros} \usepackage{todonotes} From 292fa1d1c28eafa4cc2f99b605d58ed65a44f845 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 07:10:32 +0800 Subject: [PATCH 48/57] refactor: promote warning "Plot data file `...' not found" to error Signed-off-by: Yukai Chou --- doc/generic/pgf/CHANGELOG.md | 1 + tex/generic/pgf/modules/pgfmoduleplot.code.tex | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 520cebee4..4ee4c2de0 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Harden parser for math expressions against active chars - Resolve overfull hboxes >=20pt in the manual - Adapt `\graphicspath` setting for flattened doc tree #1191 +- Promote warning "Plot data file \`...' not found" to error ### Contributors diff --git a/tex/generic/pgf/modules/pgfmoduleplot.code.tex b/tex/generic/pgf/modules/pgfmoduleplot.code.tex index 0afea0ae3..5135d4eec 100644 --- a/tex/generic/pgf/modules/pgfmoduleplot.code.tex +++ b/tex/generic/pgf/modules/pgfmoduleplot.code.tex @@ -332,7 +332,7 @@ \pgfplotstreamstart% \openin\r@pgf@reada=#1 \ifeof\r@pgf@reada - \pgfwarning{Plot data file `#1' not found.} + \pgferror{Plot data file `#1' not found.} \else \catcode`\#=14 \catcode`\^^M=5 @@ -400,7 +400,7 @@ \pgfplotstreamstart% \openin\r@pgf@reada=#1 \ifeof\r@pgf@reada - \pgfwarning{Plot data file `#1' not found.} + \pgferror{Plot data file `#1' not found.} \else \catcode`\#=14 \catcode`\^^M=5 From bb712ea946aa3584cbaf835f6f9f16d766c63180 Mon Sep 17 00:00:00 2001 From: Andrew Stacey Date: Mon, 8 Jan 2024 21:46:11 +0000 Subject: [PATCH 49/57] Fix for nodes in foreach In the code: ``` \draw (A) foreach \nd in {B,C} { -- (\nd) }; ``` then the line to `C` is drawn from `A`, not `B`. This is because the foreach loop does not update the macro that remembers that the last coordinate was a node. This fixes that issue. See https://github.com/pgf-tikz/pgf/issues/1303 Signed-off-by: Andrew Stacey --- tex/generic/pgf/frontendlayer/tikz/tikz.code.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index d9b1743b9..1415fdd3c 100644 --- a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2582,6 +2582,7 @@ \def\tikz@foreach{% \def\pgffor@beginhook{% + \global\let\tikz@moveto@waiting\tikz@foreach@moveto@waiting% \tikz@lastx=\tikz@foreach@save@lastx% \tikz@lasty=\tikz@foreach@save@lasty% \tikz@lastxsaved=\tikz@foreach@save@lastxsaved% @@ -2590,6 +2591,7 @@ \setbox\tikz@figbox@bg=\box\tikz@tempbox@bg% \expandafter\tikz@scan@next@command\pgfutil@firstofone}% \def\pgffor@endhook{\pgfextra{% + \global\let\tikz@foreach@moveto@waiting\tikz@moveto@waiting% \xdef\tikz@foreach@save@lastx{\the\tikz@lastx}% \xdef\tikz@foreach@save@lasty{\the\tikz@lasty}% \xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}% @@ -2598,6 +2600,7 @@ \global\setbox\tikz@tempbox@bg=\box\tikz@figbox@bg% \pgfutil@gobble}}% \def\pgffor@afterhook{% + \let\tikz@moveto@waiting\tikz@foreach@moveto@waiting% \tikz@lastx=\tikz@foreach@save@lastx% \tikz@lasty=\tikz@foreach@save@lasty% \tikz@lastxsaved=\tikz@foreach@save@lastxsaved% @@ -2614,6 +2617,7 @@ \xdef\tikz@foreach@save@lasty{\the\tikz@lasty}% \xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}% \xdef\tikz@foreach@save@lastysaved{\the\tikz@lastysaved}% + \global\let\tikz@foreach@moveto@waiting\tikz@moveto@waiting% \foreach}% From eff182fb91b38fba09e4b9327b53f38eeba3c288 Mon Sep 17 00:00:00 2001 From: Andrew Stacey Date: Mon, 8 Jan 2024 21:54:00 +0000 Subject: [PATCH 50/57] Changelog for foreach fix Signed-off-by: Andrew Stacey --- doc/generic/pgf/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 4ee4c2de0..50b1b6a37 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed +- Foreach in path remembers nodes between iterates #1303 - Typo in animations `end on` key #1273 - Output bounding box adjustment in pgfsys-dvisvgm.def #1275 - Fix shadings under LuaMetaTeX From bf8d893c2c2b4a8395a8d61e0299c013decdd2b5 Mon Sep 17 00:00:00 2001 From: Andrew Stacey Date: Tue, 9 Jan 2024 21:41:20 +0000 Subject: [PATCH 51/57] More robust fix for foreach This adds in the saving code for `\tikztostart` and `\tikz@tangent`, plus provides a more robust and maintainable method of saving the various macros and dimensions by creating a single (global) token list that will restore them to their given values upon invocation. Signed-off-by: Andrew Stacey --- .../pgf/frontendlayer/tikz/tikz.code.tex | 72 +++++++++++++------ 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index 1415fdd3c..31202cddb 100644 --- a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2580,31 +2580,64 @@ \def\tikz@fchar oreach{\tikz@foreach}% -\def\tikz@foreach{% +\def\tikzforeach@smugglers@cove{} +\let\tikztostart=\relax + +\def\tikzforeach@smuggle@macro#1{% + \pgfutil@ifx#1\relax{}{% + \expandafter + \pgfutil@g@addto@macro + \expandafter + \tikzforeach@smugglers@cove + \expandafter + {% + \expandafter\def\expandafter#1\expandafter{#1}% + }% + }% +} + +\def\tikzforeach@smuggle@dimen#1{% + \pgfutil@ifx#1\relax{}{% + \expandafter + \pgfutil@g@addto@macro + \expandafter + \tikzforeach@smugglers@cove + \expandafter + {% + \expandafter#1\expandafter=\the#1\relax% + }% + }% +} + +\def\tikzforeach@smugglers@loot{% + % + \tikzforeach@smuggle@macro\tikz@moveto@waiting% + \tikzforeach@smuggle@macro\tikztostart% + \tikzforeach@smuggle@macro\tikz@tangent% + % + \tikzforeach@smuggle@dimen\tikz@lastx% + \tikzforeach@smuggle@dimen\tikz@lasty% + \tikzforeach@smuggle@dimen\tikz@lastxsaved% + \tikzforeach@smuggle@dimen\tikz@lastysaved% + % +} + + +\def\tikz@patched@foreach{% \def\pgffor@beginhook{% - \global\let\tikz@moveto@waiting\tikz@foreach@moveto@waiting% - \tikz@lastx=\tikz@foreach@save@lastx% - \tikz@lasty=\tikz@foreach@save@lasty% - \tikz@lastxsaved=\tikz@foreach@save@lastxsaved% - \tikz@lastysaved=\tikz@foreach@save@lastysaved% + \tikzforeach@smugglers@cove% + \gdef\tikzforeach@smugglers@cove{}% \setbox\tikz@figbox=\box\tikz@tempbox% \setbox\tikz@figbox@bg=\box\tikz@tempbox@bg% \expandafter\tikz@scan@next@command\pgfutil@firstofone}% \def\pgffor@endhook{\pgfextra{% - \global\let\tikz@foreach@moveto@waiting\tikz@moveto@waiting% - \xdef\tikz@foreach@save@lastx{\the\tikz@lastx}% - \xdef\tikz@foreach@save@lasty{\the\tikz@lasty}% - \xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}% - \xdef\tikz@foreach@save@lastysaved{\the\tikz@lastysaved}% + \tikzforeach@smugglers@loot% \global\setbox\tikz@tempbox=\box\tikz@figbox% \global\setbox\tikz@tempbox@bg=\box\tikz@figbox@bg% \pgfutil@gobble}}% \def\pgffor@afterhook{% - \let\tikz@moveto@waiting\tikz@foreach@moveto@waiting% - \tikz@lastx=\tikz@foreach@save@lastx% - \tikz@lasty=\tikz@foreach@save@lasty% - \tikz@lastxsaved=\tikz@foreach@save@lastxsaved% - \tikz@lastysaved=\tikz@foreach@save@lastysaved% + \tikzforeach@smugglers@cove + \gdef\tikzforeach@smugglers@cove{}% \let\pgffor@beginhook\relax% \let\pgffor@endhook\relax% \let\pgffor@afterhook\relax% @@ -2613,14 +2646,9 @@ \tikz@scan@next@command}% \global\setbox\tikz@tempbox=\box\tikz@figbox% \global\setbox\tikz@tempbox@bg=\box\tikz@figbox@bg% - \xdef\tikz@foreach@save@lastx{\the\tikz@lastx}% - \xdef\tikz@foreach@save@lasty{\the\tikz@lasty}% - \xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}% - \xdef\tikz@foreach@save@lastysaved{\the\tikz@lastysaved}% - \global\let\tikz@foreach@moveto@waiting\tikz@moveto@waiting% + \tikzforeach@smugglers@loot% \foreach}% - % Syntax for againpath: % \againpath \somepathname From 3d03d026460d1b3516122efb8798d9221d1ac5c9 Mon Sep 17 00:00:00 2001 From: Rocky Zhang Date: Wed, 10 Jan 2024 21:43:07 +0800 Subject: [PATCH 52/57] docs: \makeatletter and \makeatother should match (#1305) Co-authored-by: Rocky Zhang --- doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex index 0128ec2af..243c1bf73 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex @@ -663,6 +663,7 @@ \subsubsection{Defining New Coordinate Systems} \define@key{cylindricalkeys}{angle}{\def\myangle{#1}} \define@key{cylindricalkeys}{radius}{\def\myradius{#1}} \define@key{cylindricalkeys}{z}{\def\myz{#1}} +\makeatother \tikzdeclarecoordinatesystem{cylindrical}% {% \setkeys{cylindricalkeys}{#1}% From 61ba8435b95364448e1cc3782499a61f87e6f47d Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Wed, 10 Jan 2024 21:47:10 +0800 Subject: [PATCH 53/57] chore(docs): add new contributor Signed-off-by: Yukai Chou --- doc/generic/pgf/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 50b1b6a37..486a509cd 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -35,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Matthias Hetzenberger - Qrrbrbirlbel - quark67 +- Rocky Zhang (@rockyzhz) - Yukai Chou (@muzimuzhi) - Alexander Grahn From f35286da365f1a732ebdeeb3ab5d52cba02d73c8 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Mon, 15 Jan 2024 02:52:25 +0800 Subject: [PATCH 54/57] build: drop deprecated l3build target `revisionfile` The functionality of customized l3build target (`target_list` entry) `revisionfile` has been replaced with `l3build tag` in 9efb7e40 (refactor(ci)!: use l3build tagfiles, 2021-12-15), and the definition of `revisionfile()` has been removed in the same commit. Signed-off-by: Yukai Chou --- build.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build.lua b/build.lua index e54dbc4a5..570f7df5b 100644 --- a/build.lua +++ b/build.lua @@ -80,9 +80,3 @@ function tag_hook(tagname, tagdate) return 0 end -target_list = target_list or { } -target_list.revisionfile = - { - desc = "Create revision data file", - func = revisionfile - } From c46ed901355fc24a15756368e88170e9e1956dcd Mon Sep 17 00:00:00 2001 From: "Alan D. Salewski" Date: Tue, 5 Mar 2024 22:03:57 -0500 Subject: [PATCH 55/57] docs: fix typo in intro: "questions" => "question" (#1309) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix in context -- "question" should be singular: I wish to start with the question “What is TikZ?” Signed-off-by: Alan D. Salewski --- doc/generic/pgf/pgfmanual-en-introduction.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-introduction.tex b/doc/generic/pgf/pgfmanual-en-introduction.tex index 36670f485..afe6c808d 100644 --- a/doc/generic/pgf/pgfmanual-en-introduction.tex +++ b/doc/generic/pgf/pgfmanual-en-introduction.tex @@ -19,7 +19,7 @@ \section{Introduction} will teach you almost all you should know about \tikzname\ without your having to read the rest. -I wish to start with the questions ``What is \tikzname?'' Basically, it just +I wish to start with the question ``What is \tikzname?'' Basically, it just defines a number of \TeX\ commands that draw graphics. For example, the code |\tikz \draw (0pt,0pt) -- (20pt,6pt);| yields the line \tikz \draw (0pt,0pt) -- (20pt,6pt); and the code |\tikz \fill[orange] (1ex,1ex) circle (1ex);| yields From 7eb346a0a41eab0c2773b765bf5522029767a734 Mon Sep 17 00:00:00 2001 From: "Alan D. Salewski" Date: Fri, 8 Mar 2024 01:22:33 -0500 Subject: [PATCH 56/57] docs: fix typo in pgfmanual: "which where" => "which were" (#1310) Fix in context (in section "Repeating Things: The Foreach Statement"): Normally, when a list item '...' is encountered, there should already have been /two/ list items before it, which were numbers. Signed-off-by: Alan D. Salewski --- doc/generic/pgf/pgfmanual-en-pgffor.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-pgffor.tex b/doc/generic/pgf/pgfmanual-en-pgffor.tex index 94a41fbfe..f76f6fe64 100644 --- a/doc/generic/pgf/pgfmanual-en-pgffor.tex +++ b/doc/generic/pgf/pgfmanual-en-pgffor.tex @@ -100,7 +100,7 @@ \section{Repeating Things: The Foreach Statement} ``missing values''. More precisely, the following happens: Normally, when a list item |...| is encountered, there should already have - been \emph{two} list items before it, which where numbers. Examples of + been \emph{two} list items before it, which were numbers. Examples of \emph{numbers} are |1|, |-10|, or |-0.24|. Let us call these numbers $x$ and $y$ and let $d := y-x$ be their difference. Next, there should also be one number following the three dots, let us call this number~$z$. From 5fb6ca9802c998f222cb323996a2ae6ef6aa51be Mon Sep 17 00:00:00 2001 From: Andrew Stacey Date: Tue, 2 Apr 2024 18:06:36 +0100 Subject: [PATCH 57/57] Keys for remembering macros/dimensions in foreach interations The keys are `remember macro` and `remember dimension`. Also `\tikz@foreach` was erroneously called `\tikz@patched@foreach` (copied from my original testing file). Signed-off-by: Andrew Stacey --- tex/generic/pgf/frontendlayer/tikz/tikz.code.tex | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index 31202cddb..f50463f0e 100644 --- a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2580,6 +2580,11 @@ \def\tikz@fchar oreach{\tikz@foreach}% + + % + % These are to allow \foreach to remember macros and dimensions between iterations + % + \def\tikzforeach@smugglers@cove{} \let\tikztostart=\relax @@ -2622,8 +2627,16 @@ % } + \tikzset{ + remember macro/.code={ + \tikzforeach@smuggle@macro#1 + }, + remember dimension/.code={ + \tikzforeach@smuggle@dimen#1 + } + } -\def\tikz@patched@foreach{% +\def\tikz@foreach{% \def\pgffor@beginhook{% \tikzforeach@smugglers@cove% \gdef\tikzforeach@smugglers@cove{}%