How to change pdflatex to xelatex in nbconvert

575 views
Skip to first unread message

Xuefeng LIU

unread,
Jul 23, 2015, 10:50:07 PM7/23/15
to Project Jupyter

When exporting an ipython notebook to PDF(in the File/Download as  menu on a browser), 
the default tex compiler is pdflatex, but it cannot support Chinese-Japanese-Korean characters.

So I would like to change "pdflatex" to "xelatex" or other latex system. 
I am wondering how to customize the setting for ipython.

Below is the command that I run on server:

sudo /usr/bin/python3 /usr/local/bin/ipython3 notebook --profile-dir=/etc/ces/ipython/profile_myserver/ --user=XXXX --ipython-dir=/home/XXXX/.config/ipython --notebook-dir=/home/XXXX --logfile=/tmp/notebook.log

I add one option to "/etc/ces/ipython/profile_myserver/ipython_config.py":

c.PDFPostProcessor.latex_command = [u'xelatex', u'{filename}']

But it does not work.

Could anyone give me some advice?

Thanks ahead!

Xuefeng LIU
 

Xuefeng LIU

unread,
Jul 24, 2015, 5:38:23 AM7/24/15
to Project Jupyter, xfliu...@gmail.com
Hi, 

I found the solution. Sorry to bother all of you.

c.PDFExporter.latex_command = ['xelatex', '{filename}']

I got this solution in the answer to other questions by accident.
I am wondering where is the documentation for all the option description.

2015年7月24日金曜日 11時50分07秒 UTC+9 Xuefeng LIU:

Thomas Kluyver

unread,
Jul 24, 2015, 1:41:55 PM7/24/15
to jup...@googlegroups.com
On 24 July 2015 at 02:38, Xuefeng LIU <xfliu...@gmail.com> wrote:
I am wondering where is the documentation for all the option description.

Reply all
Reply to author
Forward
0 new messages