环境:macbook pro, mactex, jupyter notebook, brew

安装pandoc从而支持格式转换为tex:

brew install pandoc

修改tex article 模板,添加中文支持:

find / -name 'article.tplx' >/dev/null | xargs vi
# like .../nbconvert/templates/latex/article.tplx
# 或者分两条命令运行

修改Latex Article头部为:

%===============================================================================
% Latex Article
%===============================================================================
((* block docclass *))
\documentclass[11pt,adobefonts,fancyhdr,hyperref,UTF8]{article}
\usepackage{fontspec, xunicode, xltxtra}
\usepackage{ctex}    %中文支持
\setCJKmainfont{苹方-简}    %中文字体
((* endblock docclass *))

(notebook标题似乎仍然不支持中文)

然后在jupyter notebook中直接下载为 pdf via LaTex即可自动得到pdf文件。或者下载为 latex(.tex) 再用 texshop -> xlatex 编译 亦可。

PS1: mark down 新手指南

PS2:jupyter notebook 设置默认目录方法

关闭notebook, 然后运行:

jupyter notebook --generate-config

# 生成config 文件, like /Users/xxx/.jupyter/jupyter_notebook_config.py

修改jupyter_notebook_config.py文件中 c.NotebookApp.notebook_dir 配置行:

## 用于笔记本和内核的目录。
c.NotebookApp.notebook_dir = '/Users/xxx/Projects/jupyter_workspace'

重启notebook即可

jupyter notebook 目录配置、导出 tex 和 pdf 及中文支持的更多相关文章

  1. jupyter notebook 安装配置使用,+目录插件安装

    1.安装 pip3 install jupyter 2.配置 2.1. 生成一个 notebook 配置文件 jupyter notebook --generate-config /root/.jup ...

  2. jupyter notebook——安装配置

    本地登陆 cmd输入下面的命令,会进入用户主目录 jupyter notebook 在浏览器打开时,提示输入token,复制命令行上的token还是不能进入,其实浏览器上有提示的,按照提示操作即可,输 ...

  3. Jupyter Notebook的配置(密码端口+远程登陆+nbextension)

    1 生成配置文件 linux和mac系统打开终端 windows系统打开anaconda自带的终端 jupyter notebook --generate-config 此时系统会生成 ~/.jupy ...

  4. jupyter notebook远程配置

    服务器端配置 在服务器生成jupyter配置文件 $jupyter notebook --generate-config 生成之后会得到配置文件的路径 启动jupyter,设置密码 In [1]: f ...

  5. windows远程访问ubuntu下的jupyter notebook必要配置

    0.生成配置文件(一般采用默认) jupyter notebook --generate-config 1.打开ipython, 创建一个密文密码 In [1]: from notebook.auth ...

  6. anaconda+jupyter notebook 安装配置

    安装Anaconda 从清华大学开源软件镜像站选择合适自己的版本 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda ...

  7. [Mac][Python][Jupyter Notebook]安装配置和使用

    Jupyter 项目(以前称为 IPython 项目),提供了一套使用功能强大的交互式 shell 进行科学计算的工具,实现了将代码执行与创建实时计算文档相结合. 这些 Notebook 文件可以包含 ...

  8. Ubuntu-16.04 R 安装及Jupyter notebook 配置

    1. R 安装 通常在Terminal下直接apt-get 即可,在16.10下可以get到R-3.3.1,目前最新好像是 R-3.4.2,可以去官方网站下载源码编译 (https://www.r-p ...

  9. Jupyter Notebook的安装

    依赖安装 pandoc texlive-xetex texlive-lang-cjk 安装Jupyter Notebook 本文不讲解在Anaconda中安装. 安装方法 sudo python -m ...

随机推荐

  1. [Leetcode 216]求给定和的数集合 Combination Sum III

    [题目] Find all possible combinations of k numbers that add up to a number n, given that only numbers ...

  2. java-js知识库之二——canvas绘制炫彩气泡

    现在使用canvas绘制气泡,虽说很多人都已经实现过了,可能方法都大同小异,但自己写和看别人写完全是两码事,自己会写的才是自己的,话不多说,直接上代码. 先来一张效果图: 现在上代码,代码有详细的注释 ...

  3. python中的内置函数getattr()介绍及示例

    在python的官方文档中:getattr()的解释如下: ? 1 2 3 getattr(object, name[, default])   Return the value of the nam ...

  4. Python中集合set()的使用及处理

    在Python中集合(set)与字典(dict)比较相似,都具有无序以及元素不能重复的特点 1.创建set 创建set需要一个list或者tuple或者dict作为输入集合 重复的元素在set中会被自 ...

  5. CentOS7.4+OpenStack-Queens版本部署

    一.准备工作.网络选择NAT 创建两台虚拟机:linux-node1.linux-node2 node1: 修改主机名 [root@localhost ~]# hostnamectl set-host ...

  6. ajax csrf

    data 里加 csrfmiddlewaretoken:$("[name='csrfmiddlewaretoken']").val(), 还要再 form表单里加{% csrf_t ...

  7. GMT5 install

    there are two imporant modules called gshhg and dcw when installing GMT5; try to state the locations ...

  8. linux 清理缓存buff/cache

    清理缓存 echo 1 > /proc/sys/vm/drop_cachesecho 2 > /proc/sys/vm/drop_cachesecho 3 > /proc/sys/v ...

  9. 信息技术手册可视化进度报告 基于BeautifulSoup框架的python3爬取数据并连接保存到MySQL数据库

    老师给我们提供了一个word文档,里面是一份信息行业热词解释手册,要求我们把里面的文字存进数据库里面,然后在前台展示出来. 首先面临的问题是怎么把数据导进MySQL数据库,大家都有自己的方法,我采用了 ...

  10. 使用Xshell配置外网访问端口