summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-07 22:51:33 +0000
committerKarl Berry <karl@freefriends.org>2012-05-07 22:51:33 +0000
commit3ae7006344f60f0b1710dc2dba9b5bf3d4b59d2c (patch)
tree5fd3c3ca8052043a86aec6ef2d5fae10664af9d0
parent187167fedfccae89ebeb38445a0ddb3b1df5afa6 (diff)
context-filter (7may12)
git-svn-id: svn://tug.org/texlive/trunk@26248 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/context/third/filter/filter.txt16
-rw-r--r--Master/texmf-dist/tex/context/third/filter/t-filter.mkii11
-rw-r--r--Master/texmf-dist/tex/context/third/filter/t-filter.mkiv25
3 files changed, 30 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/context/third/filter/filter.txt b/Master/texmf-dist/doc/context/third/filter/filter.txt
index 1560d93fa3a..93d8df6e12b 100644
--- a/Master/texmf-dist/doc/context/third/filter/filter.txt
+++ b/Master/texmf-dist/doc/context/third/filter/filter.txt
@@ -78,7 +78,7 @@ on the ConTeXt wiki for detailed instructions.
Basic Usage
-----------
-The steps involved in calling a filter on the contents of an evironment are:
+The steps involved in calling a filter on the contents of an environment are:
1. Write the contents to an external file. This file is the input to the filter,
and is, therefore, called `\externalfilterinputfile`
@@ -229,7 +229,7 @@ The `spacebefore` and `spaceafter` keys accept all values accepted by the
In the paragraph mode, the next line after `\stop<...>` is indented or not based
on the value of the `indentnext` key. The default value is `auto` which indents
the next line if there is an empty line after `\stop<...>`; other options are
-`no`, which never indents the next line and `yes` whcih always indents the next
+`no`, which never indents the next line and `yes` which always indents the next
line.
If you want the `\start<...>` ... `\stop<...>` and the `\type<...>file{...}`
@@ -359,6 +359,8 @@ Standard options
before and after the environment.
- `before` and `after`: to enclose the output in a frame, etc.
- `style` and `color`: to set the color and style of the output.
+- `align`: to set the alignment of the output (only if
+ `location` is `paragraph`).
- `indentnext`: specify if the next line is indented (only if `location` is
`paragraph`).
- `setups`: specify a list of setups (defined using `\startsetups`). These
@@ -509,7 +511,7 @@ Processing remote files
**NOTE** Only works in MkIV
The `\process<filter>file{...}` macro also processes remote files specified
-using urls. For example, to see a typeset version of this manual, use
+using URLs. For example, to see a typeset version of this manual, use
\processmarkdownfile{https://raw.github.com/adityam/filter/master/README.md}
@@ -800,10 +802,10 @@ Version History
- Added `directory=...` option to `\defineexternalfilter` and
`\setupexternalfilters`.
- **2010.12.04**:
- - Bugfix in `directory` code. The option `directory=../something` was
+ - Bug fix in `directory` code. The option `directory=../something` was
handled incorrectly.
- **2011.01.28**
- - Bugfix. The filter counter was not incremented inside a group. Made the
+ - Bug fix. The filter counter was not incremented inside a group. Made the
increment global.
- **2011.02.21**
- Added `style` and `color` options.
@@ -824,7 +826,7 @@ Version History
- **2011.08.23**
- Added `bufferbefore` and `bufferafter` options
- **2011.08.28**
- - Internal change: Defined own macros for setting attrbutes rather than
+ - Internal change: Defined own macros for setting attributes rather than
using built-in ones.
- **2011.09.03**
- Added `filtersetups`
@@ -847,3 +849,5 @@ Version History
- Process remote files
- **2012.04.18**
- Added `location`, `spacebefore` and `spaceafter` keys.
+- **2012.05.01**
+ - Added `align` key.
diff --git a/Master/texmf-dist/tex/context/third/filter/t-filter.mkii b/Master/texmf-dist/tex/context/third/filter/t-filter.mkii
index 46bdf247971..699acbe3d2e 100644
--- a/Master/texmf-dist/tex/context/third/filter/t-filter.mkii
+++ b/Master/texmf-dist/tex/context/third/filter/t-filter.mkii
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-filter,
-%D version=2012.04.18,
+%D version=2012.05.01,
%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: 2012.04.18)}
+\writestatus{loading}{Filter (ver: 2012.05.01)}
\ifx\undefined\normalexpanded \let\normalexpanded\expanded \fi
@@ -42,6 +42,7 @@
\setinterfaceconstant {filter} {filter}
\setinterfaceconstant {filtercommand} {filtercommand}
\setinterfaceconstant {output} {output}
+ \setinterfaceconstant {purge} {purge}
\setinterfaceconstant {read} {read}
\setinterfaceconstant {readcommand} {readcommand}
\stopinterface
@@ -403,7 +404,9 @@
\starttexdefinition externalfilter@read_processed_file_indeed
\doif{\externalfilterparameter\c!location}\v!paragraph
- {\blank[\externalfilterparameter\c!spacebefore]}%
+ {\blank[\externalfilterparameter\c!spacebefore]
+ \doifsomething{\externalfilterparameter\c!align}
+ {\setupalign[\externalfilterparameter\c!align]}}
\externalfilterparameter\c!before
\begingroup
@@ -415,7 +418,7 @@
\externalfilterparameter\c!after
\doif{\externalfilterparameter\c!location}\v!paragraph
- {\blank[\externalfilterparameter\c!spaceafter]}%
+ {\par\blank[\externalfilterparameter\c!spaceafter]}%
\stoptexdefinition
%D \section {Default Values}
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 d4d4b7a66cf..8c3bd732492 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=2012.04.18,
+%D version=2012.05.06,
%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: 2012.04.18)}
+\writestatus{loading}{Filter (ver: 2012.05.06)}
% For backward compatibility
\ifx\grabbufferdata\undefined \let\grabbufferdata \dostartbuffer \fi
@@ -59,11 +59,11 @@
\externalfilter@show_status{defining filter : \currentexternalfilter}%
\doifinset{\externalfilterparameter\c!cache}{\v!yes,\v!force}
{\expandafter\newcounter\csname\externalfilter@count\endcsname}%
- \setevalue{\e!start\currentexternalfilter}{\externalfilter@start[\currentexternalfilter]}%
- \setvalue {\e!stop\currentexternalfilter}{\externalfilter@process_filter}%
- \setevalue{process\currentexternalfilter file}{\externalfilter@process_file[\currentexternalfilter]}%
- \setevalue{process\currentexternalfilter buffer}{\externalfilter@process_buffer[\currentexternalfilter]}%
- \setevalue{inline\currentexternalfilter}{\externalfilter@inline[\currentexternalfilter]}%
+ \setuevalue{\e!start\currentexternalfilter}{\externalfilter@start[\currentexternalfilter]}%
+ \setuvalue {\e!stop\currentexternalfilter}{\externalfilter@process_filter}%
+ \setuevalue{process\currentexternalfilter file}{\externalfilter@process_file[\currentexternalfilter]}%
+ \setuevalue{process\currentexternalfilter buffer}{\externalfilter@process_buffer[\currentexternalfilter]}%
+ \setuevalue{inline\currentexternalfilter}{\externalfilter@inline[\currentexternalfilter]}%
\to \everydefineexternalfilter
% For backward compatibility
@@ -85,7 +85,7 @@
\newif\iftraceexternalfilters
-\def\traceexternalfilters
+\unexpanded\def\traceexternalfilters
{\traceexternalfilterstrue
\enabletrackers[graphic.runfile]}
@@ -417,21 +417,21 @@
\starttexdefinition externalfilter@read_processed_file_indeed
\doif{\externalfilterparameter\c!location}\v!paragraph
- {\blank[\externalfilterparameter\c!spacebefore]}%
+ {\blank[\externalfilterparameter\c!spacebefore]
+ \usealignparameter\externalfilterparameter}
\externalfilterparameter\c!before
\begingroup
\dostarttagged{\externalfilterparameter\c!taglabel}\currentexternalfilter
- \externalfilter@attributes_start \externalfilter@id \c!style \c!color
+ \useexternalfilterstyleandcolor\c!style\c!color
\processcommacommand[\externalfilterparameter\c!setups]\directsetup
\externalfilterparameter\c!readcommand\externalfilter@output_file
- \externalfilter@attributes_stop
\dostoptagged
\endgroup
\externalfilterparameter\c!after
\doif{\externalfilterparameter\c!location}\v!paragraph
- {\blank[\externalfilterparameter\c!spaceafter]}%
+ {\par\blank[\externalfilterparameter\c!spaceafter]}%
\stoptexdefinition
%D \section {Default Values}
@@ -446,6 +446,7 @@
\c!style=,
\c!color=,
\c!indentnext=\v!auto,
+ \c!align=,
\c!setups=,
\c!continue=\v!no,
\c!cache=\externalfilterparameter\c!continue, % for backward compatibility