+-- Print a string or table of strings with the catcodes set to the default
+-- context ones. Use this function to print a string that contains context
+-- macro's that should be interpreted. Does not insert any automatic
+-- linebreaking.
+local function ctxsprint(str)
+ tex.sprint(tex.ctxcatcodes, str)
+end
+
+-- Print a string or table of strings almost literal. Each character in the
+-- string will be printed with the "character" catcode, causing it to show up
+-- literal in the output. Only the space character is printed with the "space"
+-- catcode.
+local function texwrite(str)
+ tex.write(str)
+end
+