-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[patterns.meta] Remaining bugs when using definitions and there is a space in the wrong place #851
Comments
--- a/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
+++ b/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
@@ -217,7 +217,7 @@
\def\pgf@pat@macroaskeys#1#2{%
\pgfutil@toks@\expandafter{#2}%
- \edef\pgf@marshal{\noexpand\pgfkeys{#1, \the\pgfutil@toks@}}%
+ \edef\pgf@marshal{\noexpand\pgfkeys{,#1,\the\pgfutil@toks@}}%
\pgf@marshal%
}%
\def\pgfsetfillpattern#1#2{% |
That was fast! Unfortunately that fixed "only" part 1 of the bug ... |
I found where the second one and here is a patch, but that is kind of an edge case. If I fix it like that it would break every pattern that deliberately uses leading or trailing spaces in its name for some reason. So either I have to say “pattern with surrounding whitespace in the name are not supported” or “whitespace before pattern options is not supported”. --- a/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
+++ b/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
@@ -185,7 +185,7 @@
\pgf@pat@@checkname#1[]\pgf@patstop}%
\def\pgf@pat@@checkname#1[#2]#3\pgf@patstop{%
- \def\pgf@pat@onlinename{#1}%
+ \expandafter\def\expandafter\pgf@pat@onlinename\expandafter{\romannumeral-`0\pgfutil@trimspaces{#1}}%
\def\pgf@pat@onlineoptions{#2}%
}%
|
I remember that "edge case". Could it be the same/something similar to issue #747? I agree to PhelypeOleinik's opinion that one should not rely on leading or trailing spaces, but you didn't want to break possible use of that as a "feature". Just for curiosity: Do you know any instance in the manual that relies on that feature? Than I definitely would agree to not change that. But my guess is that this is not the case. Instead of having to decide which way to go, couldn't there be added key to choose which behavior one wants to use? Maybe this could be combined with something that PGFPlots does with its |
The |
This bug/these bugs were already mentioned in issue #602 (comment), but since I am not sure if these are really bugs and if something can be done against them (easily) I report them separately here again.
To raise the errors follow the comment instructions at the use of the pattern.
1. remove the comment sign after
old lines[
2. add a space before the
[
inold lines[
(i.e. make itold lines [
)The text was updated successfully, but these errors were encountered: