Compare commits

..

1 Commits

Author SHA1 Message Date
12971ece2f use custom fonts. seems good 2025-03-22 15:37:09 +08:00
7 changed files with 42 additions and 30 deletions

View File

@@ -1,5 +0,0 @@
$pdf_mode = 1; # 生成PDF
$latex = 'xelatex %O %S'; # 用 xelatex 替代 latex
$pdflatex = 'xelatex %O %S'; # 用 xelatex 替代 pdflatex
$dvi_mode = 0; # 禁用DVI输出
$postscript_mode = 0; # 禁用PS输出

View File

@@ -1,19 +1,13 @@
% !TEX program = xelatex % Copyright 2018 by Zhibo Wang
% !TEX TS-program = xelatex %
% fonts % This file may be distributed and/or modified
\RequirePackage[sfdefault]{FiraSans} % under the LaTeX Project Public License
\RequirePackage{FiraMono} \usepackage{libertine}
\renewcommand{\rmfamily}{\sffamily} \RequirePackage[chinese, provide=*]{babel}
\RequirePackage[fakebold]{firamath-otf}
\RequirePackage{xeCJK}
\setCJKmainfont{Source Han Sans SC}
\RequirePackage[english]{babel}
\RequirePackage{fancyhdr} % header footer \RequirePackage{fancyhdr} % header footer
\RequirePackage[dvipsnames]{xcolor} \RequirePackage{xcolor}
\RequirePackage{bookmark} \RequirePackage{bookmark}
\RequirePackage{hyperref}[colorlinks=true,urlcolor=Blue,citecolor=Green,linkcolor=BrickRed,unicode] \RequirePackage{hyperref}[colorlinks=true,urlcolor=Blue,citecolor=Green,linkcolor=BrickRed,unicode]
\RequirePackage{natbib}
\RequirePackage{graphicx} % Allows including images \RequirePackage{graphicx} % Allows including images
\RequirePackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables \RequirePackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
% \RequirePackage{tikz} % \RequirePackage{tikz}
@@ -29,7 +23,29 @@
% \RequirePackage[utf8]{inputenc} % \RequirePackage[utf8]{inputenc}
% \RequirePackage{CJKutf8} % \RequirePackage{CJKutf8}
% \def\zh#1{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}} % \def\zh#1{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
\RequirePackage{aliascnt} % \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 % a color box
\RequirePackage[breakable, theorems, skins]{tcolorbox} \RequirePackage[breakable, theorems, skins]{tcolorbox}
@@ -131,7 +147,7 @@
\setbeamercolor{alerted text}{fg=beamer@simple@color} \setbeamercolor{alerted text}{fg=beamer@simple@color}
\setbeamerfont{block title alerted}{series=\mdseries} \setbeamerfont{block title alerted}{series=\mdseries}
\setbeamerfont{alerted text}{series=\bfseries\boldmath} \setbeamerfont{alerted text}{series=\bfseries\boldmath}
\hypersetup{colorlinks=true,linkcolor=,citecolor=Green,urlcolor=oliver} \hypersetup{colorlinks,linkcolor=,urlcolor=oliver}
% \usefonttheme[onlymath]{serif} % \usefonttheme[onlymath]{serif}
\setbeamerfont{frametitle}{series=\bfseries\boldmath} \setbeamerfont{frametitle}{series=\bfseries\boldmath}
\setbeamerfont{block title}{series=\bfseries\boldmath} \setbeamerfont{block title}{series=\bfseries\boldmath}
@@ -141,14 +157,15 @@
% theorem env % theorem env
\setbeamertemplate{theorem begin}{% \setbeamertemplate{theorem begin}{%
{ {
\vspace{5pt}% \vspace{5pt}
\usebeamerfont*{block title}% \usebeamerfont*{block title}%
\selectfont% \selectfont
\usebeamercolor[fg]{block title}% \usebeamercolor[fg]{block title}%
\textbf{% \textbf{
\inserttheoremname \inserttheoremname
\inserttheoremnumber % \inserttheoremnumber
\ifx \inserttheoremaddition \empty \else\ [\inserttheoremaddition]\fi \ifx \inserttheoremaddition \empty \else\ [\inserttheoremaddition]\fi
\inserttheorempunctuation
} }
} }
} }
@@ -157,7 +174,7 @@
\setbeamertemplate{proof begin}{% \setbeamertemplate{proof begin}{%
{\vspace{5pt} {\vspace{5pt}
\usebeamercolor[fg]{block title} \usebeamercolor[fg]{block title}
\textit{\textbf{Proof:}}} \textit{Proof.}}
} }
\setbeamertemplate{proof end}{ \setbeamertemplate{proof end}{
\qedhere \qedhere

BIN
fonts/LXGWNeoZhiSong.ttf Normal file

Binary file not shown.

BIN
fonts/LXGWWenKai-Bold.ttf Executable file

Binary file not shown.

BIN
fonts/LXGWWenKai-Regular.ttf Executable file

Binary file not shown.

BIN
main.pdf

Binary file not shown.

View File

@@ -1,6 +1,6 @@
\documentclass{beamer} \documentclass{beamer}
\title[template example]{Minimizing the Sum of Piecewise Linear Convex Functions} \title[中文测试]{Minimizing the Sum of Piecewise Linear Convex Functions - 这是很长很长很长很长的兼有中文和英文的标题}
\date{\today} \date{\today}
\author{丛宇} \author{丛宇}
% \AtBeginSection[]{ % \AtBeginSection[]{
@@ -17,13 +17,13 @@
\titlepage \titlepage
\end{frame} \end{frame}
\begin{frame}[plain]{Plan} \begin{frame}[plain]{计划}
\tableofcontents \tableofcontents
\end{frame} \end{frame}
\section{Problems \& Definitions} \section{Problems \& Definitions 问题定义}
\begin{frame}{$\min \sum f_i(a_i\cdot x-b_i)$} \begin{frame}{$\min \sum f_i(a_i\cdot x-b_i)$ 中文测试}
\begin{problem} \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)$. 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} \end{problem}
\begin{figure} \begin{figure}