summaryrefslogtreecommitdiff
path: root/tex/context/base/mtx-context-listing.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mtx-context-listing.tex')
-rw-r--r--tex/context/base/mtx-context-listing.tex17
1 files changed, 14 insertions, 3 deletions
diff --git a/tex/context/base/mtx-context-listing.tex b/tex/context/base/mtx-context-listing.tex
index d69db9934..2a333c789 100644
--- a/tex/context/base/mtx-context-listing.tex
+++ b/tex/context/base/mtx-context-listing.tex
@@ -20,7 +20,8 @@
% --sort : sort filenames first
% --topspace=dimension : distance above first line
% --backspace=dimension : distance before left margin
-% --pretty : pretty print comform suffix (temporarily disabled)
+% --pretty : pretty print comform suffix
+% --scite : pretty print comform suffix using scite lexer
% --bodyfont=list : additional bodyfont settings
% --paperformat=spec : paper*print or paperxprint
%
@@ -70,11 +71,16 @@
}
local pattern = document.arguments.pattern
+ local scite = document.arguments.scite
if pattern then
document.files = dir.glob(pattern)
end
+ if scite then
+ context.usemodule { "scite" }
+ end
+
if #document.files > 0 then
if document.arguments.sort then
table.sort(document.files)
@@ -94,19 +100,24 @@
{ function() context.detokenize(pattern and filename or file.basename(filename)) return true end },
{ function() context.pagenumber() return true end }
)
- if pretty then
+ if scite then
+ context.scitefile { filename } -- here { }
+ elseif pretty then
if type(pretty) ~= "string" or pretty == "" then
context.setuptyping { option = "color" }
else
context.setuptyping { option = types[pretty] or pretty }
end
+ context.typefile(filename)
+ else
+ context.typefile(filename)
end
- context.typefile(filename)
end
end
else
context("no files given")
end
+
\stopluacode
\stoptext