summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/zennote/zennote.tex
blob: 48c59db9ebab1584b190069bdfc1af166c1b4445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
\documentclass{article}
\usepackage[margin = 1in]{geometry}
% packages %
\usepackage{graphicx}
\usepackage{tabularray}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[dvipsnames]{xcolor} 
\usepackage{caption}
\usepackage{hologo}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage[hidelinks]{hyperref}
\usepackage[type={CC},modifier={by},version={4.0}]{doclicense}
\usepackage{zennote}
% format %
\setlength{\parindent}{0pt}
\linespread{1.3}
\renewcommand{\contentsname}{\centering Table of Contents}
% font %
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\newfontfamily\textcm{CMU Serif}
\hypersetup{
    colorlinks = True,
    allcolors = cyan
    }


% document %
\begin{document}

\titlebox{
    top-left = {{\bf{\textcm \LaTeX}}},
    top-right = {{\bf Packages}},
    bottom-left = {{\sl Author: Yifan Liang}},
    bottom-right = {{\sl Version: 1.0.0}},
    notenumber = {1},
    topic = {{\tt zennote} for Fancy Notes},
    type = {Manual}
    }


\begin{tblr}{
cell{1}{1} = {r=2}{},
colspec = {X[1]|X[20]}
}
\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. \\
  & The {\tt zennote} package itself can be compiled in any major {\textcm \hologo{LaTeX}} compiler.
\end{tblr}


\thispagestyle{empty}
\tableofcontents

\newpage
\setcounter{page}{1}

\section{Introduction}
\subsection{Basic Functions}
This {\tt zennote} package aims to provide you with an easy interface to speed up the process when organizing and producing elegant notes.\\
\\
All the tables, figures, equations, and listings are labeled according to the {\tt notenumber} with the \verb+\titlebox+ command.\\
\\
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.

\subsection{License}
This work is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons "Attribution 4.0 International" license}.\\
\\
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.
\\
\begin{flushright}
    \doclicenseImage
\end{flushright}

\newpage

\section{Note Title}
{\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:
\begin{itemize}
    \item \verb+top-left+, Text on Top-Left Corner;
    \item \verb+top-right+, Text on Top-Right Corner;
    \item \verb+bottom-left+, Text on Bottom-Left Corner;
    \item \verb+bottom-right+, Text on Bottom-Right Corner;
    \item \verb+notenumber+, Note Number;
    \item \verb+topic+, Note Topic;
    \item \verb+type+, Note Type (e.g. Chapter, Unit, Note).
\end{itemize}

\subsection{Usage}
\begin{flushleft}
\begin{verbatim}
\titlebox{
    top-left = {topleft},
    top-right = {topright},
    bottom-left = {bottomleft},
    bottom-right = {bottomright},
    notenumber = {1},
    topic = {topic},
    type = {Note}
}    
\end{verbatim}
\end{flushleft}

\subsection{Result}
\titlebox{
    top-left = {topleft},
    top-right = {topright},
    bottom-left = {bottomleft},
    bottom-right = {bottomright},
    notenumber = {1},
    topic = {topic},
    type = {Note}
} 

\newpage

\section{Note Highlighter}
{\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:
\begin{itemize}
    \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};
    \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+;
    \item \verb+title+, The title of the frame.
\end{itemize}

\subsection{Examples}
\subsubsection{Usage 1}
\begin{flushleft}
\begin{verbatim}
\begin{noteframe}[title = {Default}]
    Cyan Box Example Content.
\end{noteframe}
\end{verbatim}
\end{flushleft}

\subsubsection{Result 1}
\begin{noteframe}[title = {Default}]
    Cyan Box Example Content.
\end{noteframe}

\begin{flushright}
{\sl (To be continued on the next page...)}
\end{flushright}

\newpage

\subsubsection{Usage 2}
\begin{flushleft}
\begin{verbatim}
\begin{noteframe}[
    title = {style: two and color: LimeGreen},
    color = {LimeGreen},
    style = {two}
]
    LimeGreen Box Example Content.
    \begin{align}
        a^2 + b^2 = c^2
    \end{align}
\end{noteframe}
\end{verbatim}
\end{flushleft}

\subsubsection{Result 2}
\begin{noteframe}[
    title = {style: two and color: LimeGreen},
    color = {LimeGreen},
    style = {two}
]
    LimeGreen Box Example Content.
    \begin{align}
        a^2 + b^2 = c^2
    \end{align}
\end{noteframe}

\begin{flushright}
{\sl (To be continued on the next page...)}
\end{flushright}

\newpage

\subsubsection{Usage 3}
\begin{flushleft}
\begin{verbatim}
\begin{noteframe}[style = {zero}]
    Cyan Box Example Content.
    \begin{center}
        \includegraphics[width = 5cm]{example-image-a}
        \captionof{figure}{this is a picture.}
    \end{center}
\end{noteframe}
\end{verbatim}
\end{flushleft}

\subsubsection{Result 3}
\begin{noteframe}[style = {zero}]
    Cyan Box Example Content.
    \begin{center}
        \includegraphics[width = 5cm]{example-image-a}
        \captionof{figure}{this is a picture.}
    \end{center}
\end{noteframe}

\subsection{Caveats}
It is crucial to write \verb+\usepackage{zennote}+ \textbf{\textit{after}} \verb+\usepackage[dvipsnames]{xcolor}+ to prevent potential error when coloring the frame.

\end{document}