summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-28 23:44:18 +0000
committerKarl Berry <karl@freefriends.org>2011-12-28 23:44:18 +0000
commite12ff80ff1745a62a4fcd2b949a4e410bc6eb3ae (patch)
tree0646f83c85e5c1c15e39404ea6e9f7f7c31abcec
parentc2e6204629312f1a15d2d2beaa65a13e3f2474b7 (diff)
context-filter (28dec11)
git-svn-id: svn://tug.org/texlive/trunk@24964 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/context/third/filter/filter.txt25
-rw-r--r--Master/texmf-dist/tex/context/third/filter/t-filter.mkiv13
2 files changed, 22 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/context/third/filter/filter.txt b/Master/texmf-dist/doc/context/third/filter/filter.txt
index bf5f2faa603..396596cec36 100644
--- a/Master/texmf-dist/doc/context/third/filter/filter.txt
+++ b/Master/texmf-dist/doc/context/third/filter/filter.txt
@@ -44,7 +44,7 @@ standalone, you can install the module using
Depending on your TeX distribution, you may already have the module.
To verify, check if
- kpsewhich t-filter.tex
+ kpsewhich t-filter.mkii
returns a meaningful path. If not, you have to manually install the module.
@@ -61,7 +61,7 @@ and
to refresh the TeX file database (for MkII and MkIV, respectively). If
everything went well
- kpsewhich t-filter
+ kpsewhich t-filter.mkii
will return the path where you stored the file.
@@ -114,30 +114,33 @@ This defines four things:
...
\stopmarkdown
- The contents of the environment are processed by `pandoc` and the output is
- included back in ConTeXt.
+ The contents of the environment are processed by `pandoc` and the output is
+ included back in ConTeXt.
2. A macro
\inlinemarkdown{...}
- The argument of the macro is processed by `pandoc` and the output is included
- back in ConTeXt.
+ The argument of the macro is processed by `pandoc` and the output is included
+ back in ConTeXt.
3. A macro
\processmarkdownfile{...}
- The argument to the macro is a filename, which is processed by `pandoc` and
- the output is included back in ConTeXt.
+ The argument to the macro is a filename, which is processed by `pandoc` and
+ the output is included back in ConTeXt.
4. A macro
\processmarkdownbuffer[...]
- The argument to the macro is the name of a buffer, which is written to an
- external file, processesd by `pandoc` and the output included back in
- ConTeXt.
+ The argument to the macro is the name of a buffer, which is written to an
+ external file, processesd by `pandoc` and the output included back in
+ ConTeXt.
+
+The [wiki](https://github.com/adityam/filter/wiki) page on Github gives the
+setup for common usecases (pandoc, R, etc.)
Dealing with slow filters
-------------------------
diff --git a/Master/texmf-dist/tex/context/third/filter/t-filter.mkiv b/Master/texmf-dist/tex/context/third/filter/t-filter.mkiv
index 9b19204efef..c4565a2af7a 100644
--- a/Master/texmf-dist/tex/context/third/filter/t-filter.mkiv
+++ b/Master/texmf-dist/tex/context/third/filter/t-filter.mkiv
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-filter,
-%D version=2011.12.17,
+%D version=2011.12.27,
%D title=\CONTEXT\ User Module,
%D subtitle=Filter,
%D author=Aditya Mahajan,
@@ -9,7 +9,7 @@
%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{Filter (ver: 2011.12.17)}
+\writestatus{loading}{Filter (ver: 2011.12.27)}
\ifx\undefined\normalexpanded \let\normalexpanded\expanded \fi
@@ -31,6 +31,7 @@
\setinterfaceconstant {output} {output}
\setinterfaceconstant {read} {read}
\setinterfaceconstant {readcommand} {readcommand}
+ \setinterfaceconstant {taglabel} {taglabel}
\stopinterface
@@ -53,7 +54,6 @@
% For backward compatibility
\let\setupexternalfilters \setupexternalfilter
-
%D \subject {Messages}
\def\m!externalfilter{t-filter}
@@ -90,7 +90,7 @@
\starttexdefinition externalfilter@show_filtercommand
\writestatus\m!externalfilter{command : \externalfilterparameter\c!filtercommand}
- \writestatus\m!externalfilter{state : \externalfilterparameter\c!state}
+ \iftraceexternalfilters \writestatus\m!externalfilter{state : \externalfilterparameter\c!state} \fi
\stoptexdefinition
%D \section {The main user macros}
@@ -286,7 +286,7 @@
\normalend}
\doifnot{\externalfilter@get_last_character\externalfilter@get_directory}{/}
- {\showmessage\m!externalfilter{slash}\externalfilter@get_directory
+ {\iftraceexternalfilters \showmessage\m!externalfilter{slash}\externalfilter@get_directory \fi
\edef\externalfilter@get_directory{\externalfilter@get_directory/}}
\stoptexdefinition
@@ -407,10 +407,12 @@
\externalfilterparameter\c!before
\begingroup
+ \dostarttagged{\externalfilterparameter\c!taglabel}\externalfilter@name
\externalfilter@attributes_start \externalfilter@id \c!style \c!color
\processcommacommand[\externalfilterparameter\c!setups]\directsetup
\externalfilterparameter\c!readcommand\externalfilter@output_file
\externalfilter@attributes_stop
+ \dostoptagged
\endgroup
\externalfilterparameter\c!after
@@ -435,6 +437,7 @@
\c!filtercommand={\externalfilterparameter\c!filter\space \externalfilter@input_file},
\c!buffer\c!before=,
\c!buffer\c!after=,
+ \c!taglabel=\externalfilter@id,
]
\doifmodeelse{reuse}