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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
%% ******************************************************
%% * This work may be distributed and/or modified under *
%% * the conditions of the LaTeX Project Public License *
%% * http://www.latex-project.org/lppl.txt *
%% * either version 1.3c of this license or any later *
%% * version. *
%% ******************************************************
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{pdfpages}
\usepackage[level]{datetime}
\usepackage{unicode-math}
\usepackage{authblk}
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmonofont{NotoSansMono}[
Scale=MatchLowercase,
Extension=.ttf,
UprightFont=*-Light,
BoldFont=*-Medium
]
\makeatletter
\usepackage{listings,dirtree}
\lstdefinestyle{TeX}{
language = [LaTeX]TeX,
texcsstyle = *\color{H7},
numbers = none,
basicstyle = {\small\color{H6}\tt},
mathescape = false,
breaklines = true,
columns = fixed,
keywordstyle = \color{H3},
commentstyle = \color{darkgray},
tabsize = 2,
keywords = {mail,flyleaf,sticker,logo,notebook,chapter,newnote,newnotesss,newnotessss,emptynote,emptyhdunote}
}
\usepackage{hyperref,xcolor,verbatim}
\definecolor{pkgcolor}{Hsb}{103,.8,.5}
\definecolor{moducolor}{Hsb}{290,.8,.5}
\definecolor{cmdcolor}{Hsb}{188,.8,.5}
\definecolor{filecolor}{Hsb}{207,.6,.7}
\definecolor{H1}{Hsb}{349,.8,.8}% 海棠紅 (Hangzhou MTR L 1 )
\definecolor{H2}{Hsb}{23, .8,.8}% 丹桂橙 (Hangzhou Metro 2 )
\definecolor{H3}{Hsb}{48, .8,.8}% 柠檬黄 (Hangzhou Metro 3 )
\definecolor{H4}{Hsb}{103,.8,.8}% 香樟绿 (Hangzhou Metro 4 )
\definecolor{H5}{Hsb}{188,.8,.8}% 青藍色 (Hangzhou MTR L 5 )
\definecolor{H6}{Hsb}{207,.8,.8}% 海洋蓝 (Hangzhou Metro 6 )
\definecolor{H7}{Hsb}{290,.8,.8}% 浪漫紫 (Hangzhou Metro 7 )
\hypersetup{colorlinks,urlcolor=H1,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.1em}}
\def\@pkg#1{\texorpdfstring{\href{https://www.ctan.org/pkg/#1}{\textcolor{pkgcolor}{\textsf{#1}}}}{“#1”}}
\def\s@pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
\DeclareRobustCommand\pkg{\@ifstar\s@pkg\@pkg}
\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
\def\datechange#1#2{%
\noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
\noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
\makeatother
\title{The \pkg{NoteBeamer} Template}
\author[1]{Xia Ming Yu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
\ddmmyyyydate
\date{\today}
\affil[1]{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
\date{\today\quad Version 2.2b\thanks{%
\url{https://github.com/xiamyphys/NoteBeamer}}}
\begin{document}
\maketitle
\begin{abstract}
This is the document for \pkg{NoteBeamer} template, which provides a method to input Beamers on note papers and make notebook quickly.
\end{abstract}
\tableofcontents
\section{Introduction}
\subsection{The purpose of this template}
This template provides an easy way to input Beamers on note papers and make notebook quickly. It's optimized for Goodnotes' default paper size and there won't have difference between papers.
If you meet bugs when using this template, or you have better suggestions or ideas, or you want to participate in the development of the template or other templates by me, welcome to contact via email \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}.
Also, you can join my \textsf\LaTeX{} Template Discussion \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} to communicate with me and get the insider preview edition of the template.
\subsection{Packages required}
This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global opinions, \pkg{graphics} package to provides the \mode{draft} mode, \pkg{xparse} to provide the commands with star, \pkg{hyperref} package provides link jump function, \pkg{ctex} package to supports the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provides a set of beautiful icons.
I strongly suggest that you should use cmd to implement the commands to update all the packages to the latest version or switch to portable version instead.
\begin{verbatim}
tlmgr update --self
tlmgr update --all
\end{verbatim}
Remember to choose the proper mirror source in your region. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my TEX distribution?}
\subsection{Loading \pkg{NoteBeamer} and its modes}
Update your \sffamily\TeX distribution or just save the file \verb|notebeamer.cls| to your project's root directory, then create a \verb|.tex| file, just input the command \verb|\documentclass{notebeamer}| on the first line.
The template provides three modes: \mode{draft}, \mode{color} and \mode{font}. Just add the options of the modes separately by commas in the square bracket of the command in your \verb|.tex| file, such as
\begin{verbatim}
\documentclass[draft,dark,libertinus]{notebeamer}
\end{verbatim}
\section{Modes of \pkg{NoteBeamer}}
\subsection{The \mode{draft} mode}
Like most of the templates, this template also provide all modes provided by \pkg{graphics} package such as \mode{draft}, \sffamily\TeX{} will only read for size info of pages you input, and a box of the correct size is printed with the filename in.
This can accelerate the speed of compile and you can preview the effect quickly when you input a file with too many pages and (or) its size is too large. After you make sure that there's no formatting errors, you can cancel this mode just to wait until compiled.
The files corresponding to the commands \cmd{sticker}, \cmd{logo} and \cmd{flyleaf} can be stored in a folder named \verb|figure(s)|, \verb|image(s)|, \verb|graphic(s)| or \verb|picture(s)|, and you needn't to write these directories again in these commands because this template has already set these directories as indexes. Just as shown in the file tree in the example in \nameref{dirtree}.
\subsection{The \mode{color} mode}
This mode has three opinions, \mode{normal}, \mode{lighter} and \& \mode{darker}, which can make the color of the covers you create in this template get lighter or darker, and the default opinion is \mode{normal}.
\subsection{The \mode{font} mode}
This mode has two opinions, \mode{times} and \mode{libertinus}, which can deside which font the notebook will use: The default \emph{New Times Roman} font or the \emph{Libertinus} font. You can use Libertinus fonts if you've installed it on your computer, and the default opinion is \mode{times}.
\section{Commands of \pkg{NoteBeamer}}
\subsection{The \cmd{author}, \cmd{mail}, \cmd{flyleaf}, \cmd{sticker} and \cmd{logo} commands}
\begin{verbatim}
\author{Your Name} \mail{Your Mail Address}
\flyleaf{titlepage.pdf} \sticker{sticker.png}
\logo[link]{logofile.pdf}[info]
\end{verbatim}
\begin{itemize}
\item \cmd{author}, \cmd{mail} and \cmd{flyleaf} command.
There will be an author's name or (and) mail on the cover page after you use the command \cmd{author} or (and) \cmd{mail}, also a hyperlink will be added to the email address. A titlepage will automatically be added after the cover page after you use the command \cmd{flyleaf}.
\item \cmd{sticker} and \cmd{logo} command.
There will be a sticker on the south east of the note paper after you add, and there will be a logo on the north west corner of the cover page and HDU note paper; otherwise it won't.
The first and third variable of the command \cmd{logo} can assign the link and info of the logo, which are optional.
\end{itemize}
\paragraph{The commands above are all repeatable, which can reassign the values that these commands assigned before.}
\subsection{The \cmd{notebook} command}
\begin{verbatim}
\notebook[color]{title}[subtitle]
\end{verbatim}
This command can create a cover. There're 7 colors for the cover, these colors' Hues are from Hangzhou MTR line 1 -- 7, they are \textcolor{H1}{H1. \textsf{\href{https://en.wikipedia.org/wiki/Malus_spectabilis}{Haitang} Red}}, \textcolor{H2}{H2. \textsf{Dangui orange}}, \textcolor{H3}{H3. \textsf{Lemon yellow}}, \textcolor{H4}{H4. \textsf{Camphor green}}, \textcolor{H5}{H5. \textsf{Cyan}}, \textcolor{H6}{H6.\textsf{ Ocean Blue}} and \textcolor{H7}{H7. \textsf{Romantic purple}}.
Here, the second value \verb|title| is mandatory and it can add the title above the center of the cover page while the third value \verb|subtitle| is optional and it can add the subtitle vertically to the lower left of the center. The first variable is from \textcolor{H1}{H1} to \textcolor{H7}{H7} and the default value is \textcolor{H5}{H5}.
\subsection{The \cmd{chapter} command}
\begin{verbatim}
\chapter[chaptertitle]{filename} \chapter*[chaptertitle]{filename}
\end{verbatim}
This command has 2 variables: \verb|chaptertitle| and \verb|filename|, will assign the following chapter title and the file (such as PDF made from \textsf\LaTeX{}) will be inputted. Here, the value \verb|chaptertitle| is optional.
If a star (*) is added after this command, the counter \verb|chap| won't take effect.
\subsection{The \cmd{emptynote} \& \cmd{emptyhdunote} command}
\begin{verbatim}
\emptynote \emptynote* \emptyhdunote \emptyhdunote*
\emptynote[1] \emptynote*[2] \emptyhdunote[3] \emptyhdunote*[4]
\end{verbatim}
Command \cmd{emptynote} will create an empty note paper with the chapter title before and page number following the previous page, and command \cmd{emptyhdunote} will create an empty note paper with logo (may include link) and info were assigned by the command \cmd{logo} but without chapter title on the top of the note paper.
If a star (*) is added after this command, then the note paper created won't include the chapter title and page number. Also, the counter \verb|page| won't take effect.
There's one optional variable of these command, it decides the number of note papers you will create, and the default value is 1 certainly.
\subsection{The \cmd{newnote (sss) (ssss)} commands}
\begin{verbatim}
\newnote{start page}{end page} % insert 1 image per page
\newnotesss{start page}{end page} % insert 3 images per page
\newnotessss{start page}{end page} % insert 4 images per page
\end{verbatim}
These commands will create note papers that were inserted images on the left side, the two variables is the start page number and the end page number of the file that was already assigned by the second variable of the command \cmd{chapter}.
\section{Version History}
In the Advanced Quantum Mechanics class on 19 October, 2023, my \emph{obsessive-compulsive disorder} forced me to copy all the content projected by the teacher onto the whiteboard on my iPad, and I found that I only got a few pages full of notes without any knowledge understood in my brain after a class is over. Then, an idea suddenly occurred me: Why not create an automated program to quickly insert the Beamers given by the teacher before class with the format of several images per page? So I can just annotate on it and pay more attention to listen to the teacher. After the class ended that day, I went back to my dormitory and started writing programs in \textsf\LaTeX{}.
\textsf{\bfseries Version 1.0} was finished on 22 October, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3720.html}{LaTeX Studio} (Xiaoshan, Hangzhou) and \href{https://www.xiaohongshu.com/user/profile/61e7ad870000000010005642}{Xiaohongshu}, where won the favor of many people and even some people who have already retired from \textsf\LaTeX{} want to re-enter.
On 24 October, 2023, a member in the CMC competition WeChat group praised for my template, and proposed his idea: the template could be magically changed to insert a slightly smaller page of notes on the left side and take notes on the right side, because he found that he can only write in the corners when annotating some notes. It's a good idea, then I'm setting about developing the next version of the template.
While considering the suggestions from friends, I am also thinking about how to simplify the previous code. Because in version 1.0, if one want to insert a Beamer with 78 images and make 3 images per page, then he should write the command \cmd{newnotesss} for 26 times, it's so inelegant... However, no matter how I write the loop, it's can't meet my expectations or report errors. Then, I asked stackexchange for help, and finally a LaTeX programmer \href{https://tex.stackexchange.com/users/51799/wipet}{wipet} wrote the loop module for me. Here, I want to express my gratitude to him.
\textsf{\bfseries Version 2.0a} was finished developing on 1 November, 2023. This version not only simplified the commands to insert Beamers from to dozens of commands to only 1 command, but redesigned some details and functions. Firstly, this version supports to insert only one page of notes on the left side. What's more, this version supports to insert your school's logo on the cover page and empty note paper. Also, this version supports insert empty note papers without page number and chapter title with just add a star (*) after the command. Finally, this version can add a subtitle on the cover page, and redesign the colors (chosen from Hangzhou MTR) of the cover pages.
\textsf{\bfseries Version 2.1a} was finished developing on 9 November, 2023. This version has fixed some bugs, and now supports inserting non-consecutive page numbers of the same file, and you can inserting a certain number of empty note papers with only one command. Also, this version has redesigned the top and bottom margins and the height between note lines in response to the suggestion from \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group} member. What's more, this version supports the `Libertinus' font, which can make users have a better visual effect.
\textsf{\bfseries Version 2.2b} was finished developing on 11 November, 2023. This version has fixed some bugs, and partical commands in this version has changed to use \sffamily\LaTeX{2e} original commands.
\newpage
\datechange{01/11/2023}{Version 2.0a}
\begin{itemize}
\item Simplify the command of inserting 3 \& 4 images per page.
\item Redesign the cover page \& note paper title.
\item Add commands to create empty note paper with(out) chapter title \& page number.
\item Add commands to create empty note paper with logo and info on the top.
\end{itemize}
\datechange{09/11/2023}{Version 2.1a}
\begin{itemize}
\item Fixed the bug of page number errors when inserting the titlepage.
\item Fixed the bug of picture string position when inserting the first page number of courseware when the page number is not 1.
\item Supports inserting non-consecutive page numbers of the same file.
\item Supports inserting a certain number of empty note papers \& HDU empty note papers with only one command.
\item Support the `Libertinus' font.
\item Increased the top and bottom margins of the page by 18.8\% than before.
\item Other detailed adjustments.
\end{itemize}
\datechange{\today}{Version 2.2b}
\begin{itemize}
\item Fixed the image position error when inserting 3 and 4 images per note page.
\item Partially using \sffamily\LaTeX{2e} original commands.
\end{itemize}
\newpage
\appendix
\section{Document Example}
\lstinputlisting[style=TeX]{notebeamer-demo.tex}
\vspace{0.5em}\hrule\vspace{0.5em}
\label{dirtree}
\begin{minipage}{0.48\textwidth}
\dirtree{%
.1 notebeamer/.
.2 doc/.
.3 images/.
.3 notebeamer-demo.tex.
.3 notebeamer-demo.pdf.
.3 notebeamer-doc.tex.
.3 notebeamer-doc.pdf.
.2 tex/.
.3 notebeamer.cls.
.2 License.
.2 README.md.
}
\end{minipage}
\hfill
\begin{minipage}{0.48\textwidth}
\dirtree{%
.1 doc/.
.2 images/.
.3 HDU.pdf.
.3 Inuyasa.jpg.
.3 titlepage1.pdf.
.3 titlepage2.pdf.
.3 newnotedemo.pdf.
.3 newnote3sdemo.pdf.
.3 newnote4sdemo.pdf.
.2 notebeamer-demo.tex.
.2 notebeamer-demo.pdf.
}
\end{minipage}
\includepdf[pages=-,nup=4x4]{notebeamer-demo.pdf}
\end{document}
|