环境: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. elasticsearch kabana中创建索引

    在kabana中创建索引和索引类型语法 PUT clockin{ "mappings": { "time": { } }} 查询索引下的所有数据 GET clo ...

  2. python基础之作业1---用户登录

    作业:编写登陆接口 输入用户名密码 认证成功后显示欢迎信息 输错三次后锁定 import sys, os, getpass os.system('clear')i = 0while i < 3: ...

  3. ssh整合报错严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'

    错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...

  4. 基于vue项目的组件中导入mui框架初始化滑动等效果时需移除严格模式的问题

    基于vue项目的组件中导入mui框架初始化滑动等效果时,控制台报错:Uncaught TypeError: 'caller', 'callee', and 'arguments' properties ...

  5. 零基础IDEA整合SpringBoot + Mybatis项目,及常见问题详细解答

    开发环境介绍:IDEA + maven + springboot2.1.4 1.用IDEA搭建SpringBoot项目:File - New - Project - Spring Initializr ...

  6. reinterpret_cast

    reinterpret_cast强制类型转换符 用法: new_type a = reinterpret_cast <new_type> (value) 将value的值转成new_typ ...

  7. 谱聚类(Spectral Clustring)原理

    谱聚类(spectral clustering)是广泛使用的聚类算法,比起传统的K-Means算法,谱聚类对数据分布的适应性更强,聚类效果也很优秀,同时聚类的计算量也小很多,更加难能可贵的是实现起来也 ...

  8. 使用EFCore处理并发冲突

    一.首先添加并发处理标记 在需要进行并发处理的类中添加版本号,并在版本号上使用[Timestamp]标记: public class Department { public int Id { get; ...

  9. 机器学习笔记(三)Logistic回归模型

    Logistic回归模型 1. 模型简介: 线性回归往往并不能很好地解决分类问题,所以我们引出Logistic回归算法,算法的输出值或者说预测值一直介于0和1,虽然算法的名字有“回归”二字,但实际上L ...

  10. Oracle 的几种循环方式介绍

    1 Oracle 中的Goto 用法: declare x number; begin x:=10; --定义的初始值 <<repeat_loop>> --循环点 x:= x- ...