LuaTeX-ja与中文排版笔记

\documentclass{article}
\usepackage{luatexja-fontspec}
\setmainjfont{FandolSong}


\begin{document}
    测试

    在 Lua\TeX{} 中正常地使用中文。获得自动的\textbf{字体选择},标点“压缩”,以及正确的断行处理等特性。

\end{document}
\documentclass{article}
\usepackage{fontspec}
\setmainfont{MS PGothic}
\begin{document}
我希望這是,翻譯是由谷歌提供的中國文字。
\end{document}

speed up

http://www.howtotex.com/tips-tricks/faster-latex-part-iv-use-a-precompiled-preamble/

mydoc-noformat.tex

%% preamble: static and dynamic part
% static part of the preamble (stuff that does not change every now and then)
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subfig}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{xspace}
\usepackage{siunitx}
\usepackage{cleveref}
\usepackage{url}
\usepackage{natbib}
\usepackage{tikz,pgfplots}

% the \endofdump part 'saves' everything above into one precompiled preamble, which gets loaded every time the LaTeX document is processed. This saves a lot of time mostly. 
% NOTE: uncomment the following line if you want to create the precompiled preamble format file!
%\endofdump

% dynamic part of the preamble (stuff that might change)
% \includeonly{} would be an example of a dynamic part in your preamble
% if you're using the minitoc package, also put it in the dynamic part as this package does not comply with mylatexformat
\usepackage{minitoc}

\begin{document}
	\frame{
		This is the file without precompiled preamble
	} 
\end{document}

mydoc-format.tex

支持英文

%&mydoc

% dynamic part of the preamble (stuff that might change)
% \includeonly{} would be an example of a dynamic part in your preamble
% if you're using the minitoc package, also put it in the dynamic part as this package does not comply with mylatexformat
\usepackage{minitoc}

\begin{document}
	\frame{
		This is the file with precompiled preamble
	} 
\end{document}

pdftex -ini -jobname=”mydoc” “&pdflatex” mylatexformat.ltx mydoc-noformat.tex

pdflatex mydoc-format.tex

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值