Am Freitag, den 29.04.2011, 18:13 -0400 schrieb Aditya Mahajan:
> On Fri, 29 Apr 2011, Paul Menzel wrote:

> > the filter module installed using
> >
> >     $ ./first-setup.sh --extras="t-filter"
> >
> > does not work with the following example, which is also attached.
> >
> >        \usemodule[filter]
> >        \defineexternalfilter[rest][filtercommand={pandoc -f rst -t context 
> > -o \externalfilteroutputfile\space \externalfilterinputfile}]
> >        \starttext
> >        There should be a table here.
> >        \startrest
> >        =========    =========
> >          test            table
> >        =========    =========
> >        α                 b
> >        c                 d
> >        ========     ========
> >        \stoprest
> >        \stoptext
> >
> > The output file `minimal-temp-rest.tex` is just empty.
> >
> > Replacing »α« by »a« solves the problem.
> 
> Weird.
> 
> > Running `filtercommand` in a terminal produces the *correct* output
> > though and no empty file.
> >
> > Is that a known problem?
> 
> No. The content of the file should not affect whether the filter is run or 
> not. Can you add \traceexternalfilters on the top and check the output 
> (look for lines starting with t-filter).

You already added it in your commit of the test file.

        […]
        resolvers       > modules > loaded: 'filter'
        (t-filter.tex
        loading         > ConTeXt User Module / Filter
        resolvers       > modules > loaded: 'module-catcodes'
        (t-module-catcodes.tex
        loading         > ConTeXt User Module / Module Catcodes
        )) (/opt/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(/opt/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/opt/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-tx.map}{/opt/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/opt/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
        fonts           > virtual math > the mapping is incomplete for 'txmath' 
at 7pt
        system          > begin file tests/rest at line 11
        t-filter        > current filter : rest
        t-filter        > base file : rest-temp-rest
        t-filter        > input file : rest-temp-rest.tmp
        t-filter        > output file : rest-temp-rest.tex
        t-filter        > command : pandoc -f rst -t context -o 
rest-temp-rest.tex rest-temp-rest.tmp
        (rest-temp-rest.tex)
        backend         > xmp > using file 
'/opt/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
        pages           > flushing realpage 1, userpage 1, subpage 1
        system          > end file tests/rest at line 21
         
)</opt/context/tex/texmf/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf>
        […]
        $ more rest-temp-rest.t*
        ::::::::::::::
        rest-temp-rest.tex
        ::::::::::::::
        ::::::::::::::
        rest-temp-rest.tmp
        ::::::::::::::
        =========       =========
          test            table
        =========       =========
        α                 b
        c                 d
        ========        ========

Please find `rest.log` attached.

> > I also include a patch adding this example into `tests/` in [1].
> 
> Thanks. I added it to the test suite.

You can save the mbox file and use `git am path/to/mbox` next time.

> The file works correctly on my machine.

That is weired.

> Which version of pandoc are you using?

        $ pandoc --version
        pandoc 1.5.1.1
        Compiled with syntax highlighting support for:
        Ada, Alert, Asp, Awk, Bash, Bibtex, C, Cmake, Coldfusion, Commonlisp, 
Cpp, Css,
        D, Djangotemplate, Doxygen, Dtd, Eiffel, Erlang, Fortran, Haskell, 
Html, Java,
        Javadoc, Javascript, Json, Latex, Lex, LiterateHaskell, Lua, Makefile, 
Matlab,
        Mediawiki, Modula3, Nasm, Objectivec, Ocaml, Octave, Pascal, Perl, Php,
        Postscript, Prolog, Python, Relaxngcompact, Rhtml, Ruby, Scala, Scheme, 
Sgml,
        Sql, SqlMysql, SqlPostgresql, Tcl, Texinfo, Xml, Xslt, Yacc
        Copyright (C) 2006-2010 John MacFarlane
        Web:  http://johnmacfarlane.net/pandoc
        This is free software; see the source for copying conditions.  There is 
no
        warranty, not even for merchantability or fitness for a particular 
purpose.

As already written in my last mail. Executing the command directly works
fine.

        $ pandoc -f rst -t context -o rest-temp-rest.tex rest-temp-rest.tmp
        $ more rest-temp-rest.t*::::::::::::::
        rest-temp-rest.tex
        ::::::::::::::
        \placetable[here]{none}
        \starttable[|l|l|]
        \HL
        \NC test
        \NC table
        \NC\AR
        \HL
        \NC α
        \NC b
        \NC\AR
        \NC c
        \NC d
        \NC\AR
        \HL
        \stoptable
        ::::::::::::::
        rest-temp-rest.tmp
        ::::::::::::::
        =========       =========
          test            table
        =========       =========
        α                 b
        c                 d
        ========        ========

> Does the error also occur if you use the dev branch from github?

Yes.

>    $git checkout dev
>    $context tests/rest

For the Git newbies. If you do this the first time, you need to do

        $ git checkout -b dev origin/dev

beforehand.


Thanks,

Paul
(tests/rest.tex

ConTeXt  ver: 2011.04.27 21:50 MKIV  fmt: 2011.4.29  int: english/english

system          > cont-new.mkiv loaded
(/opt/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > rest.top loaded
system          > options > begin of optionfile
system          > options >
system          > options > % runtime options files (command line driven)
system          > options > \unprotect
system          > options > % feedback and basic job control
system          > options > % handy for special styles
system          > options > \startluacode
system          > options > document = document or { }
system          > options > document.arguments={
system          > options > }
system          > options > document.files={
system          > options >  "tests/rest",
system          > options > }
system          > options > \stopluacode
system          > options > % process info
system          > options > \setupsystem[inputfile=tests/rest]
system          > options > \setupsystem[\c!n=2,\c!m=3]
system          > options > % modes
system          > options > % options (not that important)
system          > options > \startsetups *runtime:options
system          > options > \stopsetups
system          > options > % styles and modules
system          > options > \startsetups *runtime:modules
system          > options > \stopsetups
system          > options > % done
system          > options > \protect \endinput
system          > options >
system          > options > end of optionfile
(rest.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
resolvers       > modules > loaded: 'filter'
(t-filter.tex
loading         > ConTeXt User Module / Filter
resolvers       > modules > loaded: 'module-catcodes'
(t-module-catcodes.tex
loading         > ConTeXt User Module / Module Catcodes
)) (/opt/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (/opt/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/opt/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-tx.map}{/opt/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/opt/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > virtual math > the mapping is incomplete for 'txmath' at 7pt
system          > begin file tests/rest at line 11
t-filter        > current filter : rest
t-filter        > base file : rest-temp-rest
t-filter        > input file : rest-temp-rest.tmp
t-filter        > output file : rest-temp-rest.tex
t-filter        > command : pandoc -f rst -t context -o rest-temp-rest.tex rest-temp-rest.tmp
(rest-temp-rest.tex)
backend         > xmp > using file '/opt/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
system          > end file tests/rest at line 21
 )</opt/context/tex/texmf/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf>
mkiv lua stats  > used config file          - selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - /opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > input load time           - 0.010 seconds
mkiv lua stats  > stored bytecode data      - 284 modules, 58 tables, 342 chunks
mkiv lua stats  > loaded tex modules        - 2 requested, 2 found (*-filter *-module-catcodes), 0 missing
mkiv lua stats  > cleaned up reserved nodes - 33 nodes, 9 lists of 423
mkiv lua stats  > node memory usage         - 19 glue_spec
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 2397 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > callbacks                 - 2529 direct, 3469 indirect, 5998 total
mkiv lua stats  > randomizer                - resumed with value 0.81004799567631
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats  > result saved in file      - rest.pdf
mkiv lua stats  > loaded fonts              - 12 files: lmmono10-regular.otf lmsans10-regular.otf texgyretermes-bold.otf texgyretermes-bolditalic.otf texgyretermes-regular.otf rtxmi.tfm rtxptmri.tfm rtxr.tfm txex.tfm txsy.tfm txsya.tfm txsyb.tfm
mkiv lua stats  > fonts load time           - 0.308 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.66.0-2011041216
mkiv lua stats  > control sequences         - 30417 of 165536
mkiv lua stats  > current memory usage      - 25 MB (ctx: 26 MB)
mkiv lua stats  > runtime                   - 0.997 seconds, 1 processed pages, 1 shipped pages, 1.003 pages/second

Attachment: signature.asc
Description: This is a digitally signed message part

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to