diff options
Diffstat (limited to 'smp.1')
-rw-r--r-- | smp.1 | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -94,6 +94,41 @@ Passes the rest of the file as content to the \fBtemplate\fR-macro. .IP "\fB@html_from_markdown\fR" Passes the rest of the file as content to the \fBhtml_from_markdown\fR-macro. +.SS "\fBStrings\fR" +This macro processor is generally recursive, meaning all macros will process it's arguments normally before using them. +To make this easier to deal with, strings are differentiated between opening and closing. + +Opening is \fB%"\fR, closing is \fB"%\fR. + +.SS "\fBCode\fR" +You can run arbitrary (python) code in the files, which operates in the same environment as the macros. +This means you can from the python code call all builtin macros directly (you will need to manually provide the macro_processor reference). +It also means all definitions you make, are available outside as macro tokens. +Code blocks are opened with \fB%(\fR and closed with \fB)%\fR. + + + +.PP +.nf +.RS +%( +def A(): + return "test" +)% +A +%"A"% +.RE +.fi +.PP +Returns +.PP +.nf +.RS +test +A +.RE +.fi +.PP .SS "\fBBuiltin macro options\fR" There are some macros flags that can enable/disable features, |