texlive[65549] Master: zennote (15jan23)

commits+karl at tug.org commits+karl at tug.org
Sun Jan 15 21:54:58 CET 2023


Revision: 65549
          http://tug.org/svn/texlive?view=revision&revision=65549
Author:   karl
Date:     2023-01-15 21:54:58 +0100 (Sun, 15 Jan 2023)
Log Message:
-----------
zennote (15jan23)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/zennote/
    trunk/Master/texmf-dist/doc/latex/zennote/README.txt
    trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf
    trunk/Master/texmf-dist/doc/latex/zennote/zennote.tex
    trunk/Master/texmf-dist/tex/latex/zennote/
    trunk/Master/texmf-dist/tex/latex/zennote/zennote.sty
    trunk/Master/tlpkg/tlpsrc/zennote.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/zennote/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zennote/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/zennote/README.txt	2023-01-15 20:54:58 UTC (rev 65549)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/zennote/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf	2023-01-15 20:54:13 UTC (rev 65548)
+++ trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf	2023-01-15 20:54:58 UTC (rev 65549)

Property changes on: trunk/Master/texmf-dist/doc/latex/zennote/zennote.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/zennote/zennote.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zennote/zennote.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/zennote/zennote.tex	2023-01-15 20:54:58 UTC (rev 65549)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/zennote/zennote.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/zennote/zennote.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zennote/zennote.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/zennote/zennote.sty	2023-01-15 20:54:58 UTC (rev 65549)
@@ -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


Property changes on: trunk/Master/texmf-dist/tex/latex/zennote/zennote.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2023-01-15 20:54:13 UTC (rev 65548)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2023-01-15 20:54:58 UTC (rev 65549)
@@ -897,7 +897,7 @@
     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

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2023-01-15 20:54:13 UTC (rev 65548)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2023-01-15 20:54:58 UTC (rev 65549)
@@ -1467,6 +1467,7 @@
 depend yplan
 depend zebra-goodies
 depend zed-csp
+depend zennote
 depend ziffer
 depend zref
 depend zref-check

Added: trunk/Master/tlpkg/tlpsrc/zennote.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.