Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[12pt, a4paper, oneside]{memoir}
- %%%%%%%%%%%%%%%% 引入 package %%%%%%%%%%%%%%%%
- \usepackage[margin=3cm]{geometry}
- \usepackage{amsmath,amsthm,amssymb} % 引入 AMS 數學環境
- \usepackage{yhmath} % math symbol
- \usepackage{graphicx} % 圖形插入用
- %\graphicspath{{images/}} % 搜尋圖片目錄
- %\usepackage{wrapfig} % 文繞圖
- \usepackage{floatflt} % 浮動 figure
- %\usepackage{float} % 浮動環境
- %\usepackage{subfig} % subfigures
- %\usepackage{caption3} % caption 增強
- %\usepackage{setspace} % 控制空行
- \usepackage{fontspec} % 設定字體
- \usepackage{type1cm} % 設定fontsize
- \usepackage{titlesec} % 設定section等的字體
- \usepackage{titling} % 加強 title 功能
- \usepackage{fancyhdr} % 頁首頁尾
- \usepackage{tabularx} % 加強版 table
- \usepackage{listings} % 內嵌程式碼
- \usepackage{indentfirst} % 首行縮排
- \usepackage{enumerate} % 加強 enumerate
- \usepackage{upquote} % verbatim 中引號顯示
- \usepackage{ulem} % 裝飾
- \usepackage{enumitem}
- \usepackage[square, comma, numbers, super, sort&compress]{natbib}
- \usepackage[unicode=true, pdfborder={0 0 0}, bookmarksdepth=-1]{hyperref}
- \usepackage[usenames, dvipsnames]{color}
- \usepackage[many]{tcolorbox}
- \usepackage{tikz} %繪圖用
- \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
- decorations.pathreplacing,decorations.pathmorphing,shapes,%
- matrix,shapes.symbols}
- \usepackage{forest}
- \usepackage{xeCJK} % xelatex 中文
- %設定標楷體為中文字型,而英文不去更動,使用原TeX字型
- \setCJKmainfont[AutoFakeBold=3,AutoFakeSlant=.4]{Noto Sans CJK TC Regular}
- \defaultCJKfontfeatures{AutoFakeBold=3,AutoFakeSlant=.4}
- \XeTeXlinebreaklocale "zh"
- \XeTeXlinebreakskip = 0pt plus 1pt
- \setmonofont{Consolas}
- %%%%%%%%%%%%%%%% 頁面設定 %%%%%%%%%%%%%%%%
- \setlength{\headheight}{15pt} %with titling
- \setlength{\droptitle}{-1.5cm} %title 與上緣的間距
- \parindent=24pt %設定縮排的距離
- \fancyhf{}
- \fancyhead[L]{\rightmark}
- \fancyhead[R]{\thepage}
- \renewcommand{\headrulewidth}{0.4pt}
- \renewcommand{\footrulewidth}{0.4pt}
- \pagestyle{fancy}
- %%%%%%%%%%%%%%%% chapter 樣式 %%%%%%%%%%%%%%%%
- \usepackage{calc} \makechapterstyle{combined}{ \setlength{\midchapskip}{-60pt} \setlength{\afterchapskip}{2.5cm} \renewcommand*{\printchaptername}{\thispagestyle{fancy}} \renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{80}{0}\selectfont} \renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor[rgb]{.64,.79,.87}{\thechapter}} \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries} \renewcommand*{\printchaptertitle}[1]{ \raggedright\chaptitlefont\parbox[t]{\textwidth-3cm}{\raggedright##1}} } \chapterstyle{combined}
- \tcbuselibrary{skins,raster}
- %%%%%%%%%%%%%%%% custom environment %%%%%%%%%%%%%%%%
- \input{cpp_env}
- \newtcbtheorem[number within=section]{eericbox}{跟著蕭電這樣做}{
- colback=white,colframe=purple,fonttitle=\bfseries,
- enhanced,
- coltitle=white,
- attach boxed title to top left={xshift=2mm,yshift=-2mm,yshifttext=-1mm},
- boxed title style={colframe=purple,colback=purple},
- }{th}
- \newtcbtheorem[number within=section]{thm}{定理}{
- colback=white,colframe=purple,fonttitle=\bfseries,
- enhanced,
- coltitle=white,
- attach boxed title to top left={xshift=2mm,yshift=-2mm,yshifttext=-1mm},
- boxed title style={colframe=purple, colback=purple},
- }{th}
- \newtcbtheorem[number within=section]{dfn}{定義}{
- colback=white,colframe=green,fonttitle=\bfseries,
- enhanced,
- coltitle=white,
- attach boxed title to top left={xshift=2mm,yshift=-2mm,yshifttext=-1mm},
- boxed title style={colframe=purple, colback=purple},
- }{th}
- \newtcbtheorem[number within=section]{lem}{引理}{
- colback=white,colframe=editorGreen,fonttitle=\bfseries,
- enhanced,
- coltitle=white,
- attach boxed title to top left={xshift=2mm,yshift=-2mm,yshifttext=-1mm},
- boxed title style={colframe=editorGreen,colback=editorGreen},
- }{th}
- \newtcbtheorem[number within=section]{prbox}{習題}{
- colback=white,colframe=blue!75,fonttitle=\bfseries,
- enhanced,
- coltitle=white,
- attach boxed title to top left={xshift=2mm,yshift=-2mm,yshifttext=-1mm},
- boxed title style={colframe=blue!75,colback=blue!75},
- }{th}
- \newcommand{\hint}[1]{
- \begin{tcolorbox}[lowerbox=ignored,skin=enhanced,interior style={left color=red!35,right color=white}, colframe = white]
- #1
- \tcblower
- \end{tcolorbox}
- }
- \newcommand{\definition}[2]{ \begin{dfn}{#1}{} #2 \end{dfn} }
- \newcommand{\theorem}[2]{ \begin{thm*}{#1}{} #2 \end{thm*} }
- \newcommand{\eeric}[1]{ \begin{eericbox}{}#1 \end{eericbox} }
- \newcommand{\lemma}[3]{ \begin{lem}{#1}{#2} #3 \end{lem} }
- \newcommand{\problem}[2]{ \begin{prbox}{#1}{} #2 \end{prbox} }
- \begin{document}
- %\maketitle %製作tilte page
- %\tableofcontents %目錄
- %%%%%%%%%%%%%%%% \include{filename} %%%%%%%%%%%%%%%%
- \include{chapter10}
- % \include{dp_bsearch}
- % \include{basicDS+STL}
- % \include{DSU}
- % \include{STL應用}
- % \include{MST}
- % \include{shortest_path}
- % \include{offline_algo}
- % \include{LCA}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %\begin{thebibliography}{99}
- %\bibitem[1]{ex}\verb|http://www.example.com/|
- %\end{thebibliography}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement