├── main.pdf
├── images
├── contents.png
├── title-1.png
├── title-2.png
├── preview-1.png
├── preview-2.png
└── theorem boxes.png
├── analysis_class-note.pdf
├── .gitignore
├── main.tex
├── LICENSE
├── macros.tex
├── preamble-formal.tex
├── README.md
├── letterfonts.tex
├── preamble.tex.bak
├── preamble-article.tex
└── preamble.tex
/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/main.pdf
--------------------------------------------------------------------------------
/images/contents.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/contents.png
--------------------------------------------------------------------------------
/images/title-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/title-1.png
--------------------------------------------------------------------------------
/images/title-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/title-2.png
--------------------------------------------------------------------------------
/images/preview-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/preview-1.png
--------------------------------------------------------------------------------
/images/preview-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/preview-2.png
--------------------------------------------------------------------------------
/analysis_class-note.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/analysis_class-note.pdf
--------------------------------------------------------------------------------
/images/theorem boxes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sohamch08/Eye-Candy-Lecture-Notes-Theme/HEAD/images/theorem boxes.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.aux
2 | *.log
3 | *.out
4 | *.synctex.gz
5 | *.toc
6 | *.bbl
7 | *.bcf
8 | *.blg
9 | *.nav
10 | *.snm
11 | *.run.xml
12 |
--------------------------------------------------------------------------------
/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{report}
2 | \input{preamble}
3 | \input{macros}
4 | \input{letterfonts}
5 | \begin{document}
6 |
7 | \thispagestyle{empty}
8 | \mytitleb{Title Here}{Soham Chatterjee}{sohamchatterjee999@gmail.com}{2021}
9 | \newpage% or \cleardoublepage
10 | \tableofcontents
11 | \chapter{First Chapter}
12 | \section{Section 1}
13 | \dfn{Definition Topic}{Definition Statement}
14 | \thm{Theorem Name}{Theorem Statement}
15 | \cor[cori]{Corollary Name}{Corollary Statement}
16 | \lem{Lemma Name}{Lemma Statement}
17 | \clm{Claim Name}{Claim Statement}
18 | \ex{Example Name}{Example explained}
19 | \opn{Open Question Name}{Question Statement}
20 | \qs{Question Name}{Question Statement}
21 | \nt{Special Note}
22 | \wc{Wrong Concept topic}{Explanation}
23 | \pf{Proof}{Proof}
24 |
25 | \chapter{Second Chapter}
26 | \section{Section 1}
27 | \end{document}
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Soham Chatterjee
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/macros.tex:
--------------------------------------------------------------------------------
1 | \newcommand{\Qed}{\begin{flushright}\qed\end{flushright}}
2 | \newcommand{\parinn}{\setlength{\parindent}{1cm}}
3 | \newcommand{\parinf}{\setlength{\parindent}{0cm}}
4 | \newcommand{\del}[2]{\frac{\partial #1}{\partial #2}}
5 | \newcommand{\Del}[3]{\frac{\partial^{#1} #2}{\partial^{#1} #3}}
6 | \newcommand{\deld}[2]{\dfrac{\partial #1}{\partial #2}}
7 | \newcommand{\Deld}[3]{\dfrac{\partial^{#1} #2}{\partial^{#1} #3}}
8 | \newcommand{\uin}{\mathbin{\rotatebox[origin=c]{90}{$\in$}}}
9 | \newcommand{\usubset}{\mathbin{\rotatebox[origin=c]{90}{$\subset$}}}
10 | \newcommand{\lt}{\left}
11 | \newcommand{\rt}{\right}
12 | \newcommand{\exs}{\exists}
13 | \newcommand{\st}{\strut}
14 | \newcommand{\dps}[1]{\displaystyle{#1}}
15 | \newcommand{\la}{\langle}
16 | \newcommand{\ra}{\rangle}
17 | \newcommand{\cls}[1]{\textsc{#1}}
18 | \newcommand{\prb}[1]{\textsc{#1}}
19 | \newcommand{\comb}[2]{\left(\begin{matrix}
20 | #1\\ #2
21 | \end{matrix}\right)}
22 | %\newcommand[2]{\quotient}{\faktor{#1}{#2}}
23 | \newcommand\quotient[2]{
24 | \mathchoice
25 | {% \displaystyle
26 | \text{\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}}%
27 | }
28 | {% \textstyle
29 | #1\,/\,#2
30 | }
31 | {% \scriptstyle
32 | #1\,/\,#2
33 | }
34 | {% \scriptscriptstyle
35 | #1\,/\,#2
36 | }
37 | }
38 |
39 | \newcommand{\tensor}{\otimes}
40 | \newcommand{\xor}{\oplus}
41 | %\newcommand{\algoprob}[3]{\begin{center}
42 | % \begin{tabular}{l@{\hskip 0.5cm} p{13cm}}
43 | % \multicolumn{2}{l}{\ensuremath{#1}}\\
44 | % \textbf{Input:} \\[.7\baselineskip]
45 | % \textbf{Question:} & #3
46 | % \end{tabular}
47 | %\end{center}}
48 | \newenvironment{solution}
49 | {\textit{\textbf{Solution:}}
50 | }
51 | {
52 | \hfill $\blacksquare$
53 |
54 | \vspace{1cm}
55 | }
56 | \newcommand{\sol}[1]{\begin{solution}#1\end{solution}}
57 | \newcommand{\solve}[1]{\setlength{\parindent}{0cm}\textbf{\textit{Solution: }}\setlength{\parindent}{1cm}#1 \hfill $\blacksquare$}
58 | \newcommand{\mat}[1]{\left[\begin{matrix}#1\end{matrix}\right]}
59 | \newcommand{\matp}[1]{\lt(\begin{matrix}#1\end{matrix}\rt)}
60 | \newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
61 | \newcommand{\handout}[3]{
62 | \noindent
63 | \begin{center}
64 | \framebox{
65 | \vbox{
66 | \hbox to 6.5in { {\bf Complexity Theory I } \hfill Jan -- May, 2023 }
67 | \vspace{4mm}
68 | \hbox to 6.5in { {\Large \hfill #1 \hfill} }
69 | \vspace{2mm}
70 | \hbox to 6.5in { {\em #2 \hfill #3} }
71 | }
72 | }
73 | \end{center}
74 | \vspace*{4mm}
75 | }
76 |
77 | \newcommand{\lecture}[3]{\handout{Lecture #1}{Lecturer: #2}{Scribe: #3}}
78 |
79 | \let\marvosymLightning\Lightning
80 | \newcommand{\ctr}{\text{\marvosymLightning}\hspace{0.5ex}} % Requires marvosym package
81 |
82 | \newcommand{\ov}[1]{\overline{#1}}
83 | \newcommand{\thmref}[1]{\hyperref[th:#1]{Theorem \ref{th:#1}}}
84 | \newcommand{\propref}[1]{\hyperref[th:#1]{Proposition \ref{th:#1}}}
85 | \newcommand{\lmref}[1]{\hyperref[th:#1]{Lemma \ref{th:#1}}}
86 | \newcommand{\corref}[1]{\hyperref[th:#1]{Corollary \ref{th:#1}}}
87 |
88 | \newcommand{\thrmref}[1]{\hyperref[#1]{Theorem \ref{#1}}}
89 | \newcommand{\propnref}[1]{\hyperref[#1]{Proposition \ref{#1}}}
90 | \newcommand{\lemref}[1]{\hyperref[#1]{Lemma \ref{#1}}}
91 | \newcommand{\corrref}[1]{\hyperref[#1]{Corollary \ref{#1}}}
92 |
93 | \DeclareMathOperator{\enc}{Enc}
94 | \DeclareMathOperator{\res}{Res}
95 | \DeclareMathOperator{\spec}{Spec}
96 | \newcommand{\algo}[3][]{\begin{algorithm}
97 | \DontPrintSemicolon
98 | \Begin{
99 | #2
100 | }
101 | \caption{#3\label{#1}}
102 | \end{algorithm}}
--------------------------------------------------------------------------------
/preamble-formal.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % PACKAGE IMPORTS
3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 |
5 |
6 | \usepackage{fullpage,amsmath,amsfonts,amsthm,amssymb,mathtools}
7 | \usepackage{enumitem}
8 | \usepackage[hidelinks]{hyperref}
9 | \usepackage{theoremref}
10 | \hypersetup{
11 | colorlinks=true, linkcolor=doc!80, urlcolor=doc!80, citecolor=myr,
12 | bookmarksnumbered=true,
13 | bookmarksopen=true
14 | }
15 | \usepackage[Sonny]{fncychap}
16 | \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
17 | \usepackage{tcolorbox}
18 | \usepackage{etoolbox}
19 | \usepackage{authblk}
20 | \usepackage{nameref}
21 | \usepackage{multicol,array}
22 | \usepackage{tikz}
23 | \usepackage{tikz-cd}
24 |
25 | \usepackage{stmaryrd}
26 | \usepackage{mathpazo}
27 | \usepackage{libertine}
28 | %\usepackage{libertinust1math}
29 | \usepackage[T1]{fontenc}
30 | \usepackage[ruled,vlined]{algorithm2e}
31 | %\usepackage{biblatex}
32 | %\usepackage[
33 | %backend=biber,
34 | %style=alphabetic,
35 | %sorting=ynt
36 | %]{biblatex}
37 | \usepackage{marvosym}
38 | \usepackage{titling}
39 | \renewcommand\maketitlehooka{\null\mbox{}\vfill}
40 | \renewcommand\maketitlehookd{\vfill\null}
41 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 | % SELF MADE COLORS
43 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44 |
45 | \newcommand{\mystep}{\vrule width 0.5em\hspace{0.5em}}
46 |
47 | \SetAlgoNlRelativeSize{-1}
48 |
49 |
50 | \definecolor{myg}{RGB}{56, 140, 70}
51 | \definecolor{myb}{RGB}{45, 111, 177}
52 | \definecolor{myr}{RGB}{199, 68, 64}
53 | \definecolor{mytheorembg}{HTML}{F2F2F9}
54 | \definecolor{mytheoremfr}{HTML}{00007B}
55 | \definecolor{myexamplebg}{HTML}{F2FBF8}
56 | \definecolor{myexamplefr}{HTML}{88D6D1}
57 | \definecolor{myexampleti}{HTML}{2A7F7F}
58 | \definecolor{mydefinitbg}{HTML}{E5E5FF}
59 | \definecolor{mydefinitfr}{HTML}{3F3FA3}
60 | \definecolor{notesgreen}{RGB}{0,162,0}
61 | \definecolor{myp}{RGB}{197, 92, 212}
62 | \definecolor{mygr}{HTML}{2C3338}
63 | \definecolor{myred}{RGB}{127,0,0}
64 | \definecolor{myyellow}{RGB}{169,121,69}
65 | \definecolor{doc}{RGB}{0,60,110}
66 |
67 | \newtheorem*{observation*}{Observation}
68 |
69 | \setlength{\parindent}{1cm}
70 |
71 | \renewcommand{\qed}{\ensuremath{\blacksquare}}
72 |
73 | \newtheorem{theorem}{Theorem}
74 | \numberwithin{theorem}{section}
75 | \newtheorem{corollary}[theorem]{Corollary}
76 | \newtheorem{example}[theorem]{Example}
77 | \newtheorem{lemma}[theorem]{Lemma}
78 | \newtheorem{observation}{Observation}
79 | \newtheorem{proposition}[theorem]{Proposition}
80 | \newtheorem{definition}{Definition}[section]
81 | \newtheorem{claim}{Claim}
82 | \newtheorem{question}{Question}
83 | \newtheorem{fact}[observation]{Fact}
84 | \newtheorem{assumption}[theorem]{Assumption}
85 | \newtheorem{open}[theorem]{Open Question}
86 |
87 | \renewenvironment{proof}{\noindent{\it \textbf{Proof:}}\hspace*{1em}}{\qed\bigskip\\}
88 | \newenvironment{proof-sketch}{\noindent{\bf Sketch of Proof:}\hspace*{1em}}{\qed\bigskip\\}
89 | \newenvironment{proof-idea}{\noindent{\bf Proof Idea:}\hspace*{1em}}{\qed\bigskip\\}
90 | \newenvironment{proof-of-lemma}[1]{\noindent{\bf Proof of Lemma #1:}\hspace*{1em}}{\qed\bigskip\\}
91 | \newenvironment{proof-of-claim}[1]{\noindent{\bf Proof of Claim #1:}\hspace*{1em}}{\qed\bigskip\\}
92 | \newenvironment{proof-attempt}{\noindent{\bf Proof Attempt:}\hspace*{1em}}{\qed\bigskip\\}
93 | \newenvironment{proofof}[1]{\noindent{\bf Proof:}
94 | of #1:\hspace*{1em}}{\qed\bigskip\\}
95 | \newenvironment{remark}{\noindent{\bf Remark:}\hspace*{1em}}{\bigskip\\}
96 | \newenvironment{answer}{%
97 | \setlength\parindent{0pt}\par\medskip\textbf{Answer:}\quad}{%
98 | \par\medskip}
99 |
100 |
101 |
102 |
103 |
104 | \newcommand\colorlink[3]{\href{#2}{\color{#1}#3}}
105 | \newcommand\colorurl[2]{{\color{#1}\url{#2}}}
106 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Eye-Candy-Lecture-Notes-Theme
2 | This is a Eye Candy lecture note taking theme I have created for my personal course lecture notes. If you want to check an actual example in using this theme. Then you can check my [Analysis Lecture Notes](analysis_class-note.pdf). If you want to just view some pages of using this theme. Here check these pages
3 |
4 |
5 |
6 |
7 |
8 | ## Title Page
9 | There are two custom title pages. I have named them `\mytitlea` and `\mytitleb`. Among them I have used the `\mytitleb` in the analysis lecture notes.
10 |
11 |
12 |
13 |
14 | The command goes like this
15 | ```tex
16 | \mytitleb{Title}{Author}{Email}{Year}
17 | ```
18 | >- Use this command inside the `\begin{document}`.
19 | >- Do not use the usual `\maketitle` process here ie you first wrote the `title{}` `\author{}` and `\date{}` then inside the `\begin{document}`, `\maketitle`.
20 | >- I would recommend first add `\thispagestyle{empty}` to make the title page without pagenumber. And after the `\mytitleb` command add a `\newpage` to make a forcefull page break.
21 |
22 | So the whole command block looks like this
23 | ```tex
24 | \begin{document}
25 |
26 | \thispagestyle{empty}
27 | \mytitleb{Title Here}{Soham Chatterjee}{sohamchatterjee999@gmail.com}{2021}
28 | \newpage
29 | ...
30 | Put your content here
31 | ...
32 | \end{document}
33 | ```
34 |
35 | ## Theorem Boxes
36 | I have many theorem boxes for Theorems, Corollaries, Lemmas, Claims, Definitions, Examples, Questions etc.
37 |
38 |
39 |
40 | The environments which are appears in pairs one of them is for the chapters which have sections whose environment name starts with small letter and the other is for chapters which do not have sections whose environment name starts with capital letter. In the short command for the latter I used the letter 'c' to represent it should be use if it is not under a section
41 |
42 | Short commands for environments goes like this
43 | ```tex
44 | \commandName[reference_name]{heading}{description}
45 | ```
46 | For example in theorem for suppose Fundamental Theorem of Calculus i will write like this
47 | ```tex
48 | \thm[ftc]{Fundamental Theorem of Calculus}{Theorem Statement}
49 | ```
50 | ## Referencing Theorems
51 | Take the code for the `Theorem` box
52 | ```tex
53 | \tcbuselibrary{theorems,skins,hooks}
54 | \newtcbtheorem[number within=section]{Theorem}{Theorem}
55 | {%
56 | enhanced,
57 | breakable,
58 | colback = mytheorembg,
59 | frame hidden,
60 | boxrule = 0sp,
61 | borderline west = {2pt}{0pt}{mytheoremfr},
62 | sharp corners,
63 | detach title,
64 | before upper = \tcbtitle\par\smallskip,
65 | coltitle = mytheoremfr,
66 | fonttitle = \bfseries\sffamily,
67 | description font = \mdseries,
68 | separator sign none,
69 | segmentation style={solid, mytheoremfr},
70 | }
71 | {th}
72 | ```
73 | Here take the last `{th}` term in mind cause this will be used in referencing. Suppose a use case of theorem
74 |
75 | ```tex
76 | \begin{Theorem}{title}{refer}
77 | Theroem Statement
78 | ...
79 | \end{Theorem}
80 | ```
81 | To refer this in another place use the command `\ref{th:refer}`. This will put `(1.1.1)` type of text with a link to that theorem in your document. To use custom text for example I want to put `Theorem 1.1.1` and then use the command
82 |
83 | ```tex
84 | \hyperref[th:refer]{Theorem \ref{th:refer}}
85 | ```
86 | This will do the work. This process will work for all the theorem boxes I have defined. Here are the terms to be used in each type of theorem boxes
87 |
88 | ```
89 | Theorem: th
90 | Claim: th
91 | Lemma: th
92 | Corollary: th
93 | Definition: def
94 | Example: ex
95 | Question: qs
96 | Exercise: def
97 | Open Question: def
98 | ```
99 |
100 |
101 | ## Proof
102 | The proof environment actually multipurpose. For a proof many things actually play. Proof idea. Proof overview. Main pproof. Proof prerequisites etc. Thats why the first option uses the actual name of what exactly we are writing for the proof. It will go like this
103 | Proof idea: `\pf{Proof Idea}{content..}`
104 | Proof Overview: `\pf{Proof Overview}{content..}`
105 | Proof : `\pf{Proof}{content..}`
106 |
107 | >Thereom boxes, Proof environment, Title pages and contents page are set up in the file [preamble](preamble.tex)
108 |
109 | ## Contents Page
110 | I have a beautiful looking contents page.
111 |
112 |
113 |
114 | >I woulld suggest dont play with the margin. It kind of ruins the contents page.
115 |
116 |
117 | ## Macros
118 | I have two macros file. One is for different fonts and the hats, bars, tildes. These are in [letterfonts](letterfonts.tex) file.
119 | ```tex
120 | Blackboard Font: \newcommand{\bbA}{\mathbb{A}}
121 | Bold Math: \newcommand{\bmA}{\boldsymbol{A}}
122 | Math SCR Font: \newcommand{\sA}{{\mathscr{A}}}
123 | Math Fraktur Font: \newcommand{\mfA}{\mathfrak{A}}
124 |
125 |
126 | Bar: \newcommand{\ovA}{\overline{A}}
127 | Tilde: \newcommand{\tdA}{\tilde{A}}
128 | Vector: \newcommand{\vA}{\vec{A}}
129 |
130 |
131 | Greek Letters:
132 | \newcommand{\al}{\alpha} \newcommand{\Al}{\Alpha}
133 | \newcommand{\gm}{\gamma} \newcommand{\Gm}{\Gamma}
134 | \newcommand{\dl}{\delta} \newcommand{\Dl}{\Delta}
135 | \newcommand{\eps}{\epsilon} \newcommand{\Eps}{\Epsilon} \newcommand{\veps}{\varepsilon}
136 | \newcommand{\lm}{\lambda} \newcommand{\Lm}{\Lambda}
137 | \newcommand{\sg}{\sigma} \newcommand{\Sg}{\Sigma}
138 |
139 | \newcommand{\vph}{\varphi}
140 | \newcommand{\om}{\omega} \newcommand{\Om}{\Omega}
141 | ```
142 |
143 | There are some other macros which are my lecture notes specific and daily workflow specific. These are in the file [macros](macros.tex).
144 |
--------------------------------------------------------------------------------
/letterfonts.tex:
--------------------------------------------------------------------------------
1 | %---------------------------------------
2 | % BlackBoard Math Fonts :-
3 | %---------------------------------------
4 |
5 | %Captital Letters
6 | \newcommand{\bbA}{\mathbb{A}} \newcommand{\bbB}{\mathbb{B}}
7 | \newcommand{\bbC}{\mathbb{C}} \newcommand{\bbD}{\mathbb{D}}
8 | \newcommand{\bbE}{\mathbb{E}} \newcommand{\bbF}{\mathbb{F}}
9 | \newcommand{\bbG}{\mathbb{G}} \newcommand{\bbH}{\mathbb{H}}
10 | \newcommand{\bbI}{\mathbb{I}} \newcommand{\bbJ}{\mathbb{J}}
11 | \newcommand{\bbK}{\mathbb{K}} \newcommand{\bbL}{\mathbb{L}}
12 | \newcommand{\bbM}{\mathbb{M}} \newcommand{\bbN}{\mathbb{N}}
13 | \newcommand{\bbO}{\mathbb{O}} \newcommand{\bbP}{\mathbb{P}}
14 | \newcommand{\bbQ}{\mathbb{Q}} \newcommand{\bbR}{\mathbb{R}}
15 | \newcommand{\bbS}{\mathbb{S}} \newcommand{\bbT}{\mathbb{T}}
16 | \newcommand{\bbU}{\mathbb{U}} \newcommand{\bbV}{\mathbb{V}}
17 | \newcommand{\bbW}{\mathbb{W}} \newcommand{\bbX}{\mathbb{X}}
18 | \newcommand{\bbY}{\mathbb{Y}} \newcommand{\bbZ}{\mathbb{Z}}
19 |
20 | %---------------------------------------
21 | % MathCal Fonts :-
22 | %---------------------------------------
23 |
24 | %Captital Letters
25 | \newcommand{\mcA}{\mathcal{A}} \newcommand{\mcB}{\mathcal{B}}
26 | \newcommand{\mcC}{\mathcal{C}} \newcommand{\mcD}{\mathcal{D}}
27 | \newcommand{\mcE}{\mathcal{E}} \newcommand{\mcF}{\mathcal{F}}
28 | \newcommand{\mcG}{\mathcal{G}} \newcommand{\mcH}{\mathcal{H}}
29 | \newcommand{\mcI}{\mathcal{I}} \newcommand{\mcJ}{\mathcal{J}}
30 | \newcommand{\mcK}{\mathcal{K}} \newcommand{\mcL}{\mathcal{L}}
31 | \newcommand{\mcM}{\mathcal{M}} \newcommand{\mcN}{\mathcal{N}}
32 | \newcommand{\mcO}{\mathcal{O}} \newcommand{\mcP}{\mathcal{P}}
33 | \newcommand{\mcQ}{\mathcal{Q}} \newcommand{\mcR}{\mathcal{R}}
34 | \newcommand{\mcS}{\mathcal{S}} \newcommand{\mcT}{\mathcal{T}}
35 | \newcommand{\mcU}{\mathcal{U}} \newcommand{\mcV}{\mathcal{V}}
36 | \newcommand{\mcW}{\mathcal{W}} \newcommand{\mcX}{\mathcal{X}}
37 | \newcommand{\mcY}{\mathcal{Y}} \newcommand{\mcZ}{\mathcal{Z}}
38 |
39 |
40 |
41 | %---------------------------------------
42 | % Bold Math Fonts :-
43 | %---------------------------------------
44 |
45 | %Captital Letters
46 | \newcommand{\bmA}{\boldsymbol{A}} \newcommand{\bmB}{\boldsymbol{B}}
47 | \newcommand{\bmC}{\boldsymbol{C}} \newcommand{\bmD}{\boldsymbol{D}}
48 | \newcommand{\bmE}{\boldsymbol{E}} \newcommand{\bmF}{\boldsymbol{F}}
49 | \newcommand{\bmG}{\boldsymbol{G}} \newcommand{\bmH}{\boldsymbol{H}}
50 | \newcommand{\bmI}{\boldsymbol{I}} \newcommand{\bmJ}{\boldsymbol{J}}
51 | \newcommand{\bmK}{\boldsymbol{K}} \newcommand{\bmL}{\boldsymbol{L}}
52 | \newcommand{\bmM}{\boldsymbol{M}} \newcommand{\bmN}{\boldsymbol{N}}
53 | \newcommand{\bmO}{\boldsymbol{O}} \newcommand{\bmP}{\boldsymbol{P}}
54 | \newcommand{\bmQ}{\boldsymbol{Q}} \newcommand{\bmR}{\boldsymbol{R}}
55 | \newcommand{\bmS}{\boldsymbol{S}} \newcommand{\bmT}{\boldsymbol{T}}
56 | \newcommand{\bmU}{\boldsymbol{U}} \newcommand{\bmV}{\boldsymbol{V}}
57 | \newcommand{\bmW}{\boldsymbol{W}} \newcommand{\bmX}{\boldsymbol{X}}
58 | \newcommand{\bmY}{\boldsymbol{Y}} \newcommand{\bmZ}{\boldsymbol{Z}}
59 | %Small Letters
60 | \newcommand{\bma}{\boldsymbol{a}} \newcommand{\bmb}{\boldsymbol{b}}
61 | \newcommand{\bmc}{\boldsymbol{c}} \newcommand{\bmd}{\boldsymbol{d}}
62 | \newcommand{\bme}{\boldsymbol{e}} \newcommand{\bmf}{\boldsymbol{f}}
63 | \newcommand{\bmg}{\boldsymbol{g}} \newcommand{\bmh}{\boldsymbol{h}}
64 | \newcommand{\bmi}{\boldsymbol{i}} \newcommand{\bmj}{\boldsymbol{j}}
65 | \newcommand{\bmk}{\boldsymbol{k}} \newcommand{\bml}{\boldsymbol{l}}
66 | \newcommand{\bmm}{\boldsymbol{m}} \newcommand{\bmn}{\boldsymbol{n}}
67 | \newcommand{\bmo}{\boldsymbol{o}} \newcommand{\bmp}{\boldsymbol{p}}
68 | \newcommand{\bmq}{\boldsymbol{q}} \newcommand{\bmr}{\boldsymbol{r}}
69 | \newcommand{\bms}{\boldsymbol{s}} \newcommand{\bmt}{\boldsymbol{t}}
70 | \newcommand{\bmu}{\boldsymbol{u}} \newcommand{\bmv}{\boldsymbol{v}}
71 | \newcommand{\bmw}{\boldsymbol{w}} \newcommand{\bmx}{\boldsymbol{x}}
72 | \newcommand{\bmy}{\boldsymbol{y}} \newcommand{\bmz}{\boldsymbol{z}}
73 |
74 |
75 | %---------------------------------------
76 | % Scr Math Fonts :-
77 | %---------------------------------------
78 |
79 | \newcommand{\sA}{{\mathscr{A}}} \newcommand{\sB}{{\mathscr{B}}}
80 | \newcommand{\sC}{{\mathscr{C}}} \newcommand{\sD}{{\mathscr{D}}}
81 | \newcommand{\sE}{{\mathscr{E}}} \newcommand{\sF}{{\mathscr{F}}}
82 | \newcommand{\sG}{{\mathscr{G}}} \newcommand{\sH}{{\mathscr{H}}}
83 | \newcommand{\sI}{{\mathscr{I}}} \newcommand{\sJ}{{\mathscr{J}}}
84 | \newcommand{\sK}{{\mathscr{K}}} \newcommand{\sL}{{\mathscr{L}}}
85 | \newcommand{\sM}{{\mathscr{M}}} \newcommand{\sN}{{\mathscr{N}}}
86 | \newcommand{\sO}{{\mathscr{O}}} \newcommand{\sP}{{\mathscr{P}}}
87 | \newcommand{\sQ}{{\mathscr{Q}}} \newcommand{\sR}{{\mathscr{R}}}
88 | \newcommand{\sS}{{\mathscr{S}}} \newcommand{\sT}{{\mathscr{T}}}
89 | \newcommand{\sU}{{\mathscr{U}}} \newcommand{\sV}{{\mathscr{V}}}
90 | \newcommand{\sW}{{\mathscr{W}}} \newcommand{\sX}{{\mathscr{X}}}
91 | \newcommand{\sY}{{\mathscr{Y}}} \newcommand{\sZ}{{\mathscr{Z}}}
92 |
93 |
94 | %---------------------------------------
95 | % Math Fraktur Font
96 | %---------------------------------------
97 |
98 | %Captital Letters
99 | \newcommand{\mfA}{\mathfrak{A}} \newcommand{\mfB}{\mathfrak{B}}
100 | \newcommand{\mfC}{\mathfrak{C}} \newcommand{\mfD}{\mathfrak{D}}
101 | \newcommand{\mfE}{\mathfrak{E}} \newcommand{\mfF}{\mathfrak{F}}
102 | \newcommand{\mfG}{\mathfrak{G}} \newcommand{\mfH}{\mathfrak{H}}
103 | \newcommand{\mfI}{\mathfrak{I}} \newcommand{\mfJ}{\mathfrak{J}}
104 | \newcommand{\mfK}{\mathfrak{K}} \newcommand{\mfL}{\mathfrak{L}}
105 | \newcommand{\mfM}{\mathfrak{M}} \newcommand{\mfN}{\mathfrak{N}}
106 | \newcommand{\mfO}{\mathfrak{O}} \newcommand{\mfP}{\mathfrak{P}}
107 | \newcommand{\mfQ}{\mathfrak{Q}} \newcommand{\mfR}{\mathfrak{R}}
108 | \newcommand{\mfS}{\mathfrak{S}} \newcommand{\mfT}{\mathfrak{T}}
109 | \newcommand{\mfU}{\mathfrak{U}} \newcommand{\mfV}{\mathfrak{V}}
110 | \newcommand{\mfW}{\mathfrak{W}} \newcommand{\mfX}{\mathfrak{X}}
111 | \newcommand{\mfY}{\mathfrak{Y}} \newcommand{\mfZ}{\mathfrak{Z}}
112 | %Small Letters
113 | \newcommand{\mfa}{\mathfrak{a}} \newcommand{\mfb}{\mathfrak{b}}
114 | \newcommand{\mfc}{\mathfrak{c}} \newcommand{\mfd}{\mathfrak{d}}
115 | \newcommand{\mfe}{\mathfrak{e}} \newcommand{\mff}{\mathfrak{f}}
116 | \newcommand{\mfg}{\mathfrak{g}} \newcommand{\mfh}{\mathfrak{h}}
117 | \newcommand{\mfi}{\mathfrak{i}} \newcommand{\mfj}{\mathfrak{j}}
118 | \newcommand{\mfk}{\mathfrak{k}} \newcommand{\mfl}{\mathfrak{l}}
119 | \newcommand{\mfm}{\mathfrak{m}} \newcommand{\mfn}{\mathfrak{n}}
120 | \newcommand{\mfo}{\mathfrak{o}} \newcommand{\mfp}{\mathfrak{p}}
121 | \newcommand{\mfq}{\mathfrak{q}} \newcommand{\mfr}{\mathfrak{r}}
122 | \newcommand{\mfs}{\mathfrak{s}} \newcommand{\mft}{\mathfrak{t}}
123 | \newcommand{\mfu}{\mathfrak{u}} \newcommand{\mfv}{\mathfrak{v}}
124 | \newcommand{\mfw}{\mathfrak{w}} \newcommand{\mfx}{\mathfrak{x}}
125 | \newcommand{\mfy}{\mathfrak{y}} \newcommand{\mfz}{\mathfrak{z}}
126 |
127 | %---------------------------------------
128 | % Bar
129 | %---------------------------------------
130 |
131 | %Captital Letters
132 | \newcommand{\ovA}{\overline{A}} \newcommand{\ovB}{\overline{B}}
133 | \newcommand{\ovC}{\overline{C}} \newcommand{\ovD}{\overline{D}}
134 | \newcommand{\ovE}{\overline{E}} \newcommand{\ovF}{\overline{F}}
135 | \newcommand{\ovG}{\overline{G}} \newcommand{\ovH}{\overline{H}}
136 | \newcommand{\ovI}{\overline{I}} \newcommand{\ovJ}{\overline{J}}
137 | \newcommand{\ovK}{\overline{K}} \newcommand{\ovL}{\overline{L}}
138 | \newcommand{\ovM}{\overline{M}} \newcommand{\ovN}{\overline{N}}
139 | \newcommand{\ovO}{\overline{O}} \newcommand{\ovP}{\overline{P}}
140 | \newcommand{\ovQ}{\overline{Q}} \newcommand{\ovR}{\overline{R}}
141 | \newcommand{\ovS}{\overline{S}} \newcommand{\ovT}{\overline{T}}
142 | \newcommand{\ovU}{\overline{U}} \newcommand{\ovV}{\overline{V}}
143 | \newcommand{\ovW}{\overline{W}} \newcommand{\ovX}{\overline{X}}
144 | \newcommand{\ovY}{\overline{Y}} \newcommand{\ovZ}{\overline{Z}}
145 | %Small Letters
146 | \newcommand{\ova}{\overline{a}} \newcommand{\ovb}{\overline{b}}
147 | \newcommand{\ovc}{\overline{c}} \newcommand{\ovd}{\overline{d}}
148 | \newcommand{\ove}{\overline{e}} \newcommand{\ovf}{\overline{f}}
149 | \newcommand{\ovg}{\overline{g}} \newcommand{\ovh}{\overline{h}}
150 | \newcommand{\ovi}{\overline{i}} \newcommand{\ovj}{\overline{j}}
151 | \newcommand{\ovk}{\overline{k}} \newcommand{\ovl}{\overline{l}}
152 | \newcommand{\ovm}{\overline{m}} \newcommand{\ovn}{\overline{n}}
153 | \newcommand{\ovo}{\overline{o}} \newcommand{\ovp}{\overline{p}}
154 | \newcommand{\ovq}{\overline{q}} \newcommand{\ovr}{\overline{r}}
155 | \newcommand{\ovs}{\overline{s}} \newcommand{\ovt}{\overline{t}}
156 | \newcommand{\ovu}{\overline{u}} \newcommand{\ovv}{\overline{v}}
157 | \newcommand{\ovw}{\overline{w}} \newcommand{\ovx}{\overline{x}}
158 | \newcommand{\ovy}{\overline{y}} \newcommand{\ovz}{\overline{z}}
159 |
160 | %---------------------------------------
161 | % Tilde
162 | %---------------------------------------
163 |
164 | %Captital Letters
165 | \newcommand{\tdA}{\tilde{A}} \newcommand{\tdB}{\tilde{B}}
166 | \newcommand{\tdC}{\tilde{C}} \newcommand{\tdD}{\tilde{D}}
167 | \newcommand{\tdE}{\tilde{E}} \newcommand{\tdF}{\tilde{F}}
168 | \newcommand{\tdG}{\tilde{G}} \newcommand{\tdH}{\tilde{H}}
169 | \newcommand{\tdI}{\tilde{I}} \newcommand{\tdJ}{\tilde{J}}
170 | \newcommand{\tdK}{\tilde{K}} \newcommand{\tdL}{\tilde{L}}
171 | \newcommand{\tdM}{\tilde{M}} \newcommand{\tdN}{\tilde{N}}
172 | \newcommand{\tdO}{\tilde{O}} \newcommand{\tdP}{\tilde{P}}
173 | \newcommand{\tdQ}{\tilde{Q}} \newcommand{\tdR}{\tilde{R}}
174 | \newcommand{\tdS}{\tilde{S}} \newcommand{\tdT}{\tilde{T}}
175 | \newcommand{\tdU}{\tilde{U}} \newcommand{\tdV}{\tilde{V}}
176 | \newcommand{\tdW}{\tilde{W}} \newcommand{\tdX}{\tilde{X}}
177 | \newcommand{\tdY}{\tilde{Y}} \newcommand{\tdZ}{\tilde{Z}}
178 | %Small Letters
179 | \newcommand{\tda}{\tilde{a}} \newcommand{\tdb}{\tilde{b}}
180 | \newcommand{\tdc}{\tilde{c}} \newcommand{\tdd}{\tilde{d}}
181 | \newcommand{\tde}{\tilde{e}} \newcommand{\tdf}{\tilde{f}}
182 | \newcommand{\tdg}{\tilde{g}} \newcommand{\tdh}{\tilde{h}}
183 | \newcommand{\tdi}{\tilde{i}} \newcommand{\tdj}{\tilde{j}}
184 | \newcommand{\tdk}{\tilde{k}} \newcommand{\tdl}{\tilde{l}}
185 | \newcommand{\tdm}{\tilde{m}} \newcommand{\tdn}{\tilde{n}}
186 | \newcommand{\tdo}{\tilde{o}} \newcommand{\tdp}{\tilde{p}}
187 | \newcommand{\tdq}{\tilde{q}} \newcommand{\tdr}{\tilde{r}}
188 | \newcommand{\tds}{\tilde{s}} \newcommand{\tdt}{\tilde{t}}
189 | \newcommand{\tdu}{\tilde{u}} \newcommand{\tdv}{\tilde{v}}
190 | \newcommand{\tdw}{\tilde{w}} \newcommand{\tdx}{\tilde{x}}
191 | \newcommand{\tdy}{\tilde{y}} \newcommand{\tdz}{\tilde{z}}
192 |
193 | %---------------------------------------
194 | % Vec
195 | %---------------------------------------
196 |
197 | %Captital Letters
198 | \newcommand{\vcA}{\vec{A}} \newcommand{\vcB}{\vec{B}}
199 | \newcommand{\vcC}{\vec{C}} \newcommand{\vcD}{\vec{D}}
200 | \newcommand{\vcE}{\vec{E}} \newcommand{\vcF}{\vec{F}}
201 | \newcommand{\vcG}{\vec{G}} \newcommand{\vcH}{\vec{H}}
202 | \newcommand{\vcI}{\vec{I}} \newcommand{\vcJ}{\vec{J}}
203 | \newcommand{\vcK}{\vec{K}} \newcommand{\vcL}{\vec{L}}
204 | \newcommand{\vcM}{\vec{M}} \newcommand{\vcN}{\vec{N}}
205 | \newcommand{\vcO}{\vec{O}} \newcommand{\vcP}{\vec{P}}
206 | \newcommand{\vcQ}{\vec{Q}} \newcommand{\vcR}{\vec{R}}
207 | \newcommand{\vcS}{\vec{S}} \newcommand{\vcT}{\vec{T}}
208 | \newcommand{\vcU}{\vec{U}} \newcommand{\vcV}{\vec{V}}
209 | \newcommand{\vcW}{\vec{W}} \newcommand{\vcX}{\vec{X}}
210 | \newcommand{\vcY}{\vec{Y}} \newcommand{\vcZ}{\vec{Z}}
211 | %Small Letters
212 | \newcommand{\vca}{\vec{a}} \newcommand{\vcb}{\vec{b}}
213 | \newcommand{\vcc}{\vec{c}} \newcommand{\vcd}{\vec{d}}
214 | \newcommand{\vce}{\vec{e}} \newcommand{\vcf}{\vec{f}}
215 | \newcommand{\vcg}{\vec{g}} \newcommand{\vch}{\vec{h}}
216 | \newcommand{\vci}{\vec{i}} \newcommand{\vcj}{\vec{j}}
217 | \newcommand{\vck}{\vec{k}} \newcommand{\vcl}{\vec{l}}
218 | \newcommand{\vcm}{\vec{m}} \newcommand{\vcn}{\vec{n}}
219 | \newcommand{\vco}{\vec{o}} \newcommand{\vcp}{\vec{p}}
220 | \newcommand{\vcq}{\vec{q}} \newcommand{\vcr}{\vec{r}}
221 | \newcommand{\vcs}{\vec{s}} \newcommand{\vct}{\vec{t}}
222 | \newcommand{\vcu}{\vec{u}} \newcommand{\vcv}{\vec{v}}
223 | %\newcommand{\vcw}{\vec{w}} \newcommand{\vcx}{\vec{x}}
224 | \newcommand{\vcy}{\vec{y}} \newcommand{\vcz}{\vec{z}}
225 |
226 | %---------------------------------------
227 | % Greek Letters:-
228 | %---------------------------------------
229 | \newcommand{\eps}{\epsilon}
230 | \newcommand{\veps}{\varepsilon}
231 | \newcommand{\lm}{\lambda}
232 | \newcommand{\Lm}{\Lambda}
233 | \newcommand{\dl}{\delta}
234 | \newcommand{\Dl}{\Delta}
235 | \newcommand{\gm}{\gamma}
236 | \newcommand{\Gm}{\Gamma}
237 | \newcommand{\vph}{\varphi}
238 | \newcommand{\ph}{\phi}
239 | \newcommand{\om}{\omega}
240 | \newcommand{\Om}{\Omega}
241 | \newcommand{\sg}{\sigma}
242 | \newcommand{\Sg}{\Sigma}
--------------------------------------------------------------------------------
/preamble.tex.bak:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % PACKAGE IMPORTS
3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 |
5 |
6 | \usepackage[tmargin=2cm,rmargin=1in,lmargin=1in,margin=0.85in,bmargin=2cm,footskip=.2in]{geometry} % I woulld suggest dont play with the margin. It kind of ruins the contents page.
7 | \usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools}
8 | \usepackage{bookmark}
9 | \usepackage{enumitem}
10 | \usepackage{hyperref,theoremref}
11 | \hypersetup{
12 | colorlinks=true, linkcolor=doc!80, urlcolor=doc!80, citecolor=myr,
13 | bookmarksnumbered=true,
14 | bookmarksopen=true
15 | }
16 | \usepackage[most,many,breakable]{tcolorbox}
17 | \usepackage{xcolor}
18 | \usepackage{graphicx}
19 | %\graphicspath{ {./images/} } %give your suitable image path
20 | \usepackage{varwidth}
21 | \usepackage{authblk}
22 | \usepackage{nameref}
23 | \usepackage{multicol,array}
24 | \usepackage{tikz-cd}
25 | \usepackage{cancel}
26 | \usepackage{pgfplots}
27 | \usepackage[Sonny]{fncychap}
28 | \usepackage{mathpazo}
29 | \usepackage{libertine}
30 | \usepackage[T1]{fontenc}
31 | \usepackage[ruled,vlined]{algorithm2e}
32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 | % SELF MADE COLORS
34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 |
36 | \usetikzlibrary{ shapes.geometric }
37 | \usetikzlibrary{calc}
38 | \usepackage{anyfontsize}
39 |
40 | \definecolor{myg}{RGB}{56, 140, 70}
41 | \definecolor{myb}{RGB}{45, 111, 177}
42 | \definecolor{myr}{RGB}{199, 68, 64}
43 | \definecolor{mybg}{HTML}{F2F2F9}
44 | \definecolor{mytheorembg}{HTML}{F2F2F9}
45 | \definecolor{mytheoremfr}{HTML}{00007B}
46 | \definecolor{myexamplebg}{HTML}{F2FBF8}
47 | \definecolor{myexamplefr}{HTML}{88D6D1}
48 | \definecolor{myexampleti}{HTML}{2A7F7F}
49 | \definecolor{mydefinitbg}{HTML}{E5E5FF}
50 | \definecolor{mydefinitfr}{HTML}{3F3FA3}
51 | \definecolor{notesgreen}{RGB}{0,162,0}
52 | \definecolor{myp}{RGB}{197, 92, 212}
53 | \definecolor{mygr}{HTML}{2C3338}
54 | \definecolor{myred}{RGB}{127,0,0}
55 | \definecolor{myyellow}{RGB}{169,121,69}
56 | \definecolor{OrangeRed}{HTML}{ED135A}
57 | \definecolor{Dandelion}{HTML}{FDBC42}
58 | \definecolor{light-gray}{gray}{0.95}
59 | \definecolor{Emerald}{HTML}{00A99D}
60 | \definecolor{RoyalBlue}{HTML}{0071BC}
61 |
62 | \renewcommand{\qed}{\ensuremath{\blacksquare}}
63 |
64 | \newtheorem*{observation*}{Observation}
65 | \newtheorem{observation}{Observation}
66 | \newtheorem{fact}[observation]{Fact}
67 | \newtheorem{assumption}{Assumption}[section]
68 |
69 | %\renewenvironment{proof}{\noindent{\it \textbf{Proof:}}\hspace*{1em}}{\qed\bigskip\\}
70 | \newenvironment{proof-sketch}{\noindent{\bf Sketch of Proof:}\hspace*{1em}}{\qed\bigskip\\}
71 | \newenvironment{proof-idea}{\noindent{\bf Proof Idea:}\hspace*{1em}}{\qed\bigskip\\}
72 | \newenvironment{proof-of-lemma}[1]{\noindent{\bf Proof of Lemma #1:}\hspace*{1em}}{\qed\bigskip\\}
73 | \newenvironment{proof-of-claim}[1]{\noindent{\bf Proof of Claim #1:}\hspace*{1em}}{\qed\bigskip\\}
74 | \newenvironment{proof-attempt}{\noindent{\bf Proof Attempt:}\hspace*{1em}}{\qed\bigskip\\}
75 | \newenvironment{proofof}[1]{\noindent{\bf Proof:}
76 | of #1:\hspace*{1em}}{\qed\bigskip\\}
77 | \newenvironment{remark}{\noindent{\bf Remark:}\hspace*{1em}}{\bigskip\\}
78 | \newenvironment{answer}{%
79 | \setlength\parindent{0pt}\par\medskip\textbf{Answer:}\quad}{%
80 | \par\medskip}
81 |
82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 | % TCOLORBOX SETUPS
84 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
85 |
86 | \setlength{\parindent}{1cm}
87 | %================================
88 | % THEOREM BOX
89 | %================================
90 |
91 | \tcbuselibrary{theorems,skins,hooks}
92 | \newtcbtheorem[number within=section]{Theorem}{Theorem}
93 | {%
94 | enhanced,
95 | breakable,
96 | colback = mytheorembg,
97 | frame hidden,
98 | boxrule = 0sp,
99 | borderline west = {2pt}{0pt}{mytheoremfr},
100 | sharp corners,
101 | detach title,
102 | before upper = \tcbtitle\par\smallskip,
103 | coltitle = mytheoremfr,
104 | fonttitle = \bfseries\sffamily,
105 | description font = \mdseries,
106 | separator sign none,
107 | segmentation style={solid, mytheoremfr},
108 | }
109 | {th}
110 |
111 | \tcbuselibrary{theorems,skins,hooks}
112 | \newtcbtheorem[number within=chapter]{theorem}{Theorem}
113 | {%
114 | enhanced,
115 | breakable,
116 | colback = mytheorembg,
117 | frame hidden,
118 | boxrule = 0sp,
119 | borderline west = {2pt}{0pt}{mytheoremfr},
120 | sharp corners,
121 | detach title,
122 | before upper = \tcbtitle\par\smallskip,
123 | coltitle = mytheoremfr,
124 | fonttitle = \bfseries\sffamily,
125 | description font = \mdseries,
126 | separator sign none,
127 | segmentation style={solid, mytheoremfr},
128 | }
129 | {th}
130 |
131 |
132 | \tcbuselibrary{theorems,skins,hooks}
133 | \newtcolorbox{Theoremcon}
134 | {%
135 | enhanced
136 | ,breakable
137 | ,colback = mytheorembg
138 | ,frame hidden
139 | ,boxrule = 0sp
140 | ,borderline west = {2pt}{0pt}{mytheoremfr}
141 | ,sharp corners
142 | ,description font = \mdseries
143 | ,separator sign none
144 | }
145 |
146 |
147 | %================================
148 | % Corollery
149 | %================================
150 | \tcbuselibrary{theorems,skins,hooks}
151 | \newtcbtheorem[number within=section]{corolary}{Corollary}
152 | {%
153 | enhanced
154 | ,breakable
155 | ,colback = myp!10
156 | ,frame hidden
157 | ,boxrule = 0sp
158 | ,borderline west = {2pt}{0pt}{myp!85!black}
159 | ,sharp corners
160 | ,detach title
161 | ,before upper = \tcbtitle\par\smallskip
162 | ,coltitle = myp!85!black
163 | ,fonttitle = \bfseries\sffamily
164 | ,description font = \mdseries
165 | ,separator sign none
166 | ,segmentation style={solid, myp!85!black}
167 | }
168 | {th}
169 | \tcbuselibrary{theorems,skins,hooks}
170 | \newtcbtheorem[number within=chapter]{corollary}{Corollary}
171 | {%
172 | enhanced
173 | ,breakable
174 | ,colback = myp!10
175 | ,frame hidden
176 | ,boxrule = 0sp
177 | ,borderline west = {2pt}{0pt}{myp!85!black}
178 | ,sharp corners
179 | ,detach title
180 | ,before upper = \tcbtitle\par\smallskip
181 | ,coltitle = myp!85!black
182 | ,fonttitle = \bfseries\sffamily
183 | ,description font = \mdseries
184 | ,separator sign none
185 | ,segmentation style={solid, myp!85!black}
186 | }
187 | {th}
188 |
189 | %================================
190 | % LEMMA
191 | %================================
192 |
193 | \tcbuselibrary{theorems,skins,hooks}
194 | \newtcbtheorem[number within=section]{lemma}{Lemma}
195 | {%
196 | enhanced
197 | ,breakable
198 | ,colback = myg!10
199 | ,frame hidden
200 | ,boxrule = 0sp
201 | ,borderline west = {2pt}{0pt}{myg}
202 | ,sharp corners
203 | ,detach title
204 | ,before upper = \tcbtitle\par\smallskip
205 | ,coltitle = myg!85!black
206 | ,fonttitle = \bfseries\sffamily
207 | ,description font = \mdseries
208 | ,separator sign none
209 | ,segmentation style={solid, myg!85!black}
210 | }
211 | {th}
212 |
213 |
214 | \newtcbtheorem[number within=chapter]{Lemma}{Lemma}
215 | {%
216 | enhanced
217 | ,breakable
218 | ,colback = myg!10
219 | ,frame hidden
220 | ,boxrule = 0sp
221 | ,borderline west = {2pt}{0pt}{myg}
222 | ,sharp corners
223 | ,detach title
224 | ,before upper = \tcbtitle\par\smallskip
225 | ,coltitle = myg!85!black
226 | ,fonttitle = \bfseries\sffamily
227 | ,description font = \mdseries
228 | ,separator sign none
229 | ,segmentation style={solid, myg!85!black}
230 | }
231 | {th}
232 |
233 | %================================
234 | % CLAIM
235 | %================================
236 |
237 | \tcbuselibrary{theorems,skins,hooks}
238 | \newtcbtheorem[number within=section]{claim}{Claim}
239 | {%
240 | enhanced
241 | ,breakable
242 | ,colback = myg!10
243 | ,frame hidden
244 | ,boxrule = 0sp
245 | ,borderline west = {2pt}{0pt}{myg}
246 | ,sharp corners
247 | ,detach title
248 | ,before upper = \tcbtitle\par\smallskip
249 | ,coltitle = myg!85!black
250 | ,fonttitle = \bfseries\sffamily
251 | ,description font = \mdseries
252 | ,separator sign none
253 | ,segmentation style={solid, myg!85!black}
254 | }
255 | {th}
256 |
257 |
258 | \newtcbtheorem[number within=chapter]{Claim}{Claim}
259 | {%
260 | enhanced
261 | ,breakable
262 | ,colback = myg!10
263 | ,frame hidden
264 | ,boxrule = 0sp
265 | ,borderline west = {2pt}{0pt}{myg}
266 | ,sharp corners
267 | ,detach title
268 | ,before upper = \tcbtitle\par\smallskip
269 | ,coltitle = myg!85!black
270 | ,fonttitle = \bfseries\sffamily
271 | ,description font = \mdseries
272 | ,separator sign none
273 | ,segmentation style={solid, myg!85!black}
274 | }
275 | {th}
276 |
277 | %================================
278 | % EXAMPLE BOX
279 | %================================
280 |
281 | \newtcbtheorem[number within=section]{Example}{Example}
282 | {%
283 | colback = myexamplebg
284 | ,breakable
285 | ,colframe = myexamplefr
286 | ,coltitle = myexampleti
287 | ,boxrule = 1pt
288 | ,sharp corners
289 | ,detach title
290 | ,before upper=\tcbtitle\par\smallskip
291 | ,fonttitle = \bfseries
292 | ,description font = \mdseries
293 | ,separator sign none
294 | ,description delimiters parenthesis
295 | }
296 | {ex}
297 |
298 | \newtcbtheorem[number within=chapter]{example}{Example}
299 | {%
300 | colback = myexamplebg
301 | ,breakable
302 | ,colframe = myexamplefr
303 | ,coltitle = myexampleti
304 | ,boxrule = 1pt
305 | ,sharp corners
306 | ,detach title
307 | ,before upper=\tcbtitle\par\smallskip
308 | ,fonttitle = \bfseries
309 | ,description font = \mdseries
310 | ,separator sign none
311 | ,description delimiters parenthesis
312 | }
313 | {ex}
314 |
315 | %================================
316 | % DEFINITION BOX
317 | %================================
318 |
319 | \newtcbtheorem[number within=section]{Definition}{Definition}{enhanced,
320 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
321 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
322 | boxed title style={frame code={
323 | \path[fill=tcbcolback]
324 | ([yshift=-1mm,xshift=-1mm]frame.north west)
325 | arc[start angle=0,end angle=180,radius=1mm]
326 | ([yshift=-1mm,xshift=1mm]frame.north east)
327 | arc[start angle=180,end angle=0,radius=1mm];
328 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
329 | middle color=tcbcolback!80!black]
330 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
331 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
332 | -- (frame.south east) -- (frame.south west)
333 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
334 | [sharp corners]-- cycle;
335 | },interior engine=empty,
336 | },
337 | fonttitle=\bfseries,
338 | title={#2},#1}{def}
339 | \newtcbtheorem[number within=chapter]{definition}{Definition}{enhanced,
340 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
341 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
342 | boxed title style={frame code={
343 | \path[fill=tcbcolback]
344 | ([yshift=-1mm,xshift=-1mm]frame.north west)
345 | arc[start angle=0,end angle=180,radius=1mm]
346 | ([yshift=-1mm,xshift=1mm]frame.north east)
347 | arc[start angle=180,end angle=0,radius=1mm];
348 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
349 | middle color=tcbcolback!80!black]
350 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
351 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
352 | -- (frame.south east) -- (frame.south west)
353 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
354 | [sharp corners]-- cycle;
355 | },interior engine=empty,
356 | },
357 | fonttitle=\bfseries,
358 | title={#2},#1}{def}
359 |
360 |
361 | %================================
362 | % OPEN QUESTION BOX
363 | %================================
364 |
365 | \newtcbtheorem[number within=section]{open}{Open tion}{enhanced,
366 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
367 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
368 | boxed title style={frame code={
369 | \path[fill=tcbcolback]
370 | ([yshift=-1mm,xshift=-1mm]frame.north west)
371 | arc[start angle=0,end angle=180,radius=1mm]
372 | ([yshift=-1mm,xshift=1mm]frame.north east)
373 | arc[start angle=180,end angle=0,radius=1mm];
374 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
375 | middle color=tcbcolback!80!black]
376 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
377 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
378 | -- (frame.south east) -- (frame.south west)
379 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
380 | [sharp corners]-- cycle;
381 | },interior engine=empty,
382 | },
383 | fonttitle=\bfseries,
384 | title={#2},#1}{def}
385 | \newtcbtheorem[number within=chapter]{Open}{Open Question}{enhanced,
386 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
387 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
388 | boxed title style={frame code={
389 | \path[fill=tcbcolback]
390 | ([yshift=-1mm,xshift=-1mm]frame.north west)
391 | arc[start angle=0,end angle=180,radius=1mm]
392 | ([yshift=-1mm,xshift=1mm]frame.north east)
393 | arc[start angle=180,end angle=0,radius=1mm];
394 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
395 | middle color=tcbcolback!80!black]
396 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
397 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
398 | -- (frame.south east) -- (frame.south west)
399 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
400 | [sharp corners]-- cycle;
401 | },interior engine=empty,
402 | },
403 | fonttitle=\bfseries,
404 | title={#2},#1}{def}
405 |
406 |
407 |
408 | %================================
409 | % EXERCISE BOX
410 | %================================
411 |
412 | \makeatletter
413 | \newtcbtheorem[number within=chapter]{problem}{Problem}{enhanced,
414 | breakable,
415 | colback=white,
416 | colframe=myb!80!black,
417 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
418 | fonttitle=\bfseries,
419 | title={#2},
420 | boxed title size=title,
421 | boxed title style={%
422 | sharp corners,
423 | rounded corners=northwest,
424 | colback=tcbcolframe,
425 | boxrule=0pt,
426 | },
427 | underlay boxed title={%
428 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
429 | to[out=0, in=180] ([xshift=5mm]title.east)--
430 | (title.center-|frame.east)
431 | [rounded corners=\kvtcb@arc] |-
432 | (frame.north) -| cycle;
433 | },
434 | #1
435 | }{def}
436 | \makeatother
437 |
438 |
439 | %================================
440 | % Question BOX
441 | %================================
442 |
443 | \makeatletter
444 | \newtcbtheorem[number within=chapter]{prob}{Problem}{enhanced,
445 | breakable,
446 | colback=white,
447 | colframe=mygr,
448 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
449 | fonttitle=\bfseries,
450 | title={#2},
451 | boxed title size=title,
452 | boxed title style={%
453 | sharp corners,
454 | rounded corners=northwest,
455 | colback=tcbcolframe,
456 | boxrule=0pt,
457 | },
458 | underlay boxed title={%
459 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
460 | to[out=0, in=180] ([xshift=5mm]title.east)--
461 | (title.center-|frame.east)
462 | [rounded corners=\kvtcb@arc] |-
463 | (frame.north) -| cycle;
464 | },
465 | #1
466 | }{qs}
467 | \makeatother
468 |
469 | \newtcbtheorem[number within=chapter]{wconc}{Wrong Concept}{
470 | breakable,
471 | enhanced,
472 | colback=white,
473 | colframe=myr,
474 | arc=0pt,
475 | outer arc=0pt,
476 | fonttitle=\bfseries\sffamily\large,
477 | colbacktitle=myr,
478 | attach boxed title to top left={},
479 | boxed title style={
480 | enhanced,
481 | skin=enhancedfirst jigsaw,
482 | arc=3pt,
483 | bottom=0pt,
484 | interior style={fill=myr}
485 | },
486 | #1
487 | }{def}
488 |
489 |
490 |
491 | %================================
492 | % NOTE BOX
493 | %================================
494 |
495 | \usetikzlibrary{arrows,calc,shadows.blur}
496 | \tcbuselibrary{skins}
497 | \newtcolorbox{note}[1][]{%
498 | enhanced jigsaw,
499 | colback=gray!20!white,%
500 | colframe=gray!80!black,
501 | size=small,
502 | boxrule=1pt,
503 | title=\textbf{Note:-},
504 | halign title=flush center,
505 | coltitle=black,
506 | breakable,
507 | drop shadow=black!50!white,
508 | attach boxed title to top left={xshift=1cm,yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
509 | minipage boxed title=1.5cm,
510 | boxed title style={%
511 | colback=white,
512 | size=fbox,
513 | boxrule=1pt,
514 | boxsep=2pt,
515 | underlay={%
516 | \coordinate (dotA) at ($(interior.west) + (-0.5pt,0)$);
517 | \coordinate (dotB) at ($(interior.east) + (0.5pt,0)$);
518 | \begin{scope}
519 | \clip (interior.north west) rectangle ([xshift=3ex]interior.east);
520 | \filldraw [white, blur shadow={shadow opacity=60, shadow yshift=-.75ex}, rounded corners=2pt] (interior.north west) rectangle (interior.south east);
521 | \end{scope}
522 | \begin{scope}[gray!80!black]
523 | \fill (dotA) circle (2pt);
524 | \fill (dotB) circle (2pt);
525 | \end{scope}
526 | },
527 | },
528 | #1,
529 | }
530 |
531 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
532 | % SELF MADE COMMANDS
533 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
534 |
535 | %% The environments which are appears in pairs one of them is for the chapters which have sections whose environment name starts with small letter and the other is for chapters which do not have sections whose environment name starts with capital letter. In the short command for the latter I used the letter 'c' to represent it should be use if it is not under a section
536 |
537 | %% Short commands for environments goes like this
538 | %% \[]{}{}
539 | %% For example in theorem for suppose Fundamental Theorem of Calculus i will write like this
540 | %% \thm[ftc]{Fundamental Theorem of Calculus}{Theorem Statement}
541 |
542 | \NewDocumentCommand{\EqM}{ m O{black} m}{%
543 | \tikz[remember picture, baseline, anchor=base]
544 | \node[inner sep=0pt, outer sep=3pt, text=#2] (#1) {%
545 | \ensuremath{#3}%
546 | };
547 | }
548 |
549 |
550 |
551 | \newcommand{\thm}[3][]{\begin{Theorem}{#2}{#1}#3\end{Theorem}}
552 | \newcommand{\thmc}[3][]{\begin{theorem}{#2}{#1}#3\end{theorem}}
553 | \newcommand{\cor}[3][]{\begin{corolary}{#2}{#1}#3\end{corolary}}
554 | \newcommand{\corc}[3][]{\begin{corollary}{#2}{#1}#3\end{corollary}}
555 | \newcommand{\lem}[3][]{\begin{lemma}{#2}{#1}#3\end{lemma}}
556 | \newcommand{\clm}[3][]{\begin{claim}{#2}{#1}#3\end{claim}}
557 | \newcommand{\wc}[3][]{\begin{wconc}{#2}{#1}\setlength{\parindent}{1cm}#3\end{wconc}}
558 | \newcommand{\thmcon}[1]{\begin{Theoremcon}{#1}\end{Theoremcon}}
559 | \newcommand{\ex}[3][]{\begin{Example}{#2}{#1}#3\end{Example}}
560 | \newcommand{\qs}[3][]{\begin{question}{#2}{#1}#3\end{question}}
561 | \newcommand{\exc}[3][]{\begin{example}{#2}{#1}#3\end{example}}
562 | \newcommand{\dfn}[3][]{\begin{Definition}[colbacktitle=red!75!black]{#2}{#1}#3\end{Definition}}
563 | \newcommand{\dfnc}[3][]{\begin{definition}[colbacktitle=red!75!black]{#2}{#1}#3\end{definition}}
564 | \newcommand{\opn}[3][]{\begin{open}[colbacktitle=myp!75!black]{#2}{#1}#3\end{open}}
565 | \newcommand{\opnc}[3][]{\begin{Open}[colbacktitle=myp!75!black]{#2}{#1}#3\end{Open}}
566 | \newcommand{\pr}[3][]{\begin{problem}{#2}{#1}#3\end{problem}}
567 | \newcommand{\pf}[2]{\begin{myproof}[#1]#2\end{myproof}}
568 |
569 |
570 | \newcommand{\algo}[3][]{\begin{algorithm}
571 | \DontPrintSemicolon
572 | \Begin{
573 | #2
574 | }
575 | \caption{#3\label{#1}}
576 | \end{algorithm}}
577 |
578 | %% The proof environment actually multipurpose. For a proof many things actually play. Proof idea. Proof overview. Main pproof. Proof prerequisites etc. Thats why the first option uses the actual name of what exactly we are writing for the proof. It will go like this
579 | %% Proof idea: \pf{Proof Idea}{content..}
580 | %% Proof Overview: \pf{Proof Overview}{content..}
581 | %% Proof : \pf{Proof}{content..}
582 |
583 |
584 | \newcommand{\nt}[1]{\begin{note}#1\end{note}}
585 |
586 | \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
587 | \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
588 | \newcommand\getcurrentref[1]{%
589 | \ifnumequal{\value{#1}}{0}
590 | {??}
591 | {\the\value{#1}}%
592 | }
593 | \newcommand{\getCurrentSectionNumber}{\getcurrentref{section}}
594 | \newenvironment{myproof}[1][\proofname]{%
595 | \proof[\bfseries #1: ]%
596 | }{\endproof}
597 | \newcounter{mylabelcounter}
598 |
599 |
600 |
601 | \makeatletter
602 | \newcommand{\setword}[2]{%
603 | \phantomsection
604 | #1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
605 | }
606 | \makeatother
607 |
608 |
609 |
610 |
611 | \tikzset{
612 | symbol/.style={
613 | draw=none,
614 | every to/.append style={
615 | edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
616 | }
617 | }
618 |
619 |
620 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
621 | % TABLE OF CONTENTS 1
622 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
623 |
624 | %\usepackage{framed}
625 | %\usepackage{titletoc}
626 | %\usepackage{etoolbox}
627 | %\usepackage{lmodern}
628 |
629 |
630 | %\patchcmd{\tableofcontents}{\contentsname}{\sffamily\contentsname}{}{}
631 |
632 | %\renewenvironment{leftbar}
633 | %{\def\FrameCommand{\hspace{6em}%
634 | % {\color{myyellow}\vrule width 2pt depth 6pt}\hspace{1em}}%
635 | % \MakeFramed{\parshape 1 0cm \dimexpr\textwidth-6em\relax\FrameRestore}\vskip2pt%
636 | %}
637 | %{\endMakeFramed}
638 |
639 | %\titlecontents{chapter}
640 | %[0em]{\vspace*{2\baselineskip}}
641 | %{\parbox{4.5em}{%
642 | % \hfill\Huge\sffamily\bfseries\color{myred}\thecontentspage}%
643 | % \vspace*{-2.3\baselineskip}\leftbar\textsc{\small\chaptername~\thecontentslabel}\\\sffamily}
644 | %{}{\endleftbar}
645 | %\titlecontents{section}
646 | %[8.4em]
647 | %{\sffamily\contentslabel{3em}}{}{}
648 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
649 | %\titlecontents{subsection}
650 | %[8.4em]
651 | %{\sffamily\contentslabel{3em}}{}{}
652 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
653 |
654 |
655 |
656 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
657 | % TABLE OF CONTENTS 2
658 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
659 |
660 | \usepackage{tikz}
661 | \definecolor{doc}{RGB}{0,60,110}
662 | \usepackage{titletoc}
663 | \contentsmargin{0cm}
664 | \titlecontents{chapter}[3.7pc]
665 | {\addvspace{30pt}%
666 | \begin{tikzpicture}[remember picture, overlay]%
667 | \draw[fill=doc!60,draw=doc!60] (-7,-.1) rectangle (-0.7,.5);%
668 | \pgftext[left,x=-3.6cm,y=0.2cm]{\color{white}\Large\sc\bfseries Chapter\ \thecontentslabel};%
669 | \end{tikzpicture}\color{doc!60}\large\sc\bfseries}%
670 | {}
671 | {}
672 | {\;\titlerule\;\large\sc\bfseries Page \thecontentspage
673 | \begin{tikzpicture}[remember picture, overlay]
674 | \draw[fill=doc!60,draw=doc!60] (2pt,0) rectangle (4,0.1pt);
675 | \end{tikzpicture}}%
676 | \titlecontents{section}[3.7pc]
677 | {\addvspace{2pt}}
678 | {\contentslabel[\thecontentslabel]{2pc}}
679 | {}
680 | {\hfill\small \thecontentspage}
681 | []
682 | \titlecontents*{subsection}[3.7pc]
683 | {\addvspace{-1pt}\small}
684 | {\hspace*{2pc}\contentslabel[\thecontentslabel]{2pc}}
685 | {}
686 | {\hfill\small \thecontentspage}
687 | [ \textbullet\ ]
688 | %{\addvspace{-1pt}\small}
689 | %{}
690 | %{}
691 | %{\ --- \small\thecontentspage}
692 | %[ \textbullet\ ][]
693 |
694 | \makeatletter
695 | \renewcommand{\tableofcontents}{%
696 | \chapter*{%
697 | \vspace*{-20\p@}%
698 | \begin{tikzpicture}[remember picture, overlay]%
699 | \pgftext[right,x=15cm,y=0.2cm]{\color{doc!60}\Huge\sc\bfseries \contentsname};%
700 | \draw[fill=doc!60,draw=doc!60] (13,-.75) rectangle (20,1);%
701 | \clip (13,-.75) rectangle (20,1);
702 | \pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
703 | \end{tikzpicture}}%
704 | \@starttoc{toc}}
705 | \makeatother
706 |
707 |
708 |
709 | \newcommand\colorlink[3]{\href{#2}{\color{#1}#3}}
710 | \newcommand\colorurl[2]{{\color{#1}\url{#2}}}
711 |
712 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
713 | % Title Page 1
714 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
715 |
716 | \newcommand{\mytitlea}[4]{
717 | \begin{tikzpicture}[remember picture,overlay]
718 | %%%%%%%%%%%%%%%%%%%% Background %%%%%%%%%%%%%%%%%%%%%%%%
719 | \fill[orange] (current page.south west) rectangle (current page.north east);
720 |
721 |
722 |
723 |
724 | %%%%%%%%%%%%%%%%%%%% Background Polygon %%%%%%%%%%%%%%%%%%%%
725 |
726 | \foreach \i in {2.5,...,22}
727 | {
728 | \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.west)+(2.5,-5)$) {} ;
729 | }
730 |
731 | \foreach \i in {0.5,...,22}
732 | {
733 | \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north west)+(2.5,0)$) {} ;
734 | }
735 |
736 | \foreach \i in {0.5,...,22}
737 | {
738 | \node[rounded corners,orange!90,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north east)+(0,-9.5)$) {} ;
739 | }
740 |
741 |
742 | \foreach \i in {21,...,6}
743 | {
744 | \node[orange!85,rounded corners,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.south east)+(-0.2,-0.45)$) {} ;
745 | }
746 |
747 |
748 | %%%%%%%%%%%%%%%%%%%% Title of the Report %%%%%%%%%%%%%%%%%%%%
749 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=3cm, rounded corners] at ($(current page.north east)+(0,-9.5)$)
750 | {
751 | {\fontsize{25}{30} \selectfont \bfseries #1}
752 | };
753 |
754 | %%%%%%%%%%%%%%%%%%%% Subtitle %%%%%%%%%%%%%%%%%%%%
755 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-11)$)
756 | {
757 | {\huge \textit{#2}}
758 | };
759 |
760 | %%%%%%%%%%%%%%%%%%%% Author Name %%%%%%%%%%%%%%%%%%%%
761 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-13)$)
762 | {
763 | {\Large \textsc{#3}}
764 | };
765 |
766 | %%%%%%%%%%%%%%%%%%%% Year %%%%%%%%%%%%%%%%%%%%
767 | \node[rounded corners,fill=orange!70,text =black,regular polygon,regular polygon sides=6, minimum size=2.5 cm,inner sep=0,ultra thick] at ($(current page.west)+(2.5,-5)$) {\LARGE \bfseries #4};
768 |
769 | \end{tikzpicture}
770 | }
771 |
772 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
773 | % Title Page 2
774 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
775 |
776 | \newcommand{\mytitleb}[4]{\begin{tikzpicture}[overlay,remember picture]
777 |
778 | % Background color
779 | \fill[
780 | black!2]
781 | (current page.south west) rectangle (current page.north east);
782 |
783 | % Rectangles
784 | \shade[
785 | left color=Dandelion,
786 | right color=Dandelion!40,
787 | transform canvas ={rotate around ={45:($(current page.north west)+(0,-6)$)}}]
788 | ($(current page.north west)+(0,-6)$) rectangle ++(9,1.5);
789 |
790 | \shade[
791 | left color=lightgray,
792 | right color=lightgray!50,
793 | rounded corners=0.75cm,
794 | transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}]
795 | ($(current page.north west)+(0.5,-10)$) rectangle ++(15,1.5);
796 |
797 | \shade[
798 | left color=lightgray,
799 | rounded corners=0.3cm,
800 | transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}] ($(current page.north west)+(1.5,-9.55)$) rectangle ++(7,.6);
801 |
802 | \shade[
803 | left color=orange!80,
804 | right color=orange!60,
805 | rounded corners=0.4cm,
806 | transform canvas ={rotate around ={45:($(current page.north)+(-1.5,-3)$)}}]
807 | ($(current page.north)+(-1.5,-3)$) rectangle ++(9,0.8);
808 |
809 | \shade[
810 | left color=red!80,
811 | right color=red!80,
812 | rounded corners=0.9cm,
813 | transform canvas ={rotate around ={45:($(current page.north)+(-3,-8)$)}}] ($(current page.north)+(-3,-8)$) rectangle ++(15,1.8);
814 |
815 | \shade[
816 | left color=orange,
817 | right color=Dandelion,
818 | rounded corners=0.9cm,
819 | transform canvas ={rotate around ={45:($(current page.north west)+(4,-15.5)$)}}]
820 | ($(current page.north west)+(4,-15.5)$) rectangle ++(30,1.8);
821 |
822 | \shade[
823 | left color=RoyalBlue,
824 | right color=Emerald,
825 | rounded corners=0.75cm,
826 | transform canvas ={rotate around ={45:($(current page.north west)+(13,-10)$)}}]
827 | ($(current page.north west)+(13,-10)$) rectangle ++(15,1.5);
828 |
829 | \shade[
830 | left color=lightgray,
831 | rounded corners=0.3cm,
832 | transform canvas ={rotate around ={45:($(current page.north west)+(18,-8)$)}}]
833 | ($(current page.north west)+(18,-8)$) rectangle ++(15,0.6);
834 |
835 | \shade[
836 | left color=lightgray,
837 | rounded corners=0.4cm,
838 | transform canvas ={rotate around ={45:($(current page.north west)+(19,-5.65)$)}}]
839 | ($(current page.north west)+(19,-5.65)$) rectangle ++(15,0.8);
840 |
841 | \shade[
842 | left color=OrangeRed,
843 | right color=red!80,
844 | rounded corners=0.6cm,
845 | transform canvas ={rotate around ={45:($(current page.north west)+(20,-9)$)}}]
846 | ($(current page.north west)+(20,-9)$) rectangle ++(14,1.2);
847 |
848 | % Year
849 | \draw[ultra thick,gray]
850 | ($(current page.center)+(5,2)$) -- ++(0,-3cm)
851 | node[
852 | midway,
853 | left=0.25cm,
854 | text width=5cm,
855 | align=right,
856 | black!75
857 | ]
858 | {
859 | {\fontsize{25}{30} \selectfont \bf Lecture\\[10pt] Notes}
860 | }
861 | node[
862 | midway,
863 | right=0.25cm,
864 | text width=6cm,
865 | align=left,
866 | orange]
867 | {
868 | {\fontsize{72}{86.4} \selectfont #4}
869 | };
870 |
871 | % Title
872 | \node[align=center] at ($(current page.center)+(0,-5)$)
873 | {
874 | {\fontsize{60}{72} \selectfont {{#1}}} \\[1cm]
875 | {\fontsize{16}{19.2} \selectfont \textcolor{orange}{ \bf #2}}\\[3pt]
876 | #3};
877 | \end{tikzpicture}
878 | }
--------------------------------------------------------------------------------
/preamble-article.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % PACKAGE IMPORTS
3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 |
5 |
6 | \usepackage[tmargin=2cm,rmargin=1in,lmargin=1in,margin=0.85in,bmargin=2cm,footskip=.2in]{geometry} % I woulld suggest dont play with the margin. It kind of ruins the contents page.
7 | \usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools,titlesec}
8 | \usepackage{bookmark}
9 | \usepackage[inline]{enumitem}
10 | \usepackage{hyperref,theoremref}
11 | \hypersetup{
12 | colorlinks=true, linkcolor=doc!80, urlcolor=doc!80, citecolor=mydefinitfr!80!black,
13 | bookmarksnumbered=true,
14 | bookmarksopen=true
15 | }
16 | \usepackage[most,many,breakable]{tcolorbox}
17 | \usepackage{xcolor}
18 | \usepackage{graphicx}
19 | %\graphicspath{ {./images/} } %give your suitable image path
20 | \usepackage{varwidth}
21 | \usepackage{authblk}
22 | \usepackage{nameref}
23 | \usepackage{multicol,array,multirow}
24 | \usepackage{tikz-cd}
25 | \usepackage{cancel}
26 | \usepackage{pgfplots}
27 | %\usepackage[Sonny]{fncychap}
28 | \usepackage{mathpazo}
29 | % Use the libertine package for the Libertine font
30 | \usepackage{libertine}
31 | \usepackage[libertine]{newtxmath}
32 | \usepackage{mathrsfs}
33 | \usepackage{bbm}
34 | \usepackage[ruled,vlined,linesnumbered]{algorithm2e}
35 | \usepackage{fancyhdr}
36 | %\pagestyle{fancy}
37 | \fancypagestyle{plain}{%
38 | \fancyhf{}% Clear all header and footer fields
39 | \renewcommand{\headrulewidth}{0pt}% No header rule
40 | \renewcommand{\footrulewidth}{0pt}% No footer rule
41 | }
42 | \fancyhf{}% Clear all header and footer fields
43 | \renewcommand{\headrulewidth}{1pt}% Set header rule width
44 | \fancyhead[LE]{\itshape\textsc{\nouppercase\rightmark}}% Left even page header
45 | \fancyhead[RO]{\itshape\textsc{\nouppercase\leftmark}}% Right odd page header
46 | \fancyfoot{}% Clear footer
47 | \fancyhead[RE,LO]{\itshape Page \thepage}% Even page right and odd page left headers
48 |
49 |
50 | \DeclareMathOperator{\supp}{supp}
51 | \DeclareMathOperator{\rk}{Rank}
52 | \DeclareMathOperator{\conv}{Conv}
53 |
54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 | % SELF MADE COLORS
56 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 |
58 | \usetikzlibrary{ shapes.geometric }
59 | \usetikzlibrary{calc}
60 | \usepackage{anyfontsize}
61 | \definecolor{doc}{RGB}{0,60,110}
62 | \definecolor{myg}{RGB}{56, 140, 70}
63 | \definecolor{myb}{RGB}{45, 111, 177}
64 | \definecolor{myr}{RGB}{199, 68, 64}
65 | \definecolor{mybg}{HTML}{F2F2F9}
66 | \definecolor{mytheorembg}{HTML}{F2F2F9}
67 | \definecolor{mytheoremfr}{HTML}{00007B}
68 | \definecolor{myexamplebg}{HTML}{F2FBF8}
69 | \definecolor{myexamplefr}{HTML}{88D6D1}
70 | \definecolor{myexampleti}{HTML}{2A7F7F}
71 | \definecolor{mydefinitbg}{HTML}{E5E5FF}
72 | \definecolor{mydefinitfr}{HTML}{3F3FA3}
73 | \definecolor{notesgreen}{RGB}{0,162,0}
74 | \definecolor{myp}{RGB}{197, 92, 212}
75 | \definecolor{mygr}{HTML}{2C3338}
76 | \definecolor{myred}{RGB}{127,0,0}
77 | \definecolor{myyellow}{RGB}{169,121,69}
78 | \definecolor{OrangeRed}{HTML}{ED135A}
79 | \definecolor{Dandelion}{HTML}{FDBC42}
80 | \definecolor{light-gray}{gray}{0.95}
81 | \definecolor{Emerald}{HTML}{00A99D}
82 | \definecolor{RoyalBlue}{HTML}{0071BC}
83 |
84 | \renewcommand{\qed}{\ensuremath{\blacksquare}}
85 |
86 | \newtheorem*{observation*}{Observation}
87 | \newtheorem*{assumption*}{Assumption}
88 | \newtheorem{observation}{Observation}
89 | \newtheorem{fact}[observation]{Fact}
90 | \newtheorem{assumption}{Assumption}[section]
91 |
92 |
93 |
94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
95 | % TCOLORBOX SETUPS
96 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 |
98 | \setlength{\parindent}{1cm}
99 | %================================
100 | % THEOREM BOX
101 | %================================
102 |
103 | \tcbuselibrary{theorems,skins,hooks}
104 | \newtcbtheorem[number within=subsection]{Theorem}{Theorem}
105 | {%
106 | enhanced,
107 | breakable,
108 | colback = mytheorembg,
109 | frame hidden,
110 | boxrule = 0sp,
111 | borderline west = {2pt}{0pt}{mytheoremfr},
112 | sharp corners,
113 | detach title,
114 | before upper = \tcbtitle\par\smallskip,
115 | coltitle = mytheoremfr,
116 | fonttitle = \bfseries\sffamily,
117 | description font = \mdseries,
118 | separator sign none,
119 | segmentation style={solid, mytheoremfr},
120 | }
121 | {th}
122 |
123 | \tcbuselibrary{theorems,skins,hooks}
124 | \newtcbtheorem[number within=section]{theorem}{Theorem}
125 | {%
126 | enhanced,
127 | breakable,
128 | colback = mytheorembg,
129 | frame hidden,
130 | boxrule = 0sp,
131 | borderline west = {2pt}{0pt}{mytheoremfr},
132 | sharp corners,
133 | detach title,
134 | before upper = \tcbtitle\par\smallskip,
135 | coltitle = mytheoremfr,
136 | fonttitle = \bfseries\sffamily,
137 | description font = \mdseries,
138 | separator sign none,
139 | segmentation style={solid, mytheoremfr},
140 | }
141 | {th}
142 |
143 |
144 | \tcbuselibrary{theorems,skins,hooks}
145 | \newtcolorbox{Theoremcon}
146 | {%
147 | enhanced
148 | ,breakable
149 | ,colback = mytheorembg
150 | ,frame hidden
151 | ,boxrule = 0sp
152 | ,borderline west = {2pt}{0pt}{mytheoremfr}
153 | ,sharp corners
154 | ,description font = \mdseries
155 | ,separator sign none
156 | }
157 |
158 |
159 | %================================
160 | % Corollery
161 | %================================
162 | \tcbuselibrary{theorems,skins,hooks}
163 | \newtcbtheorem[use counter from=Theorem, number within=subsection]{corolary}{Corollary}
164 | {%
165 | enhanced
166 | ,breakable
167 | ,colback = myp!10
168 | ,frame hidden
169 | ,boxrule = 0sp
170 | ,borderline west = {2pt}{0pt}{myp!60!black}
171 | ,sharp corners
172 | ,detach title
173 | ,before upper = \tcbtitle\par\smallskip
174 | ,coltitle = myp!60!black
175 | ,fonttitle = \bfseries\sffamily
176 | ,description font = \mdseries
177 | ,separator sign none
178 | ,segmentation style={solid, myp!85!black}
179 | % enhanced
180 | % ,breakable
181 | % ,colback = mytheorembg
182 | % ,frame hidden
183 | % ,boxrule = 0sp
184 | % ,borderline west = {2pt}{0pt}{mytheoremfr}
185 | % ,sharp corners
186 | % ,detach title
187 | % ,before upper = \tcbtitle\par\smallskip
188 | % ,coltitle = mytheoremfr
189 | % ,fonttitle = \bfseries\sffamily
190 | % ,description font = \mdseries
191 | % ,separator sign none
192 | % ,segmentation style={solid, mytheoremfr}
193 | }
194 | {th}
195 | \tcbuselibrary{theorems,skins,hooks}
196 | \newtcbtheorem[use counter from=Theorem, number within=section]{corollary}{Corollary}
197 | {%
198 | enhanced
199 | ,breakable
200 | ,colback = mytheorembg
201 | ,frame hidden
202 | ,boxrule = 0sp
203 | ,borderline west = {2pt}{0pt}{mytheoremfr}
204 | ,sharp corners
205 | ,detach title
206 | ,before upper = \tcbtitle\par\smallskip
207 | ,coltitle = mytheoremfr
208 | ,fonttitle = \bfseries\sffamily
209 | ,description font = \mdseries
210 | ,separator sign none
211 | ,segmentation style={solid, mytheoremfr}
212 | }
213 | {th}
214 |
215 | %================================
216 | % LEMMA
217 | %================================
218 |
219 | \tcbuselibrary{theorems,skins,hooks}
220 | \newtcbtheorem[use counter from=Theorem, number within=subsection]{lemma}{Lemma}
221 | {%
222 | enhanced
223 | ,breakable
224 | ,colback = myg!10
225 | ,frame hidden
226 | ,boxrule = 0sp
227 | ,borderline west = {2pt}{0pt}{myg}
228 | ,sharp corners
229 | ,detach title
230 | ,before upper = \tcbtitle\par\smallskip
231 | ,coltitle = myg!85!black
232 | ,fonttitle = \bfseries\sffamily
233 | ,description font = \mdseries
234 | ,separator sign none
235 | ,segmentation style={solid, myg!85!black}
236 | }
237 | {th}
238 |
239 |
240 | \newtcbtheorem[use counter from=theorem, number within=section]{Lemma}{Lemma}
241 | {%
242 | enhanced
243 | ,breakable
244 | ,colback = myg!10
245 | ,frame hidden
246 | ,boxrule = 0sp
247 | ,borderline west = {2pt}{0pt}{myg}
248 | ,sharp corners
249 | ,detach title
250 | ,before upper = \tcbtitle\par\smallskip
251 | ,coltitle = myg!85!black
252 | ,fonttitle = \bfseries\sffamily
253 | ,description font = \mdseries
254 | ,separator sign none
255 | ,segmentation style={solid, myg!85!black}
256 | }
257 | {th}
258 |
259 | %================================
260 | % CLAIM
261 | %================================
262 |
263 | \tcbuselibrary{theorems,skins,hooks}
264 | \newtcbtheorem[number within=subsection]{claim}{Claim}
265 | {%
266 | enhanced
267 | ,breakable
268 | ,colback = myg!10
269 | ,frame hidden
270 | ,boxrule = 0sp
271 | ,borderline west = {2pt}{0pt}{myg}
272 | ,sharp corners
273 | ,detach title
274 | ,before upper = \tcbtitle\par\smallskip
275 | ,coltitle = myg!85!black
276 | ,fonttitle = \bfseries\sffamily
277 | ,description font = \mdseries
278 | ,separator sign none
279 | ,segmentation style={solid, myg!85!black}
280 | }
281 | {th}
282 |
283 |
284 | \newtcbtheorem[number within=section]{Claim}{Claim}
285 | {%
286 | enhanced
287 | ,breakable
288 | ,colback = myg!10
289 | ,frame hidden
290 | ,boxrule = 0sp
291 | ,borderline west = {2pt}{0pt}{myg}
292 | ,sharp corners
293 | ,detach title
294 | ,before upper = \tcbtitle\par\smallskip
295 | ,coltitle = myg!85!black
296 | ,fonttitle = \bfseries\sffamily
297 | ,description font = \mdseries
298 | ,separator sign none
299 | ,segmentation style={solid, myg!85!black}
300 | }
301 | {th}
302 |
303 | %================================
304 | % EXAMPLE BOX
305 | %================================
306 |
307 | \newtcbtheorem[number within=subsection]{Example}{Example}
308 | {%
309 | colback = myexamplebg
310 | ,breakable
311 | ,colframe = myexamplefr
312 | ,coltitle = myexampleti
313 | ,boxrule = 1pt
314 | ,sharp corners
315 | ,detach title
316 | ,before upper=\tcbtitle\par\smallskip
317 | ,fonttitle = \bfseries
318 | ,description font = \mdseries
319 | ,separator sign none
320 | ,description delimiters parenthesis
321 | }
322 | {ex}
323 |
324 | \newtcbtheorem[number within=section]{example}{Example}
325 | {%
326 | colback = myexamplebg
327 | ,breakable
328 | ,colframe = myexamplefr
329 | ,coltitle = myexampleti
330 | ,boxrule = 1pt
331 | ,sharp corners
332 | ,detach title
333 | ,before upper=\tcbtitle\par\smallskip
334 | ,fonttitle = \bfseries
335 | ,description font = \mdseries
336 | ,separator sign none
337 | ,description delimiters parenthesis
338 | }
339 | {ex}
340 |
341 | %================================
342 | % DEFINITION BOX
343 | %================================
344 |
345 | \newtcbtheorem[number within=subsection]{Definition}{Definition}{enhanced,
346 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
347 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
348 | boxed title style={frame code={
349 | \path[fill=tcbcolback]
350 | ([yshift=-1mm,xshift=-1mm]frame.north west)
351 | arc[start angle=0,end angle=180,radius=1mm]
352 | ([yshift=-1mm,xshift=1mm]frame.north east)
353 | arc[start angle=180,end angle=0,radius=1mm];
354 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
355 | middle color=tcbcolback!80!black]
356 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
357 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
358 | -- (frame.south east) -- (frame.south west)
359 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
360 | [sharp corners]-- cycle;
361 | },interior engine=empty,
362 | },
363 | fonttitle=\bfseries,
364 | title={#2},#1}{def}
365 | \newtcbtheorem[number within=section]{definition}{Definition}{enhanced,
366 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
367 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
368 | boxed title style={frame code={
369 | \path[fill=tcbcolback]
370 | ([yshift=-1mm,xshift=-1mm]frame.north west)
371 | arc[start angle=0,end angle=180,radius=1mm]
372 | ([yshift=-1mm,xshift=1mm]frame.north east)
373 | arc[start angle=180,end angle=0,radius=1mm];
374 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
375 | middle color=tcbcolback!80!black]
376 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
377 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
378 | -- (frame.south east) -- (frame.south west)
379 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
380 | [sharp corners]-- cycle;
381 | },interior engine=empty,
382 | },
383 | fonttitle=\bfseries,
384 | title={#2},#1}{def}
385 |
386 |
387 | %================================
388 | % OPEN QUESTION BOX
389 | %================================
390 |
391 | \newtcbtheorem[number within=subsection]{open}{Open Question}{enhanced,
392 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
393 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
394 | boxed title style={frame code={
395 | \path[fill=tcbcolback]
396 | ([yshift=-1mm,xshift=-1mm]frame.north west)
397 | arc[start angle=0,end angle=180,radius=1mm]
398 | ([yshift=-1mm,xshift=1mm]frame.north east)
399 | arc[start angle=180,end angle=0,radius=1mm];
400 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
401 | middle color=tcbcolback!80!black]
402 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
403 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
404 | -- (frame.south east) -- (frame.south west)
405 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
406 | [sharp corners]-- cycle;
407 | },interior engine=empty,
408 | },
409 | fonttitle=\bfseries,
410 | title={#2},#1}{def}
411 | \newtcbtheorem[number within=section]{Open}{Open Question}{enhanced,
412 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
413 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
414 | boxed title style={frame code={
415 | \path[fill=tcbcolback]
416 | ([yshift=-1mm,xshift=-1mm]frame.north west)
417 | arc[start angle=0,end angle=180,radius=1mm]
418 | ([yshift=-1mm,xshift=1mm]frame.north east)
419 | arc[start angle=180,end angle=0,radius=1mm];
420 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
421 | middle color=tcbcolback!80!black]
422 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
423 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
424 | -- (frame.south east) -- (frame.south west)
425 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
426 | [sharp corners]-- cycle;
427 | },interior engine=empty,
428 | },
429 | fonttitle=\bfseries,
430 | title={#2},#1}{def}
431 |
432 |
433 |
434 | %================================
435 | % EXERCISE BOX
436 | %================================
437 |
438 | \makeatletter
439 | \newtcbtheorem[number within=subsection]{problem}{Problem}{enhanced,
440 | breakable,
441 | colback=white,
442 | colframe=myb!80!black,
443 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
444 | fonttitle=\bfseries,
445 | title={#2},
446 | boxed title size=title,
447 | boxed title style={%
448 | sharp corners,
449 | rounded corners=northwest,
450 | colback=tcbcolframe,
451 | boxrule=0pt,
452 | },
453 | underlay boxed title={%
454 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
455 | to[out=0, in=180] ([xshift=5mm]title.east)--
456 | (title.center-|frame.east)
457 | [rounded corners=\kvtcb@arc] |-
458 | (frame.north) -| cycle;
459 | },
460 | #1
461 | }{def}
462 | \makeatother
463 |
464 |
465 | %================================
466 | % Question BOX
467 | %================================
468 |
469 |
470 | \makeatletter
471 | \newtcbtheorem[number within=section]{question}{Question}{enhanced,
472 | breakable,
473 | colback=white,
474 | colframe=myb!80!black,
475 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
476 | fonttitle=\bfseries,
477 | title={#2},
478 | boxed title size=title,
479 | boxed title style={%
480 | sharp corners,
481 | rounded corners=northwest,
482 | colback=tcbcolframe,
483 | boxrule=0pt,
484 | },
485 | underlay boxed title={%
486 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
487 | to[out=0, in=180] ([xshift=5mm]title.east)--
488 | (title.center-|frame.east)
489 | [rounded corners=\kvtcb@arc] |-
490 | (frame.north) -| cycle;
491 | },
492 | #1
493 | }{qs}
494 | \makeatother
495 |
496 | \newtcbtheorem[number within=section]{wconc}{Wrong Concept}{
497 | breakable,
498 | enhanced,
499 | colback=white,
500 | colframe=myr,
501 | arc=0pt,
502 | outer arc=0pt,
503 | fonttitle=\bfseries\sffamily\large,
504 | colbacktitle=myr,
505 | attach boxed title to top left={},
506 | boxed title style={
507 | enhanced,
508 | skin=enhancedfirst jigsaw,
509 | arc=3pt,
510 | bottom=0pt,
511 | interior style={fill=myr}
512 | },
513 | #1
514 | }{def}
515 |
516 |
517 |
518 | %================================
519 | % NOTE BOX
520 | %================================
521 |
522 | \usetikzlibrary{arrows,calc,shadows.blur}
523 | \tcbuselibrary{skins}
524 | \newtcolorbox{note}[1][]{%
525 | enhanced jigsaw,
526 | colback=gray!20!white,%
527 | colframe=gray!80!black,
528 | size=small,
529 | boxrule=1pt,
530 | title=\textbf{Note:-},
531 | halign title=flush center,
532 | coltitle=black,
533 | breakable,
534 | drop shadow=black!50!white,
535 | attach boxed title to top left={xshift=1cm,yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
536 | minipage boxed title=1.5cm,
537 | boxed title style={%
538 | colback=white,
539 | size=fbox,
540 | boxrule=1pt,
541 | boxsep=2pt,
542 | underlay={%
543 | \coordinate (dotA) at ($(interior.west) + (-0.5pt,0)$);
544 | \coordinate (dotB) at ($(interior.east) + (0.5pt,0)$);
545 | \begin{scope}
546 | \clip (interior.north west) rectangle ([xshift=3ex]interior.east);
547 | \filldraw [white, blur shadow={shadow opacity=60, shadow yshift=-.75ex}, rounded corners=2pt] (interior.north west) rectangle (interior.south east);
548 | \end{scope}
549 | \begin{scope}[gray!80!black]
550 | \fill (dotA) circle (2pt);
551 | \fill (dotB) circle (2pt);
552 | \end{scope}
553 | },
554 | },
555 | #1,
556 | }
557 |
558 |
559 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
560 | %% SELF MADE COMMANDS
561 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
562 | %
563 | %%% The environments which are appears in pairs one of them is for the chapters which have sections whose environment name starts with small letter and the other is for chapters which do not have sections whose environment name starts with capital letter. In the short command for the latter I used the letter 'c' to represent it should be use if it is not under a section
564 | %
565 | %%% Short commands for environments goes like this
566 | %%% \[]{}{}
567 | %%% For example in theorem for suppose Fundamental Theorem of Calculus i will write like this
568 | %%% \thm[ftc]{Fundamental Theorem of Calculus}{Theorem Statement}
569 | %
570 | %\NewDocumentCommand{\EqM}{ m O{black} m}{%
571 | % \tikz[remember picture, baseline, anchor=base]
572 | % \node[inner sep=0pt, outer sep=3pt, text=#2] (#1) {%
573 | % \ensuremath{#3}%
574 | % };
575 | %}
576 |
577 |
578 |
579 | \newcommand{\thm}[3][]{\begin{Theorem}{#2}{#1}#3\end{Theorem}}
580 | \newcommand{\cor}[3][]{\begin{corolary}{#2}{#1}#3\end{corolary}}
581 | \newcommand{\lem}[3][]{\begin{lemma}{#2}{#1}#3\end{lemma}}
582 | \newcommand{\clm}[3][]{\begin{claim}{#2}{#1}#3\end{claim}}
583 | \newcommand{\thmcon}[1]{\begin{Theoremcon}{#1}\end{Theoremcon}}
584 | \newcommand{\ex}[3][]{\begin{Example}{#2}{#1}#3\end{Example}}
585 | \newcommand{\dfn}[3][]{\begin{Definition}[colbacktitle=red!75!black]{#2}{#1}#3\end{Definition}}
586 | \newcommand{\opn}[3][]{\begin{open}[colbacktitle=myp!75!black]{#2}{#1}#3\end{open}}
587 | \newcommand{\pr}[3][]{\begin{problem}{#2}{#1}#3\end{problem}}
588 |
589 |
590 |
591 |
592 | \renewenvironment{proof}{\noindent{\it \textbf{Proof:}}\hspace*{1em}}{\hfill\qed\bigskip\\}
593 | \newenvironment{proof-sketch}{\noindent{\it \bf Sketch of Proof:}\hspace*{1em}}{\hfill\qed\bigskip\\}
594 | \newenvironment{proof-idea}{\noindent{\it \bf Proof Idea:}\hspace*{1em}}{\hfill\qed\bigskip\\}
595 | \newenvironment{proof-of-theorem}[1]{\noindent{\it \bf Proof of \thmref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
596 | \newenvironment{proof-of-lemma}[1]{\noindent{\it \bf Proof of Lemma \lemref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
597 | \newenvironment{proof-of-corollary}[1]{\noindent{\it \bf Proof of \corrref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
598 | \newenvironment{proof-attempt}{\noindent{\it \bf Proof Attempt:}\hspace*{1em}}{\hfill\qed\bigskip\\}
599 | \newenvironment{alternate-proof}[1][]{\noindent{\textbf{\textbf{Alternate Proof }\thmref{#1}:}}\hspace*{1em}}{\hfill\qed\bigskip\\}
600 | \newenvironment{proofof}[1]{\noindent{\bf Proof:}
601 | of #1:\hspace*{1em}}{\hfill\qed\bigskip\\}
602 | \newenvironment{remark}{\noindent{\bf Remark:}\hspace*{1em}}{\bigskip\\}
603 |
604 |
605 | %% The proof environment actually multipurpose. For a proof many things actually play. Proof idea. Proof overview. Main pproof. Proof prerequisites etc. Thats why the first option uses the actual name of what exactly we are writing for the proof. It will go like this
606 | %% Proof idea: \pf{Proof Idea}{content..}
607 | %% Proof Overview: \pf{Proof Overview}{content..}
608 | %% Proof : \pf{Proof}{content..}
609 |
610 |
611 | \newcommand{\nt}[1]{\begin{note}#1\end{note}}
612 |
613 | \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
614 | \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
615 | \newcommand\getcurrentref[1]{%
616 | \ifnumequal{\value{#1}}{0}
617 | {??}
618 | {\the\value{#1}}%
619 | }
620 | \newcommand{\getCurrentSectionNumber}{\getcurrentref{section}}
621 |
622 |
623 |
624 |
625 |
626 | \makeatletter
627 | \newcommand{\setword}[2]{%
628 | \phantomsection
629 | #1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
630 | }
631 | \makeatother
632 |
633 |
634 |
635 |
636 | \tikzset{
637 | symbol/.style={
638 | draw=none,
639 | every to/.append style={
640 | edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
641 | }
642 | }
643 |
644 |
645 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
646 | % TABLE OF CONTENTS 1
647 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
648 |
649 | %\usepackage{framed}
650 | %\usepackage{titletoc}
651 | %\usepackage{etoolbox}
652 | %\usepackage{lmodern}
653 |
654 |
655 | %\patchcmd{\tableofcontents}{\contentsname}{\sffamily\contentsname}{}{}
656 |
657 | %\renewenvironment{leftbar}
658 | %{\def\FrameCommand{\hspace{6em}%
659 | % {\color{myyellow}\vrule width 2pt depth 6pt}\hspace{1em}}%
660 | % \MakeFramed{\parshape 1 0cm \dimexpr\textwidth-6em\relax\FrameRestore}\vskip2pt%
661 | %}
662 | %{\endMakeFramed}
663 |
664 | %\titlecontents{chapter}
665 | %[0em]{\vspace*{2\baselineskip}}
666 | %{\parbox{4.5em}{%
667 | % \hfill\Huge\sffamily\bfseries\color{myred}\thecontentspage}%
668 | % \vspace*{-2.3\baselineskip}\leftbar\textsc{\small\chaptername~\thecontentslabel}\\\sffamily}
669 | %{}{\endleftbar}
670 | %\titlecontents{section}
671 | %[8.4em]
672 | %{\sffamily\contentslabel{3em}}{}{}
673 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
674 | %\titlecontents{subsection}
675 | %[8.4em]
676 | %{\sffamily\contentslabel{3em}}{}{}
677 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
678 |
679 |
680 |
681 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
682 | % TABLE OF CONTENTS 2
683 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
684 | %
685 | \usepackage{tikz}
686 | \usetikzlibrary{shapes, positioning}
687 | \usepackage{titletoc}
688 | \contentsmargin{0cm}
689 | \titlecontents{section}[3.7pc]
690 | {\addvspace{30pt}%
691 | \begin{tikzpicture}[remember picture, overlay]%
692 | \draw[fill=doc!60,draw=doc!60] (-7,-.1) rectangle (-0.6,.5);%
693 | \pgftext[left,x=-3.3cm,y=0.17cm]{\color{white}\Large\sc\bfseries Section\ \thecontentslabel};%
694 | \end{tikzpicture}\color{doc!60}\large\sc\bfseries}%
695 | {}
696 | {}
697 | {\;\titlerule\;\large\sc\bfseries Page \thecontentspage
698 | \begin{tikzpicture}[remember picture, overlay]
699 | \draw[fill=doc!60,draw=doc!60] (2pt,0) rectangle (4,0.1pt);
700 | \end{tikzpicture}}%
701 | \titlecontents{subsection}[3.7pc]
702 | {\addvspace{2pt}}
703 | {\contentslabel[\thecontentslabel]{2pc}}
704 | {}
705 | {\hfill\small \thecontentspage}
706 | []
707 | \titlecontents{subsubsection}[3.7pc]
708 | {\addvspace{-1pt}\small}
709 | {\hspace*{2pc}\contentslabel[\thecontentslabel]{2pc}}
710 | {}
711 | {\hfill\small \thecontentspage}
712 | []
713 |
714 |
715 | \makeatletter
716 | \renewcommand{\tableofcontents}{%
717 | \section*{%
718 | \vspace*{-20\p@}%
719 | \begin{tikzpicture}[remember picture, overlay]%
720 | \pgftext[right,x=15cm,y=0.2cm]{\color{doc!60}\Huge\sc\bfseries \contentsname};%
721 | \draw[fill=doc!60,draw=doc!60] (13,-.75) rectangle (20,1);%
722 | \clip (13,-.75) rectangle (20,1);
723 | \pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
724 | \end{tikzpicture}}%
725 | \vspace*{5mm}
726 | \@starttoc{toc}}
727 | \makeatother
728 | %
729 | %
730 | %
731 | %\newcommand\colorlink[3]{\href{#2}{\color{#1}#3}}
732 | %\newcommand\colorurl[2]{{\color{#1}\url{#2}}}
733 | %
734 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
735 | %% Title Page 1
736 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
737 | %
738 | %\newcommand{\mytitlea}[4]{
739 | % \begin{tikzpicture}[remember picture,overlay]
740 | % %%%%%%%%%%%%%%%%%%%% Background %%%%%%%%%%%%%%%%%%%%%%%%
741 | % \fill[orange] (current page.south west) rectangle (current page.north east);
742 | %
743 | %
744 | %
745 | %
746 | % %%%%%%%%%%%%%%%%%%%% Background Polygon %%%%%%%%%%%%%%%%%%%%
747 | %
748 | % \foreach \i in {2.5,...,22}
749 | % {
750 | % \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.west)+(2.5,-5)$) {} ;
751 | % }
752 | %
753 | % \foreach \i in {0.5,...,22}
754 | % {
755 | % \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north west)+(2.5,0)$) {} ;
756 | % }
757 | %
758 | % \foreach \i in {0.5,...,22}
759 | % {
760 | % \node[rounded corners,orange!90,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north east)+(0,-9.5)$) {} ;
761 | % }
762 | %
763 | %
764 | % \foreach \i in {21,...,6}
765 | % {
766 | % \node[orange!85,rounded corners,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.south east)+(-0.2,-0.45)$) {} ;
767 | % }
768 | %
769 | %
770 | % %%%%%%%%%%%%%%%%%%%% Title of the Report %%%%%%%%%%%%%%%%%%%%
771 | % \node[left,black,minimum width=0.625*\paperwidth,minimum height=3cm, rounded corners] at ($(current page.north east)+(0,-9.5)$)
772 | % {
773 | % {\fontsize{25}{30} \selectfont \bfseries #1}
774 | % };
775 | %
776 | % %%%%%%%%%%%%%%%%%%%% Subtitle %%%%%%%%%%%%%%%%%%%%
777 | % \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-11)$)
778 | % {
779 | % {\huge \textit{#2}}
780 | % };
781 | %
782 | % %%%%%%%%%%%%%%%%%%%% Author Name %%%%%%%%%%%%%%%%%%%%
783 | % \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-13)$)
784 | % {
785 | % {\Large \textsc{#3}}
786 | % };
787 | %
788 | % %%%%%%%%%%%%%%%%%%%% Year %%%%%%%%%%%%%%%%%%%%
789 | % \node[rounded corners,fill=orange!70,text =black,regular polygon,regular polygon sides=6, minimum size=2.5 cm,inner sep=0,ultra thick] at ($(current page.west)+(2.5,-5)$) {\LARGE \bfseries #4};
790 | %
791 | % \end{tikzpicture}
792 | %}
793 | %
794 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
795 | %% Title Page 2
796 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
797 | %
798 | %\newcommand{\mytitleb}[4]{\begin{tikzpicture}[overlay,remember picture]
799 | %
800 | % % Background color
801 | % \fill[
802 | % black!2]
803 | % (current page.south west) rectangle (current page.north east);
804 | %
805 | % % Rectangles
806 | % \shade[
807 | % left color=Dandelion,
808 | % right color=Dandelion!40,
809 | % transform canvas ={rotate around ={45:($(current page.north west)+(0,-6)$)}}]
810 | % ($(current page.north west)+(0,-6)$) rectangle ++(9,1.5);
811 | %
812 | % \shade[
813 | % left color=lightgray,
814 | % right color=lightgray!50,
815 | % rounded corners=0.75cm,
816 | % transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}]
817 | % ($(current page.north west)+(0.5,-10)$) rectangle ++(15,1.5);
818 | %
819 | % \shade[
820 | % left color=lightgray,
821 | % rounded corners=0.3cm,
822 | % transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}] ($(current page.north west)+(1.5,-9.55)$) rectangle ++(7,.6);
823 | %
824 | % \shade[
825 | % left color=orange!80,
826 | % right color=orange!60,
827 | % rounded corners=0.4cm,
828 | % transform canvas ={rotate around ={45:($(current page.north)+(-1.5,-3)$)}}]
829 | % ($(current page.north)+(-1.5,-3)$) rectangle ++(9,0.8);
830 | %
831 | % \shade[
832 | % left color=red!80,
833 | % right color=red!80,
834 | % rounded corners=0.9cm,
835 | % transform canvas ={rotate around ={45:($(current page.north)+(-3,-8)$)}}] ($(current page.north)+(-3,-8)$) rectangle ++(15,1.8);
836 | %
837 | % \shade[
838 | % left color=orange,
839 | % right color=Dandelion,
840 | % rounded corners=0.9cm,
841 | % transform canvas ={rotate around ={45:($(current page.north west)+(4,-15.5)$)}}]
842 | % ($(current page.north west)+(4,-15.5)$) rectangle ++(30,1.8);
843 | %
844 | % \shade[
845 | % left color=RoyalBlue,
846 | % right color=Emerald,
847 | % rounded corners=0.75cm,
848 | % transform canvas ={rotate around ={45:($(current page.north west)+(13,-10)$)}}]
849 | % ($(current page.north west)+(13,-10)$) rectangle ++(15,1.5);
850 | %
851 | % \shade[
852 | % left color=lightgray,
853 | % rounded corners=0.3cm,
854 | % transform canvas ={rotate around ={45:($(current page.north west)+(18,-8)$)}}]
855 | % ($(current page.north west)+(18,-8)$) rectangle ++(15,0.6);
856 | %
857 | % \shade[
858 | % left color=lightgray,
859 | % rounded corners=0.4cm,
860 | % transform canvas ={rotate around ={45:($(current page.north west)+(19,-5.65)$)}}]
861 | % ($(current page.north west)+(19,-5.65)$) rectangle ++(15,0.8);
862 | %
863 | % \shade[
864 | % left color=OrangeRed,
865 | % right color=red!80,
866 | % rounded corners=0.6cm,
867 | % transform canvas ={rotate around ={45:($(current page.north west)+(20,-9)$)}}]
868 | % ($(current page.north west)+(20,-9)$) rectangle ++(14,1.2);
869 | %
870 | % % Year
871 | % \draw[ultra thick,gray]
872 | % ($(current page.center)+(5,2)$) -- ++(0,-3cm)
873 | % node[
874 | % midway,
875 | % left=0.25cm,
876 | % text width=5cm,
877 | % align=right,
878 | % black!75
879 | % ]
880 | % {
881 | % {\fontsize{25}{30} \selectfont \bf Lecture\\[10pt] Notes}
882 | % }
883 | % node[
884 | % midway,
885 | % right=0.25cm,
886 | % text width=6cm,
887 | % align=left,
888 | % orange]
889 | % {
890 | % {\fontsize{72}{86.4} \selectfont #4}
891 | % };
892 | %
893 | % % Title
894 | % \node[align=center] at ($(current page.center)+(0,-5)$)
895 | % {
896 | % {\fontsize{60}{72} \selectfont {{#1}}} \\[1cm]
897 | % {\fontsize{16}{19.2} \selectfont \textcolor{orange}{ \bf #2}}\\[3pt]
898 | % #3};
899 | % \end{tikzpicture}
900 | %}
--------------------------------------------------------------------------------
/preamble.tex:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % PACKAGE IMPORTS
3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 |
5 |
6 | \usepackage[tmargin=2cm,rmargin=1in,lmargin=1in,margin=0.85in,bmargin=2cm,footskip=.2in]{geometry} % I woulld suggest dont play with the margin. It kind of ruins the contents page.
7 | \usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools}
8 | \usepackage{bookmark}
9 | \usepackage[inline]{enumitem}
10 | \usepackage{cancel}
11 | \usepackage{hyperref,theoremref}
12 | \hypersetup{
13 | colorlinks=true, linkcolor=doc!80, urlcolor=doc!80, citecolor=mydefinitfr!80!black,
14 | bookmarksnumbered=true,
15 | bookmarksopen=true
16 | }
17 | \usepackage[most,many,breakable]{tcolorbox}
18 | \usepackage{xcolor}
19 | \usepackage{graphicx}
20 | %\graphicspath{ {./images/} } %give your suitable image path
21 | \usepackage{varwidth}
22 | \usepackage{authblk}
23 | \usepackage{nameref}
24 | \usepackage{multicol,array,multirow}
25 | \usepackage{tikz-cd}
26 | \usepackage{cancel}
27 | \usepackage{caption}
28 | \usepackage{pgfplots}
29 | %\usepackage[Sonny]{fncychap}
30 | \usepackage{mathpazo}
31 | % Use the libertine package for the Libertine font
32 | \usepackage{libertine}
33 | \usepackage[libertine]{newtxmath}
34 | \usepackage{mathrsfs}
35 | \usepackage{bbm}
36 | \usepackage[ruled,vlined,linesnumbered]{algorithm2e}
37 | \usepackage{fancyhdr}
38 | \pagestyle{fancy}
39 | \fancypagestyle{plain}{%
40 | \renewcommand{\headrulewidth}{0pt}%
41 | \fancyhf{}%
42 | }
43 | \fancyhead{}
44 | \renewcommand{\headrulewidth}{1pt}
45 | \fancyhead[LE]{\itshape\textsc{\nouppercase\rightmark}}
46 | \fancyhead[RO]{\itshape\textsc\leftmark} % CO Centered Odd
47 | \fancyfoot{}
48 | \fancyhead[RE,LO]{\itshape Page \thepage}
49 | \makeatletter
50 | \renewcommand{\chaptermark}[1]{%
51 | \markboth{%
52 | \ifnum\c@secnumdepth>\m@ne
53 | \@chapapp\ {\thechapter} \ %
54 | \fi
55 | #1%
56 | }{}%
57 | }
58 | \def\sectionmark#1{%
59 | \markright {\MakeUppercase{%
60 | \ifnum \c@secnumdepth >\z@
61 | \thesection \ %
62 | \fi
63 | #1}}}
64 | \makeatother
65 |
66 | \DeclareMathOperator{\supp}{supp}
67 | \DeclareMathOperator{\rk}{Rank}
68 | \DeclareMathOperator{\conv}{Conv}
69 |
70 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 | % SELF MADE COLORS
72 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 |
74 | \usetikzlibrary{ shapes.geometric }
75 | \usetikzlibrary{calc}
76 | \usepackage{anyfontsize}
77 | \definecolor{doc}{RGB}{0,60,110}
78 | \definecolor{myg}{RGB}{56, 140, 70}
79 | \definecolor{myb}{RGB}{45, 111, 177}
80 | \definecolor{myr}{RGB}{199, 68, 64}
81 | \definecolor{mybg}{HTML}{F2F2F9}
82 | \definecolor{mytheorembg}{HTML}{F2F2F9}
83 | \definecolor{mytheoremfr}{HTML}{00007B}
84 | \definecolor{myexamplebg}{HTML}{F2FBF8}
85 | \definecolor{myexamplefr}{HTML}{88D6D1}
86 | \definecolor{myexampleti}{HTML}{2A7F7F}
87 | \definecolor{mydefinitbg}{HTML}{E5E5FF}
88 | \definecolor{mydefinitfr}{HTML}{3F3FA3}
89 | \definecolor{notesgreen}{RGB}{0,162,0}
90 | \definecolor{myp}{RGB}{197, 92, 212}
91 | \definecolor{mygr}{HTML}{2C3338}
92 | \definecolor{myred}{RGB}{127,0,0}
93 | \definecolor{myyellow}{RGB}{169,121,69}
94 | \definecolor{OrangeRed}{HTML}{ED135A}
95 | \definecolor{Dandelion}{HTML}{FDBC42}
96 | \definecolor{light-gray}{gray}{0.95}
97 | \definecolor{Emerald}{HTML}{00A99D}
98 | \definecolor{RoyalBlue}{HTML}{0071BC}
99 |
100 | \renewcommand{\qed}{\ensuremath{\blacksquare}}
101 |
102 |
103 |
104 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
105 | % TCOLORBOX SETUPS
106 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 |
108 | \setlength{\parindent}{1cm}
109 | %================================
110 | % THEOREM BOX
111 | %================================
112 |
113 | \tcbuselibrary{theorems,skins,hooks}
114 | \newtcbtheorem[number within=section]{Theorem}{Theorem}
115 | {%
116 | enhanced,
117 | breakable,
118 | colback = mytheorembg,
119 | frame hidden,
120 | boxrule = 0sp,
121 | borderline west = {2pt}{0pt}{mytheoremfr},
122 | sharp corners,
123 | detach title,
124 | before upper = \tcbtitle\par\smallskip,
125 | coltitle = mytheoremfr,
126 | fonttitle = \bfseries\sffamily,
127 | description font = \mdseries,
128 | separator sign none,
129 | segmentation style={solid, mytheoremfr},
130 | }
131 | {th}
132 |
133 | \tcbuselibrary{theorems,skins,hooks}
134 | \newtcbtheorem[number within=chapter]{theorem}{Theorem}
135 | {%
136 | enhanced,
137 | breakable,
138 | colback = mytheorembg,
139 | frame hidden,
140 | boxrule = 0sp,
141 | borderline west = {2pt}{0pt}{mytheoremfr},
142 | sharp corners,
143 | detach title,
144 | before upper = \tcbtitle\par\smallskip,
145 | coltitle = mytheoremfr,
146 | fonttitle = \bfseries\sffamily,
147 | description font = \mdseries,
148 | separator sign none,
149 | segmentation style={solid, mytheoremfr},
150 | }
151 | {th}
152 |
153 |
154 | \tcbuselibrary{theorems,skins,hooks}
155 | \newtcolorbox{Theoremcon}
156 | {%
157 | enhanced
158 | ,breakable
159 | ,colback = mytheorembg
160 | ,frame hidden
161 | ,boxrule = 0sp
162 | ,borderline west = {2pt}{0pt}{mytheoremfr}
163 | ,sharp corners
164 | ,description font = \mdseries
165 | ,separator sign none
166 | }
167 |
168 |
169 | %================================
170 | % Corollery
171 | %================================
172 | \tcbuselibrary{theorems,skins,hooks}
173 | \newtcbtheorem[use counter from=Theorem, number within=section]{corolary}{Corollary}
174 | {%
175 | enhanced
176 | ,breakable
177 | ,colback = myp!10
178 | ,frame hidden
179 | ,boxrule = 0sp
180 | ,borderline west = {2pt}{0pt}{myp!60!black}
181 | ,sharp corners
182 | ,detach title
183 | ,before upper = \tcbtitle\par\smallskip
184 | ,coltitle = myp!60!black
185 | ,fonttitle = \bfseries\sffamily
186 | ,description font = \mdseries
187 | ,separator sign none
188 | ,segmentation style={solid, myp!85!black}
189 | % enhanced
190 | % ,breakable
191 | % ,colback = mytheorembg
192 | % ,frame hidden
193 | % ,boxrule = 0sp
194 | % ,borderline west = {2pt}{0pt}{mytheoremfr}
195 | % ,sharp corners
196 | % ,detach title
197 | % ,before upper = \tcbtitle\par\smallskip
198 | % ,coltitle = mytheoremfr
199 | % ,fonttitle = \bfseries\sffamily
200 | % ,description font = \mdseries
201 | % ,separator sign none
202 | % ,segmentation style={solid, mytheoremfr}
203 | }
204 | {th}
205 | \tcbuselibrary{theorems,skins,hooks}
206 | \newtcbtheorem[use counter from=Theorem, number within=chapter]{corollary}{Corollary}
207 | {%
208 | enhanced
209 | ,breakable
210 | ,colback = mytheorembg
211 | ,frame hidden
212 | ,boxrule = 0sp
213 | ,borderline west = {2pt}{0pt}{mytheoremfr}
214 | ,sharp corners
215 | ,detach title
216 | ,before upper = \tcbtitle\par\smallskip
217 | ,coltitle = mytheoremfr
218 | ,fonttitle = \bfseries\sffamily
219 | ,description font = \mdseries
220 | ,separator sign none
221 | ,segmentation style={solid, mytheoremfr}
222 | }
223 | {th}
224 |
225 | %================================
226 | % LEMMA
227 | %================================
228 |
229 | \tcbuselibrary{theorems,skins,hooks}
230 | \newtcbtheorem[use counter from=Theorem, number within=section]{lemma}{Lemma}
231 | {%
232 | enhanced
233 | ,breakable
234 | ,colback = myg!10
235 | ,frame hidden
236 | ,boxrule = 0sp
237 | ,borderline west = {2pt}{0pt}{myg}
238 | ,sharp corners
239 | ,detach title
240 | ,before upper = \tcbtitle\par\smallskip
241 | ,coltitle = myg!85!black
242 | ,fonttitle = \bfseries\sffamily
243 | ,description font = \mdseries
244 | ,separator sign none
245 | ,segmentation style={solid, myg!85!black}
246 | }
247 | {th}
248 |
249 |
250 | \newtcbtheorem[use counter from=theorem, number within=chapter]{Lemma}{Lemma}
251 | {%
252 | enhanced
253 | ,breakable
254 | ,colback = myg!10
255 | ,frame hidden
256 | ,boxrule = 0sp
257 | ,borderline west = {2pt}{0pt}{myg}
258 | ,sharp corners
259 | ,detach title
260 | ,before upper = \tcbtitle\par\smallskip
261 | ,coltitle = myg!85!black
262 | ,fonttitle = \bfseries\sffamily
263 | ,description font = \mdseries
264 | ,separator sign none
265 | ,segmentation style={solid, myg!85!black}
266 | }
267 | {th}
268 |
269 | %================================
270 | % CLAIM
271 | %================================
272 |
273 | \tcbuselibrary{theorems,skins,hooks}
274 | \newtcbtheorem[number within=section]{claim}{Claim}
275 | {%
276 | enhanced
277 | ,breakable
278 | ,colback = myg!10
279 | ,frame hidden
280 | ,boxrule = 0sp
281 | ,borderline west = {2pt}{0pt}{myg}
282 | ,sharp corners
283 | ,detach title
284 | ,before upper = \tcbtitle\par\smallskip
285 | ,coltitle = myg!85!black
286 | ,fonttitle = \bfseries\sffamily
287 | ,description font = \mdseries
288 | ,separator sign none
289 | ,segmentation style={solid, myg!85!black}
290 | }
291 | {th}
292 |
293 |
294 | \newtcbtheorem[number within=chapter]{Claim}{Claim}
295 | {%
296 | enhanced
297 | ,breakable
298 | ,colback = myg!10
299 | ,frame hidden
300 | ,boxrule = 0sp
301 | ,borderline west = {2pt}{0pt}{myg}
302 | ,sharp corners
303 | ,detach title
304 | ,before upper = \tcbtitle\par\smallskip
305 | ,coltitle = myg!85!black
306 | ,fonttitle = \bfseries\sffamily
307 | ,description font = \mdseries
308 | ,separator sign none
309 | ,segmentation style={solid, myg!85!black}
310 | }
311 | {th}
312 |
313 | %================================
314 | % EXAMPLE BOX
315 | %================================
316 |
317 | \newtcbtheorem[number within=section]{Example}{Example}
318 | {%
319 | colback = myexamplebg
320 | ,breakable
321 | ,colframe = myexamplefr
322 | ,coltitle = myexampleti
323 | ,boxrule = 1pt
324 | ,sharp corners
325 | ,detach title
326 | ,before upper=\tcbtitle\par\smallskip
327 | ,fonttitle = \bfseries
328 | ,description font = \mdseries
329 | ,separator sign none
330 | ,description delimiters parenthesis
331 | }
332 | {ex}
333 |
334 | \newtcbtheorem[number within=chapter]{example}{Example}
335 | {%
336 | colback = myexamplebg
337 | ,breakable
338 | ,colframe = myexamplefr
339 | ,coltitle = myexampleti
340 | ,boxrule = 1pt
341 | ,sharp corners
342 | ,detach title
343 | ,before upper=\tcbtitle\par\smallskip
344 | ,fonttitle = \bfseries
345 | ,description font = \mdseries
346 | ,separator sign none
347 | ,description delimiters parenthesis
348 | }
349 | {ex}
350 |
351 | %================================
352 | % DEFINITION BOX
353 | %================================
354 |
355 | \newtcbtheorem[number within=section]{Definition}{Definition}{enhanced,
356 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
357 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,colbacktitle=red!75!black,
358 | boxed title style={frame code={
359 | \path[fill=tcbcolback]
360 | ([yshift=-1mm,xshift=-1mm]frame.north west)
361 | arc[start angle=0,end angle=180,radius=1mm]
362 | ([yshift=-1mm,xshift=1mm]frame.north east)
363 | arc[start angle=180,end angle=0,radius=1mm];
364 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
365 | middle color=tcbcolback!80!black]
366 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
367 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
368 | -- (frame.south east) -- (frame.south west)
369 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
370 | [sharp corners]-- cycle;
371 | },interior engine=empty,
372 | },
373 | fonttitle=\bfseries,
374 | title={#2},#1}{def}
375 | \newtcbtheorem[number within=chapter]{definition}{Definition}{enhanced,
376 | before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
377 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm, colbacktitle=red!75!black,
378 | boxed title style={frame code={
379 | \path[fill=red!75!black]
380 | ([yshift=-1mm,xshift=-1mm]frame.north west)
381 | arc[start angle=0,end angle=180,radius=1mm]
382 | ([yshift=-1mm,xshift=1mm]frame.north east)
383 | arc[start angle=180,end angle=0,radius=1mm];
384 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
385 | middle color=tcbcolback!80!black]
386 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
387 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
388 | -- (frame.south east) -- (frame.south west)
389 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
390 | [sharp corners]-- cycle;
391 | },interior engine=empty,
392 | },
393 | fonttitle=\bfseries,
394 | title={#2},#1}{def}
395 |
396 |
397 | %================================
398 | % OPEN QUESTION BOX
399 | %================================
400 |
401 | \newtcbtheorem[number within=section]{open}{Open Question}{enhanced,
402 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
403 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm, colbacktitle=myp!75!black,
404 | boxed title style={frame code={
405 | \path[fill=tcbcolback]
406 | ([yshift=-1mm,xshift=-1mm]frame.north west)
407 | arc[start angle=0,end angle=180,radius=1mm]
408 | ([yshift=-1mm,xshift=1mm]frame.north east)
409 | arc[start angle=180,end angle=0,radius=1mm];
410 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
411 | middle color=tcbcolback!80!black]
412 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
413 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
414 | -- (frame.south east) -- (frame.south west)
415 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
416 | [sharp corners]-- cycle;
417 | },interior engine=empty,
418 | },
419 | fonttitle=\bfseries,
420 | title={#2},#1}{def}
421 | \newtcbtheorem[number within=chapter]{Open}{Open Question}{enhanced,
422 | before skip=2mm,after skip=2mm, colback=myp!5,colframe=myp!80!black,boxrule=0.5mm,
423 | attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm, colbacktitle=myp!75!black,
424 | boxed title style={frame code={
425 | \path[fill=tcbcolback]
426 | ([yshift=-1mm,xshift=-1mm]frame.north west)
427 | arc[start angle=0,end angle=180,radius=1mm]
428 | ([yshift=-1mm,xshift=1mm]frame.north east)
429 | arc[start angle=180,end angle=0,radius=1mm];
430 | \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
431 | middle color=tcbcolback!80!black]
432 | ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
433 | [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
434 | -- (frame.south east) -- (frame.south west)
435 | -- ([xshift=-1mm,yshift=-1mm]frame.north west)
436 | [sharp corners]-- cycle;
437 | },interior engine=empty,
438 | },
439 | fonttitle=\bfseries,
440 | title={#2},#1}{def}
441 |
442 |
443 |
444 | %================================
445 | % EXERCISE BOX
446 | %================================
447 |
448 | \makeatletter
449 | \newtcbtheorem[number within=chapter]{problem}{Problem}{enhanced,
450 | breakable,
451 | colback=white,
452 | colframe=myb!80!black,
453 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
454 | fonttitle=\bfseries,
455 | title={#2},
456 | boxed title size=title,
457 | boxed title style={%
458 | sharp corners,
459 | rounded corners=northwest,
460 | colback=tcbcolframe,
461 | boxrule=0pt,
462 | },
463 | underlay boxed title={%
464 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
465 | to[out=0, in=180] ([xshift=5mm]title.east)--
466 | (title.center-|frame.east)
467 | [rounded corners=\kvtcb@arc] |-
468 | (frame.north) -| cycle;
469 | },
470 | #1
471 | }{def}
472 | \makeatother
473 |
474 |
475 | %================================
476 | % Question BOX
477 | %================================
478 |
479 |
480 | \makeatletter
481 | \newtcbtheorem[number within=chapter]{question}{Question}{enhanced,
482 | breakable,
483 | colback=white,
484 | colframe=myb!80!black,
485 | attach boxed title to top left={yshift*=-\tcboxedtitleheight},
486 | fonttitle=\bfseries,
487 | title={#2},
488 | boxed title size=title,
489 | boxed title style={%
490 | sharp corners,
491 | rounded corners=northwest,
492 | colback=tcbcolframe,
493 | boxrule=0pt,
494 | },
495 | underlay boxed title={%
496 | \path[fill=tcbcolframe] (title.south west)--(title.south east)
497 | to[out=0, in=180] ([xshift=5mm]title.east)--
498 | (title.center-|frame.east)
499 | [rounded corners=\kvtcb@arc] |-
500 | (frame.north) -| cycle;
501 | },
502 | #1
503 | }{qs}
504 | \makeatother
505 |
506 | \newtcbtheorem[number within=chapter]{wconc}{Wrong Concept}{
507 | breakable,
508 | enhanced,
509 | colback=white,
510 | colframe=myr,
511 | arc=0pt,
512 | outer arc=0pt,
513 | fonttitle=\bfseries\sffamily\large,
514 | colbacktitle=myr,
515 | attach boxed title to top left={},
516 | boxed title style={
517 | enhanced,
518 | skin=enhancedfirst jigsaw,
519 | arc=3pt,
520 | bottom=0pt,
521 | interior style={fill=myr}
522 | },
523 | #1
524 | }{def}
525 |
526 |
527 |
528 | %================================
529 | % NOTE BOX
530 | %================================
531 |
532 | \usetikzlibrary{arrows,calc,shadows.blur}
533 | \tcbuselibrary{skins}
534 | \newtcolorbox{note}[1][]{%
535 | enhanced jigsaw,
536 | colback=gray!20!white,%
537 | colframe=gray!80!black,
538 | size=small,
539 | boxrule=1pt,
540 | title=\textbf{Note:-},
541 | halign title=flush center,
542 | coltitle=black,
543 | breakable,
544 | drop shadow=black!50!white,
545 | attach boxed title to top left={xshift=1cm,yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
546 | minipage boxed title=1.5cm,
547 | boxed title style={%
548 | colback=white,
549 | size=fbox,
550 | boxrule=1pt,
551 | boxsep=2pt,
552 | underlay={%
553 | \coordinate (dotA) at ($(interior.west) + (-0.5pt,0)$);
554 | \coordinate (dotB) at ($(interior.east) + (0.5pt,0)$);
555 | \begin{scope}
556 | \clip (interior.north west) rectangle ([xshift=3ex]interior.east);
557 | \filldraw [white, blur shadow={shadow opacity=60, shadow yshift=-.75ex}, rounded corners=2pt] (interior.north west) rectangle (interior.south east);
558 | \end{scope}
559 | \begin{scope}[gray!80!black]
560 | \fill (dotA) circle (2pt);
561 | \fill (dotB) circle (2pt);
562 | \end{scope}
563 | },
564 | },
565 | #1,
566 | }
567 |
568 | %================================
569 | % Algorithm Problem Definition
570 | %================================
571 |
572 | \makeatletter
573 | \usepackage{tabularx,environ}
574 | \newcommand{\problemtitle}[1]{\gdef\@problemtitle{\scshape #1}}% Store problem title
575 | \newcommand{\probleminput}[1]{\gdef\@probleminput{#1}}% Store problem input
576 | \newcommand{\problemquestion}[1]{\gdef\@problemquestion{#1}}% Store problem question
577 | \NewEnviron{algoprob}{
578 | \problemtitle{}\probleminput{}\problemquestion{}% Default input is empty
579 | \BODY% Parse input
580 | \par\addvspace{.5\baselineskip}
581 | \noindent
582 | \begin{tabularx}{\textwidth}{@{\hspace{\parindent}} l X c}
583 | \multicolumn{2}{@{\hspace{\parindent}}l}{\@problemtitle} \\% Title
584 | \textbf{Input:} & \@probleminput \\% Input
585 | \textbf{Question:} & \@problemquestion% Question
586 | \end{tabularx}
587 | \par\addvspace{.5\baselineskip}
588 | }
589 | \makeatother
590 |
591 |
592 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
593 | % SELF MADE COMMANDS
594 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
595 |
596 | %% The environments which are appears in pairs one of them is for the chapters which have sections whose environment name starts with small letter and the other is for chapters which do not have sections whose environment name starts with capital letter. In the short command for the latter I used the letter 'c' to represent it should be use if it is not under a section
597 |
598 | %% Short commands for environments goes like this
599 | %% \[]{}{}
600 | %% For example in theorem for suppose Fundamental Theorem of Calculus i will write like this
601 | %% \thm[ftc]{Fundamental Theorem of Calculus}{Theorem Statement}
602 |
603 | \NewDocumentCommand{\EqM}{ m O{black} m}{%
604 | \tikz[remember picture, baseline, anchor=base]
605 | \node[inner sep=0pt, outer sep=3pt, text=#2] (#1) {%
606 | \ensuremath{#3}%
607 | };
608 | }
609 |
610 |
611 |
612 | \newcommand{\thm}[3][]{\begin{Theorem}{#2}{#1}#3\end{Theorem}}
613 | \newcommand{\thmc}[3][]{\begin{theorem}{#2}{#1}#3\end{theorem}}
614 | \newcommand{\cor}[3][]{\begin{corolary}{#2}{#1}#3\end{corolary}}
615 | \newcommand{\corc}[3][]{\begin{corollary}{#2}{#1}#3\end{corollary}}
616 | \newcommand{\lem}[3][]{\begin{lemma}{#2}{#1}#3\end{lemma}}
617 | \newcommand{\clm}[3][]{\begin{claim}{#2}{#1}#3\end{claim}}
618 | \newcommand{\wc}[3][]{\begin{wconc}{#2}{#1}\setlength{\parindent}{1cm}#3\end{wconc}}
619 | \newcommand{\thmcon}[1]{\begin{Theoremcon}{#1}\end{Theoremcon}}
620 | \newcommand{\ex}[3][]{\begin{Example}{#2}{#1}#3\end{Example}}
621 | \newcommand{\exc}[3][]{\begin{example}{#2}{#1}#3\end{example}}
622 | \newcommand{\dfn}[3][]{\begin{Definition}{#2}{#1}#3\end{Definition}}
623 | \newcommand{\dfnc}[3][]{\begin{definition}{#2}{#1}#3\end{definition}}
624 | \newcommand{\opn}[3][]{\begin{open}{#2}{#1}#3\end{open}}
625 | \newcommand{\opnc}[3][]{\begin{Open}{#2}{#1}#3\end{Open}}
626 | \newcommand{\pr}[3][]{\begin{problem}{#2}{#1}#3\end{problem}}
627 |
628 |
629 |
630 |
631 |
632 | \newtheorem*{observation*}{Observation}
633 | \newtheorem*{idea*}{Idea}
634 | \newtheorem*{assumption*}{Assumption}
635 | \newtheorem{observation}{Observation}
636 | \newtheorem{fact}[observation]{Fact}
637 | \newtheorem{assumption}{Assumption}[section]
638 |
639 |
640 | \renewenvironment{proof}{\noindent{\it \textbf{Proof:}}\hspace*{1em}}{\hfill\qed\bigskip\\}
641 | \newenvironment{proof-sketch}{\noindent{\it \bf Sketch of Proof:}\hspace*{1em}}{\hfill\qed\bigskip\\}
642 | \newenvironment{proof-idea}{\noindent{\it \bf Proof Idea:}\hspace*{1em}}{\hfill\qed\bigskip\\}
643 | \newenvironment{proof-of-theorem}[1]{\noindent{\it \bf Proof of \thmref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
644 | \newenvironment{proof-of-lemma}[1]{\noindent{\it \bf Proof of Lemma \lemref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
645 | \newenvironment{proof-of-corollary}[1]{\noindent{\it \bf Proof of \corrref{#1}:}\hspace*{1em}}{\hfill\qed\bigskip\\}
646 | \newenvironment{proof-attempt}{\noindent{\it \bf Proof Attempt:}\hspace*{1em}}{\hfill\qed\bigskip\\}
647 | \newenvironment{alternate-proof}[1][]{\noindent{\textit{\textbf{Alternate Proof }#1:}}\hspace*{1em}}{\hfill\qed\bigskip\\}
648 | \newenvironment{proofof}[1]{\noindent{\bf Proof:}
649 | of #1:\hspace*{1em}}{\hfill\qed\bigskip\\}
650 | \newenvironment{remark}{\noindent{\bf Remark:}\hspace*{1em}}{\bigskip\\}
651 | \newenvironment{idea}{\noindent{\bf Idea: }}{\bigskip\\}
652 |
653 |
654 |
655 | %% The proof environment actually multipurpose. For a proof many things actually play. Proof idea. Proof overview. Main pproof. Proof prerequisites etc. Thats why the first option uses the actual name of what exactly we are writing for the proof. It will go like this
656 | %% Proof idea: \pf{Proof Idea}{content..}
657 | %% Proof Overview: \pf{Proof Overview}{content..}
658 | %% Proof : \pf{Proof}{content..}
659 |
660 |
661 | \newcommand{\nt}[1]{\begin{note}#1\end{note}}
662 |
663 | \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
664 | \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
665 | \newcommand\getcurrentref[1]{%
666 | \ifnumequal{\value{#1}}{0}
667 | {??}
668 | {\the\value{#1}}%
669 | }
670 |
671 | \newcounter{mylabelcounter}
672 |
673 |
674 |
675 | \makeatletter
676 | \newcommand{\setword}[2]{%
677 | \phantomsection
678 | #1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
679 | }
680 | \makeatother
681 |
682 |
683 |
684 |
685 | \tikzset{
686 | symbol/.style={
687 | draw=none,
688 | every to/.append style={
689 | edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
690 | }
691 | }
692 |
693 |
694 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
695 | % TABLE OF CONTENTS 1
696 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
697 | %
698 | %\usepackage{framed}
699 | %\usepackage{titletoc}
700 | %\usepackage{etoolbox}
701 | %\usepackage{lmodern}
702 | %
703 | %
704 | %\patchcmd{\tableofcontents}{\contentsname}{\sffamily\contentsname}{}{}
705 | %
706 | %\renewenvironment{leftbar}
707 | %{\def\FrameCommand{\hspace{6em}%
708 | % {\color{myyellow}\vrule width 2pt depth 6pt}\hspace{1em}}%
709 | % \MakeFramed{\parshape 1 0cm \dimexpr\textwidth-6em\relax\FrameRestore}\vskip2pt%
710 | % }
711 | %{\endMakeFramed}
712 | %
713 | %\titlecontents{chapter}
714 | %[0em]{\vspace*{2\baselineskip}}
715 | %{\parbox{4.5em}{%
716 | % \hfill\Huge\sffamily\bfseries\color{myred}\thecontentspage}%
717 | % \vspace*{-2.3\baselineskip}\leftbar\textsc{\small\chaptername~\thecontentslabel}\\\sffamily}
718 | %{}{\endleftbar}
719 | %\titlecontents{section}
720 | %[8.4em]
721 | %{\sffamily\contentslabel{3em}}{}{}
722 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
723 | %\titlecontents{subsection}
724 | %[8.4em]
725 | %{\sffamily\contentslabel{3em}}{}{}
726 | %{\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}
727 |
728 |
729 |
730 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
731 | % TABLE OF CONTENTS 2
732 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
733 |
734 | \usepackage{tikz}
735 | \usetikzlibrary{shapes, positioning}
736 | \usepackage{titletoc,titlesec}
737 | \contentsmargin{0cm}
738 | \titlecontents{chapter}[3.7pc]
739 | {\addvspace{30pt}%
740 | \begin{tikzpicture}[remember picture, overlay]%
741 | \draw[fill=doc!60,draw=doc!60] (-7,-.1) rectangle (-0.6,.5);%
742 | \pgftext[left,x=-3.6cm,y=0.2cm]{\color{white}\Large\sc\bfseries Chapter\ \thecontentslabel};%
743 | \end{tikzpicture}\color{doc!60}\large\sc\bfseries}%
744 | {}
745 | {}
746 | {\;\titlerule\;\large\sc\bfseries Page \thecontentspage
747 | \begin{tikzpicture}[remember picture, overlay]
748 | \draw[fill=doc!60,draw=doc!60] (2pt,0) rectangle (4,0.1pt);
749 | \end{tikzpicture}}%
750 | \titlecontents{section}[3.7pc]
751 | {\addvspace{2pt}}
752 | {\contentslabel[\thecontentslabel]{2pc}}
753 | {}
754 | {\hfill\small \thecontentspage}
755 | []
756 | \titlecontents{subsection}[3.7pc]
757 | {\addvspace{-1pt}\small}
758 | {\hspace*{2pc}\contentslabel[\thecontentslabel]{2pc}}
759 | {}
760 | {\hfill\small \thecontentspage}
761 | []
762 |
763 |
764 | %{\addvspace{-1pt}\small}
765 | %{}
766 | %{}
767 | %{\ --- \small\thecontentspage}
768 | %[ \textbullet\ ][]
769 |
770 | \makeatletter
771 | \renewcommand{\tableofcontents}{%
772 | \chapter*{%
773 | \vspace*{-80\p@}%
774 | \begin{tikzpicture}[remember picture, overlay]%
775 | \pgftext[right,x=15cm,y=0.2cm]{\color{doc!60}\Huge\sc\bfseries \contentsname};%
776 | \draw[fill=doc!60,draw=doc!60] (13,-.75) rectangle (20,1);%
777 | \clip (13,-.75) rectangle (20,1);
778 | \pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
779 | \end{tikzpicture}}%
780 | \@starttoc{toc}}
781 | \makeatother
782 | %\titleformat{\chapter}[display]
783 | %{\normalfont\Huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
784 |
785 |
786 | \newcommand\colorlink[3]{\href{#2}{\color{#1}#3}}
787 | \newcommand\colorurl[2]{{\color{#1}\url{#2}}}
788 |
789 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
790 | % Title Page 1
791 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
792 |
793 | \newcommand{\mytitlea}[4]{
794 | \begin{tikzpicture}[remember picture,overlay]
795 | %%%%%%%%%%%%%%%%%%%% Background %%%%%%%%%%%%%%%%%%%%%%%%
796 | \fill[orange] (current page.south west) rectangle (current page.north east);
797 |
798 |
799 |
800 |
801 | %%%%%%%%%%%%%%%%%%%% Background Polygon %%%%%%%%%%%%%%%%%%%%
802 |
803 | \foreach \i in {2.5,...,22}
804 | {
805 | \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.west)+(2.5,-5)$) {} ;
806 | }
807 |
808 | \foreach \i in {0.5,...,22}
809 | {
810 | \node[rounded corners,orange!60,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north west)+(2.5,0)$) {} ;
811 | }
812 |
813 | \foreach \i in {0.5,...,22}
814 | {
815 | \node[rounded corners,orange!90,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.north east)+(0,-9.5)$) {} ;
816 | }
817 |
818 |
819 | \foreach \i in {21,...,6}
820 | {
821 | \node[orange!85,rounded corners,draw,regular polygon,regular polygon sides=6, minimum size=\i cm,ultra thick] at ($(current page.south east)+(-0.2,-0.45)$) {} ;
822 | }
823 |
824 |
825 | %%%%%%%%%%%%%%%%%%%% Title of the Report %%%%%%%%%%%%%%%%%%%%
826 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=3cm, rounded corners] at ($(current page.north east)+(0,-9.5)$)
827 | {
828 | {\fontsize{25}{30} \selectfont \bfseries #1}
829 | };
830 |
831 | %%%%%%%%%%%%%%%%%%%% Subtitle %%%%%%%%%%%%%%%%%%%%
832 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-11)$)
833 | {
834 | {\huge \textit{#2}}
835 | };
836 |
837 | %%%%%%%%%%%%%%%%%%%% Author Name %%%%%%%%%%%%%%%%%%%%
838 | \node[left,black,minimum width=0.625*\paperwidth,minimum height=2cm, rounded corners] at ($(current page.north east)+(0,-13)$)
839 | {
840 | {\Large \textsc{#3}}
841 | };
842 |
843 | %%%%%%%%%%%%%%%%%%%% Year %%%%%%%%%%%%%%%%%%%%
844 | \node[rounded corners,fill=orange!70,text =black,regular polygon,regular polygon sides=6, minimum size=2.5 cm,inner sep=0,ultra thick] at ($(current page.west)+(2.5,-5)$) {\LARGE \bfseries #4};
845 |
846 | \end{tikzpicture}
847 | }
848 |
849 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
850 | % Title Page 2
851 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
852 |
853 | \newcommand{\mytitleb}[4]{\begin{tikzpicture}[overlay,remember picture]
854 |
855 | % Background color
856 | \fill[
857 | black!2]
858 | (current page.south west) rectangle (current page.north east);
859 |
860 | % Rectangles
861 | \shade[
862 | left color=Dandelion,
863 | right color=Dandelion!40,
864 | transform canvas ={rotate around ={45:($(current page.north west)+(0,-6)$)}}]
865 | ($(current page.north west)+(0,-6)$) rectangle ++(9,1.5);
866 |
867 | \shade[
868 | left color=lightgray,
869 | right color=lightgray!50,
870 | rounded corners=0.75cm,
871 | transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}]
872 | ($(current page.north west)+(0.5,-10)$) rectangle ++(15,1.5);
873 |
874 | \shade[
875 | left color=lightgray,
876 | rounded corners=0.3cm,
877 | transform canvas ={rotate around ={45:($(current page.north west)+(.5,-10)$)}}] ($(current page.north west)+(1.5,-9.55)$) rectangle ++(7,.6);
878 |
879 | \shade[
880 | left color=orange!80,
881 | right color=orange!60,
882 | rounded corners=0.4cm,
883 | transform canvas ={rotate around ={45:($(current page.north)+(-1.5,-3)$)}}]
884 | ($(current page.north)+(-1.5,-3)$) rectangle ++(9,0.8);
885 |
886 | \shade[
887 | left color=red!80,
888 | right color=red!80,
889 | rounded corners=0.9cm,
890 | transform canvas ={rotate around ={45:($(current page.north)+(-3,-8)$)}}] ($(current page.north)+(-3,-8)$) rectangle ++(15,1.8);
891 |
892 | \shade[
893 | left color=orange,
894 | right color=Dandelion,
895 | rounded corners=0.9cm,
896 | transform canvas ={rotate around ={45:($(current page.north west)+(4,-15.5)$)}}]
897 | ($(current page.north west)+(4,-15.5)$) rectangle ++(30,1.8);
898 |
899 | \shade[
900 | left color=RoyalBlue,
901 | right color=Emerald,
902 | rounded corners=0.75cm,
903 | transform canvas ={rotate around ={45:($(current page.north west)+(13,-10)$)}}]
904 | ($(current page.north west)+(13,-10)$) rectangle ++(15,1.5);
905 |
906 | \shade[
907 | left color=lightgray,
908 | rounded corners=0.3cm,
909 | transform canvas ={rotate around ={45:($(current page.north west)+(18,-8)$)}}]
910 | ($(current page.north west)+(18,-8)$) rectangle ++(15,0.6);
911 |
912 | \shade[
913 | left color=lightgray,
914 | rounded corners=0.4cm,
915 | transform canvas ={rotate around ={45:($(current page.north west)+(19,-5.65)$)}}]
916 | ($(current page.north west)+(19,-5.65)$) rectangle ++(15,0.8);
917 |
918 | \shade[
919 | left color=OrangeRed,
920 | right color=red!80,
921 | rounded corners=0.6cm,
922 | transform canvas ={rotate around ={45:($(current page.north west)+(20,-9)$)}}]
923 | ($(current page.north west)+(20,-9)$) rectangle ++(14,1.2);
924 |
925 | % Year
926 | \draw[ultra thick,gray]
927 | ($(current page.center)+(5,2)$) -- ++(0,-3cm)
928 | node[
929 | midway,
930 | left=0.25cm,
931 | text width=5cm,
932 | align=right,
933 | black!75
934 | ]
935 | {
936 | {\fontsize{25}{30} \selectfont \bf Lecture\\[10pt] Notes}
937 | }
938 | node[
939 | midway,
940 | right=0.25cm,
941 | text width=6cm,
942 | align=left,
943 | orange]
944 | {
945 | {\fontsize{72}{86.4} \selectfont #4}
946 | };
947 |
948 | % Title
949 | \node[align=center] at ($(current page.center)+(0,-5)$)
950 | {
951 | {\fontsize{60}{72} \selectfont {{#1}}} \\[1cm]
952 | {\fontsize{16}{19.2} \selectfont \textcolor{orange}{ \bf #2}}\\[3pt]
953 | #3};
954 | \end{tikzpicture}
955 | }
--------------------------------------------------------------------------------