diff --git a/beamerthemeSimple.sty b/beamerthemeSimple.sty index 2825eb4..cb35f11 100644 --- a/beamerthemeSimple.sty +++ b/beamerthemeSimple.sty @@ -3,7 +3,7 @@ % This file may be distributed and/or modified % under the LaTeX Project Public License \usepackage{libertine} -\RequirePackage[english]{babel} +\RequirePackage[chinese, provide=*]{babel} \RequirePackage{fancyhdr} % header footer \RequirePackage{xcolor} \RequirePackage{bookmark} @@ -20,10 +20,32 @@ \RequirePackage{subcaption} \RequirePackage{amsmath} \RequirePackage{amsthm} -\RequirePackage[utf8]{inputenc} -\RequirePackage{CJKutf8} -\def\zh#1{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}} -\RequirePackage{aliascnt} +% \RequirePackage[utf8]{inputenc} +% \RequirePackage{CJKutf8} +% \def\zh#1{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}} +% \RequirePackage{aliascnt} +\RequirePackage{ctex} +\RequirePackage{fontspec} +\RequirePackage{xeCJK} +% infact italic and BoldItalic fonts are missing +\setCJKmainfont{LXGWNeoZhiSong}[ + Path=./fonts/, + Extension = .ttf, + UprightFont=*, + BoldFont=*, + ItalicFont=*, + BoldItalicFont=* +] +\setCJKsansfont{LXGWWenKai}[ + Path=./fonts/, + Extension = .ttf, + UprightFont=*-Regular, + BoldFont=*-Bold, + ItalicFont=*-Regular, + BoldItalicFont=*-Regular, +] +\XeTeXlinebreaklocale "zh" +\XeTeXlinebreakskip = 0pt plus 1pt % a color box \RequirePackage[breakable, theorems, skins]{tcolorbox} diff --git a/fonts/LXGWNeoZhiSong.ttf b/fonts/LXGWNeoZhiSong.ttf new file mode 100644 index 0000000..1596787 Binary files /dev/null and b/fonts/LXGWNeoZhiSong.ttf differ diff --git a/fonts/LXGWWenKai-Bold.ttf b/fonts/LXGWWenKai-Bold.ttf new file mode 100755 index 0000000..584e15e Binary files /dev/null and b/fonts/LXGWWenKai-Bold.ttf differ diff --git a/fonts/LXGWWenKai-Regular.ttf b/fonts/LXGWWenKai-Regular.ttf new file mode 100755 index 0000000..de26379 Binary files /dev/null and b/fonts/LXGWWenKai-Regular.ttf differ diff --git a/main.pdf b/main.pdf index aa5d1e4..9734f42 100644 Binary files a/main.pdf and b/main.pdf differ diff --git a/main.tex b/main.tex index 916bb3d..61d6bc7 100644 --- a/main.tex +++ b/main.tex @@ -1,8 +1,8 @@ \documentclass{beamer} -\title[template example]{Minimizing the Sum of Piecewise Linear Convex Functions} +\title[中文测试]{Minimizing the Sum of Piecewise Linear Convex Functions - 这是很长很长很长很长的兼有中文和英文的标题} \date{\today} -\author{\texorpdfstring{\zh{丛宇}}{Yu Cong}} +\author{丛宇} % \AtBeginSection[]{ % \frame{\frametitle{Outline}\tableofcontents[currentsection, % subsectionstyle=show/show/shaded]} @@ -17,13 +17,13 @@ \titlepage \end{frame} -\begin{frame}[plain]{Plan} +\begin{frame}[plain]{计划} \tableofcontents \end{frame} -\section{Problems \& Definitions} -\begin{frame}{$\min \sum f_i(a_i\cdot x-b_i)$} -\begin{problem} +\section{Problems \& Definitions 问题定义} +\begin{frame}{$\min \sum f_i(a_i\cdot x-b_i)$ 中文测试} +\begin{problem} regular 中文 jjjfff Given $n$ piecewise linear convex functions $f_1,...,f_n:\R \to \R$ of total $m$ breakpoints, and $n$ linear functions $a_i\cdot x-b_i:\R^d\to \R$, find $\min_x \sum_i f_i(a_i\cdot x-b_i)$. \end{problem} \begin{figure}