[IPython-dev] Use the IPython Notebook to generate reST output for SciPy proceedings?

David P. Sanders dpsanders at ciencias.unam.mx
Wed Jun 4 19:33:07 EDT 2014


On Wed, Jun 4, 2014 at 6:29 PM, David P. Sanders <dpsanders at ciencias.unam.mx
> wrote:

> Hi all,
>
> I am writing my contribution to the SciPy 2014 proceedings.
> This is required to be in reStructuredText (a strange choice, in my
> opinion...)
>
> Since I am far from a reST expert, I thought that it would be a good idea
> to use the IPython Notebook and export the results to reST:
>
> ipython nbconvert proceedings.ipynb --to rst
>
> This mostly does, indeed, work (with some tweaking to splice in the
> article header in the correct format).
>
> However, the resulting reST apparently is not in the correct format.
> In particular, displayed equations are rendered as
>
> .. math:: a = \pm 2^e \times m.
>
> instead of
>
> .. math::
>
>      a = \pm 2^e \times m.
>
> which seems to be the required format
>
> and Python code blocks as
>
> .. code:: python
>
> instead of
>
> .. code-block:: python
>
>
> Does anybody have a suitable template file?
> I'm sure it should be easy to do, but I have not yet got round to playing
> with templates, and I have not been following the latest developments so
> would not even know where to start looking.
>

OK, found the template file.
Modifying code to code-block is trivial, but what is the correct syntax to
add the new line and spacing after .. math:: ?



>
> Thanks,
> David.
>
> --
> Dr. David P. Sanders
>
> Profesor Titular "A" / Associate Professor
> Departamento de Física, Facultad de Ciencias
> Universidad Nacional Autónoma de México (UNAM)
>
> dpsanders at ciencias.unam.mx
> http://sistemas.fciencias.unam.mx/~dsanders
>
> Cubículo / office: #414, 4o. piso del Depto. de Física
>
> Tel.: +52 55 5622 4965
>



-- 
Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders at ciencias.unam.mx
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140604/7a66c644/attachment.html>


More information about the IPython-dev mailing list