[IPython-dev] Making custom converter/template with nbconvert
Rafał Skolasiński
rjtskolasinski at gmail.com
Sun Jan 4 08:19:01 EST 2015
Hi Raniere,
The problem occurred when folder was named 'files'. When I renamed it to
'figures' it behaves as in your example. I must say that this very weird
behavior but there must be some reason for that probably.
Cheers,
Rafał
2015-01-04 3:27 GMT+01:00 Raniere Silva <ra092767 at ime.unicamp.br>:
> Hi Rafał,
>
> > I have some problem with figures that are put inside text in markdowns,
> > i.ex. as
> > 
> > which goes in html into <img src="dot.png" alt="some_caption" /><p
> > class="caption">caption</p>
> > (as a template very similar to basic one).
> >
> > How can force converter to not skip 'files/' to have src="files/dot.png"?
> > Probably it lies somewhere in template but I couldn't localize it.
>
> I couldn't reproduce your problem.
>
> $ cat sample.ipynb
> {
> "cells": [
> {
> "cell_type": "markdown",
> "metadata": {},
> "source": [
> ""
> ]
> },
> {
> "cell_type": "code",
> "execution_count": null,
> "metadata": {
> "collapsed": true
> },
> "outputs": [],
> "source": []
> }
> ],
> "metadata": {
> "kernelspec": {
> "display_name": "IPython (Python 3)",
> "name": "python3"
> },
> "language_info": {
> "codemirror_mode": {
> "name": "ipython",
> "version": 3
> },
> "file_extension": ".py",
> "mimetype": "text/x-python",
> "name": "python",
> "nbconvert_exporter": "python",
> "pygments_lexer": "ipython3"
> },
> "signature":
> "sha256:5c8cb31d4083cbf815d3e1dff7a3cc229fa54b9c02cff82af4548cef72581573"
> },
> "nbformat": 4,
> "nbformat_minor": 0
> }
> $ ipython nbconvert --to html sample.ipynb
> [NbConvertApp] Using existing profile dir:
> '/home/raniere/.ipython/profile_default'
> [NbConvertApp] Converting notebook sample.ipynb to html
> [NbConvertApp] Support files will be in sample_files/
> [NbConvertApp] Loaded template full.tpl
> [NbConvertApp] Writing 223380 bytes to sample.html
> $ grep '<img' sample.html
> <p><img src="folder/bar.jpg" alt="foo"></p>
>
> What version of IPython/Jupyter are you using? I tested with
>
> $ ipython --version
> 3.0.0-dev
>
> Cheers,
> Raniere
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150104/94f8eab6/attachment.html>
More information about the IPython-dev
mailing list