summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/context
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-14 16:23:35 +0000
committerKarl Berry <karl@freefriends.org>2012-07-14 16:23:35 +0000
commit608f05b308304f3fac331cf7cacc5326e7955108 (patch)
tree77037d6e341af6f68f756586b8c1935c3baecb43 /Master/texmf-dist/doc/context
parent8ff57bdca1f2f31861913ebc22961fdb89240cbd (diff)
context-filter (17jun12)
git-svn-id: svn://tug.org/texlive/trunk@27048 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/context')
-rw-r--r--Master/texmf-dist/doc/context/third/filter/filter.txt45
1 files changed, 41 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/context/third/filter/filter.txt b/Master/texmf-dist/doc/context/third/filter/filter.txt
index 93d8df6e12b..b98325b2fec 100644
--- a/Master/texmf-dist/doc/context/third/filter/filter.txt
+++ b/Master/texmf-dist/doc/context/third/filter/filter.txt
@@ -141,6 +141,37 @@ The above `\defineexternalfilter` macro defines:
The [wiki](https://github.com/adityam/filter/wiki) page on Github gives the
setup for common usecases (pandoc, R, etc.)
+Inheriting setup from other commands
+-------------------------------------
+
+It is also possible to inherit the settings from another filter. For example,
+
+ \defineexternalfilter
+ [filterstyle]
+ [color=red,
+ style=bold]
+
+ \defineexternalfilter
+ [markdown]
+ [filterstyle]
+ [filter={pandoc -w context -o \externalfilteroutputfile },
+ style=italic]
+
+Notice the three arguments to `\defineexternalfilter`. The first argument
+(`markdown`) is the name of the new filter; the second argument (`filterstyle`)
+is the name of the filter whose settings we want to inherit, and the third
+argument (`filter=...`) are the new settings for `markdown` filter. The above
+definition is same as:
+
+ \defineexternalfilter
+ [filter={pandoc -w context -o \externalfilteroutputfile },
+ style=italic,
+ color=red]
+
+Note that if a setting (like `style` above) is defined both in the new filter
+and the parent filter, then the value of the new filter (`style=italic` above)
+is used.
+
Dealing with slow filters
-------------------------
@@ -493,10 +524,15 @@ file. To use such markdown files in ConTeXt, I can just use
\processmarkdownfile{filename.md}
+By default, the file is searched the current directory and in the directories
+specified by `\usepath`. In addition, in MkIV, the parent and grand-parent
+directories are also searched. If the file is not in one of these locations,
+specify a full or a relative path to the file.
+
The general macro is `\process<filter>file{...}`, which takes the name of a file
-**or a url** as an argument and uses that file as the input file for the filter. The rest of
-the processing is the same as with `\start<filter>` ... `\stop<filter>`
-environment.
+**or a url (MkIV only)** as an argument and uses that file as the input file for
+the filter. The rest of the processing is the same as with `\start<filter>` ...
+`\stop<filter>` environment.
The `\process<filter>file` macro also takes an optional argument for setup
options:
@@ -539,7 +575,6 @@ or use
to compile the file.
-
Processing existing buffers
---------------------------
@@ -851,3 +886,5 @@ Version History
- Added `location`, `spacebefore` and `spaceafter` keys.
- **2012.05.01**
- Added `align` key.
+- **2012.06.20**
+ - Support for `\usepath`