Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86866

Re: rst and pypandoc

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From al.basili@gmail.com (alb)
Newsgroups comp.lang.python
Subject Re: rst and pypandoc
Date 3 Mar 2015 20:50:16 GMT
Lines 39
Message-ID <clml46F2fphU4@mid.individual.net> (permalink)
References <cliji5FvctU1@mid.individual.net> <54f458a5$0$13003$c3e8da3$5496439d@news.astraweb.com> <clj866F68tpU1@mid.individual.net> <mailman.41.1425307075.13471.python-list@python.org> <clk70gFeal8U2@mid.individual.net> <cll3adFl0hpU1@mid.individual.net>
X-Trace individual.net Oeo2KGb3G1GgHfgsL5xSfQb5TaBtSm/fzRbWaYB7y/Tl2HYSqB
X-Orig-Path not-for-mail
Cancel-Lock sha1:W6/l+ubHrWKPodvVcenM/4re3f8=
User-Agent tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/3.2.0-4-686-pae (i686))
Xref csiph.com comp.lang.python:86866

Show key headers only | View raw


Hi Gregory,

Gregory Ewing <greg.ewing@canterbury.ac.nz> wrote:
[]
> From a cursory reading of the pypandoc docs, it looks
> like enabling the raw_tex extension in pypandoc will
> give you what you want.
> 
> Search for raw_tex on this page:
> 
> http://johnmacfarlane.net/pandoc/README.html

As far as I understood the docs, it seems this extension should be 
passed to pandoc through +EXTERNSION, but I don't seem to get it 
working:

In [14]: print pypandoc.convert(s, 'latex', format="md+raw_tex")
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-14-f41e67057a59> in <module>()
----> 1 print pypandoc.convert(s, 'latex', format="md+raw_tex")

/usr/local/lib/python2.7/dist-packages/pypandoc.pyc in convert(source, to, format, extra_args, encoding)
     25     '''
     26     return _convert(_read_file, _process_file, source, to,
---> 27                     format, extra_args, encoding=encoding)
     28 
     29 

/usr/local/lib/python2.7/dist-packages/pypandoc.pyc in _convert(reader, processor, source, to, format, extra_args, encoding)
     50         raise RuntimeError(
     51             'Invalid input format! Expected one of these: ' +
---> 52             ', '.join(from_formats))
     53 
     54     if to not in to_formats:

RuntimeError: Invalid input format! Expected one of these: native, json, markdown, markdown+lhs, rst, rst+lhs, docbook, textile, html, latex, latex+lhs

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 07:59 +0000
  Re: rst and pypandoc Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-03-02 12:03 +0100
  Re: rst and pypandoc Dave Angel <davea@davea.name> - 2015-03-02 07:03 -0500
    Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 12:36 +0000
  Re: rst and pypandoc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-02 23:33 +1100
    Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 13:51 +0000
      Re: rst and pypandoc Dave Angel <davea@davea.name> - 2015-03-02 09:08 -0500
        Re: rst and pypandoc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-03 01:43 +1100
          Re: rst and pypandoc Dave Angel <davea@davea.name> - 2015-03-02 13:55 -0500
          Re: rst and pypandoc Ben Finney <ben+python@benfinney.id.au> - 2015-03-03 06:09 +1100
          Re: rst and pypandoc Dave Angel <davea@davea.name> - 2015-03-02 14:16 -0500
        Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 22:30 +0000
          Re: rst and pypandoc Chris Angelico <rosuav@gmail.com> - 2015-03-03 09:51 +1100
          Re: rst and pypandoc Ben Finney <ben+python@benfinney.id.au> - 2015-03-03 10:18 +1100
          Re: rst and pypandoc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-03 10:32 +1100
            Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-03 20:35 +0000
        Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 22:40 +0000
          Re: rst and pypandoc Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-02 23:08 +0000
            Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-03 20:37 +0000
          Re: rst and pypandoc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-03 10:22 +1100
            Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-03 20:46 +0000
          Re: rst and pypandoc Dave Angel <davea@davea.name> - 2015-03-02 18:23 -0500
      Re: rst and pypandoc MRAB <python@mrabarnett.plus.com> - 2015-03-02 14:37 +0000
        Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-02 22:37 +0000
          Re: rst and pypandoc Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-03 19:40 +1300
            Re: rst and pypandoc al.basili@gmail.com (alb) - 2015-03-03 20:50 +0000
              Re: rst and pypandoc Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-04 11:27 +1300
      Re: rst and pypandoc MRAB <python@mrabarnett.plus.com> - 2015-03-02 14:40 +0000
      Re: rst and pypandoc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-03 02:09 +1100

csiph-web