diff options
author | Galin Simeonov <gts@volconst.com> | 2021-05-28 23:20:22 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-05-28 23:20:22 +0300 |
commit | 312eb6e589c67f954ba676fb7a04ab8d06827033 (patch) | |
tree | 356d05b4ec7443d848ee670af102952bf9e09542 /g.tmac | |
parent | ee9d3272aa67de912eb1f015b62ba128fbb1a974 (diff) | |
download | mg-312eb6e589c67f954ba676fb7a04ab8d06827033.tar.gz |
added multi level headings
Diffstat (limited to 'g.tmac')
-rw-r--r-- | g.tmac | 37 |
1 files changed, 34 insertions, 3 deletions
@@ -5,7 +5,10 @@ \######################################################################### .nr paragraph_indentation 2.3 \######################################################################### -.nr heading_current_number 1 +.nr heading_current_number_1 0 +.nr heading_current_number_2 0 +.nr heading_current_number_3 0 +.nr heading_current_number_4 0 .ds heading_style DIGIT \######################################################################### .nr footnote_current_number 0 @@ -97,6 +100,7 @@ .. \######################################################################### .de finish +.main_diversion .references \#.plainpage end .. @@ -135,9 +139,36 @@ \} .el .if '\\*[heading_style]'DIGIT' \{\ -\f[B] \\n[heading_current_number]. +\f[B] +.if \\$2<=1 \{\ +.nr heading_current_number_1 +1 +.nr heading_current_number_2 0 +.nr heading_current_number_3 0 +.nr heading_current_number_4 0 +\\n[heading_current_number_1]. +\} +.if '\\$2'2' \{\ +.nr heading_current_number_2 +1 +.nr heading_current_number_3 0 +.nr heading_current_number_4 0 +\\n[heading_current_number_1]. +\\n[heading_current_number_2]. +\} +.if '\\$2'3' \{\ +.nr heading_current_number_3 +1 +.nr heading_current_number_4 0 +\\n[heading_current_number_1]. +\\n[heading_current_number_2]. +\\n[heading_current_number_3]. +\} +.if '\\$2'4' \{\ +.nr heading_current_number_4 +1 +\\n[heading_current_number_1]. +\\n[heading_current_number_2]. +\\n[heading_current_number_3]. +\\n[heading_current_number_4]. +\} \\$1 \f[] -.nr heading_current_number +1 \} .br .. |