summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-19 22:29:53 +0000
committerKarl Berry <karl@freefriends.org>2015-04-19 22:29:53 +0000
commite5c54b88b33735cd7dd2fa93d3ac70bc99766e20 (patch)
treed87810777a0558b7767da89d44b64ed1767eb421 /Master/texmf-dist
parent32bfeacdb9c8a2c38eeb81258fba80950027b3b3 (diff)
context-fancybreak (19apr15)
git-svn-id: svn://tug.org/texlive/trunk@36948 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/context/third/fancybreak/fancybreak-doc.pdfbin70704 -> 193087 bytes
-rw-r--r--Master/texmf-dist/tex/context/third/fancybreak/t-fancybreak.mkvi101
2 files changed, 78 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/context/third/fancybreak/fancybreak-doc.pdf b/Master/texmf-dist/doc/context/third/fancybreak/fancybreak-doc.pdf
index dcb4c18ab2f..1bacc8eb6fa 100644
--- a/Master/texmf-dist/doc/context/third/fancybreak/fancybreak-doc.pdf
+++ b/Master/texmf-dist/doc/context/third/fancybreak/fancybreak-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/third/fancybreak/t-fancybreak.mkvi b/Master/texmf-dist/tex/context/third/fancybreak/t-fancybreak.mkvi
index d3ea45253e5..3e547186e85 100644
--- a/Master/texmf-dist/tex/context/third/fancybreak/t-fancybreak.mkvi
+++ b/Master/texmf-dist/tex/context/third/fancybreak/t-fancybreak.mkvi
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-fancybreak,
-%D version=2013.12.06,
+%D version=2015.04.18,
%D title=\CONTEXT\ User Module,
%D subtitle=Fancybreak,
%D author=Wolfgang Schuster,
@@ -320,9 +320,9 @@
%D \showsetup{definefancybreak}
\appendtoks
- \setuevalue {\currentfancybreak}{\fancybreak_direct{\currentfancybreak}}%
- \setuevalue{\e!start\currentfancybreak}{\fancybreak_start {\currentfancybreak}}%
- \setuevalue{\e!stop \currentfancybreak}{\fancybreak_stop }%
+ \setuevalue {\currentfancybreak}{\fancybreak [\currentfancybreak]}%
+ \setuevalue{\e!start\currentfancybreak}{\startfancybreak[\currentfancybreak]}%
+ \setuevalue{\e!stop \currentfancybreak}{\stopfancybreak }%
\to \everydefinefancybreak
%D \macros
@@ -368,18 +368,47 @@
\texsetup{\????fancybreakrenderings:\v!test}
\stopsetups
-\unexpanded\def\fancybreak_direct#environment%
- {\edef\currentfancybreak{#environment}%
- \dosingleempty\fancybreak_direct_indeed}
-
-\def\fancybreak_direct_indeed[#parameters]%
+\unexpanded\def\fancybreak
{\par
\begingroup
- \iffirstargument
- \doifassignmentelse{#parameters}
- {\setupcurrentfancybreak[#parameters]}
- {\setfancybreakparameter\c!spaceinbetween{#parameters}}%
+ \dodoubleempty\fancybreak_direct}
+
+\def\fancybreak_direct
+ {\ifsecondargument
+ \expandafter\fancybreak_direct_double
+ \else\iffirstargument
+ \doubleexpandafter\fancybreak_direct_single
+ \else
+ \doubleexpandafter\fancybreak_direct_zero
+ \fi\fi}
+
+\def\fancybreak_direct_double[#environment][#parameters]%
+ {\edef\currentfancybreak{#environment}%
+ \ifcsname\currentfancybreakhash\s!parent\endcsname
+ % the current environment does exist
+ \else
+ \let\currentfancybreak\empty
\fi
+ \doifassignmentelse{#parameters}
+ {\setupcurrentfancybreak[#parameters]}
+ {\setfancybreakparameter\c!spaceinbetween{#parameters}}%
+ \doifnextbgroupelse\fancybreak_direct_yes\fancybreak_direct_nop}
+
+\def\fancybreak_direct_single[#environment][#parameters]%
+ {\doifassignmentelse{#environment}
+ {\let\currentfancybreak\empty
+ \setupcurrentfancybreak[#environment]}
+ {\edef\currentfancybreak{#environment}%
+ \ifcsname\currentfancybreakhash\s!parent\endcsname
+ % the argument is the name of a environment
+ \else
+ \let\currentfancybreak\empty
+ \setfancybreakparameter\c!spaceinbetween{#parameters}
+ \fi}%
+ \doifnextbgroupelse\fancybreak_direct_yes\fancybreak_direct_nop}
+
+\def\fancybreak_direct_zero[#environment][#parameters]%
+ {\let\currentfancybreak\empty
\doifnextbgroupelse\fancybreak_direct_yes\fancybreak_direct_nop}
\def\fancybreak_direct_yes
@@ -410,22 +439,48 @@
\endgroup
\dorechecknextindentation}}
-\unexpanded\def\fancybreak_start#environment%
- {\edef\currentfancybreak{#environment}%
- \dosingleempty\fancybreak_start_indeed}
-
-\def\fancybreak_start_indeed[#parameters]%
+\unexpanded\def\startfancybreak
{\par
\begingroup
- \iffirstargument
- \setupcurrentfancybreak[#parameters]%
+ \dodoubleempty\fancybreak_start}
+
+\def\fancybreak_start
+ {\ifsecondargument
+ \expandafter\fancybreak_start_double
+ \else\iffirstargument
+ \doubleexpandafter\fancybreak_start_single
+ \else
+ \doubleexpandafter\fancybreak_start_zero
+ \fi\fi}
+
+\def\fancybreak_start_double[#environment][#parameters]%
+ {\edef\currentfancybreak{#environment}%
+ \ifcsname\currentfancybreakhash\s!parent\endcsname
+ % the current environment does exist
+ \else
+ \let\currentfancybreak\empty
\fi
+ \setupcurrentfancybreak[#parameters]%
\fancybreak_direct_yes\bgroup}
-\unexpanded\def\fancybreak_stop
- {\egroup}
+\def\fancybreak_start_single[#environment][#parameters]%
+ {\doifassignmentelse{#environment}
+ {\let\currentfancybreak\empty
+ \setupcurrentfancybreak[#parameters]}
+ {\edef\currentfancybreak{#environment}%
+ \ifcsname\currentfancybreakhash\s!parent\endcsname
+ % the current environment does exist
+ \else
+ \let\currentfancybreak\empty
+ \fi}%
+ \fancybreak_direct_yes\bgroup}
-\definefancybreak[\v!fancybreak]
+\def\fancybreak_start_zero[#environment][#parameters]%
+ {\let\currentfancybreak\empty
+ \fancybreak_direct_yes\bgroup}
+
+\unexpanded\def\stopfancybreak
+ {\egroup}
\setupfancybreak
[ \c!spacebefore=,