aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/grosciteco.tes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/grosciteco.tes')
-rwxr-xr-xdoc/grosciteco.tes30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/grosciteco.tes b/doc/grosciteco.tes
index 9be0f1a..5548f1c 100755
--- a/doc/grosciteco.tes
+++ b/doc/grosciteco.tes
@@ -169,6 +169,12 @@ EBN[input]
Q[stylestart]ESSTARTSTYLING Q.s,(-Q[stylestart])ESSETSTYLING
]*
L F<
+ !cmd.xXsciteco_foldlevel!
+ C :M#giU.[foldlevel]
+ [* EB 0:M[move]
+ Q.[foldlevel],(ESLINEFROMPOSITION)ESSETLINESTATE
+ ]*
+ L F<
!cmd.xXtty!
!cmd.xXdevtag!
L F<
@@ -342,6 +348,30 @@ J 0U#cs 0U#cd
:C;>
!*
+ * The fold level is stored in the line state since it is set
+ * while the document is not fully built yet.
+ *!
+J 0U#li 0U[cur.fl] 0U[last.line]
+ESGETLINECOUNT<
+ Q#liESGETLINESTATEU#fl
+ Q#fl"N
+ Q[cur.fl]"N
+ Q#li-Q[last.line]Ux
+ 1024%[cur.fl]
+ @:EU[styles]{\[last.line]U.l \x<\[cur.fl],Q.lESSETFOLDLEVEL %.l>^J}
+ '
+ Q#li+1U[last.line] Q#flU[cur.fl]
+ (1024+Q#fl-1)#(2^*13)U#fl
+ @:EU[styles]{\#fl,\#liESSETFOLDLEVEL^J}
+ '
+%#li>
+Q[cur.fl]"N
+ Q#li-Q[last.line]Ux
+ 1024%[cur.fl]
+ @:EU[styles]{\[last.line]U.l \x<\[cur.fl],Q.lESSETFOLDLEVEL %.l>^J}
+'
+
+!*
* Save the clear-text part of the document into <output-woman>
*!
2EL EWQ[output-woman]