Skip to content

Correct order of packages for unicode in nbconvert to LaTeX#4806

Merged
minrk merged 1 commit into
ipython:masterfrom
richardeverson:ucs
Jan 16, 2014
Merged

Correct order of packages for unicode in nbconvert to LaTeX#4806
minrk merged 1 commit into
ipython:masterfrom
richardeverson:ucs

Conversation

@richardeverson
Copy link
Copy Markdown
Contributor

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".

minrk added a commit that referenced this pull request Jan 16, 2014
Correct order of packages for unicode in nbconvert to LaTeX
@minrk minrk merged commit ba5e32a into ipython:master Jan 16, 2014
@richardeverson richardeverson deleted the ucs branch January 16, 2014 16:23
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Correct order of packages for unicode in nbconvert to LaTeX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants