[IPython-dev] Input encoding problem with > character and nbconvert

Ian Bell ian.h.bell at gmail.com
Wed Apr 30 12:37:08 EDT 2014


Yeah I worked around it - should I file this as an issue on github?


On Wed, Apr 30, 2014 at 6:26 PM, Matthias Bussonnier <
bussonniermatthias at gmail.com> wrote:

> You can use \lt and \gt for lower and greater than in the meantime.
> --
> M
>
> Envoyé de mon iPhone
>
> > Le 30 avr. 2014 à 16:58, Ian Bell <ian.h.bell at gmail.com> a écrit :
> >
> > I have put together a MWE that demonstrates the problem I have.
> >
> > When you have a markdown cell with $>$ in it, it cannot be converted
> properly to PDF using LaTeX.  I was able to work around by moving the
> greater than symbol out of math mode, but this smells like a bug to me.
> >
> > The file and the error I get are below.
> >
> > Ian
> >
> > The ipynb contents are
> > {
> >  "metadata": {
> >   "name": ""
> >  },
> >  "nbformat": 3,
> >  "nbformat_minor": 0,
> >  "worksheets": [
> >   {
> >    "cells": [
> >     {
> >      "cell_type": "markdown",
> >      "metadata": {},
> >      "source": [
> >       "$A>B$"
> >      ]
> >     },
> >     {
> >      "cell_type": "code",
> >      "collapsed": false,
> >      "input": [],
> >      "language": "python",
> >      "metadata": {},
> >      "outputs": []
> >     }
> >    ],
> >    "metadata": {}
> >   }
> >  ]
> > }
> >
> > and the error is :
> >
> > C:\Users\Belli\Documents\Code\CoolProp\doc\notebooks>ipython nbconvert
> --to latex --post PDF bad_gt.ipynb
> > [NbConvertApp] Using existing profile dir:
> u'C:\\Users\\Belli\\.ipython\\profile_default'
> > [NbConvertApp] Converting notebook bad_gt.ipynb to latex
> > [NbConvertApp] Support files will be in bad_gt_files\
> > [NbConvertApp] Loaded template latex_article.tplx
> > [NbConvertApp] Writing 11619 bytes to bad_gt.tex
> > [NbConvertApp] Building PDF
> > [NbConvertApp] Running pdflatex 3 times: ['pdflatex', 'bad_gt.tex']
> > [NbConvertApp] CRITICAL | pdflatex failed: ['pdflatex', 'bad_gt.tex']
> > This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)
> > entering extended mode
> > (C:\Users\Belli\Documents\Code\CoolProp\doc\notebooks\bad_gt.tex
> > LaTeX2e <2011/06/27>
> > Babel <v3.8m> and hyphenation patterns for english, afrikaans,
> ancientgreek, ar
> > abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan,
> coptic,
> > croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish,
> french, ga
> > lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian,
> iceland
> > ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin,
> latvian,
> >  lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek,
> ngerman, n
> > german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish,
> portuguese, roman
> > ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish,
> swissgerm
> > an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian,
> usengl
> > ishmax, welsh, loaded.
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
> > Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\adjustbox\adjustbox.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\adjustbox\adjcalc.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\adjustbox\trimclip.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\collectbox\collectbox.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\adjustbox\tc-pdftex.def"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ifoddpage\ifoddpage.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ltxmisc\varwidth.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\color.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\enumerate.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"
> > For additional information on amsmath, use the `?' option.
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\inputenc.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\utf8.def"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\t1enc.dfu")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ot1enc.dfu")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\omsenc.dfu")))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ucs\ucs.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ucs\uni-global.def"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fancyvrb\fancyvrb.sty"
> > Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and
> firstline=lastline fix
> > <2008/02/07> (tvz))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\grffile.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\oberdiek\ifluatex.sty"))))
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\oberdiek\pdftexcmds.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\url\url.sty"))
> >
> > Package hyperref Message: Driver (autodetected): hpdftex.
> >
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\longtable.sty")
> > No file bad_gt.aux.
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
> > [Loading MPS to PDF converter (version 2006.09.02).]
> > )
> > *geometry* driver: auto-detecting
> > *geometry* detected driver: pdftex
> >
> > Package geometry Warning: The marginal notes overrun the paper.
> >      Add 3.73001pt and more to the right margin.
> >
> > *geometry* verbose mode - [ preamble ] result:
> > * driver: pdftex
> > * paper: <default>
> > * layout: <same size as paper>
> > * layoutoffset:(h,v)=(0.0pt,0.0pt)
> > * modes:
> > * h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt)
> > * v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt)
> > * \paperwidth=614.295pt
> > * \paperheight=794.96999pt
> > * \textwidth=469.75502pt
> > * \textheight=650.43001pt
> > * \oddsidemargin=0.0pt
> > * \evensidemargin=0.0pt
> > * \topmargin=-37.0pt
> > * \headheight=12.0pt
> > * \headsep=25.0pt
> > * \topskip=10.0pt
> > * \footskip=30.0pt
> > * \marginparwidth=65.0pt
> > * \marginparsep=11.0pt
> > * \columnsep=10.0pt
> > * \skip\footins=9.0pt plus 4.0pt minus 2.0pt
> > * \hoffset=0.0pt
> > * \voffset=0.0pt
> > * \mag=1000
> > * \@twocolumnfalse
> > * \@twosidefalse
> > * \@mparswitchfalse
> > * \@reversemarginfalse
> > * (1in=72.27pt=25.4mm, 1cm=28.453pt)
> >
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ucs\ucsencs.def")
> >
> > Package ucs Warning: ***************************
> > (ucs)                You seem to have loaded inputencoding utf8
> > (ucs)                (LaTeX kernel UTF-8) instead of utf8x (ucs.sty
> UTF-8).
> > (ucs)                Probably you are compiling a document written for a
> > (ucs)                pre-august-2004 ucs.sty.
> > (ucs)                ***************************
> > (ucs)                Please use \usepackage[utf8x]{inputenc} instead of
> > (ucs)                \usepackage[utf8]{inputenc}.
> > (ucs)                ***************************
> > (ucs)                If you should really want to use ucs.sty and
> kernel's
> > (ucs)                utf8.def together, use
> \usepackage[utf8x,utf8]{inputenc}
> > (ucs)                to disable compatibility mode
> > (ucs)                ***************************
> > (ucs)                Activating compatibility mode.
> > (ucs)                ***************************
> > (ucs)                 on input line 218.
> >
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ucs\utf8x.def")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
> > ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\oberdiek\gettitlestring.sty"))
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
> > ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")
> >
> > LaTeX Warning: No \author given.
> >
> > ! Misplaced alignment tab character &.
> > l.226     $A&
> >              gt;B$
> > ?
> > ! Emergency stop.
> > l.226     $A&
> >              gt;B$
> > !  ==> Fatal error occurred, no output PDF file produced!
> > Transcript written on bad_gt.log.
> >
> > [NbConvertApp] Removing temporary LaTeX files
> >
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> _______________________________________________
> 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/20140430/6d08a3cf/attachment.html>


More information about the IPython-dev mailing list