| 1 |
%% This work is released under the LaTeX Project Public License, v1.3c or later. |
| 2 |
% This template is made by Ethan Lu. |
| 3 |
% Please use XeLaTeX engine! |
| 4 |
\documentclass[lang=cn,zihao=-4,a4paper,fontset=windows]{beautybook} |
| 5 |
% ---------------------------------------------------------------------------- % |
| 6 |
% The Cover Theme Chosen % |
| 7 |
% ---------------------------------------------------------------------------- % |
| 8 |
\definecolor{coverbgcolor}{HTML}{e0e0e0} |
| 9 |
\definecolor{coverfgcolor}{HTML}{1f3134} % The color of the background |
| 10 |
\definecolor{coverbar}{HTML}{7c9092} % The color of the left bar |
| 11 |
\definecolor{bottomcolor}{HTML}{2c4f54} |
| 12 |
\definecolor{nuanbai}{HTML}{f5f5f5} |
| 13 |
\coverstyle={ % 封面键值列表 |
| 14 |
cover-choose=cn, % cn ; en ; enfig ; birkar |
| 15 |
} |
| 16 |
% ---------------------------------------------------------------------------- % |
| 17 |
% The Cover Theme Chosen % |
| 18 |
% ---------------------------------------------------------------------------- % |
| 19 |
\mathstyle={ % 数学字体键值列表 |
| 20 |
math-font=plain, %plain (默认数学字体); stix; mtpro2 |
| 21 |
} |
| 22 |
\RequirePackage{fontspec} |
| 23 |
\setmainfont{XITS} |
| 24 |
\setsansfont{DejaVu Sans} |
| 25 |
\setmonofont{Latin Modern Mono} |
| 26 |
\renewcommand{\partial}{∂} |
| 27 |
%% First one |
| 28 |
\mynewtheorem{ |
| 29 |
defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, |
| 30 |
thm={\textbf{Theorem}}[section]{interior style={left color=CyaN!80!black!20,right color=CyaN!80!black!15!CyaN!50}, borderline west={1.5mm}{0mm}{CyaN!80!black}}, |
| 31 |
lem={\textbf{Lemma}}[section]{interior style={left color=BluE!8,right color=BluE!5!CyaN!50}, borderline west={1.5mm}{0mm}{BluE}}, |
| 32 |
prop={\textbf{Proposition}}[section]{interior style={left color=OrangE!8,right color=OrangE!5!CyaN!50}, borderline west={1.5mm}{0mm}{OrangE}}, |
| 33 |
exam={\textbf{Example}}[chapter]{interior style={left color=DarkGreen!8,right color=DarkGreen!5!CyaN!50}, borderline west={1.5mm}{0mm}{DarkGreen}}, |
| 34 |
cor={\textbf{Corollary}}[chapter]{interior style={left color=violet!8,right color=violet!5!CyaN!50}, borderline west={1.5mm}{0mm}{violet}}, |
| 35 |
} |
| 36 |
\newtheorem*{remark}{\textbf{Remark}} |
| 37 |
%% Second one |
| 38 |
\makeatletter |
| 39 |
\mynewtcbtheorem{ |
| 40 |
% 这个 theorem 是环境名 |
| 41 |
problem={ |
| 42 |
counter=tcbprob, |
| 43 |
the counter=\thesection.\arabic{tcbprob}, |
| 44 |
name=Problem, % 它保存到 \theorem@name 里 |
| 45 |
thmcolor=绛紫, |
| 46 |
autoref name=\bfseries Problem, |
| 47 |
style={ |
| 48 |
arc=3pt,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},boxrule=0pt,top=8mm, |
| 49 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 50 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 51 |
opacityframe=0, opacityback=0.98, |
| 52 |
fontupper=\itshape, step={tcbprob}, |
| 53 |
before pre=\smallskip, after app=\smallskip, |
| 54 |
overlay unbroken=\my@theorem@overlay@unbroken{Problem\ \thetcbprob}{绛紫}, |
| 55 |
overlay first=\my@theorem@overlay@first{Problem\ \thetcbprob}{绛紫}, |
| 56 |
overlay last=\my@theorem@overlay@last{绛紫}, |
| 57 |
} |
| 58 |
}, |
| 59 |
lemma={ |
| 60 |
counter=tcblem, |
| 61 |
the counter=\thesection.\arabic{tcblem}, |
| 62 |
name=Lemma, |
| 63 |
lemcolor=靛蓝, |
| 64 |
autoref name=\bfseries Lemma, |
| 65 |
style={ |
| 66 |
arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 67 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 68 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 69 |
opacityframe=0, opacityback=0.98, |
| 70 |
fontupper=\itshape,step={tcblem}, |
| 71 |
before pre=\smallskip, after app=\smallskip, |
| 72 |
overlay unbroken=\my@lemma@overlay@unbroken{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 73 |
overlay first=\my@lemma@overlay@first{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 74 |
overlay last=\my@lemma@overlay@last{\lemma@lemcolor}, |
| 75 |
} |
| 76 |
}, |
| 77 |
corollary={ |
| 78 |
counter=tcbcor, |
| 79 |
the counter=\thesection.\arabic{tcbcor}, |
| 80 |
autoref name=\bfseries Corollary, |
| 81 |
style={ |
| 82 |
arc=0mm,breakable,enhanced,interior style={top color=茶色!9 ,middle color=茶色!6, bottom color=茶色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 83 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 84 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 85 |
opacityframe=0, opacityback=0.98, |
| 86 |
fontupper=\itshape,step={tcbcor}, |
| 87 |
before pre=\smallskip, after app=\smallskip, |
| 88 |
overlay unbroken=\my@lemma@overlay@unbroken{Corollary\ \thetcbcor}{茶色}, |
| 89 |
overlay first=\my@lemma@overlay@first{Corollary\ \thetcbcor}{茶色}, |
| 90 |
overlay last=\my@lemma@overlay@last{茶色}, |
| 91 |
} |
| 92 |
}, |
| 93 |
proposition={ |
| 94 |
counter=tcbprop, |
| 95 |
the counter=\thesection.\arabic{tcbprop}, |
| 96 |
autoref name=\bfseries Proposition, |
| 97 |
style={ |
| 98 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 99 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 100 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 101 |
opacityframe=0, opacityback=0.98, |
| 102 |
fontupper=\itshape,step={tcbprop}, |
| 103 |
before pre=\smallskip, after app=\smallskip, |
| 104 |
overlay unbroken=\my@lemma@overlay@unbroken{Proposition\ \thetcbprop}{黛绿}, |
| 105 |
overlay first=\my@lemma@overlay@first{Proposition\ \thetcbprop}{黛绿}, |
| 106 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 107 |
} |
| 108 |
}, |
| 109 |
definition={ |
| 110 |
counter=tcbdefi, |
| 111 |
the counter=\thesection.\arabic{tcbdefi}, |
| 112 |
autoref name=\bfseries Definition, |
| 113 |
style={ |
| 114 |
arc=0mm,breakable,enhanced,interior style={top color=茜色!9 ,middle color=茜色!6, bottom color=茜色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 115 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 116 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 117 |
opacityframe=0, opacityback=0.98, |
| 118 |
fontupper=\normalsize,step={tcbdefi}, |
| 119 |
before pre=\smallskip, after app=\smallskip, |
| 120 |
overlay unbroken=\my@lemma@overlay@unbroken{Definition\ \thetcbdefi}{茜色}, |
| 121 |
overlay first=\my@lemma@overlay@first{Definition\ \thetcbdefi}{茜色}, |
| 122 |
overlay last=\my@lemma@overlay@last{茜色}, |
| 123 |
} |
| 124 |
}, |
| 125 |
example={ |
| 126 |
counter=tcbexam, |
| 127 |
the counter=\thesection.\arabic{tcbexam}, |
| 128 |
autoref name=\bfseries Example, |
| 129 |
style={ |
| 130 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 131 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 132 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 133 |
opacityframe=0, opacityback=0.98, |
| 134 |
fontupper=\normalsize,step={tcbexam}, |
| 135 |
before pre=\smallskip, after app=\smallskip, |
| 136 |
overlay unbroken=\my@lemma@overlay@unbroken{Example\ \thetcbexam}{黛绿}, |
| 137 |
overlay first=\my@lemma@overlay@first{Example\ \thetcbexam}{黛绿}, |
| 138 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 139 |
} |
| 140 |
}, |
| 141 |
Exercise={ |
| 142 |
counter=tcbexer, |
| 143 |
the counter=\thechapter.\arabic{tcbexer}, |
| 144 |
autoref name=\bfseries Exercise, |
| 145 |
style={ |
| 146 |
arc=0mm,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 147 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 148 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 149 |
opacityframe=0, opacityback=0.9, |
| 150 |
fontupper=\normalsize,step={tcbexer}, |
| 151 |
before pre=\smallskip, after app=\smallskip, |
| 152 |
overlay unbroken=\my@lemma@overlay@unbroken{Exercise\ \thetcbexer}{绛紫}, |
| 153 |
overlay first=\my@lemma@overlay@first{Exercise\ \thetcbexer}{绛紫}, |
| 154 |
overlay last=\my@lemma@overlay@last{绛紫}, |
| 155 |
} |
| 156 |
}, |
| 157 |
theorem={ |
| 158 |
counter=tcbthm, |
| 159 |
the counter=\thesection.\arabic{tcbthm}, |
| 160 |
autoref name=\bfseries Theorem, |
| 161 |
style={ |
| 162 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 163 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 164 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 165 |
opacityframe=0, opacityback=0.98, |
| 166 |
fontupper=\itshape,step={tcbthm}, |
| 167 |
before pre=\smallskip, after app=\smallskip, |
| 168 |
overlay unbroken=\my@lemma@overlay@unbroken{Theorem\ \thetcbthm}{黛绿}, |
| 169 |
overlay first=\my@lemma@overlay@first{Theorem\ \thetcbthm}{黛绿}, |
| 170 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 171 |
} |
| 172 |
}, |
| 173 |
conjecture={ |
| 174 |
counter=tcbconj, |
| 175 |
the counter=\thesection.\arabic{tcbconj}, |
| 176 |
name=Conjecture, |
| 177 |
lemcolor=靛蓝, |
| 178 |
autoref name=\bfseries Conjecture, |
| 179 |
style={ |
| 180 |
arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 181 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 182 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 183 |
opacityframe=0, opacityback=0.98, |
| 184 |
fontupper=\itshape,step={tcbconj}, |
| 185 |
before pre=\smallskip, after app=\smallskip, |
| 186 |
overlay unbroken=\my@lemma@overlay@unbroken{Conjecture\ \thetcblem}{靛蓝}, |
| 187 |
overlay first=\my@lemma@overlay@first{Conjecture\ \thetcblem}{靛蓝}, |
| 188 |
overlay last=\my@lemma@overlay@last{靛蓝}, |
| 189 |
} |
| 190 |
}, |
| 191 |
} |
| 192 |
\makeatother |
| 193 |
|
| 194 |
%% --------参考文献 |
| 195 |
\RequirePackage[ |
| 196 |
backend=biber, |
| 197 |
style=numeric, |
| 198 |
sorting=nty |
| 199 |
]{biblatex} |
| 200 |
\addbibresource{ref.bib} |
| 201 |
|
| 202 |
\indexsetup{level=\chapter*,noclearpage} |
| 203 |
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule] |
| 204 |
\makeindex |
| 205 |
|
| 206 |
\usepackage{listings} |
| 207 |
\lstset{ |
| 208 |
basicstyle=\small\ttfamily, |
| 209 |
keywordstyle=\color{NavyBlue}, |
| 210 |
commentstyle=\color{gray!50!black!50}, |
| 211 |
stringstyle=\rmfamily\slshape\color{red}, |
| 212 |
backgroundcolor=\color{gray!5}, |
| 213 |
frame=leftline, |
| 214 |
framerule=0.5pt,rulecolor=\color{gray!80}, |
| 215 |
numbers=left, |
| 216 |
numberstyle=\footnotesize, |
| 217 |
firstnumber=1, |
| 218 |
stepnumber=1, |
| 219 |
numbersep=7pt, |
| 220 |
aboveskip=.25em, |
| 221 |
showspaces=false, |
| 222 |
showstringspaces=false, |
| 223 |
keepspaces=true, |
| 224 |
showtabs=false, |
| 225 |
tabsize=2, |
| 226 |
captionpos=b, |
| 227 |
flexiblecolumns=true, |
| 228 |
breaklines=true, |
| 229 |
breakatwhitespace=false, |
| 230 |
breakautoindent=true, |
| 231 |
breakindent=1em, |
| 232 |
title=\lstname, |
| 233 |
escapeinside=``, |
| 234 |
xleftmargin=1em, xrightmargin=1em, |
| 235 |
aboveskip=1ex, belowskip=1ex, |
| 236 |
framextopmargin=1pt, framexbottommargin=1pt, |
| 237 |
abovecaptionskip=-2pt,belowcaptionskip=3pt, |
| 238 |
extendedchars=false, columns=flexible, mathescape=true, |
| 239 |
texcl=true, |
| 240 |
fontadjust |
| 241 |
}% |
| 242 |
% 设置1.25倍行距 |
| 243 |
\linespread{1.25} |
| 244 |
\setlist[itemize]{itemsep=1pt, parsep=1pt} % 对所有itemize环境生效 |
| 245 |
\setlist[enumerate]{itemsep=1pt, parsep=1pt} % 对所有enumerate环境生效 |
| 246 |
\begin{document} |
| 247 |
\thispagestyle{empty} |
| 248 |
\title{Beautybook模板简介} |
| 249 |
\subtitle{这是一个副标题!} |
| 250 |
\edition{First Edition} |
| 251 |
\bookseries{Ilustrated by Ethan Lu} |
| 252 |
\author{Ethan Lu} |
| 253 |
\pressname{Beautybook} |
| 254 |
\presslogo{inner_pics/beautybook-logo.png} |
| 255 |
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg |
| 256 |
\makecover |
| 257 |
|
| 258 |
\makeatletter |
| 259 |
% ---------------------------------------------------------------------------- % |
| 260 |
% The Sidebar Theme Chosen % |
| 261 |
% ---------------------------------------------------------------------------- % |
| 262 |
\definecolor{bg}{HTML}{e0e0e0} |
| 263 |
\definecolor{fg}{HTML}{2c4f54} |
| 264 |
\colorlet{outermarginbgcolor}{bg} |
| 265 |
\colorlet{outermarginfgcolor}{fg} |
| 266 |
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth |
| 267 |
\oddoutermargin{\sffamily \leftmark} % Odd |
| 268 |
\evenoutermargin{\sffamily\@title} % Even |
| 269 |
% ---------------------------------------------------------------------------- % |
| 270 |
% The Sidebar Theme Chosen % |
| 271 |
% ---------------------------------------------------------------------------- % |
| 272 |
|
| 273 |
% ---------------------------------------------------------------------------- % |
| 274 |
% The images used in the title % |
| 275 |
% ---------------------------------------------------------------------------- % |
| 276 |
\titleimage{ |
| 277 |
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 278 |
% |
| 279 |
partoddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 280 |
% |
| 281 |
chapterevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 282 |
% |
| 283 |
partevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 284 |
} |
| 285 |
\chapimage{\beautybook@chapterimagename} % 会自动改变 |
| 286 |
\partimage{\beautybook@partimagename} % 会自动改变 |
| 287 |
\makeatother |
| 288 |
% ---------------------------------------------------------------------------- % |
| 289 |
% The images used in the title % |
| 290 |
% ---------------------------------------------------------------------------- % |
| 291 |
|
| 292 |
% ---------------------------------------------------------------------------- % |
| 293 |
% The Color Chosen for The Magic Box % |
| 294 |
% ---------------------------------------------------------------------------- % |
| 295 |
\colorlet{framegolden}{fg} % The line color of the magic box |
| 296 |
\colorlet{framegray}{bg!50} % The background color of the magic box |
| 297 |
% ---------------------------------------------------------------------------- % |
| 298 |
% The Color Chosen for The Magic Box % |
| 299 |
% ---------------------------------------------------------------------------- % |
| 300 |
|
| 301 |
\frontmatter |
| 302 |
\pagenumbering{Roman} |
| 303 |
|
| 304 |
{% Preface |
| 305 |
\thispagestyle{empty} |
| 306 |
% \addcontentsline{toc}{chapter}{Preface} |
| 307 |
\chapter*{Preface} |
| 308 |
Introduction to Beatybook template. |
| 309 |
|
| 310 |
|
| 311 |
\hfill |
| 312 |
\begin{tabular}{lr} |
| 313 |
&--- Ethan Lu\\ |
| 314 |
&2024-03-17 |
| 315 |
\end{tabular} |
| 316 |
\clearpage} |
| 317 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 318 |
|
| 319 |
\thispagestyle{empty} |
| 320 |
\tableofcontents\let\cleardoublepage\clearpage |
| 321 |
|
| 322 |
|
| 323 |
\mainmatter |
| 324 |
\pagenumbering{arabic} |
| 325 |
|
| 326 |
\partabstract{\hspace*{2em} \textbf{Beautybook} 模板的使用说明,这里是每一个部分 (Part) 的简介区域, 您可以在此处书写下您对该部分的一个简明扼要的概述, 当然,倘若无话可说,此处可以留空.} |
| 327 |
\part{\textbf{Beautybook} 模板使用说明} |
| 328 |
|
| 329 |
\chapter{Beautybook模板的简要介绍} |
| 330 |
|
| 331 |
\section{简介} |
| 332 |
|
| 333 |
Beauty\LaTeX{} 系列模板是由我所做的书籍模板系列, 名叫\textbf{Beautybook}! 关于为何起这么奇怪的名字? 我的答案是, 本来我是想起名elegantboook的,但是奈何已经有了大名鼎鼎的elegantbook系列, 所以鄙人只能退而求其次,命名为同样是美丽意思的名词与书籍相组合,古人云:书中自有颜如玉,这不, 美女配书籍,岂不美哉! 故而,这就是 \textbf{Beautybook} 的由来! |
| 334 |
|
| 335 |
本人致力于打造一系列美观、优雅、简便的模板以方便用户和我自己 (主要是服务于自己的,但是耐不住大伙的赏识,遂毛遂自荐一番,望谅解!) 使用。版本经常有所更迭,请关注版本信息,在未开始使用模板前,建议直接选择最新正式版本!最新测试版通常会发布在QQ群内,诸君可自取, 取完后是留是去随意. |
| 336 |
|
| 337 |
|
| 338 |
本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 GitHub 上给我提交 \href{https://github.com/BeautyLaTeX/latex-template/issues}{issues} 或者邮件\href{[email protected]}{163邮箱}或者\href{[email protected]}{qq邮箱}联系我。我的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Beauty\LaTeX{} 相关内容。 |
| 339 |
\begin{itemize} |
| 340 |
\item GitHub 地址:\href{https://github.com/BeautyLaTeX/latex-template}{https://github.com/BeautyLaTeX/latex-template} |
| 341 |
\item Texpage 地址: \href{https://www.texpage.com/template/8dc933fc-6579-44c9-b660-ea58409d193b}{https://www.texpage.com/template/8dc933fc-6579-44c9-b660-ea58409d193b} |
| 342 |
\item 下载地址:\href{https://github.com/BeautyLaTeX/latex-template/releases}{正式发行版} |
| 343 |
\item 用户 QQ 群:809237593 |
| 344 |
\item 我的outlook邮箱:\href{https://[email protected]}{Outlook Email} |
| 345 |
\end{itemize} |
| 346 |
\textbf{This work is released under the LaTeX Project Public License, v1.3c or later.} |
| 347 |
|
| 348 |
\section{模板安装与更新} |
| 349 |
|
| 350 |
你需要通过下载然后编译的方式使用本模板,仅有本地(文件夹内)使用一种方式。 |
| 351 |
|
| 352 |
\subsection{在线使用模板} |
| 353 |
本模板可以直接上传到overleaf上使用,但需要注意的是, 需要使用 math-font=plain 键值, 并使用XeLaTeX或者lualatex编译! |
| 354 |
\newpage |
| 355 |
\subsection{本地安装使用} |
| 356 |
|
| 357 |
\textbf{本地安装}使用方法如下:从 GitHub 或者 QQ群下载最新版, 然后将模板文件放在你的工作目录下即可使用。 |
| 358 |
|
| 359 |
以下是最小工作示例: |
| 360 |
\begin{lstlisting} |
| 361 |
\documentclass[lang=cn,zihao=-4,a4paper,fontset=windows]{beautybook} |
| 362 |
% ---------------------------------------------------------------------------- % |
| 363 |
% The Cover Theme Chosen % |
| 364 |
% ---------------------------------------------------------------------------- % |
| 365 |
\definecolor{coverbgcolor}{HTML}{e0e0e0} |
| 366 |
\definecolor{coverfgcolor}{HTML}{1f3134} % The color of the background |
| 367 |
\definecolor{coverbar}{HTML}{7c9092} % The color of the left bar |
| 368 |
\definecolor{bottomcolor}{HTML}{2c4f54} |
| 369 |
\definecolor{nuanbai}{HTML}{f5f5f5} |
| 370 |
\coverstyle={ % 封面键值列表 |
| 371 |
cover-choose=cn, % cn ; en ; enfig ; birkar |
| 372 |
} |
| 373 |
% ---------------------------------------------------------------------------- % |
| 374 |
% The Cover Theme Chosen % |
| 375 |
% ---------------------------------------------------------------------------- % |
| 376 |
\mathstyle={ % 数学字体键值列表 |
| 377 |
math-font=plain, %plain (默认数学字体); stix; mtpro2 |
| 378 |
} |
| 379 |
\RequirePackage{fontspec} |
| 380 |
\setmainfont{XITS} |
| 381 |
\setsansfont{DejaVu Sans} |
| 382 |
\setmonofont{Latin Modern Mono} |
| 383 |
\renewcommand{\partial}{∂} |
| 384 |
\coverstyle={ % 封面键值列表 |
| 385 |
cover-choose=cn, % cn ; en ; enfig ; birkar |
| 386 |
} |
| 387 |
\mathstyle={ % 数学字体键值列表 |
| 388 |
math-font=plain, %plain (默认数学字体); stix; mtpro2 |
| 389 |
} |
| 390 |
%% First one |
| 391 |
\mynewtheorem{ |
| 392 |
defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, |
| 393 |
thm={\textbf{Theorem}}[section]{interior style={left color=CyaN!80!black!20,right color=CyaN!80!black!15!CyaN!50}, borderline west={1.5mm}{0mm}{CyaN!80!black}}, |
| 394 |
lem={\textbf{Lemma}}[section]{interior style={left color=BluE!8,right color=BluE!5!CyaN!50}, borderline west={1.5mm}{0mm}{BluE}}, |
| 395 |
prop={\textbf{Proposition}}[section]{interior style={left color=OrangE!8,right color=OrangE!5!CyaN!50}, borderline west={1.5mm}{0mm}{OrangE}}, |
| 396 |
exam={\textbf{Example}}[chapter]{interior style={left color=DarkGreen!8,right color=DarkGreen!5!CyaN!50}, borderline west={1.5mm}{0mm}{DarkGreen}}, |
| 397 |
cor={\textbf{Corollary}}[chapter]{interior style={left color=violet!8,right color=violet!5!CyaN!50}, borderline west={1.5mm}{0mm}{violet}}, |
| 398 |
} |
| 399 |
\newtheorem*{remark}{\textbf{Remark}} |
| 400 |
%% Second one |
| 401 |
\makeatletter |
| 402 |
\mynewtcbtheorem{ |
| 403 |
% 这个 theorem 是环境名 |
| 404 |
problem={ |
| 405 |
counter=tcbprob, |
| 406 |
the counter=\thesection.\arabic{tcbprob}, |
| 407 |
name=Problem, % 它保存到 \theorem@name 里 |
| 408 |
thmcolor=绛紫, |
| 409 |
autoref name=\bfseries Problem, |
| 410 |
style={ |
| 411 |
arc=3pt,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},boxrule=0pt,top=8mm, |
| 412 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 413 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 414 |
opacityframe=0, opacityback=0.98, |
| 415 |
fontupper=\itshape, step={tcbprob}, |
| 416 |
before pre=\smallskip, after app=\smallskip, |
| 417 |
overlay unbroken=\my@theorem@overlay@unbroken{Problem\ \thetcbprob}{绛紫}, |
| 418 |
overlay first=\my@theorem@overlay@first{Problem\ \thetcbprob}{绛紫}, |
| 419 |
overlay last=\my@theorem@overlay@last{绛紫}, |
| 420 |
} |
| 421 |
}, |
| 422 |
lemma={ |
| 423 |
counter=tcblem, |
| 424 |
the counter=\thesection.\arabic{tcblem}, |
| 425 |
name=Lemma, |
| 426 |
lemcolor=靛蓝, |
| 427 |
autoref name=\bfseries Lemma, |
| 428 |
style={ |
| 429 |
arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 430 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 431 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 432 |
opacityframe=0, opacityback=0.98, |
| 433 |
fontupper=\itshape,step={tcblem}, |
| 434 |
before pre=\smallskip, after app=\smallskip, |
| 435 |
overlay unbroken=\my@lemma@overlay@unbroken{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 436 |
overlay first=\my@lemma@overlay@first{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 437 |
overlay last=\my@lemma@overlay@last{\lemma@lemcolor}, |
| 438 |
} |
| 439 |
}, |
| 440 |
corollary={ |
| 441 |
counter=tcbcor, |
| 442 |
the counter=\thesection.\arabic{tcbcor}, |
| 443 |
autoref name=\bfseries Corollary, |
| 444 |
style={ |
| 445 |
arc=0mm,breakable,enhanced,interior style={top color=茶色!9 ,middle color=茶色!6, bottom color=茶色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 446 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 447 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 448 |
opacityframe=0, opacityback=0.98, |
| 449 |
fontupper=\itshape,step={tcbcor}, |
| 450 |
before pre=\smallskip, after app=\smallskip, |
| 451 |
overlay unbroken=\my@lemma@overlay@unbroken{Corollary\ \thetcbcor}{茶色}, |
| 452 |
overlay first=\my@lemma@overlay@first{Corollary\ \thetcbcor}{茶色}, |
| 453 |
overlay last=\my@lemma@overlay@last{茶色}, |
| 454 |
} |
| 455 |
}, |
| 456 |
proposition={ |
| 457 |
counter=tcbprop, |
| 458 |
the counter=\thesection.\arabic{tcbprop}, |
| 459 |
autoref name=\bfseries Proposition, |
| 460 |
style={ |
| 461 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 462 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 463 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 464 |
opacityframe=0, opacityback=0.98, |
| 465 |
fontupper=\itshape,step={tcbprop}, |
| 466 |
before pre=\smallskip, after app=\smallskip, |
| 467 |
overlay unbroken=\my@lemma@overlay@unbroken{Proposition\ \thetcbprop}{黛绿}, |
| 468 |
overlay first=\my@lemma@overlay@first{Proposition\ \thetcbprop}{黛绿}, |
| 469 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 470 |
} |
| 471 |
}, |
| 472 |
definition={ |
| 473 |
counter=tcbdefi, |
| 474 |
the counter=\thesection.\arabic{tcbdefi}, |
| 475 |
autoref name=\bfseries Definition, |
| 476 |
style={ |
| 477 |
arc=0mm,breakable,enhanced,interior style={top color=茜色!9 ,middle color=茜色!6, bottom color=茜色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 478 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 479 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 480 |
opacityframe=0, opacityback=0.98, |
| 481 |
fontupper=\normalsize,step={tcbdefi}, |
| 482 |
before pre=\smallskip, after app=\smallskip, |
| 483 |
overlay unbroken=\my@lemma@overlay@unbroken{Definition\ \thetcbdefi}{茜色}, |
| 484 |
overlay first=\my@lemma@overlay@first{Definition\ \thetcbdefi}{茜色}, |
| 485 |
overlay last=\my@lemma@overlay@last{茜色}, |
| 486 |
} |
| 487 |
}, |
| 488 |
example={ |
| 489 |
counter=tcbexam, |
| 490 |
the counter=\thesection.\arabic{tcbexam}, |
| 491 |
autoref name=\bfseries Example, |
| 492 |
style={ |
| 493 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 494 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 495 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 496 |
opacityframe=0, opacityback=0.98, |
| 497 |
fontupper=\normalsize,step={tcbexam}, |
| 498 |
before pre=\smallskip, after app=\smallskip, |
| 499 |
overlay unbroken=\my@lemma@overlay@unbroken{Example\ \thetcbexam}{黛绿}, |
| 500 |
overlay first=\my@lemma@overlay@first{Example\ \thetcbexam}{黛绿}, |
| 501 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 502 |
} |
| 503 |
}, |
| 504 |
Exercise={ |
| 505 |
counter=tcbexer, |
| 506 |
the counter=\thechapter.\arabic{tcbexer}, |
| 507 |
autoref name=\bfseries Exercise, |
| 508 |
style={ |
| 509 |
arc=0mm,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 510 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 511 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 512 |
opacityframe=0, opacityback=0.9, |
| 513 |
fontupper=\normalsize,step={tcbexer}, |
| 514 |
before pre=\smallskip, after app=\smallskip, |
| 515 |
overlay unbroken=\my@lemma@overlay@unbroken{Exercise\ \thetcbexer}{绛紫}, |
| 516 |
overlay first=\my@lemma@overlay@first{Exercise\ \thetcbexer}{绛紫}, |
| 517 |
overlay last=\my@lemma@overlay@last{绛紫}, |
| 518 |
} |
| 519 |
}, |
| 520 |
theorem={ |
| 521 |
counter=tcbthm, |
| 522 |
the counter=\thesection.\arabic{tcbthm}, |
| 523 |
autoref name=\bfseries Theorem, |
| 524 |
style={ |
| 525 |
arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 526 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 527 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 528 |
opacityframe=0, opacityback=0.98, |
| 529 |
fontupper=\itshape,step={tcbthm}, |
| 530 |
before pre=\smallskip, after app=\smallskip, |
| 531 |
overlay unbroken=\my@lemma@overlay@unbroken{Theorem\ \thetcbthm}{黛绿}, |
| 532 |
overlay first=\my@lemma@overlay@first{Theorem\ \thetcbthm}{黛绿}, |
| 533 |
overlay last=\my@lemma@overlay@last{黛绿}, |
| 534 |
} |
| 535 |
}, |
| 536 |
conjecture={ |
| 537 |
counter=tcbconj, |
| 538 |
the counter=\thesection.\arabic{tcbconj}, |
| 539 |
name=Conjecture, |
| 540 |
lemcolor=靛蓝, |
| 541 |
autoref name=\bfseries Conjecture, |
| 542 |
style={ |
| 543 |
arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm, |
| 544 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 545 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 546 |
opacityframe=0, opacityback=0.98, |
| 547 |
fontupper=\itshape,step={tcbconj}, |
| 548 |
before pre=\smallskip, after app=\smallskip, |
| 549 |
overlay unbroken=\my@lemma@overlay@unbroken{Conjecture\ \thetcblem}{靛蓝}, |
| 550 |
overlay first=\my@lemma@overlay@first{Conjecture\ \thetcblem}{靛蓝}, |
| 551 |
overlay last=\my@lemma@overlay@last{靛蓝}, |
| 552 |
} |
| 553 |
}, |
| 554 |
} |
| 555 |
\makeatother |
| 556 |
|
| 557 |
%% --------参考文献 |
| 558 |
\RequirePackage[ |
| 559 |
backend=biber, |
| 560 |
style=numeric, |
| 561 |
sorting=nty |
| 562 |
]{biblatex} |
| 563 |
\addbibresource{ref.bib} |
| 564 |
|
| 565 |
\indexsetup{level=\chapter*,noclearpage} |
| 566 |
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule] |
| 567 |
\makeindex |
| 568 |
\usepackage{listings} |
| 569 |
\lstset{ % 代码环境 |
| 570 |
basicstyle=\small\ttfamily, |
| 571 |
keywordstyle=\color{NavyBlue}, |
| 572 |
commentstyle=\color{gray!50!black!50}, |
| 573 |
stringstyle=\rmfamily\slshape\color{red}, |
| 574 |
backgroundcolor=\color{gray!5}, |
| 575 |
frame=leftline, |
| 576 |
framerule=0.5pt,rulecolor=\color{gray!80}, |
| 577 |
numbers=left, |
| 578 |
numberstyle=\footnotesize, |
| 579 |
firstnumber=1, |
| 580 |
stepnumber=1, |
| 581 |
numbersep=7pt, |
| 582 |
aboveskip=.25em, |
| 583 |
showspaces=false, |
| 584 |
showstringspaces=false, |
| 585 |
keepspaces=true, |
| 586 |
showtabs=false, |
| 587 |
tabsize=2, |
| 588 |
captionpos=b, |
| 589 |
flexiblecolumns=true, |
| 590 |
breaklines=true, |
| 591 |
breakatwhitespace=false, |
| 592 |
breakautoindent=true, |
| 593 |
breakindent=1em, |
| 594 |
title=\lstname, |
| 595 |
escapeinside=``, |
| 596 |
xleftmargin=1em, xrightmargin=1em, |
| 597 |
aboveskip=1ex, belowskip=1ex, |
| 598 |
framextopmargin=1pt, framexbottommargin=1pt, |
| 599 |
abovecaptionskip=-2pt,belowcaptionskip=3pt, |
| 600 |
extendedchars=false, columns=flexible, mathescape=true, |
| 601 |
texcl=true, |
| 602 |
fontadjust |
| 603 |
}% |
| 604 |
|
| 605 |
\begin{document} |
| 606 |
\thispagestyle{empty} |
| 607 |
\title{Beautybook模板简介} |
| 608 |
\subtitle{} |
| 609 |
\edition{First Edition} |
| 610 |
\bookseries{Illustrated by Ethan Lu} |
| 611 |
\author{Ethan Lu} |
| 612 |
\pressname{Beautybook} |
| 613 |
\presslogo{inner_pics/logo.png} |
| 614 |
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg |
| 615 |
\makecover |
| 616 |
|
| 617 |
|
| 618 |
\definecolor{bg}{HTML}{e0e0e0} |
| 619 |
\definecolor{fg}{HTML}{2c4f54} |
| 620 |
\colorlet{outermarginbgcolor}{bg} |
| 621 |
\colorlet{outermarginfgcolor}{fg} |
| 622 |
\colorlet{framegolden}{fg} |
| 623 |
\colorlet{framegray}{bg!50} |
| 624 |
|
| 625 |
\makeatletter |
| 626 |
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth |
| 627 |
\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd 奇数页 |
| 628 |
\evenoutermargin{\sffamily\@title} % Even 偶数页 |
| 629 |
% |
| 630 |
\titleimage{ |
| 631 |
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 632 |
% |
| 633 |
partoddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 634 |
% |
| 635 |
chapterevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 636 |
% |
| 637 |
partevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11}, |
| 638 |
} |
| 639 |
\chapimage{\beautybook@chapterimagename} % 会自动改变 |
| 640 |
\partimage{\beautybook@partimagename} % 会自动改变 |
| 641 |
\makeatother |
| 642 |
% |
| 643 |
\frontmatter |
| 644 |
\pagenumbering{Roman} |
| 645 |
|
| 646 |
{% Preface |
| 647 |
\thispagestyle{empty} |
| 648 |
% \addcontentsline{toc}{chapter}{Preface} |
| 649 |
\chapter*{Preface} |
| 650 |
Introduction to Beatybook template. |
| 651 |
|
| 652 |
|
| 653 |
\hfill |
| 654 |
\begin{tabular}{lr} |
| 655 |
&-- Ethan Lu\\ |
| 656 |
&2024-06-30 |
| 657 |
\end{tabular} |
| 658 |
\clearpage} |
| 659 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 660 |
|
| 661 |
\thispagestyle{empty} |
| 662 |
\tableofcontents\let\cleardoublepage\clearpage |
| 663 |
|
| 664 |
|
| 665 |
\mainmatter |
| 666 |
\pagenumbering{arabic} |
| 667 |
|
| 668 |
\partabstract{\hspace*{2em} \textbf{Beautybook} 模板的使用说明,这里是每一个部分 (Part) 的简介区域, 您可以在此处书写下您对该部分的一个简明扼要的概述, 当然,倘若无话可说,此处可以留空.} |
| 669 |
\part{\textbf{Beautybook} 模板使用说明} |
| 670 |
|
| 671 |
\chapter{Beautybook模板的简要介绍} |
| 672 |
|
| 673 |
\section{简介} |
| 674 |
|
| 675 |
% your main contents here! |
| 676 |
|
| 677 |
|
| 678 |
\printindex\thispagestyle{empty} |
| 679 |
\bottomimage{inner_pics/coverimage.jpg} |
| 680 |
\ISBNcode{\EANisbn[ISBN=978-80-7340-097-2]} % |
| 681 |
\summary{Summary.} |
| 682 |
\makebottomcover |
| 683 |
\end{document} |
| 684 |
\end{lstlisting} |
| 685 |
|
| 686 |
\subsection{发行版安装与更新} |
| 687 |
|
| 688 |
本模板测试环境为 |
| 689 |
\begin{enumerate} |
| 690 |
\item Win11 23H2 + \TeX{} Live 2024; |
| 691 |
\end{enumerate} |
| 692 |
|
| 693 |
\TeX Live/Mac\TeX{} 的安装请参考知乎的文章,此处略过。 |
| 694 |
|
| 695 |
安装 \TeX{} Live 之后,安装后建议升级全部宏包,升级方法:使用 cmd 或 terminal 运行 \lstinline{tlmgr update --all},如果 tlmgr 需要更新,请使用 cmd 运行 \lstinline{tlmgr update --self},如果更新过程中出现了中断,请改用 \lstinline{tlmgr update --self --all --reinstall-forcibly-removed} 更新,也即 |
| 696 |
|
| 697 |
\begin{lstlisting} |
| 698 |
tlmgr update --self |
| 699 |
tlmgr update --all |
| 700 |
tlmgr update --self --all --reinstall-forcibly-removed |
| 701 |
\end{lstlisting} |
| 702 |
|
| 703 |
更多的内容请参考 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX{} distribution?} |
| 704 |
|
| 705 |
\subsection{其他发行版本} |
| 706 |
|
| 707 |
由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live/Mac\TeX{}。更多关于 \TeX{} Live 的安装使用以及 C\TeX{} 与 \TeX{} Live 的兼容、系统路径问题,请参考官方文档。 |
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
\chapter{beautybook 设置说明} |
| 712 |
|
| 713 |
本模板英文版基于基础的 book 文类, 中文版则基于ctexbook文类,所以 book或者 ctexbook 的选项对于本模板也是有效的。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。 |
| 714 |
|
| 715 |
\section{语言模式} |
| 716 |
本模板内含两套基础语言环境, 分别为中文和英文。改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: |
| 717 |
\begin{lstlisting} |
| 718 |
\documentclass[lang=cn,zihao=-4,a4paper,fontset=windows]{beautybook} % 中文 |
| 719 |
\documentclass[lang=en]{beautybook} % 英文 |
| 720 |
\end{lstlisting} |
| 721 |
|
| 722 |
除模板自带的两套语言设定之外,如果您需要使用其他语言, 可以通过更改cls文件中这几处解决, 分别为 |
| 723 |
|
| 724 |
\begin{enumerate} |
| 725 |
\item 更改 part环境的名称 \lstinline{Part \thepart}为 \lstinline{(你的语言中part的翻译) \thepart} |
| 726 |
\item 主文件,即当前文件导言区中的定理引导词 |
| 727 |
\item 更改chapter环境中的part名称如第一条所示 |
| 728 |
\end{enumerate} |
| 729 |
|
| 730 |
|
| 731 |
\section{颜色主题} |
| 732 |
|
| 733 |
本模板的颜色是可以自由配置的,可以配置的颜色参数如下: |
| 734 |
\begin{lstlisting} |
| 735 |
\definecolor{bg}{HTML}{e0e0e0} % 整体风格的背景色 % 即浅色 |
| 736 |
\definecolor{fg}{HTML}{455a64} % 整体风格的前景色 % 即深色 |
| 737 |
%% 下面颜色位于 stys/bottompage.sty文件中 |
| 738 |
\definecolor{coverbgcolor}{HTML}{f9b868} % 封面及封底背景色 |
| 739 |
\definecolor{coverfgcolor}{HTML}{503D4B} % 封面及封底前景色 |
| 740 |
\definecolor{coverbar}{HTML}{BF8E6F} % 封面竖条颜色 |
| 741 |
\definecolor{bottomcolor}{HTML}{B3686A} % 封底说明背景颜色 |
| 742 |
%%%%%%%%%%%%%%%%%%%%%%%% |
| 743 |
\colorlet{framegolden}{fg} % 古风盒子线条颜色 |
| 744 |
\colorlet{framegray}{黛绿!5} % 古风盒子背景色 |
| 745 |
\end{lstlisting} |
| 746 |
还有定理环境颜色可以在此文件的导言区设置,下面数学环境部分会展开讲. |
| 747 |
|
| 748 |
这里推荐使用林莲枝开发的cncolours宏包的颜色配置,可以对照选取适合的颜色. |
| 749 |
|
| 750 |
\section{封面} |
| 751 |
|
| 752 |
\subsection{封面个性化} |
| 753 |
|
| 754 |
本模板拥有多套封面可随意取用, 其中使用方法如下: |
| 755 |
\begin{enumerate} |
| 756 |
\item Springer经典封面--对应宏包 \lstinline{cover-choose=cn} (中文默认), |
| 757 |
\item Springer经典封面之二--对应宏包 \lstinline{cover-choose=en} (英文默认), |
| 758 |
\item Springer经典封面之三--对应宏包 \lstinline{cover-choose=enfig} (图片背景), |
| 759 |
\item 中文书籍经典封面--对应宏包\lstinline{cover-choose=birkar} (三角几何风)。 |
| 760 |
注意, 使用该封面所对应的信息不太一样, 看好上面的示例,按照要求操作即可。 |
| 761 |
\end{enumerate} |
| 762 |
|
| 763 |
\begin{table}[htbp] |
| 764 |
\centering |
| 765 |
\caption{封面元素信息} |
| 766 |
\begin{tabular}{cccccc} |
| 767 |
\hline |
| 768 |
信息 & 命令 & 信息 & 命令 & 信息 & 命令 \\ |
| 769 |
\hline |
| 770 |
标题 & \lstinline|\title| & 副标题 & \lstinline|\subtitle| & 作者 & \lstinline|\author| \\ |
| 771 |
出版社 & \lstinline|\pressname| & 版本 & \lstinline|\edition| & 封面图 & \lstinline|\coverimage|\\ |
| 772 |
徽标 & \lstinline|\presslogo| & &&&\\ |
| 773 |
\hline |
| 774 |
\end{tabular} |
| 775 |
\end{table} |
| 776 |
|
| 777 |
|
| 778 |
\subsection{封面图} |
| 779 |
封面图片可以自行选取. |
| 780 |
|
| 781 |
\subsection{徽标} |
| 782 |
|
| 783 |
本文用到的 Logo 为作者自行制作的beautybook专用Logo, 另外还可以使用自己的logo, 为免侵权,在更换图片的时候请选择合适合法的图片进行替换。 |
| 784 |
|
| 785 |
\subsection{自定义封面} |
| 786 |
|
| 787 |
另外,如果使用自定义的封面,比如 Adobe illustrator 或者其他软件制作的 A4 PDF 文档,请把 \lstinline{\makecover} 注释掉,然后借助 \lstinline{pdfpages} 宏包将自制封面插入即可。如果使用 \lstinline{titlepage} 环境,也是类似。 |
| 788 |
|
| 789 |
\section{章标题} |
| 790 |
|
| 791 |
本模板自定义了一套标题样式, 主要是 part、chapter、section 这三个标题,具体代码见cls。可能不适合所有人的审美,可以注释掉就会回归默认ctexbook的标题样式。 |
| 792 |
|
| 793 |
\section{数学环境简介} |
| 794 |
|
| 795 |
在我们这个模板中,我们定义了四种不同的定理模式,包括简单模式(默认的定理样式amsthm) 、有点自定义的thmtools、彩色强调盒子、以及本人开发的专有版权盒子,当然,由雾月老师给我定制的古风盒子您也可以是用来作为定理盒子,只需要在本文件导言区第一种定理样式里面加上\lstinline{ys style}即可. |
| 796 |
|
| 797 |
|
| 798 |
\subsection{定理类环境的使用} |
| 799 |
以下是使用效果展示 |
| 800 |
\subsubsection{amsthm} |
| 801 |
\begin{remark} |
| 802 |
这是基于amsthm的注释环境 |
| 803 |
\end{remark} |
| 804 |
\subsubsection{thmtools} |
| 805 |
\begin{proof}[证明的说明] |
| 806 |
证明环境 |
| 807 |
\end{proof} |
| 808 |
|
| 809 |
\begin{solution}[解的说明] |
| 810 |
解环境 |
| 811 |
\end{solution} |
| 812 |
\subsubsection{彩色强调盒子} |
| 813 |
\begin{defi}[名称]\label{defi:def test} |
| 814 |
第一种定义环境 |
| 815 |
\end{defi} |
| 816 |
|
| 817 |
\begin{thm}[名称]\label{thm:thm test} |
| 818 |
第一种定理环境 |
| 819 |
\end{thm} |
| 820 |
|
| 821 |
\begin{cor}[名称]\label{cor:cor test} |
| 822 |
第一种推论环境 |
| 823 |
\end{cor} |
| 824 |
|
| 825 |
\begin{prop}[名称]\label{prop:prop test} |
| 826 |
第一种命题环境 |
| 827 |
\end{prop} |
| 828 |
|
| 829 |
\begin{exam}[名称]\label{exam:exam test} |
| 830 |
第一种例题环境 |
| 831 |
\end{exam} |
| 832 |
|
| 833 |
\begin{lem}[名称]\label{lem:lem test} |
| 834 |
第一种引理环境 |
| 835 |
\end{lem} |
| 836 |
\clearpage |
| 837 |
\subsubsection{个人版权的盒子共两种} |
| 838 |
|
| 839 |
\begin{definition}[][名称][def label] |
| 840 |
这是采用个人定制的盒子制作的定理环境,这是其中定义环境示例。注意:使用方法如下 |
| 841 |
\begin{itemize} |
| 842 |
\item 如果你没有名称和标签,使用方法为 |
| 843 |
\begin{lstlisting} |
| 844 |
\begin{definition} |
| 845 |
定义环境内容 |
| 846 |
\end{definition} |
| 847 |
\end{lstlisting} |
| 848 |
\item 如果你没有标签但有名称,使用方法为 |
| 849 |
\begin{lstlisting} |
| 850 |
\begin{definition}[][名称] |
| 851 |
定义环境内容 |
| 852 |
\end{definition} |
| 853 |
\end{lstlisting} |
| 854 |
\item 如果你有标签,那么无论是否有名称,使用方法为 |
| 855 |
\begin{lstlisting} |
| 856 |
\begin{definition}[][有就填,没有空着][标签] |
| 857 |
定义环境内容 |
| 858 |
\end{definition} |
| 859 |
\end{lstlisting} |
| 860 |
\item 如果你想更改盒子的一些设定选项,比如加框线等之类的,使用方法为 |
| 861 |
\begin{lstlisting} |
| 862 |
\begin{definition}[tcolorbox选项][名称有就写,没有就连带外面括号删掉][标签 (有标签下就这样子,没有标签可以把这个标签连带外面的括号删掉)] |
| 863 |
定义环境内容 |
| 864 |
\end{definition} |
| 865 |
\end{lstlisting} |
| 866 |
\end{itemize} |
| 867 |
\end{definition} |
| 868 |
|
| 869 |
\begin{theorem} |
| 870 |
用法同上,引用下上面的标签 \ref{def label}或者可以\autoref{def label}. |
| 871 |
\end{theorem} |
| 872 |
|
| 873 |
\begin{lemma} |
| 874 |
用法同上,引用下上面的标签 \ref{def label}或者可以\autoref{def label}. |
| 875 |
\end{lemma} |
| 876 |
|
| 877 |
\begin{corollary} |
| 878 |
用法同上,引用下上面的标签 \ref{def label}或者可以\autoref{def label}. |
| 879 |
\end{corollary} |
| 880 |
|
| 881 |
\begin{example} |
| 882 |
用法同上,引用下上面的标签 \ref{def label}或者可以\autoref{def label}. |
| 883 |
\end{example} |
| 884 |
|
| 885 |
古风盒子 |
| 886 |
\begin{fancybox} |
| 887 |
古风盒子测试,可以任意嵌套其他环境! |
| 888 |
\end{fancybox} |
| 889 |
|
| 890 |
\subsection{修改计数器} |
| 891 |
|
| 892 |
当前定理等环境计数器按章计数,如果想修改定理类环境按节计数,可以修改计数器选项 \lstinline{ counter/.code}中的\lstinline{chapter},可用选项为 \lstinline{chapter} (默认)与 \lstinline{section}、 \lstinline{subsection}等 |
| 893 |
|
| 894 |
\subsection{自定义定理类环境} |
| 895 |
用户可以采用四种方式定义自己的定理环境,分别为amsthm与thmtools, 这两种看宏包说明文档即可; 后面两种定理的定义方式为 |
| 896 |
如本文件导言区: |
| 897 |
\begin{lstlisting} |
| 898 |
% 这是第一种 |
| 899 |
\mynewtheorem{ |
| 900 |
defi={\textbf{定义}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}}, % 类似模仿即可 |
| 901 |
} |
| 902 |
|
| 903 |
% 下面是第二种 |
| 904 |
\mynewtcbtheorem{ |
| 905 |
% 这个 theorem 是环境名 |
| 906 |
theorem={ % 第一种 : 圣诞礼盒风格 |
| 907 |
counter=tcbthm, |
| 908 |
the counter=\thesection.\arabic{tcbthm}, |
| 909 |
name=定理, % 它保存到 \theorem@name 里 |
| 910 |
thmcolor=purple5, |
| 911 |
autoref name=\bfseries 定理, |
| 912 |
style={ |
| 913 |
arc=3pt,breakable,enhanced,interior style={top color=purple5!5 ,middle color=purple5!1!nuanbai, bottom color=nuanbai},boxrule=0pt,top=8mm, |
| 914 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 915 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 916 |
opacityframe=0, opacityback=0.98, |
| 917 |
fontupper=\itshape, step={tcbthm}, |
| 918 |
before pre=\smallskip, after app=\smallskip, |
| 919 |
overlay unbroken=\my@theorem@overlay@unbroken{\theorem@name\ \thetcbthm}{\theorem@thmcolor}, |
| 920 |
overlay first=\my@theorem@overlay@first{\theorem@name\ \thetcbthm}{\theorem@thmcolor}, |
| 921 |
overlay last=\my@theorem@overlay@last{\theorem@thmcolor}, |
| 922 |
} |
| 923 |
}, |
| 924 |
lemma={ % 第二种 : 丝带风格 |
| 925 |
counter=tcblem, |
| 926 |
the counter=\thesection.\arabic{tcblem}, |
| 927 |
name=引理, |
| 928 |
lemcolor=靛蓝, |
| 929 |
autoref name=\bfseries 引理, |
| 930 |
style={ |
| 931 |
arc=0mm,breakable,enhanced,interior style={top color=靛蓝!5 ,middle color=靛蓝!1!nuanbai, bottom color=nuanbai},arc=3pt,boxrule=0pt,top=7mm,bottom=5mm, |
| 932 |
fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上 |
| 933 |
fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下 |
| 934 |
opacityframe=0, opacityback=0.98, |
| 935 |
fontupper=\normalsize,step={tcblem}, |
| 936 |
before pre=\smallskip, after app=\smallskip, |
| 937 |
overlay unbroken=\my@lemma@overlay@unbroken{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 938 |
overlay first=\my@lemma@overlay@first{\lemma@name\ \thetcblem}{\lemma@lemcolor}, |
| 939 |
overlay last=\my@lemma@overlay@last{\lemma@lemcolor}, |
| 940 |
} |
| 941 |
}, |
| 942 |
} |
| 943 |
\end{lstlisting} |
| 944 |
\begin{remark} |
| 945 |
解释一下, 其中的overlay部分更改需要看中文修改,定理名称改成你想要的,颜色也是,然后别忘了给最外面的example之类的环境名改成你的,比如axiom之类,还有就是tcbexam这个计数器名称要换成你新定义的,如tcbaxiom之类,其他就不用动了。至于说第一种定理样式看上面例子相信您能学会的。 |
| 946 |
\end{remark} |
| 947 |
\newpage |
| 948 |
\section{列表环境} |
| 949 |
本模板借助于 \lstinline{enumitem} 实现了可定制化,具体见enumitem宏包说明文档,这里示例如下\\[2ex] |
| 950 |
\begin{minipage}[b]{0.49\textwidth} |
| 951 |
\begin{itemize}[label=$\bigodot $] |
| 952 |
\item first item of nesti; |
| 953 |
\item second item of nesti; |
| 954 |
\begin{itemize} |
| 955 |
\item first item of nestii; |
| 956 |
\item second item of nestii; |
| 957 |
\begin{itemize} |
| 958 |
\item first item of nestiii; |
| 959 |
\item second item of nestiii. |
| 960 |
\end{itemize} |
| 961 |
\end{itemize} |
| 962 |
\end{itemize} |
| 963 |
\end{minipage} |
| 964 |
\begin{minipage}[b]{0.49\textwidth} |
| 965 |
\begin{enumerate}[label=\arabic*)] |
| 966 |
\item first item of nesti; |
| 967 |
\item second item of nesti; |
| 968 |
\begin{enumerate} |
| 969 |
\item first item of nestii; |
| 970 |
\item second item of nestii; |
| 971 |
\begin{enumerate} |
| 972 |
\item first item of nestiii; |
| 973 |
\item second item of nestiii. |
| 974 |
\end{enumerate} |
| 975 |
\end{enumerate} |
| 976 |
\end{enumerate} |
| 977 |
\end{minipage} |
| 978 |
|
| 979 |
\section{参考文献} |
| 980 |
|
| 981 |
\subsection{打印文献} |
| 982 |
|
| 983 |
\lstinline{ref.bib} 为参考文献存放的文件,需要放在项目文件夹下。 |
| 984 |
|
| 985 |
\subsection{修改文献格式} |
| 986 |
|
| 987 |
此外,本模板调用了 biblatex 宏包,并提供了 biber引擎编译参考文献,当然您也可以直接删除cls中的biblatex宏包(cls最后几行)来使用bibtex. |
| 988 |
|
| 989 |
关于文献条目(bib item),你可以在谷歌学术,Mendeley,Endnote 中取,然后把它们添加到 \lstinline{ref.bib} 中。在文中引用的时候,引用它们的键值(bib key)即可。 |
| 990 |
|
| 991 |
文献样式默认为数字样式。 |
| 992 |
\begin{lstlisting} |
| 993 |
\usepackage[ |
| 994 |
backend=biber, % 可改为bibtex |
| 995 |
style=numeric, % 可改为其他样式,参考biblatex说明文档 |
| 996 |
sorting=nty |
| 997 |
]{biblatex} |
| 998 |
\addbibresource{ref.bib} |
| 999 |
\end{lstlisting} |
| 1000 |
|
| 1001 |
\chapter{字体选项} |
| 1002 |
字体选项独立成章的原因是,我们希望本模板的用户关心模板使用的字体,知晓自己使用的字体以及遇到字体相关的问题能更加便捷地找到答案。 |
| 1003 |
|
| 1004 |
本模板默认使用ctex的windows选项提供的字体, 如非必要,字体不应改动,当然,如果确实需要,可按照下面代码操作: |
| 1005 |
\begin{lstlisting} |
| 1006 |
\setCJKmainfont[Path=fonts/,BoldFont={XX.TTF},ItalicFont={YY.TTF},SlantedFont = {ZZ.TTF} , SlantedFeatures = {FakeSlant}]{WW.TTF} |
| 1007 |
\setCJKsansfont[Path=fonts/,BoldFont={XX.TTF},ItalicFont={XX.TTF}]{XX.TTF} |
| 1008 |
\setCJKmonofont[Path=fonts/,BoldFont={XX.TTF},ItalicFont={XX.TTF}]{XX.TTF} |
| 1009 |
%设置新的中文字体命令 |
| 1010 |
\newCJKfontfamily[song]\songti{XX.TTF}[Path=fonts/] %宋体 |
| 1011 |
%设置新的英文字体命令 |
| 1012 |
\newfontfamily\largetitlestyle[Path=fonts/]{XX.TTF} |
| 1013 |
\end{lstlisting} |
| 1014 |
!必须全部使用英文字体名称进行导入,否则报错找不到的!!切记!! |
| 1015 |
|
| 1016 |
\section{数学字体选项} |
| 1017 |
本模板使用的是默认数学字体,仅将$\partial$符号改为Times New Roman的Unicode符号。 |
| 1018 |
|
| 1019 |
{\normalem |
| 1020 |
\printbibliography[ |
| 1021 |
heading=bibintoc, |
| 1022 |
title={参考文献} |
| 1023 |
] |
| 1024 |
\printindex |
| 1025 |
\thispagestyle{empty}} |
| 1026 |
%-------------------封底 ---------------% |
| 1027 |
\bottomimage{inner_pics/ivy-ge998908f8_1280.jpg} |
| 1028 |
\ISBNcode{\EANisbn[ISBN=978-80-7340-097-2]} % |
| 1029 |
\summary{封底信息.} |
| 1030 |
\makebottomcover |
| 1031 |
\end{document} |