| 1 |
\long\def\newblocktype#1#2#3#4{% |
| 2 |
\def#1{\ptx@newblock_pattern{#2}{#3}{#4}}% |
| 3 |
} |
| 4 |
\newife\ifptx@newblock_group |
| 5 |
\long\def\ptx@newblock_pattern#1#2#3{% |
| 6 |
\ifnext* |
| 7 |
{\ptx@newblock_grouptrue\gobbleoneand{\ptx@newblock{#1}{#2}{#3}}} |
| 8 |
{\ptx@newblock_groupfalse\ptx@newblock{#1}{#2}{#3}}% |
| 9 |
} |
| 10 |
\long\def\ptx@newblock#1#2#3#4#5{% |
| 11 |
\ifnextnospace* |
| 12 |
{\gobbleoneand{\ptx@newblock_do#4{#1#5}{#2}{#3}}} |
| 13 |
{\ptx@newblock_do#4{#1#5}{#2}{#3}{}}% |
| 14 |
} |
| 15 |
\long\def\ptx@newblock_do#1#2#3#4#5#6{% |
| 16 |
\ifptx@newblock_group |
| 17 |
{\defcs{ptx@inner_\commandtoname#1:start}{\bgroup#2}% |
| 18 |
\defcs{ptx@inner_\commandtoname#1:stop}{#4#6\egroup}} |
| 19 |
{\defcs{ptx@inner_\commandtoname#1:start}{#2}% |
| 20 |
\defcs{ptx@inner_\commandtoname#1:stop}{#4#6}}% |
| 21 |
\defcs{ptx@inner_\commandtoname#1:continue}{#3#5}% |
| 22 |
\def#1##1{% |
| 23 |
\ifelseif{% |
| 24 |
{\ifstring{##1}{|}} {\skipspace{\usecs{ptx@inner_\commandtoname#1:continue}}} |
| 25 |
{\ifstring{##1}{/}} {\usecs{ptx@inner_\commandtoname#1:stop}} |
| 26 |
{\ifstring{##1}{>}} {\skipspace{\usecs{ptx@inner_\commandtoname#1:start}}} |
| 27 |
\iftrue {\usecs{ptx@inner_\commandtoname#1:start}##1}}% |
| 28 |
}% |
| 29 |
} |
| 30 |
|
| 31 |
\newblocktype\newblock{}{}{} |
| 32 |
|
| 33 |
\def\Indent{\quitvmode\kern\parindent} |
| 34 |
|
| 35 |
\gates new \Everypar {Everypar} |
| 36 |
\Everypar list {everypar} [0] |
| 37 |
[noindent] ?{status = close} {{\setbox0=\lastbox}} |
| 38 |
\Everypar close {noindent}{everypar} |
| 39 |
\everypar={\Everypar execute {everypar}} |
| 40 |
\def\removenextindent{\Everypar ajar {noindent}{everypar}} |