Debian Codegraph @

texmf-dist/doc/latex/zennote/zennote.tex

raw
1 \documentclass{article}
2 \usepackage[margin = 1in]{geometry}
3 % packages %
4 \usepackage{graphicx}
5 \usepackage{tabularray}
6 \usepackage{amsmath}
7 \usepackage{amssymb}
8 \usepackage[dvipsnames]{xcolor}
9 \usepackage{caption}
10 \usepackage{hologo}
11 \usepackage{fontspec}
12 \usepackage{unicode-math}
13 \usepackage[hidelinks]{hyperref}
14 \usepackage[type={CC},modifier={by},version={4.0}]{doclicense}
15 \usepackage{zennote}
16 % format %
17 \setlength{\parindent}{0pt}
18 \linespread{1.3}
19 \renewcommand{\contentsname}{\centering Table of Contents}
20 % font %
21 \setmainfont{TeX Gyre Pagella}
22 \setmathfont{TeX Gyre Pagella Math}
23 \newfontfamily\textcm{CMU Serif}
24 \hypersetup{
25 colorlinks = True,
26 allcolors = cyan
27 }
28
29
30 % document %
31 \begin{document}
32
33 \titlebox{
34 top-left = {{\bf{\textcm \LaTeX}}},
35 top-right = {{\bf Packages}},
36 bottom-left = {{\sl Author: Yifan Liang}},
37 bottom-right = {{\sl Version: 1.0.0}},
38 notenumber = {1},
39 topic = {{\tt zennote} for Fancy Notes},
40 type = {Manual}
41 }
42
43
44 \begin{tblr}{
45 cell{1}{1} = {r=2}{},
46 colspec = {X[1]|X[20]}
47 }
48 \textbf{Note} & This documentation/manual is suggested to be compiled in {\textcm \hologo{XeLaTeX}} or {\textcm \hologo{LuaLaTeX}}, and is available on the CTAN website. \\
49 & The {\tt zennote} package itself can be compiled in any major {\textcm \hologo{LaTeX}} compiler.
50 \end{tblr}
51
52
53 \thispagestyle{empty}
54 \tableofcontents
55
56 \newpage
57 \setcounter{page}{1}
58
59 \section{Introduction}
60 \subsection{Basic Functions}
61 This {\tt zennote} package aims to provide you with an easy interface to speed up the process when organizing and producing elegant notes.\\
62 \\
63 All the tables, figures, equations, and listings are labeled according to the {\tt notenumber} with the \verb+\titlebox+ command.\\
64 \\
65 The {\tt noteframe} environment helps you generate fancy colored boxes to emphasize the important information (e.g. Theorems, Equations, Proof, etc.) in your document. You can customize the style and color to denote different categories, too.
66
67 \subsection{License}
68 This work is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons "Attribution 4.0 International" license}.\\
69 \\
70 For detailed information about the license, please visit the Creative Commons' website by clicking the \textcolor{Cyan}{cyan text above} or the license image below.
71 \\
72 \begin{flushright}
73 \doclicenseImage
74 \end{flushright}
75
76 \newpage
77
78 \section{Note Title}
79 {\tt zennote} provides \verb+\titlebox{<settings>}+ command to generate the following title box for your note, where {\tt settings} help you set the key information of your note, including:
80 \begin{itemize}
81 \item \verb+top-left+, Text on Top-Left Corner;
82 \item \verb+top-right+, Text on Top-Right Corner;
83 \item \verb+bottom-left+, Text on Bottom-Left Corner;
84 \item \verb+bottom-right+, Text on Bottom-Right Corner;
85 \item \verb+notenumber+, Note Number;
86 \item \verb+topic+, Note Topic;
87 \item \verb+type+, Note Type (e.g. Chapter, Unit, Note).
88 \end{itemize}
89
90 \subsection{Usage}
91 \begin{flushleft}
92 \begin{verbatim}
93 \titlebox{
94 top-left = {topleft},
95 top-right = {topright},
96 bottom-left = {bottomleft},
97 bottom-right = {bottomright},
98 notenumber = {1},
99 topic = {topic},
100 type = {Note}
101 }
102 \end{verbatim}
103 \end{flushleft}
104
105 \subsection{Result}
106 \titlebox{
107 top-left = {topleft},
108 top-right = {topright},
109 bottom-left = {bottomleft},
110 bottom-right = {bottomright},
111 notenumber = {1},
112 topic = {topic},
113 type = {Note}
114 }
115
116 \newpage
117
118 \section{Note Highlighter}
119 {\tt zennote} provides \verb+noteframe+ environment to generate the following "highlighter boxes." Users can set the key values in options to customize the styles of the frame, which includes:
120 \begin{itemize}
121 \item \verb+color+, The color of the frame, which can be chosen from \verb+\usepackage[dvipsnames]{xcolor}+. The default color is \textcolor{cyan}{\bf cyan};
122 \item \verb+style+, The edge of the frame, which can be chosen from \verb+zero+, \verb+one+, and \verb+two+. The default edge style is \verb+one+;
123 \item \verb+title+, The title of the frame.
124 \end{itemize}
125
126 \subsection{Examples}
127 \subsubsection{Usage 1}
128 \begin{flushleft}
129 \begin{verbatim}
130 \begin{noteframe}[title = {Default}]
131 Cyan Box Example Content.
132 \end{noteframe}
133 \end{verbatim}
134 \end{flushleft}
135
136 \subsubsection{Result 1}
137 \begin{noteframe}[title = {Default}]
138 Cyan Box Example Content.
139 \end{noteframe}
140
141 \begin{flushright}
142 {\sl (To be continued on the next page...)}
143 \end{flushright}
144
145 \newpage
146
147 \subsubsection{Usage 2}
148 \begin{flushleft}
149 \begin{verbatim}
150 \begin{noteframe}[
151 title = {style: two and color: LimeGreen},
152 color = {LimeGreen},
153 style = {two}
154 ]
155 LimeGreen Box Example Content.
156 \begin{align}
157 a^2 + b^2 = c^2
158 \end{align}
159 \end{noteframe}
160 \end{verbatim}
161 \end{flushleft}
162
163 \subsubsection{Result 2}
164 \begin{noteframe}[
165 title = {style: two and color: LimeGreen},
166 color = {LimeGreen},
167 style = {two}
168 ]
169 LimeGreen Box Example Content.
170 \begin{align}
171 a^2 + b^2 = c^2
172 \end{align}
173 \end{noteframe}
174
175 \begin{flushright}
176 {\sl (To be continued on the next page...)}
177 \end{flushright}
178
179 \newpage
180
181 \subsubsection{Usage 3}
182 \begin{flushleft}
183 \begin{verbatim}
184 \begin{noteframe}[style = {zero}]
185 Cyan Box Example Content.
186 \begin{center}
187 \includegraphics[width = 5cm]{example-image-a}
188 \captionof{figure}{this is a picture.}
189 \end{center}
190 \end{noteframe}
191 \end{verbatim}
192 \end{flushleft}
193
194 \subsubsection{Result 3}
195 \begin{noteframe}[style = {zero}]
196 Cyan Box Example Content.
197 \begin{center}
198 \includegraphics[width = 5cm]{example-image-a}
199 \captionof{figure}{this is a picture.}
200 \end{center}
201 \end{noteframe}
202
203 \subsection{Caveats}
204 It is crucial to write \verb+\usepackage{zennote}+ \textbf{\textit{after}} \verb+\usepackage[dvipsnames]{xcolor}+ to prevent potential error when coloring the frame.
205
206 \end{document}