aboutsummaryrefslogtreecommitdiff
path: root/smp.1
diff options
context:
space:
mode:
Diffstat (limited to 'smp.1')
-rw-r--r--smp.135
1 files changed, 35 insertions, 0 deletions
diff --git a/smp.1 b/smp.1
index 33a96dc..40942ad 100644
--- a/smp.1
+++ b/smp.1
@@ -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,