File: blocks.ptx

package info (click to toggle)
texlive-extra 2024.20250309-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 5,368,476 kB
  • sloc: perl: 401,582; xml: 41,345; python: 38,753; cs: 25,850; sh: 18,555; makefile: 17,174; ansic: 13,023; java: 12,811; javascript: 9,898; lisp: 1,876; csh: 1,347; ruby: 618; awk: 183; tcl: 142; pascal: 138; cpp: 124; sed: 92; haskell: 5
file content (40 lines) | stat: -rw-r--r-- 1,451 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\long\def\newblocktype#1#2#3#4{%
  \def#1{\ptx@newblock_pattern{#2}{#3}{#4}}%
  }
\newife\ifptx@newblock_group
\long\def\ptx@newblock_pattern#1#2#3{%
  \ifnext*
    {\ptx@newblock_grouptrue\gobbleoneand{\ptx@newblock{#1}{#2}{#3}}}
    {\ptx@newblock_groupfalse\ptx@newblock{#1}{#2}{#3}}%
  }
\long\def\ptx@newblock#1#2#3#4#5{%
  \ifnextnospace*
    {\gobbleoneand{\ptx@newblock_do#4{#1#5}{#2}{#3}}}
    {\ptx@newblock_do#4{#1#5}{#2}{#3}{}}%
  }
\long\def\ptx@newblock_do#1#2#3#4#5#6{%
  \ifptx@newblock_group
	  {\defcs{ptx@inner_\commandtoname#1:start}{\bgroup#2}%
	   \defcs{ptx@inner_\commandtoname#1:stop}{#4#6\egroup}}
	  {\defcs{ptx@inner_\commandtoname#1:start}{#2}%
	   \defcs{ptx@inner_\commandtoname#1:stop}{#4#6}}%
	  \defcs{ptx@inner_\commandtoname#1:continue}{#3#5}%
  \def#1##1{%
    \ifelseif{%
      {\ifstring{##1}{|}} {\skipspace{\usecs{ptx@inner_\commandtoname#1:continue}}}
      {\ifstring{##1}{/}} {\usecs{ptx@inner_\commandtoname#1:stop}}
      {\ifstring{##1}{>}} {\skipspace{\usecs{ptx@inner_\commandtoname#1:start}}}
       \iftrue            {\usecs{ptx@inner_\commandtoname#1:start}##1}}%
    }%
  }

\newblocktype\newblock{}{}{}

\def\Indent{\quitvmode\kern\parindent}

\gates new \Everypar {Everypar}
\Everypar list {everypar} [0]
  [noindent] ?{status = close} {{\setbox0=\lastbox}}
\Everypar close {noindent}{everypar}
\everypar={\Everypar execute {everypar}}
\def\removenextindent{\Everypar ajar {noindent}{everypar}}