diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex index 9d0680e2a4a..f8bfeef3a6e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex @@ -18,11 +18,15 @@ % usage: context --extra=xml [options] list-of-files % % --analyze : show elements and characters +% --template : also export template % --topspace=dimension : distance above first line % --backspace=dimension : distance before left margin % --bodyfont=list : additional bodyfont settings % --paperformat=spec : paper*print or paperxprint % +% context --extra=xml --analyze path::i-context.xml +% context --extra=xml --analyze --template path::i-context.xml +% context --extra=xml --analyze selfautoparent:texmf-context/tex/context/interface/mkiv/i-*.xml % end help \input mtx-context-common.tex @@ -50,8 +54,10 @@ \starttext \startluacode - local pattern = document.arguments.pattern - local files = document.files + local files = document.files + local pattern = document.arguments.pattern or (#files == 1 and files[1]) + local analyze = document.arguments.analyze + local template = document.arguments.template if pattern then files = dir.glob(pattern) @@ -61,12 +67,15 @@ end if #files > 0 then - if document.arguments.analyze then - moduledata.xml.analyzers.structure (files) + if analyze then + moduledata.xml.analyzers.structure(files) context.page() moduledata.xml.analyzers.characters(files) context.page() moduledata.xml.analyzers.entities(files) + if template then + moduledata.xml.analyzers.allsetups(files,type(template) == "string" and template or nil) + end else context("no action given") end |