summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/notebeamer
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-12 03:02:06 +0000
committerNorbert Preining <norbert@preining.info>2023-11-12 03:02:06 +0000
commit5ee22d8ea7f225ba59142a53f0387a2bccc22dde (patch)
tree63ca211ff5ff12c7f756ac8a197726c314eb980b /macros/latex/contrib/notebeamer
parente4ccc7921b6518e670428990524161b3ddbfebd2 (diff)
CTAN sync 202311120302
Diffstat (limited to 'macros/latex/contrib/notebeamer')
-rw-r--r--macros/latex/contrib/notebeamer/doc/notebeamer-demo.pdfbin2978326 -> 2958248 bytes
-rw-r--r--macros/latex/contrib/notebeamer/doc/notebeamer-demo.tex4
-rw-r--r--macros/latex/contrib/notebeamer/doc/notebeamer-doc.pdfbin3049806 -> 3026901 bytes
-rw-r--r--macros/latex/contrib/notebeamer/doc/notebeamer-doc.tex78
-rw-r--r--macros/latex/contrib/notebeamer/tex/notebeamer.cls34
5 files changed, 64 insertions, 52 deletions
diff --git a/macros/latex/contrib/notebeamer/doc/notebeamer-demo.pdf b/macros/latex/contrib/notebeamer/doc/notebeamer-demo.pdf
index d36511b6f5..c6752e931b 100644
--- a/macros/latex/contrib/notebeamer/doc/notebeamer-demo.pdf
+++ b/macros/latex/contrib/notebeamer/doc/notebeamer-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/notebeamer/doc/notebeamer-demo.tex b/macros/latex/contrib/notebeamer/doc/notebeamer-demo.tex
index cadf4dfb76..3d4b7136b9 100644
--- a/macros/latex/contrib/notebeamer/doc/notebeamer-demo.tex
+++ b/macros/latex/contrib/notebeamer/doc/notebeamer-demo.tex
@@ -18,12 +18,12 @@
\notebook[H5]{AQM \& SPD}
\chapter[Introduction \& Fundamental Concepts]{newnote3sdemo.pdf}
% Insert the page 1--2, 4--6 of the file with the format 3 images per page
- \newnotesss{1}{2} \newnotesss{4}{6}
+ \newnotesss{1}{2} \newnotesss{3}{6}
\chapter[SPD Basic: Transport]{newnote4sdemo.pdf}
% Insert the page 1--2, 4--6, 7--10 of the file with the format 4 images per page
\newnotessss{1}{2} \newnotessss{4}{6} \newnotessss{7}{10}
% Create an empty note paper with no page number
- \emptynote*[3]
+ \emptynote*[2]
% Create an empty note paper with logo and info but no page number
\emptyhdunote*[2]
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/notebeamer/doc/notebeamer-doc.pdf b/macros/latex/contrib/notebeamer/doc/notebeamer-doc.pdf
index 4905a3c915..ace62f54d5 100644
--- a/macros/latex/contrib/notebeamer/doc/notebeamer-doc.pdf
+++ b/macros/latex/contrib/notebeamer/doc/notebeamer-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/notebeamer/doc/notebeamer-doc.tex b/macros/latex/contrib/notebeamer/doc/notebeamer-doc.tex
index 8caa538d0b..a0668e292c 100644
--- a/macros/latex/contrib/notebeamer/doc/notebeamer-doc.tex
+++ b/macros/latex/contrib/notebeamer/doc/notebeamer-doc.tex
@@ -49,8 +49,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\@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”}}
@@ -65,7 +64,7 @@
\ddmmyyyydate
\date{\today}
\affil[1]{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
-\date{\today\quad Version 2.0a\thanks{%
+\date{\today\quad Version 2.2b\thanks{%
\url{https://github.com/xiamyphys/NoteBeamer}}}
\begin{document}
\maketitle
@@ -87,7 +86,7 @@ If you meet bugs when using this template, or you have better suggestions or ide
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 \verb|draft| mode, \pkg{xparse} to provide the commands with star\footnote{This is an awful idea, because using the original command can be better than using a package.}\footnote{In the later versions, the template will change to use the original commands of \textsf\LaTeX{$2\varepsilon$} to avoid using the package \pkg{xparse}, which can improve the compilation efficiency in some ways.}, \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.
+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}
@@ -95,33 +94,39 @@ I strongly suggest that you should use cmd to implement the commands to update a
tlmgr update --all
\end{verbatim}
-If you are in some areas with awful Internet environment, you can choose proper mirror source or use other means\footnote{Please comply with local network regulations.}. 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?}
+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}
-Save the file \verb|notebeamer.cls| to your project's root directory, and then create a \verb|.tex| file, just input the command \verb|\documentclass{notebeamer}| on the first line.
+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 two modes, \mode{draft} and \mode{color}. Just add the options of the modes you want separately in the square bracket of the command \verb|\documentclass[options]{notebeamer}| in your \verb|.tex| file.
+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 \mode{draft} mode (with the support of package \pkg{graphics}), \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.
+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.
-\subsection{The \mode{normal}, \mode{lighter}, \& \mode{darker} modes}
-This mode can make the color of the covers you create in this template get lighter or darker, and the default opinion is \mode{normal}.
+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{times} \& \mode{libertinus} modes}
-This mode 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}.
+\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}
+ \author{Your Name} \mail{Your Mail Address}
+ \flyleaf{titlepage.pdf} \sticker{sticker.png}
\logo[link]{logofile.pdf}[info]
\end{verbatim}
\begin{itemize}
@@ -134,8 +139,6 @@ This mode can deside which font the notebook will use: The default \emph{New Tim
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.
-
- \item The files corresponding to the commands \verb|sticker|, \verb|logo| and \verb|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}.
\end{itemize}
\paragraph{The commands above are all repeatable, which can reassign the values that these commands assigned before.}
@@ -194,6 +197,9 @@ While considering the suggestions from friends, I am also thinking about how to
\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.
@@ -202,7 +208,7 @@ While considering the suggestions from friends, I am also thinking about how to
\item Add commands to create empty note paper with logo and info on the top.
\end{itemize}
-\datechange{\today}{Version 2.1a}
+\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.
@@ -213,6 +219,12 @@ While considering the suggestions from friends, I am also thinking about how to
\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}
@@ -223,22 +235,6 @@ While considering the suggestions from friends, I am also thinking about how to
\label{dirtree}
\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}
-\hfill
-\begin{minipage}{0.48\textwidth}
- \dirtree{%
.1 notebeamer/.
.2 doc/.
.3 images/.
@@ -252,6 +248,22 @@ While considering the suggestions from friends, I am also thinking about how to
.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}
diff --git a/macros/latex/contrib/notebeamer/tex/notebeamer.cls b/macros/latex/contrib/notebeamer/tex/notebeamer.cls
index 1827871355..e748552164 100644
--- a/macros/latex/contrib/notebeamer/tex/notebeamer.cls
+++ b/macros/latex/contrib/notebeamer/tex/notebeamer.cls
@@ -14,13 +14,13 @@
%% ************************************************************************************************************
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{notebeamer}[09/11/2023 v2.1a NoteBeamer document class]
+\ProvidesClass{notebeamer}[11/11/2023 v2.2b NoteBeamer document class]
%% Global opinions
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{family=NB, prefix=NB@, setkeys=\kvsetkeys}
-\newcommand{\ekv}[1]{\kvsetkeys{NB}{#1}}
+\def\ekv#1{\kvsetkeys{NB}{#1}}
\DeclareStringOption[normal]{color}
\DeclareVoidOption{lighter}{\ekv{color=lighter}}
@@ -43,10 +43,10 @@
\RequirePackage{fontawesome5}
%% Global definitions
-\newcommand{\notewidth}{6.32}
-\newcommand{\noteheight}{8.18}
-\renewcommand{\author}[1]{\gdef\@author{#1}}
-\newcommand{\mail}[1]{\gdef\@mail{\href{mailto:#1}{\nolinkurl{#1}}}}
+\def\notewidth{6.32}
+\def\noteheight{8.18}
+\def\author#1{\gdef\@author{#1}}
+\def\mail#1{\gdef\@mail{\href{mailto:#1}{\nolinkurl{#1}}}}
\NewDocumentCommand\chapter{s o m}{
\IfBooleanTF{#1}{}{
\refstepcounter{chap}
@@ -55,8 +55,8 @@
\gdef\@courseware{#3}
\setcounter{note}{0}
}
-\newcommand{\flyleaf}[1]{\gdef\@flyleaf{#1}}
-\newcommand{\sticker}[1]{\gdef\@sticker{#1}}
+\def\flyleaf#1{\gdef\@flyleaf{#1}}
+\def\sticker#1{\gdef\@sticker{#1}}
\NewDocumentCommand\logo{O{https://www.hdu.edu.cn} m O{Hangzhou·Zhejiang}}{\gdef\@edu{#1}\gdef\@logo{#2}\gdef\@address{#3}}
%% Fonts
@@ -78,10 +78,10 @@
\definecolor{紺色}{HTML}{223A70}
\newcounter{chap}
\newcounter{note}
-\newcommand{\chaptername}{\faIcon{seedling} Chapter}
+\def\chaptername{\faIcon{seedling} Chapter}
%%%% 1 note per page
-\newcommand{\newnote}[2]{
+\def\newnote#1#2{
\refstepcounter{note}
\addtocounter{note}{-1}
\foreach \n in {#1,...,#2}{
@@ -116,7 +116,7 @@
}
%%%% 3 beamers per page
-\newcommand{\threebeamers}[3]{
+\def\threebeamers#1#2#3{
\refstepcounter{note}
\begin{tikzpicture}
\fill [lightyellow!50] (0,0) rectangle (\notewidth in,\noteheight in);% 边界
@@ -124,7 +124,7 @@
%%%%%% imput file
\foreach \n in {#1,#2,#3}
- \node [yshift=((27.5-(\n-#1)*11+\thenote*33)*0.028*\noteheight in),inner sep=0pt] at (0.3125*\notewidth in,0.038*\noteheight in) {\ifcsname @chapter\endcsname\includegraphics[height=2.40492 in,page=\n]{\@courseware}\fi};
+ \node [yshift=(27.5-(\n-#1)*11)*0.028*\noteheight in,inner sep=0pt] at (0.3125*\notewidth in,0.038*\noteheight in) {\ifcsname @chapter\endcsname\includegraphics[height=2.40492 in,page=\n]{\@courseware}\fi};
%%%%%% draw lines & dots
\foreach \a in {0,...,33}
@@ -157,14 +157,14 @@
}
%%%% 4 slides per page
-\newcommand{\fourbeamers}[4]{
+\def\fourbeamers#1#2#3#4{
\refstepcounter{note}
\begin{tikzpicture}
\fill [lightyellow!50] (0,0) rectangle (\notewidth in,\noteheight in);% 边界
\ifcsname @sticker\endcsname\node [anchor=south east,opacity=0.24,inner sep=0pt] at (0.985*\notewidth in,0.012*\noteheight in) {\includegraphics[height=1.07158 in]{\@sticker}};\fi
%%%%%% imput file
\foreach \n in {#1,#2,#3,#4}
- \node [yshift=((28.875-(\n-#1)*8.25+\thenote*33)*0.028*\noteheight in),inner sep=0pt] at (0.3125*\notewidth in,0.038*\noteheight in) {\ifcsname @chapter\endcsname\includegraphics[height=1.77506 in,page=\n]{\@courseware}\fi};
+ \node [yshift=(28.875-(\n-#1)*8.25)*0.028*\noteheight in,inner sep=0pt] at (0.3125*\notewidth in,0.038*\noteheight in) {\ifcsname @chapter\endcsname\includegraphics[height=1.77506 in,page=\n]{\@courseware}\fi};
\foreach \a in {0,...,33}
\foreach \b in {18,...,29}
@@ -261,9 +261,9 @@
}
%% covers
-\ifdefstring{\NB@color}{lighter}{\newcommand{\@saturation}{.16}}{\relax}
-\ifdefstring{\NB@color}{normal}{\newcommand{\@saturation}{.12}}{\relax}
-\ifdefstring{\NB@color}{darker}{\newcommand{\@saturation}{.08}}{\relax}
+\ifdefstring{\NB@color}{lighter}{\def\@saturation{.16}}{\relax}
+\ifdefstring{\NB@color}{normal}{\def\@saturation{.12}}{\relax}
+\ifdefstring{\NB@color}{darker}{\def\@saturation{.08}}{\relax}
\definecolor{H1}{Hsb}{349,\@saturation,.9}% 海棠紅 (Hangzhou MTR L 1 )
\definecolor{H2}{Hsb}{23, \@saturation,.9}% 丹桂橙 (Hangzhou Metro 2 )