These are chat archives for ipython/ipython

11th
Nov 2014
epifanio
@epifanio
Nov 11 2014 01:22
@minrk i’m tring to use a template for nbconver, what i’m tring to do is to add a template that will “use this solution http://tex.stackexchange.com/questions/5433/can-i-use-an-image-located-on-the-web-in-a-latex-document “ to add images from an url
i know the use of wget directly can be really bad .. but i tought it is a simple solution
essentially the template sghpuld do :
\write18{wget http://www.some-site.com/path/to/image.png} and then
\includegraphics{image.png}
epifanio
@epifanio
Nov 11 2014 01:35
basically i should study ‘style_ipython.tplx’ and extend it using something like : https://github.com/ipython/nbconvert-examples/blob/master/custom_latex_cell_style/scenario1/custom_cell_style.tplx
i’m looking on “where” the includegraphics latex instruction is used .. but i can’t find it. i was looking here : https://github.com/ipython/ipython/tree/master/IPython/nbconvert/templates/latex
epifanio
@epifanio
Nov 11 2014 01:48
also .. now when i di a gist of notebooks using hml with path to a file, the image is no more embedded in the notebook anymore http://nbviewer.ipython.org/gist/epifanio/50f249e174faf8ea7ea4
i tried both html and markdown, the images are not in the gist. it works only for url then .. but the url are notundersood by the pdf/latex export
epifanio
@epifanio
Nov 11 2014 15:30
@minrk where is called, in nbconvert src code, the instruction command “pandoc” with —options ?
i was wondering if i can change it from latex to context
seems that context is capable to include graphics from url
from http://johnmacfarlane.net/pandoc/try/ i can see pandoc gas “context” option, and from this : http://tex.stackexchange.com/questions/5433/can-i-use-an-image-located-on-the-web-in-a-latex-document looks like context support syntax like : \externalfigure[http://www.site.com/path/to/figure.png]
epifanio
@epifanio
Nov 11 2014 16:52
i tested in the notebook a markdown syntax like : ![image test](http://tug.org/images/logobw.jpg) generate a proper picture, the same syntax converted with pandoc to ConText generate this code : \placefigure{image test}{\externalfigure[http://tug.org/images/logobw.jpg]} that used in this tex file https://gist.github.com/1f3cda033d65053d4241
compiled with : context test2.tex generate a proper pdf http://epinux.com/shared/testex2.pdf
hi @jdfreder i saw that file, i was looking on ‘where’ it is called from nbconvert. so that i can try to change the outout from latex to context
is it just the input to nbconver ? from coomand line
i checked nbconvert --to doesn’t include context as output
the search in gihub is great :)
i’ll try to add a markdown2context following markdown2latex
epifanio
@epifanio
Nov 11 2014 17:39
i update my ipython fork and added the new function , now i was looking on the code that is executed when latex is selected. i’m sure is not so simple .. but i guess i should work on https://github.com/epifanio/ipython/blob/master/IPython/nbconvert/exporters/pdf.py … trying to add new methods for the option ‘context’ ? at least context is installed as default with mactex (no extra dep involved and is available on apt-get)
maybe adding context_command like latex_command and run_context like run_latex
(if that was correct) I’m lost on what’s next