summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-15 20:54:58 +0000
committerKarl Berry <karl@freefriends.org>2023-01-15 20:54:58 +0000
commitdbe13a8c559cf436f66cae202a5fb2b5855151af (patch)
tree32894466f6c0d92f7340e4eaaa22d46880a40c35
parentd514993bbf89481a115b14b40cc967ecabf8f478 (diff)
zennote (15jan23)
git-svn-id: svn://tug.org/texlive/trunk@65549 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/zennote/README.txt25
-rw-r--r--Master/texmf-dist/doc/latex/zennote/zennote.pdfbin0 -> 72865 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zennote/zennote.tex206
-rw-r--r--Master/texmf-dist/tex/latex/zennote/zennote.sty94
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/zennote.tlpsrc0
7 files changed, 327 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/zennote/README.txt b/Master/texmf-dist/doc/latex/zennote/README.txt
new file mode 100644
index 00000000000..3115509c613
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zennote/README.txt
@@ -0,0 +1,25 @@
+Package Name
+
+zennote (Please read the documentation on CTAN for detailed usage.)
+
+
+
+Author
+
+Yifan Liang (Github User Name: futurelyf)
+You may contact me via Github.
+
+
+
+Basic Functions
+
+This 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 notenumber with the \titlebox command.
+The 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.
+
+
+
+License
+
+This work is licensed under Creative Commons ”Attribution 4.0 International” license.
+For detailed information about the license, please visit the Creative Commons’ website. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/zennote/zennote.pdf b/Master/texmf-dist/doc/latex/zennote/zennote.pdf
new file mode 100644
index 00000000000..a8fe571a5ac
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zennote/zennote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zennote/zennote.tex b/Master/texmf-dist/doc/latex/zennote/zennote.tex
new file mode 100644
index 00000000000..48c59db9eba
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/zennote/zennote.tex
@@ -0,0 +1,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} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/zennote/zennote.sty b/Master/texmf-dist/tex/latex/zennote/zennote.sty
new file mode 100644
index 00000000000..2bb39f0d496
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/zennote/zennote.sty
@@ -0,0 +1,94 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zennote}[2023/01/10 Version 1.0.0]
+
+\RequirePackage[most]{tcolorbox}
+
+\newcounter{notenumber}
+\setcounter{notenumber}{1}
+\counterwithin{equation}{notenumber}
+\counterwithin{figure}{notenumber}
+\counterwithin{table}{notenumber}
+\AtBeginDocument{\counterwithin{lstlisting}{notenumber}}
+\ExplSyntaxOn
+\keys_define:nn{titlebox}{
+ top-left.tl_set:N = \l_titlebox_topleft_tl,
+ top-right.tl_set:N = \l_titlebox_topright_tl,
+ bottom-left.tl_set:N = \l_titlebox_bottomleft_tl,
+ bottom-right.tl_set:N = \l_titlebox_bottomright_tl,
+ notenumber.code:n = {\setcounter{notenumber}{#1}},
+ topic.tl_set:N = \l_titlebox_topic_tl,
+ type.tl_set:N = \l_titlebox_type_tl,
+}
+
+\NewDocumentCommand{\titlebox}{m}{
+ \group_begin:
+ \keys_set:nn{titlebox}{#1}
+ \begin{center}
+ \framebox{
+ \vbox{\vspace{2mm}
+ \hbox to .98\textwidth {\hspace*{2mm}\tl_use:N \l_titlebox_topleft_tl
+ \hfill \tl_use:N \l_titlebox_topright_tl\hspace*{2mm}}
+ \vspace{4mm}
+ \hbox to .98\textwidth { \large\hfill \tl_use:N \l_titlebox_type_tl{~}\thenotenumber\c_colon_str {~} \tl_use:N \l_titlebox_topic_tl \hfill}
+ \vspace{2mm}
+ \hbox to .98\textwidth {\hspace*{2mm}\tl_use:N \l_titlebox_bottomleft_tl \hfill \tl_use:N \l_titlebox_bottomright_tl\hspace*{2mm}}
+ \vspace{2mm}}
+ }
+ \end{center}
+ \group_end:
+}
+
+\tl_new:N \l_noteframe_style_tl
+
+\tl_const:Nn \c_noteframe_style_zero_tl {}
+\tl_const:Nn \c_noteframe_style_one_tl {
+ borderline~west={3pt}{0pt}{\l_noteframe_color_tl!85!black}
+}
+\tl_const:Nn \c_noteframe_style_two_tl {
+ borderline~west={3pt}{0pt}{\l_noteframe_color_tl!85!black},
+ borderline~east={3pt}{0pt}{\l_noteframe_color_tl!85!black}
+}
+
+\keys_define:nn{noteframe}{
+ color.tl_set:N = \l_noteframe_color_tl,
+ style.tl_set:N = \l_noteframe_style_tl,
+ title.tl_set:N = \l_noteframe_title_tl,
+}
+
+\keys_set:nn{noteframe}{
+ color = {cyan},
+ style = {one},
+ title = {}
+}
+
+\NewDocumentEnvironment{noteframe}{O{}+b}{
+ \group_begin:
+
+ \keys_set:nn{noteframe}{#1}
+ \use:x {
+ \exp_not:n{\begin{tcolorbox}}[
+ enhanced,
+ boxrule=0pt,
+ frame~hidden,
+ \exp_not:v {c_noteframe_style_ \l_noteframe_style_tl _tl},
+ colback=\tl_use:N \l_noteframe_color_tl!10!white,
+ sharp~corners
+ ]
+ \exp_not:n{
+ \tl_if_empty:NTF\l_noteframe_title_tl{}{
+ \textbf{\Large \textcolor{\tl_use:N \l_noteframe_color_tl!85!black}{\tl_use:N \l_noteframe_title_tl}\\\vspace*{-2mm}\\ }
+ }
+ #2
+ \end{tcolorbox}
+ }
+ \group_end:
+ }
+}{
+
+}
+
+\ExplSyntaxOff
+
+\pagestyle{plain}
+
+\endinput \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 5fb024da711..f5e6d34bf12 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -897,7 +897,7 @@ my @TLP_working = qw(
yb-book ycbook ydoc yet-another-guide-latex2e
yfonts yfonts-otf yfonts-t1 yhmath
yinit-otf york-thesis youngtab yplan yquant ytableau
- zapfchan zapfding zbmath-review-template zebra-goodies zed-csp
+ zapfchan zapfding zbmath-review-template zebra-goodies zed-csp zennote
zhlineskip zhlipsum zhnumber zhmetrics zhmetrics-uptex zhspacing
ziffer zitie zlmtt zootaxa-bst zref zref-check zref-clever zref-vario
zwgetfdate zwpagelayout
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index d30b27ad063..0ffe772f490 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -1467,6 +1467,7 @@ depend ydoc
depend yplan
depend zebra-goodies
depend zed-csp
+depend zennote
depend ziffer
depend zref
depend zref-check
diff --git a/Master/tlpkg/tlpsrc/zennote.tlpsrc b/Master/tlpkg/tlpsrc/zennote.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/zennote.tlpsrc