From f15c721a5a3e2e018be2e61e3c53ff6412fd20e6 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 01/40] 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 93d5b9faf..80f379d41 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -83,6 +83,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 53b1ddb11b632a1b73e883bd9954ca56df5950e4 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:11:45 +0000 Subject: [PATCH 02/40] 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 9b09656e0346ed7c827ab818fc62ddb8592a52b1 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:19:01 +0000 Subject: [PATCH 03/40] 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 a97c182df..46807bd2c 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -97,6 +97,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 5c29d69d0e0642df744767032cf9bdac1f6be710 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 30 Nov 2022 06:23:34 +0000 Subject: [PATCH 04/40] 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 34e9255ea7289229b979324c9195d4992340bc3a Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Wed, 26 Jul 2023 23:25:54 +0800 Subject: [PATCH 05/40] 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 4e28977fe2383979e3d83383820b6253f8286198 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Wed, 26 Jul 2023 23:26:50 +0800 Subject: [PATCH 06/40] 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 8221548be..9f02ca2c1 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -9,6 +9,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 e4ef1d35e12e8056043d4fcd7bf2ea0ad1a801c3 Mon Sep 17 00:00:00 2001 From: Alexander Grahn Date: Tue, 12 Sep 2023 15:05:46 +0200 Subject: [PATCH 07/40] 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 60a017a21843a39b5380d301b29a3bc654154a8d Mon Sep 17 00:00:00 2001 From: agrahn Date: Wed, 20 Sep 2023 17:09:53 +0200 Subject: [PATCH 08/40] 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 52ecf8c9796dad87ee9ad261da67119ae0f4e127 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Sat, 23 Sep 2023 00:18:49 +0800 Subject: [PATCH 09/40] 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 da294b5298fab2ce7596d185dd15f97113550762 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 23 Oct 2023 17:55:47 +0800 Subject: [PATCH 10/40] 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 e141b101280ebd896add8625d8af5fe26cb55723 Mon Sep 17 00:00:00 2001 From: muzimuzhi Date: Mon, 23 Oct 2023 17:56:58 +0800 Subject: [PATCH 11/40] 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 a63708935f5c2c465b077dcbeb629e0d03cc4c26 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 12/40] 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 06708d8092cc354cc31965b49ecf94960be76751 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 13/40] 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 cb11f3c4dd993bcf0c0fb0feb7f6bee411306a8f Mon Sep 17 00:00:00 2001 From: Toni Dietze Date: Wed, 13 Dec 2023 11:12:11 +0100 Subject: [PATCH 14/40] 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 c23529e16f97dfd39caacfdb58ee65800bd08c83 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 15/40] 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 eac0ce633c256773d28cc663e1a3c63a46d50a9d Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 22 Dec 2023 04:53:50 +0800 Subject: [PATCH 16/40] 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 ca303609e828dd2824b9e2b9dbfcc9241b546988 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 22 Dec 2023 06:43:00 +0800 Subject: [PATCH 17/40] 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 25d4aa3d167306bf94f5cbaf8a4b38b7e277b054 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Fri, 21 Oct 2022 07:01:56 +0800 Subject: [PATCH 18/40] 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 14ef7f3494766f3df4c9b177bec1e5695ec980f5 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sat, 16 Jan 2021 07:44:06 +0800 Subject: [PATCH 19/40] 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 351626dda57de09631e4c37318c1db64ac2faec0 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 05:32:34 +0800 Subject: [PATCH 20/40] 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 67609352a389241489b45f5bba024bca1682375c Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 06:54:11 +0800 Subject: [PATCH 21/40] 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 4da661cc8123118f439c2d40e1807c7f8e5e7696 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Sun, 12 Feb 2023 07:10:32 +0800 Subject: [PATCH 22/40] 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 83ac9b17a3690cc8453b3bdb70fd9c758f51da71 Mon Sep 17 00:00:00 2001 From: Rocky Zhang Date: Wed, 10 Jan 2024 21:43:07 +0800 Subject: [PATCH 23/40] 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 dd0e2538b43bfb983c59731b71245ec11f839af9 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Wed, 10 Jan 2024 21:47:10 +0800 Subject: [PATCH 24/40] 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 4ee4c2de0..d27a1ab42 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -34,6 +34,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 ed5d70b658391c69321849d1f5bafbb6d0f78acd Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Mon, 15 Jan 2024 02:52:25 +0800 Subject: [PATCH 25/40] 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 94d99a16360eafc87d084529a89d3397c3eec324 Mon Sep 17 00:00:00 2001 From: "Alan D. Salewski" Date: Tue, 5 Mar 2024 22:03:57 -0500 Subject: [PATCH 26/40] 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 3007c426586a4c160ab3d668e4803f702f12e33b Mon Sep 17 00:00:00 2001 From: "Alan D. Salewski" Date: Fri, 8 Mar 2024 01:22:33 -0500 Subject: [PATCH 27/40] 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 73c697c4bcf96abeafeb7a57008f118b2c6da063 Mon Sep 17 00:00:00 2001 From: Max Chernoff <49086429+gucci-on-fleek@users.noreply.github.com> Date: Sun, 6 Feb 2022 15:41:03 -0700 Subject: [PATCH 28/40] Support `RGB` and `gray` color models in ConTeXt The `RGB` support was copied from the the Plain TeX definitions, `tex/generic/pgf/utilities/pgfutil-plain.def:29-37`, which is from #772. The `gray` color model now maps to the grayscale and not to `rgb`. Signed-off-by: Max Chernoff <49086429+gucci-on-fleek@users.noreply.github.com> --- doc/generic/pgf/CHANGELOG.md | 3 +++ tex/generic/pgf/utilities/pgfutil-context.def | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index d27a1ab42..bd8a8ab28 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added +- Add `RGB` and `gray` color model support for ConTeXt #1130 + ### Fixed - Typo in animations `end on` key #1273 @@ -37,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Rocky Zhang (@rockyzhz) - Yukai Chou (@muzimuzhi) - Alexander Grahn +- Max Chernoff ## [3.1.10] - 2023-01-13 Henri Menke diff --git a/tex/generic/pgf/utilities/pgfutil-context.def b/tex/generic/pgf/utilities/pgfutil-context.def index eddab09ab..66edb0980 100644 --- a/tex/generic/pgf/utilities/pgfutil-context.def +++ b/tex/generic/pgf/utilities/pgfutil-context.def @@ -26,8 +26,17 @@ \def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil} \def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}} -\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}} +\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{gray}{#2}}} \def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{cmyk}{#2,#3,#4,#5}}} +\def\pgfutil@emu@RGB#1#2,#3,#4\@nil{% + \begingroup + \pgfmathdivide@{#2}{255}\let\pgfutil@emu@RGB@r\pgfmathresult + \pgfmathdivide@{#3}{255}\let\pgfutil@emu@RGB@g\pgfmathresult + \pgfmathdivide@{#4}{255}\let\pgfutil@emu@RGB@b\pgfmathresult + \edef\pgf@marshal{\def\expandafter\noexpand\csname\string\color@#1\endcsname{% + \noexpand\xcolor@{}{}{rgb}{\pgfutil@emu@RGB@r,\pgfutil@emu@RGB@g,\pgfutil@emu@RGB@b}}}% + \expandafter\endgroup\pgf@marshal +} % no need for x colors (users can load it if needed) From 12f17834c849a659b8829bbc9122bc459f585917 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Mon, 29 Apr 2024 06:40:43 +0800 Subject: [PATCH 29/40] docs: typo (fixes #1325) Add curly braces around initial value of a key that contains an equal sign "=". Signed-off-by: Yukai Chou --- doc/generic/pgf/pgfmanual-en-library-calendar.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/generic/pgf/pgfmanual-en-library-calendar.tex b/doc/generic/pgf/pgfmanual-en-library-calendar.tex index 971da06bd..66a2a49c8 100644 --- a/doc/generic/pgf/pgfmanual-en-library-calendar.tex +++ b/doc/generic/pgf/pgfmanual-en-library-calendar.tex @@ -261,7 +261,7 @@ \subsection{Calendar Command} \end{codeexample} \end{key} - \begin{key}{/tikz/every day (initially anchor=base east)} + \begin{key}{/tikz/every day (initially {anchor=base east})} This style is executed by the default node code for each day. The |every day| style is useful for changing the way days look. For example, let us make all days red: From b70099515710a01c3929503777606f277f5a694b Mon Sep 17 00:00:00 2001 From: mbertucci47 <61854785+mbertucci47@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:27:08 -0600 Subject: [PATCH 30/40] fix small typos --- .../pgf/pgfmanual-en-dv-visualizers.tex | 2 +- .../pgf/pgfmanual-en-gd-algorithms-in-c.tex | 2 +- .../pgf/pgfmanual-en-pgfsys-commands.tex | 4 ++-- .../pgf/gd/examples/c/SimpleDemoC.c | 2 +- .../pgf/gd/interface/c/InterfaceFromC.c | 2 +- .../pgf/gd/interface/c/InterfaceFromC.h | 18 +++++++++--------- .../external/tikzexternaltest.code.tex | 2 +- .../tikz/libraries/tikzexternalshared.code.tex | 2 +- .../libraries/tikzlibraryanimations.code.tex | 2 +- .../tikzlibraryintersections.code.tex | 2 +- .../lua/pgf/gd/force/ControlCoarsening.lua | 2 +- .../graphdrawing/lua/pgf/gd/force/library.lua | 2 +- .../lua/pgf/gd/model/Path_arced.lua | 2 +- .../pgf/gd/trees/SpanningTreeComputation.lua | 2 +- .../tex/pgflibrarygraphdrawing.code.tex | 4 ++-- .../pgfmoduledatavisualization.code.tex | 2 +- tex/generic/pgf/systemlayer/pgfsys-tex4ht.def | 8 ++++---- tex/generic/pgf/systemlayer/pgfsys.code.tex | 8 ++++---- .../pgf/systemlayer/pgfsysanimations.code.tex | 2 +- .../utilities/pgfkeyslibraryfiltered.code.tex | 4 ++-- tex/generic/pgf/utilities/pgfutil-common.tex | 2 +- 21 files changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-dv-visualizers.tex b/doc/generic/pgf/pgfmanual-en-dv-visualizers.tex index f1e5c06ed..2fcd5a811 100644 --- a/doc/generic/pgf/pgfmanual-en-dv-visualizers.tex +++ b/doc/generic/pgf/pgfmanual-en-dv-visualizers.tex @@ -740,7 +740,7 @@ \subsection{Advanced: Creating New Visualizers} Now, let's see how this works: % TODOsp: codeexamples: This stuff is all needed for the next `codeexample` -% but cannot be stored (simply) in `setup code`, `preample` or `pre` +% but cannot be stored (simply) in `setup code`, `preamble` or `pre` \pgfooclass{circle visualizer} { % Stores the name of the visualizer. This is needed for filtering % and configuration diff --git a/doc/generic/pgf/pgfmanual-en-gd-algorithms-in-c.tex b/doc/generic/pgf/pgfmanual-en-gd-algorithms-in-c.tex index 305752fc4..bfc2dc5cb 100644 --- a/doc/generic/pgf/pgfmanual-en-gd-algorithms-in-c.tex +++ b/doc/generic/pgf/pgfmanual-en-gd-algorithms-in-c.tex @@ -755,7 +755,7 @@ \subsubsection{The Hello World of Graph Drawing in OGDF -- Adapting Existing Cla // File HelloWorldLayout.h #include -class HelloWorldLayout : puplic ogdf::LayoutModule { +class HelloWorldLayout : public ogdf::LayoutModule { public: virtual void call(ogdf::GraphAttributes &GA) diff --git a/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex b/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex index dd80accf0..06e412f02 100644 --- a/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex +++ b/doc/generic/pgf/pgfmanual-en-pgfsys-commands.tex @@ -460,7 +460,7 @@ \subsection{Graphic State Option System Commands} \end{command} \begin{command}{\pgfsys@setdash\marg{pattern}\marg{phase}} - Sets the dashing patter. \meta{pattern} should be a list of \TeX\ + Sets the dashing pattern. \meta{pattern} should be a list of \TeX\ dimensions separated by commas. \meta{phase} should be a single dimension. \example |\pgfsys@setdash{3pt,3pt}{0pt}| @@ -645,7 +645,7 @@ \subsection{Pattern System Commands} This command declares a new colored or uncolored pattern, depending on whether \meta{flag} is |0|, which means uncolored, or |1|, which means colored. Uncolored patterns have no inherent color, the color is provided - when they are set. Colored patters have an inherent color. + when they are set. Colored patterns have an inherent color. The \meta{name} is a name for later use when the pattern is to be shown. The pairs $(x_1,y_1)$ and $(x_2,y_2)$ must describe a bounding box of the diff --git a/source/generic/pgf/c/graphdrawing/pgf/gd/examples/c/SimpleDemoC.c b/source/generic/pgf/c/graphdrawing/pgf/gd/examples/c/SimpleDemoC.c index 18e5889ad..5a0468b76 100644 --- a/source/generic/pgf/c/graphdrawing/pgf/gd/examples/c/SimpleDemoC.c +++ b/source/generic/pgf/c/graphdrawing/pgf/gd/examples/c/SimpleDemoC.c @@ -25,7 +25,7 @@ int luaopen_pgf_gd_examples_c_SimpleDemoC (struct lua_State *state) { the nodes of a graph in a circle (without paying heed to the sizes of the \ nodes or to the edges). Its main purpose is to show how C code \ can access the Lua representation of graphs. See \ - Section~\ref{section-algorithms-in-c} of the manual for detais."); + Section~\ref{section-algorithms-in-c} of the manual for details."); pgfgd_key_add_precondition (d, "connected"); pgfgd_declare (state, d); pgfgd_free_key (d); 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 40c9dca84..6f501f54e 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 @@ -849,7 +849,7 @@ pgfgd_Edge_array* pgfgd_digraph_syntactic_edges (pgfgd_Digraph* g, int tail, in { pgfgd_Edge_array* edges = (pgfgd_Edge_array*) calloc(1, sizeof(pgfgd_Edge_array)); - // First, get the arc in the syntatic digraph. + // First, get the arc in the syntactic digraph. lua_State* L = g->state; int tos = lua_gettop(L); diff --git a/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.h b/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.h index 40495dbdc..e529f33c5 100644 --- a/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.h +++ b/source/generic/pgf/c/graphdrawing/pgf/gd/interface/c/InterfaceFromC.h @@ -164,13 +164,13 @@ typedef struct pgfgd_Vertex { /** The pos field of the Lua Vertex class. Unlike the other fields of this struct, you can write pos.x and pos.y. When the graph - drawing function returns, the values stored in theses fields + drawing function returns, the values stored in these fields will be written back to the Lua layer. */ pgfgd_Coordinate pos; /** The options fields of the Lua Vertex class. Note that you do - not have direct access to theses options. Rather, all access to + not have direct access to these options. Rather, all access to them must go through functions like pgfgd_isset that take a pgfgd_OptionsTable* as input. Also note that you cannot store a pointer to an options table: At the end of the graph drawing @@ -297,7 +297,7 @@ typedef struct pgfgd_SyntacticDigraph { pgfgd_Vertex_array vertices; /** All syntactic edges of the graph. You cannot modify this array, - but you can use the pgfgd_path_xxx funtion to change the routing + but you can use the pgfgd_path_xxx function to change the routing of the edges stored here. Note that, since you get access to syntactic edges, the direction of these edges may not be what you expect and there may be several syntactic edges between the @@ -382,7 +382,7 @@ typedef struct pgfgd_Digraph pgfgd_Digraph; pgfgd_Vertex objects. The reason is that a pgfgd_Digraph may actually contain vertices that are not present in the syntactic digraph (for instance, dummy vertices in a spanning tree) and for - which no pgfgd_Vertex obejct exists. For this reason, we only use + which no pgfgd_Vertex object exists. For this reason, we only use indices and there is a special function (pgfgd_digraph_syntactic_vertex) that can be used to retrieve the pgfgd_Vertex object, provided it exists. @@ -421,7 +421,7 @@ typedef struct pgfgd_Arc_array { store a |Digraph| object. Examples are "digraph" or "ugraph". The function will then return a handle to this digraph which you can subsequently access. The handle will become invalid at the end of - the graph drawing funciton and you must free it explicitly using + the graph drawing function and you must free it explicitly using pgfgd_digraph_free. */ extern pgfgd_Digraph* pgfgd_get_digraph (pgfgd_SyntacticDigraph* g, const char* graph_name); @@ -438,13 +438,13 @@ extern int pgfgd_digraph_num_vertices (pgfgd_Digraph* g); */ extern pgfgd_Arc_array* pgfgd_digraph_arcs (pgfgd_Digraph* g); -/** This function allows you to retrieve the syntatic vertex that +/** This function allows you to retrieve the syntactic vertex that corresponds to a given index in the digraph. Normally, the first vertex of a digraph like the ugraph will also be the first entry of the vertices field of the syntactic digraph, but this need not always be the case. For instance, for a spanning_tree digraph, there will be more vertices in the graph than there are syntactic - vertices and the order may be quite different. For theses reaons, + vertices and the order may be quite different. For these reasons, you must use this function to convert a vertex index into the digraph g into a pgfgd_Vertex object. It may happen that the index does not refer to any syntactic vertex, in this case 0 is @@ -466,7 +466,7 @@ extern int pgfgd_digraph_isarc (pgfgd_Digraph* g, int t returned array explicitly using pgfgd_digraph_free_edge_array. Typically, this array will have at most one entry, but it may happen that the user has specified - several syntatic edges between the same vertices, in which case + several syntactic edges between the same vertices, in which case you get a larger array here. Note that tail and head are indices (starting with 1) into the @@ -568,7 +568,7 @@ extern void pgfgd_key_phase (pgfgd_Declaration* d, const char* s); some point, it would call the actual Lua graph drawing algorithm. At that point, the function f is called instead. The parameter of this function will be a representation of the - to-be-drawn syntatic digraph as a C pgfgd_SyntacticDigraph. + to-be-drawn syntactic digraph as a C pgfgd_SyntacticDigraph. */ extern void pgfgd_key_algorithm (pgfgd_Declaration* d, pgfgd_algorithm_fun f, diff --git a/source/generic/pgf/testsuite/external/tikzexternaltest.code.tex b/source/generic/pgf/testsuite/external/tikzexternaltest.code.tex index 153a07425..e796dba79 100644 --- a/source/generic/pgf/testsuite/external/tikzexternaltest.code.tex +++ b/source/generic/pgf/testsuite/external/tikzexternaltest.code.tex @@ -8,7 +8,7 @@ \begin{tikzpicture}[baseline] \draw (0,0) grid (4,4); \end{tikzpicture} -an explizit file name. +an explicit file name. \begin{tikzpicture} \node[draw,rounded corners] {A node with a ref (\ref{eq:1})}; diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex index 2ff5aa2d3..7db917980 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex @@ -310,7 +310,7 @@ }% }% -% Auto-select a suitable default value fo 'system call': +% Auto-select a suitable default value for 'system call': \pgfutil@ifundefined{tikzexternal@driver@\pgfsysdriver}{% % fallback. We do not know the driver here. \csname tikzexternal@driver@pgfsys-pdftex.def\endcsname diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex index 90b868771..7f8175d50 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex @@ -296,7 +296,7 @@ \def\tikz@anim@path@parse#1{% {% - \setbox0=\hbox{{% protext against side effects + \setbox0=\hbox{{% protect against side effects \pgfinterruptpath% \expandafter\tikz@scan@next@command#1\pgf@stop% \pgfsyssoftpath@getcurrentpath\tikz@anim@result% diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex index cf94f9236..013c1949b 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex @@ -53,7 +53,7 @@ \expandafter\pgfutil@g@addto@macro\expandafter\tikz@intersect@namedpaths\expandafter{\tikz@marshal}% }% -% at the end of evey \path command ... +% at the end of every \path command ... \let\tikz@finish@orig=\tikz@finish \def\tikz@finish{% \tikz@finish@orig% diff --git a/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua b/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua index d69d5fc6c..c5ce0f295 100644 --- a/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua +++ b/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua @@ -57,7 +57,7 @@ declare { expected to be higher than graphics where this feature is not applied. The following example demonstrates how coarsening can improve the - quality of graph drawings generated with Walshaw's algorihtm + quality of graph drawings generated with Walshaw's algorithm |spring electrical layout'|. "]], examples = [[" diff --git a/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua b/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua index acfda34ff..8d03f99c2 100644 --- a/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua +++ b/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua @@ -43,7 +43,7 @@ -- \item If the nodes are connected by an edge, one can treat the edge as -- a ``spring'' that has a ``natural spring dimension''. If the nodes -- are nearer than the spring dimension, they are push apart; if they --- are farther aways than the spring dimension, they are pulled together. +-- are farther away than the spring dimension, they are pulled together. -- \item If two nodes are connected by a path of a certain length, the -- nodes may ``wish to be at a distance proportional to the path -- length''. If they are nearer, they are pushed apart; if they are diff --git a/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua b/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua index 1875b8d1a..1401f1f9f 100644 --- a/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua +++ b/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua @@ -171,7 +171,7 @@ local function arc (path, start, start_angle, end_angle, radius, trans, centerx, end_angle = end_angle % 360 if end_angle >= start_angle then - -- In case the modulo has inadvertedly moved the end angle + -- In case the modulo has inadvertently moved the end angle -- before the start angle: end_angle = end_angle - 360 end diff --git a/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua b/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua index dacf63486..0fa3a52a1 100644 --- a/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua +++ b/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua @@ -436,7 +436,7 @@ declare { }, summary = [[" - Assings a uniform priority of 5 to all edges. + Assigns a uniform priority of 5 to all edges. "]] } diff --git a/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex b/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex index 63efd352f..4affb7dfe 100644 --- a/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex +++ b/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex @@ -540,7 +540,7 @@ % #2 = second node % #3 = edge direction % #4 = edge options (will be executed in a protected environment) -% #5 = aux stuff (curtesy for TikZ -- edge nodes) +% #5 = aux stuff (courtesy for TikZ -- edge nodes) % % Description: % @@ -604,7 +604,7 @@ % % % The text in #5 is some "auxiliary" text that is simply stored away -% and later directly to \pgfgdcallbackedge. This is a curtesy to TikZ, +% and later directly to \pgfgdcallbackedge. This is a courtesy to TikZ, % which can use it to store its node labels. % % Example: diff --git a/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex b/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex index 1c79ba748..9f922358b 100644 --- a/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex +++ b/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex @@ -2721,7 +2721,7 @@ % % % Compute the ideal number of entries per row/column (called - % "target" in the following) and entries per colum/row (called + % "target" in the following) and entries per column/row (called % "per target" in the following) % % if (number of entries > ideal) diff --git a/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def index 44dd1ae5b..29415d968 100644 --- a/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def +++ b/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def @@ -115,7 +115,7 @@ % okey padding:0; margin:0; - % background-color:\#12ff55; usefull for debugging positioning + % background-color:\#12ff55; useful for debugging positioning text-align:center; % good for centered text nodes...will have to improve that later on...with more integration with pgf options for text nodes } }% @@ -179,7 +179,7 @@ }% \pgfsys@invoke{\Hnewline% added that \Hnewline}% added that -%%%%%%%%%%%%%%% maybee I should add an option to change the css, for the whole picture +%%%%%%%%%%%%%%% maybe I should add an option to change the css, for the whole picture \pgfsys@invoke{ Date: Mon, 15 Jul 2024 01:35:31 +0200 Subject: [PATCH 31/40] docs: fix indentation in math example function (#1351) --- doc/generic/pgf/pgfmanual-en-library-math.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-library-math.tex b/doc/generic/pgf/pgfmanual-en-library-math.tex index 8fabb4998..694fba554 100644 --- a/doc/generic/pgf/pgfmanual-en-library-math.tex +++ b/doc/generic/pgf/pgfmanual-en-library-math.tex @@ -57,8 +57,8 @@ \subsection{Overview} if \n == 0 then { return 0; } else { - return fibonacci2(\n, 0, 1); - }; + return fibonacci2(\n, 0, 1); + }; }; function fibonacci2(\n, \p, \q) { if \n == 1 then { From b97dfb6a504fbe2be9fd1ba24d0455cb9263a63d Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Mon, 15 Jul 2024 07:40:33 +0800 Subject: [PATCH 32/40] chore: add Volker Diels-Grabsch as 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 bd8a8ab28..a9d8f9ade 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Yukai Chou (@muzimuzhi) - Alexander Grahn - Max Chernoff +- Volker Diels-Grabsch ## [3.1.10] - 2023-01-13 Henri Menke From 44f8137449b34f62bc6371bd442ae5cc98f60f18 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Mon, 15 Jul 2024 07:41:13 +0800 Subject: [PATCH 33/40] docs: typos Signed-off-by: Yukai Chou --- doc/generic/pgf/pgfmanual-en-tikz-paths.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/generic/pgf/pgfmanual-en-tikz-paths.tex b/doc/generic/pgf/pgfmanual-en-tikz-paths.tex index 8d4e1bf92..87babad89 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-paths.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-paths.tex @@ -302,7 +302,7 @@ \subsubsection{Horizontal and Vertical Lines} \index{--2@\protect\texttt{\protect\pgfmanualbar-} path operation}% \index{Path operations!--2@\protect\texttt{\protect\pgfmanualbar-}}% \pgfmanualpdflabel[\catcode`\|=12 ]{|-}{}% - This operations means ``first vertical, then horizontal''. + This operation means ``first vertical, then horizontal''. \end{pathoperation} } @@ -601,10 +601,10 @@ \subsection{The Grid Operation} You can add a grid to the current path using the |grid| path operation. \begin{pathoperation}{grid}{\opt{\oarg{options}}\meta{corner or cycle}} - This operations adds a grid filling a rectangle whose two corners are given + This operation adds a grid filling a rectangle whose two corners are given by \meta{corner} and by the previous coordinate. (Instead of a coordinate you can also say |cycle| to use the position of the last move-to as the - corner coordinate, but it not very natural to do so.) Thus, the + corner coordinate, but it is not very natural to do so.) Thus, the typical way in which a grid is drawn is |\draw (1,1) grid (3,3);|, which yields a grid filling the rectangle whose corners are at $(1,1)$ and $(3,3)$. All coordinate transformations apply to the grid. From d43fb104dadc1db7e2bcae6f02e0607078a98be1 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Wed, 21 Aug 2024 06:54:25 +0800 Subject: [PATCH 34/40] chore: overwrite detected lang for *.def etc on GitHub [ci skip] --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..f69c60199 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md#using-gitattributes +*.cfg linguist-language=tex +*.def linguist-language=tex +*.lvt linguist-language=tex +*.pvt linguist-language=tex From b49c8074a46250f21bc7d2c1a7f25e85b124403c Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Tue, 17 Sep 2024 16:48:52 +0200 Subject: [PATCH 35/40] fix: treat varargs for min and max in luamath Fixes https://github.com/pgf-tikz/pgfplots/issues/492 Signed-off-by: Henri Menke --- .../pgf/libraries/luamath/pgf/luamath/functions.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua b/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua index 367d6ae29..d161e7c91 100644 --- a/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua +++ b/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua @@ -148,12 +148,12 @@ function pgfluamathfunctions.less(x,y) end end -function pgfluamathfunctions.min(x,y) - return mathmin(x,y) +function pgfluamathfunctions.min(x,y,...) + return mathmin(x,y,...) end -function pgfluamathfunctions.max(x,y) - return mathmax(x,y) +function pgfluamathfunctions.max(x,y,...) + return mathmax(x,y,...) end function pgfluamathfunctions.notequal(x,y) From ab7c1475b4acbaafd0f3ba8d166489d32fb0fe0e Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Wed, 18 Sep 2024 05:48:16 +0800 Subject: [PATCH 36/40] docs: add changelog entry for #1359 [ci skip] 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 a9d8f9ade..85a42796a 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/). - Output bounding box adjustment in pgfsys-dvisvgm.def #1275 - Fix shadings under LuaMetaTeX - Resolve missing `gnuplot` plots in manual #1238 +- Treat varargs for `min` and `max` in `luamath` pgf-tikz/pgfplots#492 #1359 ### Changed From 99e4df465a4256d1eac6129d8a588efc4b7cfb96 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Mon, 15 Jul 2024 13:23:28 +0200 Subject: [PATCH 37/40] feat: allow empty value for /pgf/arrow keys/fill Signed-off-by: Henri Menke Co-authored-by: Yukai Chou Co-authored-by: Romano Giannetti --- doc/generic/pgf/CHANGELOG.md | 2 ++ doc/generic/pgf/pgfmanual-en-tikz-arrows.tex | 8 ++++++-- tex/generic/pgf/basiclayer/pgfcorearrows.code.tex | 10 ++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 85a42796a..375c00ecb 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Resolve overfull hboxes >=20pt in the manual - Adapt `\graphicspath` setting for flattened doc tree #1191 - Promote warning "Plot data file \`...' not found" to error +- Allow empty value for /pgf/arrow keys/fill to make it behave more like /tikz/fill #1352 ### Contributors @@ -38,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Qrrbrbirlbel - quark67 - Rocky Zhang (@rockyzhz) +- Romano Giannetti (@rmano) - Yukai Chou (@muzimuzhi) - Alexander Grahn - Max Chernoff diff --git a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex index f691e350a..3844f907f 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex @@ -796,7 +796,7 @@ \subsubsection{Coloring} filled. \end{key} -\begin{key}{/pgf/arrow keys/fill=\meta{color or |none|}} +\begin{key}{/pgf/arrow keys/fill=\meta{color} (default \normalfont is scope's color setting)} Use this key to explicitly set the color used for filling the arrow tips. This color can be different from the color used to draw (stroke) the arrow tip: @@ -818,6 +818,10 @@ \subsubsection{Coloring} } \end{codeexample} % + If the argument is left empty or omitted altogether, no explicit fill color + will be set, meaning that the fill color will be determined by whatever was used + last as a fill color in the current scope. + Note that such ``open'' arrow tips are a bit difficult to draw in some case: The problem is that the line must be shortened by just the right amount so that it ends exactly on the back end of the arrow tip. In some @@ -827,7 +831,7 @@ \subsubsection{Coloring} A shorthand for |fill=none|. \end{key} - When you use both the |color| and |fill| option, the |color| option must + When you use both the |color| and |fill| options, the |color| option must come first since it will reset the filling to the color specified for drawing. % diff --git a/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex b/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex index 7f079fa84..06ae5df0d 100644 --- a/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex +++ b/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex @@ -510,12 +510,14 @@ fill/.code={% \def\pgf@temp{#1}% \ifx\pgf@temp\pgf@nonetext% - \pgfarrowsaddtooptions{\pgfarrowopentrue} + \pgfarrowsaddtooptions{\pgfarrowopentrue}% + \else\ifx\pgf@temp\pgfutil@empty + \pgfarrowsaddtooptions{\pgfarrowopenfalse}% \else - \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}} - \fi + \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}% + \fi\fi }, - fill/.value required, + fill/.default=, open/.style={fill=none}, .unknown/.code={ \expandafter\pgfutil@in@\expandafter!\expandafter{\pgfkeyscurrentname}% From 404274adb324a90fbae90f6528cd10cf7a502a36 Mon Sep 17 00:00:00 2001 From: Michal Hoftich Date: Fri, 25 Oct 2024 22:44:22 +0200 Subject: [PATCH 38/40] Update pgfsys-dvisvgm4ht.def - fixed support for the inline \tikz command - added support for the alt text --- .../pgf/systemlayer/pgfsys-dvisvgm4ht.def | 89 ++++++++----------- 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def index 77e7c9bb7..1bc14356f 100644 --- a/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def +++ b/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def @@ -1,4 +1,4 @@ -% Copyright 2021 by Michal Hoftich +% Copyright 2021-2024 by Michal Hoftich % Copyright 2006 by Till Tantau % % This file may be distributed and/or modified @@ -16,66 +16,55 @@ % Load common pdf commands: % -% we load the dvips driver by default. it doesn't support patterns and some other stuff, -% but it handles better nested images and some formatting. if you use patterns or if you -% have other issues with the default method, pass the "tikz-dvisvgm" option to make4ht. +% we switched to dvisvgm driver by default. it supports patterns and other features +% dvips driver is available through the tikz+ option. It doesn't support everything, +% but it worked better with nested pictures in the past. \ifdefined\ifOption -\ifOption{tikz+}{\input pgfsys-dvisvgm.def}{\input pgfsys-dvips.def} +\ifOption{tikz+}{\input pgfsys-dvips.def}{\input pgfsys-dvisvgm.def} \else % load the dvips driver by default -\input pgfsys-dvips.def +\input pgfsys-dvisvgm.def \fi -\def\texfourht@tikz@begin{% - \bgroup% - \def\run@pict@cmd{}% insert the \Picture hooks only in the top nesting level - \def\end@pict@cmd{}% - \ifdefined\EndPicture\else% We are already inside command that uses \Picture - \ifdefined\inside@pict@cmd\else% handle nested uses - \ifdefined\tikzexternalize\else% Support externalize library - \def\run@pict@cmd{\Picture*}% - \def\end@pict@cmd{\EndPicture}% - \fi\fi\fi% - % command used to detect nesting - \def\inside@pict@cmd{}% - \csname a:tikzpicture\endcsname% -} - -\def\texfourht@tikz@end{% - \csname b:tikzpicture\endcsname% - \egroup% -} +\catcode`\:=11% +% we must call most of these redefinitions in \AtBeginDocument, because \HLet is available +% only at that moment \AtBeginDocument{% - \NewConfigure{tikzpicture}{2}% - \catcode`\:=11% - \Configure{tikzpicture}{% - \protect\csname nested:math\endcsname% support display math - \run@pict@cmd{}% - }{\end@pict@cmd} - % configure the output picture format to svg, as it will require dvisvgm - % post processing. - \Configure{Picture}{.svg}% - % insert tex4ht hooks around TikZ picture box - \def\pgfsys@typesetpicturebox#1{% - \texfourht@tikz@begin% - \orig@pgfsys@typesetpicturebox{#1}% - \texfourht@tikz@end% - } - % - \ConfigureEnv{tikzpicture}{\texfourht@tikz@begin}{\texfourht@tikz@end}{}{}% - \ConfigureEnv{pgfpicture}{\texfourht@tikz@begin}{\texfourht@tikz@end}{}{}% - \catcode`\:=12% + % configure the output picture format to svg, as it will require dvisvgm + % post processing. + \Configure{Picture}{.svg}% + + % insert picture hooks to pgfsys commands + % these redefinitions are usually called only with the \tikz command, + % they are ignored in tikzpicture environment + \def\:tempa#1{% + \texfourht@tikz@begin% + \csname o:pgfsys@typesetpicturebox:\endcsname{#1} + \texfourht@tikz@end% + } + \HLet\pgfsys@typesetpicturebox\:tempa + + % we must remove Picture-alt in \pgfsys@beginpicture, because it can result in alt text included in the image + \def\:tempa{\Configure{Picture-alt}{}\texfourht@tikz@begin\o:pgfsys@beginpicture:} + \HLet\pgfsys@beginpicture\:tempa + \let\o:pgfsys@endpicture:\pgfsys@endpicture + \def\:tempa{\o:pgfsys@endpicture:} + \HLet\pgfsys@endpicture\:tempa + + % start picture around TikZ and PGF environments + \ConfigureEnv{tikzpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}% + \ConfigureEnv{pgfpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}% } +\def\texfourht@tikz@begin{ + \protect\csname nested:math\endcsname% support display math + \Picture+[\csname a:Picture-alt\endcsname]{}% +} +\def\texfourht@tikz@end{\EndPicture} -% Make the code inserted by tex4ht configurable -% - - -\let\orig@pgfsys@typesetpicturebox\pgfsys@typesetpicturebox -%\def\pgf@sys@postscript@header#1{{\special{! #1}}} +\catcode`\:=12% \endinput From ead596e6d9994df23b60286f55b059ec1e36f991 Mon Sep 17 00:00:00 2001 From: Michal Hoftich Date: Fri, 25 Oct 2024 22:57:29 +0200 Subject: [PATCH 39/40] Update CHANGELOG.md --- doc/generic/pgf/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 375c00ecb..2afe30c26 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix shadings under LuaMetaTeX - Resolve missing `gnuplot` plots in manual #1238 - Treat varargs for `min` and `max` in `luamath` pgf-tikz/pgfplots#492 #1359 +- Fixed support for the `\tikz` command in the `dvisvg4ht` driver for TeX4ht ### Changed @@ -29,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Adapt `\graphicspath` setting for flattened doc tree #1191 - Promote warning "Plot data file \`...' not found" to error - Allow empty value for /pgf/arrow keys/fill to make it behave more like /tikz/fill #1352 +- Added support for alt text in the `dvisvg4ht` driver for TeX4ht ### Contributors From 547f5e253260830c138415114f8fa180ad517050 Mon Sep 17 00:00:00 2001 From: Michal Hoftich Date: Fri, 25 Oct 2024 23:03:13 +0200 Subject: [PATCH 40/40] Fixed typo --- 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 2afe30c26..38c2280f7 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -19,7 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix shadings under LuaMetaTeX - Resolve missing `gnuplot` plots in manual #1238 - Treat varargs for `min` and `max` in `luamath` pgf-tikz/pgfplots#492 #1359 -- Fixed support for the `\tikz` command in the `dvisvg4ht` driver for TeX4ht +- Fixed support for the `\tikz` command in the `dvisvgm4ht` driver for TeX4ht ### Changed @@ -30,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Adapt `\graphicspath` setting for flattened doc tree #1191 - Promote warning "Plot data file \`...' not found" to error - Allow empty value for /pgf/arrow keys/fill to make it behave more like /tikz/fill #1352 -- Added support for alt text in the `dvisvg4ht` driver for TeX4ht +- Added support for alt text in the `dvisvgm4ht` driver for TeX4ht ### Contributors