diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-16 23:47:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-16 23:47:14 +0000 |
commit | 0c242425bcb89cc3af3064b8b895608a7f5ec3bb (patch) | |
tree | c9e2e2a0cd90b875325b6ef0cc06edada1b5f4ec /Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex | |
parent | a77f52d8c904326838bc0523faffdc79bdff0f6e (diff) |
pgfplots 1.4 (14jul10)
git-svn-id: svn://tug.org/texlive/trunk@19488 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex | 84 |
1 files changed, 55 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex index 87ce40e586b..b60ff65c4f7 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex @@ -78,59 +78,85 @@ % Use braces '{}' to use '\\' or ',' as arguments. % \long\def\pgfplotslistnew#1#2{% - \pgfplots@check@backwards@compatible@list@format #2\\\pgfplots@EOI - \ifpgfplots@is@old@list@format - \pgfplotslistnew@backslash{#1}{#2}% + \pgfplotslist@check@backslash@list #2\\\pgfplotslist@EOI + \ifpgfplotslist@is@backslash@terminated + \pgfplotslistnew@backslash@{#1}{#2}% \else \pgfplots@foreach@to@list{#2}\to#1% \fi } +% Is this here *ever* used!? I guess not. \long\def\pgfplotslistnew@backslash#1#2{% \pgfplotslistnewempty{#1}% - \long\def\pgfplotslistnew@impl@rest{#2}% \pgfplotslist@check@backslash@list #2\\\pgfplotslist@EOI \ifpgfplotslist@is@backslash@terminated + \long\def\pgfplotslistnew@impl@rest{#2\pgfplotslist@EOI\\}% + \def\pgfplotslistnew@backslash@loop{\pgfplotslistnew@impl{#1}}% \else - \expandafter\def\expandafter\pgfplotslistnew@impl@rest\expandafter{\pgfplotslistnew@impl@rest,}% + \def\pgfplotslistnew@backslash@loop{\pgfplotslistnew@impl@comma{#1}}% + \long\def\pgfplotslistnew@impl@rest{#2\pgfplotslist@EOI,}% \fi - \pgfutil@loop - \ifx\pgfplotslistnew@impl@rest\pgfutil@empty - \pgfplots@loop@CONTINUEfalse + \expandafter\pgfplotslistnew@backslash@loop\pgfplotslistnew@impl@rest +}% +\long\def\pgfplotslistnew@backslash@#1#2{% + \pgfplotslistnewempty{#1}% + \def\pgfplotslistnew@backslash@loop{\pgfplotslistnew@impl{#1}}% + \pgfplotslistnew@backslash@loop#2\pgfplotslist@EOI\\% +}% + +% helper macro for \pgfplotslistnew +\long\def\pgfplotslistnew@impl#1#2\\{% + \def\pgfplotslist@loc@TMPa{#2}% + \ifx\pgfplotslist@loc@TMPa\pgfplotslist@EOI \else - \pgfplots@loop@CONTINUEtrue + \pgfplotslistpushback{#2}\to#1\relax% + \expandafter\pgfplotslistnew@backslash@loop \fi - \ifpgfplots@loop@CONTINUE - \ifpgfplotslist@is@backslash@terminated - \expandafter\pgfplotslistnew@impl\pgfplotslistnew@impl@rest\tolist#1\relax - \else - \expandafter\pgfplotslistnew@impl@comma\pgfplotslistnew@impl@rest\tolist#1\relax - \fi - \pgfutil@repeat -}% +} +\long\def\pgfplotslistnew@impl@comma#1#2,{% + \def\pgfplotslist@loc@TMPa{#2}% + \ifx\pgfplotslist@loc@TMPa\pgfplotslist@EOI + \else + \pgfplotslistpushback{#2}\to#1\relax% + \expandafter\pgfplotslistnew@backslash@loop + \fi +} \def\pgfplotslist@EOI{\pgfplotslist@EOI} +\def\pgfplotslist@backslashsep{\\} \long\def\pgfplotslist@check@backslash@list#1\\#2\pgfplotslist@EOI{% - \def\pgfplotslist@loc@TMPa{#2}% - \ifx\pgfplotslist@loc@TMPa\pgfutil@empty + \def\pgfplotslist@loc@TMPx{#2}% + \ifx\pgfplotslist@loc@TMPx\pgfutil@empty \pgfplotslist@is@backslash@terminatedfalse + \let\pgfplotslist@check@backslash@list@next=\relax \else - \pgfplotslist@is@backslash@terminatedtrue + \def\pgfplotslist@loc@TMPy{ }% + \ifx\pgfplotslist@loc@TMPx\pgfplotslist@loc@TMPy + \pgfplotslist@is@backslash@terminatedfalse + \let\pgfplotslist@check@backslash@list@next=\relax + \else + \ifx\pgfplotslist@loc@TMPx\pgfplotslist@backslashsep + % ok. The list is something like 'a\\b\\' so the + % complete input is + % 'a\\b\\ \\ \EOI' + % we have iterated long enough to find only the '\\' + % right before the \EOI. It is thus backslash + % terminated. + \pgfplotslist@is@backslash@terminatedtrue + \let\pgfplotslist@check@backslash@list@next=\relax + \else + % Iterate. We want to check the last list element. + \long\def\pgfplotslist@check@backslash@list@next{\pgfplotslist@check@backslash@list#2\pgfplotslist@EOI}% + \fi + \fi \fi + \pgfplotslist@check@backslash@list@next }% % Copies list #1 to list #2. \def\pgfplotslistcopy#1\to#2{\let#2=#1} -% helper macro for \pgfplotslistnew -\long\def\pgfplotslistnew@impl#1\\#2\tolist#3{% - \pgfplotslistpushback#1\to#3\relax% - \def\pgfplotslistnew@impl@rest{#2}% -} -\long\def\pgfplotslistnew@impl@comma#1,#2\tolist#3{% - \pgfplotslistpushback#1\to#3\relax% - \def\pgfplotslistnew@impl@rest{#2}% -} % #1: the item to prepend |