diff options
author | Karl Berry <karl@freefriends.org> | 2024-02-25 21:06:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-02-25 21:06:41 +0000 |
commit | e516fd02b16ea224df8dbccd0b725f9d16d032cf (patch) | |
tree | c26b89196fae06f72448231fd574cdc314b45ddd /Master/texmf-dist | |
parent | 396d820f3ca6e9930a99feb4c6772c470b785ea7 (diff) |
beautynote (25feb24)
git-svn-id: svn://tug.org/texlive/trunk@70155 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/beautynote/README.md | 25 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/beautynote/beautynote.pdf | bin | 0 -> 880927 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beautynote/beautynote.tex | 160 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/beautynote/figures/fibonacci.jpg | bin | 0 -> 756452 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beautynote/figures/titlepage.png | bin | 0 -> 3201 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/beautynote/beautynote.cls | 355 |
6 files changed, 540 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/beautynote/README.md b/Master/texmf-dist/doc/latex/beautynote/README.md new file mode 100644 index 00000000000..b6f1f563a6e --- /dev/null +++ b/Master/texmf-dist/doc/latex/beautynote/README.md @@ -0,0 +1,25 @@ +<!-- Author : Ethan Lu--> +<!-- Program Email: h1479840692@outlook.com --> + + | [Github](https://github.com/BeautyLaTeX/beautynote) | [Email](https://h1479840692@outlook.com)| + + +------- + +# An elegant LaTeX Template for Books and Notes + + + +Beautynote is a specially designed to meet the publication of books and the production of LaTeX template, created by [Ethan Lu](https://github.com/BeautyLaTeX/beautynote) , and maintained by [Ethan Lu](https://github.com/BeautyLaTeX/beautynote). Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues or contact me at h1479840692@outlook.com. + + +--- +## Version + +Release 2024-02-25. + +--- +## License + +This work is released under the LaTeX Project Public License, v1.3c or later. + diff --git a/Master/texmf-dist/doc/latex/beautynote/beautynote.pdf b/Master/texmf-dist/doc/latex/beautynote/beautynote.pdf Binary files differnew file mode 100644 index 00000000000..86364394d05 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beautynote/beautynote.pdf diff --git a/Master/texmf-dist/doc/latex/beautynote/beautynote.tex b/Master/texmf-dist/doc/latex/beautynote/beautynote.tex new file mode 100644 index 00000000000..075614e0cc8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beautynote/beautynote.tex @@ -0,0 +1,160 @@ +\documentclass[twoside,openany,12pt]{beautynote} +% Input Some Information of the doc +\doctitle{Introduction to Beautynote Template} +\docsubtitle{A subtitle} +\dockeywords{beautynote,introduction} +\date{\today\vfill\includegraphics[width=0.15\textwidth]{titlepage.png}\\[.1em] \textsc{\large Beautynote}} +% Hyperref always required second to last. +\RequirePackage{hyperref} +\makeatletter +\hypersetup{% + % hidelinks, + pdfstartview=Fit,% + pdfmenubar=true,% + pdftoolbar=true,% + bookmarksopen=false,% + colorlinks=true, + linkcolor=black, + citecolor=purple, + pdftitle={\@docsubtitle},% + pdfauthor={\@author},% + pdfsubject={\@doctitle},% + pdflang={\languagename},% + pdfkeywords={\@dockeywords},% + pdfproducer={pdfTeX}} +\makeatother + +% Cleveref as the last one. +\RequirePackage{cleveref} +%%%%%%%%%%%%%%%%% +\author{Ethan Lu} +\footext{} +\copyrightpage% +{Faculty of Pure Mathematics}% Your Faculty +{XX University}% Your University +{Press of XX University}% Your Publisher +{01A75, 00B50}% AMS +{Guang Zhou}% Your City +% If you do not want to fill one of the fields, please leave it like this: {} +\usepackage{microtype} +\usepackage{appendix} +\usepackage{mathrsfs} +\usepackage{bropd} +\usepackage{bm} +\usepackage{tabularray,booktabs} +\usepackage{listings} +\lstset{ + basicstyle=\small\ttfamily, + keywordstyle=\color{NavyBlue}, + commentstyle=\color{gray!50!black!50}, + stringstyle=\rmfamily\slshape\color{red}, + backgroundcolor=\color{gray!5}, + frame=leftline, + framerule=0.5pt,rulecolor=\color{gray!80}, + numbers=left, + numberstyle=\footnotesize, + firstnumber=1, + stepnumber=1, + numbersep=7pt, + aboveskip=.25em, + showspaces=false, + showstringspaces=false, + keepspaces=true, + showtabs=false, + tabsize=2, + captionpos=b, + flexiblecolumns=true, + breaklines=true, + breakatwhitespace=false, + breakautoindent=true, + breakindent=1em, + title=\lstname, + escapeinside=``, + xleftmargin=1em, xrightmargin=1em, + aboveskip=1ex, belowskip=1ex, + framextopmargin=1pt, framexbottommargin=1pt, + abovecaptionskip=-2pt,belowcaptionskip=3pt, + extendedchars=false, columns=flexible, mathescape=true, + texcl=true, + fontadjust +}% +\begin{document} +% Titlepage +\maketitle\clearpage +%%%%%%%%%%%%%%%% Copyright-Page %%%%%%%%%%%%%%%%%%%%%%% +\copyrights +\pagestyle{\auxsettings} +\makeatletter +\thispagestyle{copyright} +\ifdefempty{\@faculty}{}{\noindent{\large\textsc{\@faculty}} \\} +\ifdefempty{\@university}{}{{\large\textsc{\@university}} \\[1em]} +\ifdefempty{\@publisher}{}{\textit{Published by:} \@publisher \\} +\ifthenelse{\boolean{copyright}}{\textit{Copyright by:} \textsc{\docauthor }\\}{} +\ifdefempty{\@ams}{}{\textit{AMS Classification (2020):} \@ams.\\} +\vfill +\ifdefempty{\@city}{}{\noindent\@city, on \today\\} +\copyright\,\the\year\, \textsc{The Authors} +\doclicenseThis +\cleardoublepage +\makeatother +%%%%%%%%%%%%%%%% Copyright-Page %%%%%%%%%%%%%%%%%%%%%%% +% Toc + \tableofcontents +% Main Contents +\pagestyle{\defaultsettings} +\chapter{A short introduction to beautynote template} +\section{Introduction} + +Beautynote is a specially designed to meet the publication of books and the production of latex templates, with elegant chapter styles and unique page styles. + +Here are all the things you can change : +\begin{table}[!htbp] + \centering % 使用 \centering 替代 center 环境 + \caption{Information-needed} + \begin{tabular}{c|c} + \toprule + \lstinline|\docauthor| & The author of this note\\ \midrule + \lstinline|\doctitle| & The title of this note\\ \midrule + \lstinline|\docsubtitle| & The subtitle of this note\\ \midrule + \lstinline|\docdate| & The date of this note\\ \midrule + \lstinline|\dockeywords| & The keywords of this note\\ \midrule % 假设这是正确的宏命令 + \lstinline|\copyrightpage| & Some useful information of the copyright of this note, just like page 2\\ + \bottomrule + \end{tabular} + \label{tb:Information-needed} +\end{table} +\textbf{Notation:} If you want to change the picture in title page, you can find it on the 220th line in the file \lstinline{beautynote.cls}. +\section{Environments} +We can use some important theorem environments: +\begin{theorem}[Theorem]\label{thm:example-1} + Example of theorem environment. +\end{theorem} +\begin{proof} + +\end{proof} + +\begin{lemma}[Lemma]\label{thm:example-2} + Example of theorem environment. +\end{lemma} +\begin{solution} + +\end{solution} + +\begin{definition}[Definition]\label{thm:example-3} + Example of theorem environment. +\end{definition} +\begin{proposition}[Proposition]\label{thm:example-4} + Example of theorem environment. +\end{proposition} +\begin{problem}[Problem]\label{thm:example-5} + Example of theorem environment. +\end{problem} +\begin{remark}[Remark] + Example of theorem environment. +\end{remark} + +% Bibliography +\clearpage +\pagestyle{\auxsettings} +% \printbibliography[heading=bibintoc] +\end{document} diff --git a/Master/texmf-dist/doc/latex/beautynote/figures/fibonacci.jpg b/Master/texmf-dist/doc/latex/beautynote/figures/fibonacci.jpg Binary files differnew file mode 100644 index 00000000000..5f8d1630faa --- /dev/null +++ b/Master/texmf-dist/doc/latex/beautynote/figures/fibonacci.jpg diff --git a/Master/texmf-dist/doc/latex/beautynote/figures/titlepage.png b/Master/texmf-dist/doc/latex/beautynote/figures/titlepage.png Binary files differnew file mode 100644 index 00000000000..46ccc75db2d --- /dev/null +++ b/Master/texmf-dist/doc/latex/beautynote/figures/titlepage.png diff --git a/Master/texmf-dist/tex/latex/beautynote/beautynote.cls b/Master/texmf-dist/tex/latex/beautynote/beautynote.cls new file mode 100644 index 00000000000..9356903815d --- /dev/null +++ b/Master/texmf-dist/tex/latex/beautynote/beautynote.cls @@ -0,0 +1,355 @@ +\NeedsTeXFormat{LaTeX2e} +\newcommand{\docauthor}{Ethan Lu} % The author of this note + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} +\ProcessOptions\relax +\LoadClass{report} + +\def\fileversion{25-02-2024} +\def\filedate{25/02/2024} + +\ProvidesClass{beautynote}[\filedate\space Version \fileversion\space by \docauthor] +\RequirePackage{ifthen} +\RequirePackage[utf8]{inputenc} +\RequirePackage[english]{babel} +\RequirePackage[T1]{fontenc} +\RequirePackage[svgnames,dvipsnames,x11names,table]{xcolor} +\RequirePackage{ninecolors} +% \RequirePackage[fontsize=12pt]{fontsize} +% \overfullrule=1pt +%%%%%%%%%%%%%%%%%%%%%%%%%%% Chapetr Title Format %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[explicit]{titlesec} % For the customization of Chapter +\RequirePackage{graphicx} % Required for inserting images +% 关于图片 graphicx +% 如果图片没有指定后缀, 依次按下列顺序搜索 +\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} +% 设置图表搜索路径, 可以给图表文件夹取如下名字 +\graphicspath{{figures/}{figure/}} +\RequirePackage{varwidth} +\RequirePackage{tikz} +\usetikzlibrary{calc,shadows,hobby,intersections, decorations.markings, decorations.pathreplacing,spy,arrows,shapes,fadings,trees,mindmap,patterns,shapes.arrows,shapes.symbols,tikzmark,shapes.geometric,graphs, quotes, angles,decorations.pathmorphing,through,shadings,backgrounds,positioning,fit,arrows.meta,shapes.misc,decorations.shapes} +\pgfdeclarelayer{background} %背景%底层 +\pgfdeclarelayer{foreground} %上层 +\pgfdeclarelayer{top} %顶部 +\pgfdeclarelayer{bottom} %底部 +\pgfsetlayers{bottom,background,main,foreground,top} +\tikzfading[name=fade right, + right color =transparent!100, + left color=transparent!50] +\tikzfading[name=fade left, + left color =transparent!100, + right color=transparent!50] +\tikzfading[name=fade up, + top color =transparent!30, + bottom color=transparent!0] +\tikzfading[name=fade down, + bottom color =transparent!100, + top color=transparent!50] +%% -------- 章节样式 +\definecolor{gray1}{HTML}{9E9E9E} +\definecolor{gray2}{HTML}{d4d3d8} +\definecolor{black1}{HTML}{616065} + +\newcommand{\chapternumbered}[1]{% + \begin{tikzpicture}[remember picture,overlay] + \def\xshiftofnode{2cm} + \def\hlenofnode{2.8cm} + \def\vlenofnode{4.76cm} + \def\nodecorners{8pt} + \def\chapnameyshift{0.7cm} + \def\chapbackheightI{.1\paperheight} + \def\chapbackheightII{.15\paperheight} + \fill[gray2] % 浅色 + (current page.north west) coordinate (NW) --++(0,-\chapbackheightII) [bend left=-9] to ([shift={(\paperwidth,-.8*\chapbackheightI-2.96cm)}]NW) |- (NW) --cycle; % bottom background + \fill[gray1!80] % 深色 + (current page.north west) coordinate (NW) --++(0,-\chapbackheightI) [bend left=-10] to ([shift={(\paperwidth,-.8*\chapbackheightI-3.5cm)}]NW) |- (NW) --cycle; % subbottom background + %%%%%%%%%%%%%%%%%% Chapname Box %%%%%%%%%%%%%%%%%%%% + \fill[black1,opacity=0.8] + ([xshift=\xshiftofnode]NW) {[rounded corners=\nodecorners]--++(0,-\vlenofnode)} coordinate (chapnameleft) {[rounded corners=\nodecorners]--++(\hlenofnode,0)} coordinate (chapnameright) --++(0,\vlenofnode)--cycle; + \pattern[pattern=sixpointed stars,pattern color=gray2!50,opacity=0.8] + ([xshift=\xshiftofnode]NW)--++(0,-0.76*\vlenofnode) coordinate (bendl) [bend left=-2] to ([shift={(\hlenofnode,-0.168*\vlenofnode)}]bendl) |- ([xshift=\xshiftofnode]NW) --cycle; + \fill [black1,path fading=fade up]% + ([xshift=\xshiftofnode]NW)--++(0,-0.76*\vlenofnode) coordinate (bendl) [bend left=-2] to ([shift={(\hlenofnode,-0.168*\vlenofnode)}]bendl) |- ([xshift=\xshiftofnode]NW) --cycle; + %%%%%%%%%%%%%%%%%% Chapname Box %%%%%%%%%%%%%%%%%%%% + \node[font=\huge\bfseries,text=gray!20!white] (chapname) at ($([yshift=\chapnameyshift]chapnameleft)!0.5!([yshift=\chapnameyshift]chapnameright)$) {CH\ \thechapter}; %chapname + \node[right,font=\huge\bfseries,text=black] (chaptitle) at ([shift={(1.5cm,-.08*\chapnameyshift)}]chapname) {\begin{varwidth}{.92\linewidth} \baselineskip=23pt #1\end{varwidth}}; % chaptitle + \end{tikzpicture} +} +\newcommand{\chapternonum}[1]{% + \begin{tikzpicture}[remember picture,overlay] + \def\xshiftofnode{2cm} + \def\hlenofnode{2.8cm} + \def\vlenofnode{4.76cm} + \def\nodecorners{8pt} + \def\chapnameyshift{0.7cm} + \def\chapbackheightI{.1\paperheight} + \def\chapbackheightII{.15\paperheight} + \fill[gray2] + (current page.north west) coordinate (NW) --++(0,-\chapbackheightII) [bend left=-9] to ([shift={(\paperwidth,-.8*\chapbackheightI-2.96cm)}]NW) |- (NW) --cycle; % bottom background + \fill[gray1!80] + (current page.north west) coordinate (NW) --++(0,-\chapbackheightI) [bend left=-10] to ([shift={(\paperwidth,-.8*\chapbackheightI-3.5cm)}]NW) |- (NW) --cycle; % subbottom background + %%%%%%%%%%%%%%%%%% Chapname Box %%%%%%%%%%%%%%%%%%%% + \fill[black1,opacity=0.8] + ([xshift=\xshiftofnode]NW) {[rounded corners=\nodecorners]--++(0,-\vlenofnode)} coordinate (chapnameleft) {[rounded corners=\nodecorners]--++(\hlenofnode,0)} coordinate (chapnameright) --++(0,\vlenofnode)--cycle; + \pattern[pattern=sixpointed stars,pattern color=gray2!50,opacity=0.8] + ([xshift=\xshiftofnode]NW)--++(0,-0.76*\vlenofnode) coordinate (bendl) [bend left=-2] to ([shift={(\hlenofnode,-0.168*\vlenofnode)}]bendl) |- ([xshift=\xshiftofnode]NW) --cycle; + \fill [black1,path fading=fade up]% + ([xshift=\xshiftofnode]NW)--++(0,-0.76*\vlenofnode) coordinate (bendl) [bend left=-2] to ([shift={(\hlenofnode,-0.168*\vlenofnode)}]bendl) |- ([xshift=\xshiftofnode]NW) --cycle; + %%%%%%%%%%%%%%%%%% Chapname Box %%%%%%%%%%%%%%%%%%%% + \node[font=\fontsize{30pt}{30pt}\selectfont\scshape,text=gray!20!white] (chapname) at ($([yshift=\chapnameyshift]chapnameleft)!0.5!([yshift=\chapnameyshift]chapnameright)$) {chap}; %chapname + \node[right,font=\huge\bfseries,text=black] (chaptitle) at ([shift={(1.5cm,-.08*\chapnameyshift)}]chapname) {\begin{varwidth}{.92\linewidth} \baselineskip=23pt #1\end{varwidth}}; % chaptitle + \end{tikzpicture} +} + +\titleformat{\chapter}{\huge\bfseries}{}{1em}{\chapternumbered{#1}} +\titleformat{name=\chapter,numberless}{\bfseries\huge}{}{1em}{\chapternonum{#1}} +\titlespacing{\chapter}{0pt}{0pt}{65pt} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Using Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{geometry} +\RequirePackage[leqno]{amsmath} +\RequirePackage{mathtools} +\RequirePackage{amssymb} +\RequirePackage{amsthm} +\RequirePackage{empheq} +\RequirePackage{mdframed} +\RequirePackage{booktabs} +\RequirePackage{lipsum} +\pagecolor{gray!15} +\RequirePackage{psfrag} +\RequirePackage{bbding} +\RequirePackage{fancyhdr} +\RequirePackage{enumitem} +\RequirePackage{pgfplots} +\RequirePackage{bm,times} +\RequirePackage{bropd,physics} +\RequirePackage{indentfirst} +\RequirePackage{float} +\RequirePackage{pifont} +\RequirePackage{pgfornament-han} +\RequirePackage{shadowtext} +\shadowoffset{.65pt} +\RequirePackage{eso-pic,transparent} +\RequirePackage{extramarks} +\RequirePackage{etoolbox} +\RequirePackage[type={CC},modifier={by-nc-nd},hyperxmp={false},version={4.0}]{doclicense} +\RequirePackage{xpatch} +\RequirePackage{rotating} +\RequirePackage{fbox} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Other Settings + +%%%%%%%%%%%%%%%%%%%%%%%%%% Page Setting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\geometry{a4paper,margin=2.2cm} +\setcounter{secnumdepth}{4} +%%%%%%%%%%%%%%%%%%%%%%%%%% Define some useful colors %%%%%%%%%%%%%%%%%%%%%%%%%% +\definecolor{ocre}{RGB}{243,102,25} +\definecolor{mygray}{RGB}{243,243,244} +\definecolor{deepGreen}{HTML}{a71930} +\definecolor{shallowGreen}{HTML}{D5CABD} +\definecolor{deepBlue}{HTML}{005670} +\definecolor{shallowBlue}{HTML}{ced7df} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%% Define an orangebox command %%%%%%%%%%%%%%%%%%%%%%%% +\newcommand\orangebox[1]{\fcolorbox{ocre}{mygray}{\hspace{1em}#1\hspace{1em}}} +\newenvironment{note}[1][\bf Note:]{\Line\uuline{#1} }{\Line} +\newcommand{\Line}{\noindent\\\tikz\draw[line width=0.65pt,gray!80,dashed] (0,0)--++(.99\linewidth,0);\par} +\newcommand{\prob}[2][Problems]{\vspace{1em}\begin{center} + \pgfornamenthan[color=#2,scale=0.25,symmetry=c]{68}\hspace{.3em}\begin{tabular}{c} \pgfornamenthan[color=#2,scale=0.4]{60}\\[1.6em] + \shadowtext{\textbf{\color{#2}\fontsize{25pt}{25pt}\selectfont \textsc{#1}}} \end{tabular}\hspace{.5em}\pgfornamenthan[color=#2,scale=0.25,symmetry=h]{68} +\end{center}\vspace{1em}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%% English Environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newtheoremstyle{mytheoremstyle}{3pt}{3pt}{\itshape}{0cm}{\rmfamily\bfseries}{}{.5em}{{\color{black}\thmname{#1}~\thmnumber{#2}}\thmnote{\,--\,#3}} +\newtheoremstyle{myproblemstyle}{3pt}{3pt}{\normalfont}{0cm}{\rmfamily\bfseries}{}{.5em}{{\color{black}\thmname{#1}~\thmnumber{#2}}\thmnote{\,--\,#3}} +\theoremstyle{mytheoremstyle} +\newmdtheoremenv[linewidth=3pt,backgroundcolor=shallowGreen!50,linecolor=deepGreen,leftline = true,rightline=false,topline=false,bottomline=false,leftmargin=0pt,innerleftmargin=5pt,innerrightmargin=5pt,innertopmargin=3pt]{theorem}{Theorem}[section] +\newmdtheoremenv[linewidth=3pt,backgroundcolor=shallowGreen!50,linecolor=deepGreen,leftline = true,rightline=false,topline=false,bottomline=false,leftmargin=0pt,innerleftmargin=5pt,innerrightmargin=5pt,innertopmargin=3pt]{lemma}{Lemma}[section] +\newmdtheoremenv[linewidth=3pt,backgroundcolor=shallowGreen!50,linecolor=deepGreen,leftline = true,rightline=false,topline=false,bottomline=false,leftmargin=0pt,innerleftmargin=5pt,innerrightmargin=5pt,innertopmargin=3pt]{proposition}{Proposition}[section] +\theoremstyle{mytheoremstyle} +\newmdtheoremenv[linewidth=3pt,backgroundcolor=shallowBlue!70,linecolor=deepBlue,leftline = true,rightline=false,topline=false,bottomline=false,leftmargin=0pt,innerleftmargin=5pt,innerrightmargin=5pt,innertopmargin=3pt]{definition}{Definition}[section] +\theoremstyle{myproblemstyle} +\newmdtheoremenv[linecolor=black!60,backgroundcolor=gray!20,linewidth=3pt,leftline = true,rightline=false,topline=false,bottomline=false,leftmargin=0pt,innerleftmargin=5pt,innerrightmargin=5pt,innertopmargin=5pt,innerbottommargin=5pt]{problem}{Problem}[section] +\newtheorem*{remark}{Remark} +\newenvironment*{solution}{\begin{proof}[Solution]}{\end{proof}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Plotting Settings %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepgfplotslibrary{colorbrewer} +\pgfplotsset{width=8cm,compat=1.9} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Some colors +\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66} +\definecolor{beaublue}{HTML}{7eabc0} +%% +% Some commands that will be useful for the title. +\makeatletter +\newcommand{\doctitle}[1]{\def\@doctitle{#1}} +\newcommand{\docsubtitle}[1]{\def\@docsubtitle{#1}} +\newcommand{\dockeywords}[1]{\def\@dockeywords{#1}} +\newcommand{\footext}[1]{\def\@footext{#1}} +\makeatother + +% To make the lists more aesthetic, gray tones. +\setlist{label=\textcolor{gray}{\textbullet},topsep=2pt,noitemsep} +\setenumerate{label=\textcolor{gray}{\textit{\arabic*}.},topsep=2pt,noitemsep,font=\upshape} + +% Keeping the gray tones along the document, on the header bar. +\renewcommand{\headrulewidth}{1pt} +\xpretocmd\headrule{\color{lightgray}}{}{\PatchFailed} +\renewcommand{\qedsymbol}{\textcolor{gray}{$\blacksquare$}} + +% Important, header and footer spacing +\def\mylength{3pt} +\setlength{\headheight}{12pt+\mylength} +\addtolength{\headsep}{10pt} +\addtolength{\footskip}{10pt} +\addtolength{\textheight}{-20pt-1ex-\mylength} + +% Par indent modifications +\setlength{\parindent}{2em} + +% If you want to put a quote, it can appear in italic. +\AtBeginEnvironment{quote}{\itshape} + +% A beautiful background for the titlepage. +\newcommand\BackgroundPic[1]{\put(0,0){\parbox[b][\paperheight]{\paperwidth}{\vfill\centering\includegraphics[width=\paperwidth,height=\paperheight,scale=1.05]{#1}\vfill}}} % 保持长宽比 keepaspectratio, +\AtBeginEnvironment{titlepage}{\AddToShipoutPictureBG*{\transparent{0.3}\BackgroundPic{fibonacci.jpg}}} +% Page numbering Box +\newcommand{\pagenumber}[1]{{\setlength{\fboxsep}{5pt}\fbox[#1,lcolor=beaublue,rcolor=beaublue,tcolor=beaublue,bcolor=beaublue]{\fontsize{10pt}{10pt}\selectfont{\textcolor{gray!50!black}{\textsc{\thepage}}}}}} + +% Header configuration +\makeatletter + +\fancypagestyle{singleside}{% +\fancyhf{}% +\lhead{\color{gray}\nouppercase{\textit{\lastleftxmark}}}% +\rhead{\color{black}\nouppercase{\textsc{\lastrightxmark}}}% +\rfoot{\pagenumber{lt}}% +\lfoot{\fontsize{10pt}{10pt}\selectfont{\textsc{\textcolor{airforceblue}{\@doctitle}\;\textcolor{lightgray}{|}\;\textcolor{gray!70!black}{\@docsubtitle}}}}% +\cfoot{\color{gray!70!black}\fontsize{10pt}{10pt}{\@footext}} +\renewcommand{\headrulewidth}{1pt}}% + +\fancypagestyle{twoside}{% +\fancyhf{}% +\fancyhead[RE]{\textcolor{black}{\nouppercase{\leftmark}}}% +\fancyhead[LO]{\textcolor{black}{\nouppercase{\lastrightxmark}}}% +\fancyhead[RO]{\textcolor{gray}{\textit{\lastleftxmark}}}% +\fancyhead[LE]{\textcolor{gray}{\color{gray}{\textbf{\textsc{\romannumeral\thechapter\relax}}}}}% +\fancyfoot[LE]{\pagenumber{lt}}% +\fancyfoot[RO]{\pagenumber{rt}}% +\fancyfoot[RE]{\fontsize{10pt}{10pt}\selectfont{\textcolor{airforceblue}{\textsc{\@doctitle}}}}% +\fancyfoot[LO]{\fontsize{10pt}{10pt}\selectfont{\textcolor{gray!70!black}{\textsc{\@docsubtitle}}}}% +\fancyfoot[CO,CE]{\color{gray!70!black}\fontsize{10pt}{10pt}{\@footext}}% +\fancyheadoffset[leh,roh]{1em}% +\renewcommand{\headrulewidth}{1pt}}% + +\fancypagestyle{auxsingle}{% +\fancyhf{}% +\chead{\nouppercase{\textsc{\leftmark}}}% +% \lfoot{\fontsize{10pt}{10pt}\selectfont{\textsc{\textcolor{airforceblue}{\@doctitle}\;\textcolor{lightgray}{|}\;\textcolor{gray!70!black}{\@docsubtitle}}}}% +\rfoot{\pagenumber{lt}}% +\renewcommand{\headrulewidth}{1pt}}% + +\fancypagestyle{auxtwoside}{% +\fancyhf{}% +\fancyhead[CE,CO]{\nouppercase{\textsc{\leftmark}}}% +\fancyfoot[RE]{\fontsize{10pt}{10pt}\selectfont{\textcolor{airforceblue}{\textsc{\@doctitle}}}}% +\fancyfoot[LO]{\fontsize{10pt}{10pt}\selectfont{\textcolor{gray!70!black}{\textsc{\@docsubtitle}}}}% +\fancyfoot[LE]{\pagenumber{lt}}% +\fancyfoot[RO]{\pagenumber{rt}}% +\fancyheadoffset{0em}% +\renewcommand{\headrulewidth}{1pt}}% + +\makeatother + +% Now, if we load all-in-one with two side option, we will adjust the headers accordingly +\makeatletter +\if@twoside + \fancypagestyle{copyright}{ + \fancyhf{}% + \fancyfoot[LE]{\pagenumber{lt}}% + \fancyfoot[RO]{\pagenumber{rt}}% + \fancyheadoffset{0em}% + \renewcommand{\headrulewidth}{0pt}}% + \fancypagestyle{plain}{% + \fancyhf{}% + \fancyfoot[RE]{\fontsize{10pt}{10pt}\selectfont{\textcolor{airforceblue}{\textsc{\@doctitle}}}}% + \fancyfoot[LO]{\fontsize{10pt}{10pt}\selectfont{\textcolor{gray!70!black}{\textsc{\@docsubtitle}}}}% + \fancyfoot[RO,LE]{\pagenumber{lt}}% + \renewcommand{\headrulewidth}{0pt}}% +\else + \fancypagestyle{copyright}{ + \fancyhf{}% + \rfoot{\pagenumber{rt}}% + \fancyheadoffset{0em}% + \renewcommand{\headrulewidth}{0pt}}% + \fancypagestyle{plain}{% + \fancyhf{}% + \lfoot{\fontsize{10pt}{10pt}\selectfont{\textsc{\textcolor{airforceblue}{\@doctitle}\;\textcolor{lightgray}{|}\;\textcolor{gray!70!black}{\@docsubtitle}}}}% + \rfoot{\pagenumber{rt}}% + \renewcommand{\headrulewidth}{0pt}}% +\fi +\makeatother + +\makeatletter +\if@twoside + \newcommand{\defaultsettings}{twoside} + \newcommand{\auxsettings}{auxtwoside} +\else + \newcommand{\defaultsettings}{singleside} + \newcommand{\auxsettings}{auxsingle} +\fi +\pagestyle{\defaultsettings} +\makeatother + +% Section and subsection marks. +\makeatletter +\renewcommand{\chaptermark}[1]{\markboth{#1}{}\extramarks{}{}} +\renewcommand{\sectionmark}[1]{\extramarks{\thesection}{#1}} +\renewcommand{\subsectionmark}[1]{\extramarks{\thesubsection}{#1}} +\makeatother + +% Greetings for the template author command (modify the auxiliar pagestyles). +\newboolean{copyright} +\newcommand{\copyrights}{\setboolean{copyright}{true}} + +% This is my favourite config for bibliography. Each one of the references can be briefly explained with the field "note". +\RequirePackage[style=english]{csquotes} +\RequirePackage[ +backend=biber, +style=alphabetic, +sorting=ynt +]{biblatex} +\newcommand{\familynameformat}[1]{\MakeUppercase{#1}} +\AtBeginBibliography{% + \renewcommand{\mkbibnamefamily}{\familynameformat}% +} +\renewbibmacro*{begentry}{% + \iffieldundef{note} + {\undef\bbxnote} + {\savefield{note}{\bbxnote}% + \clearfield{note}}} +\renewbibmacro*{finentry}{% + \restorefield{note}{\bbxnote}% + \iffieldundef{note} + {\finentry} + {\setunit{\finentrypunct\par\vspace{\bibitemsep}\nobreak} + \textit{\printfield{note}}% + \finentry}} +\let\familynameformat=\textsc +\nocite{*} + +\addbibresource{ref.bib} + +% Setting up the titlepage. +\makeatletter% +\title{{\large\color{airforceblue}{\textit{\@doctitle}}}\\[0.5cm]{\Huge\color{gray!70!black}\textsc{\@docsubtitle}}}% +\makeatother% +% Some commands that will be useful for the copyrightpage +\makeatletter +\newcommand{\copyrightpage}[5]{\def\@faculty{#1}\def\@university{#2}\def\@publisher{#3}\def\@ams{#4}\def\@city{#5}} +\makeatother |