Correct order of packages for unicode in nbconvert to LaTeX

The ucs and inputenc latex packages set the converted notebook up for unicode support.  However, the wrong option (utf8, should be utf8x) is given to the inputenc package and the ucs package should be loaded before  inputenc.   The relevant part of the pdflatex log from "ipython nbconvert --to latex notebook.ipynb; pdflatex notebook.ipynb" is:


(/usr/local/texlive/2013/texmf-dist/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 213.

(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/utf8x.def)

This tiny patch uses the utf8x option and gets the package order right.  More information about ucs from "texdoc ucs".