summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-11-25 21:10:57 +0000
committerKarl Berry <karl@freefriends.org>2024-11-25 21:10:57 +0000
commit069fb7867f6bf031e747c6924743abb152433a27 (patch)
tree01cb4806e5ba8ec42cadb44768b6f3cb648779f8 /Master
parent7445aeb46727cd429e74651e5bd7049268d8b841 (diff)
whatsnote (25nov24)
git-svn-id: svn://tug.org/texlive/trunk@72966 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdfbin520130 -> 230408 bytes
-rw-r--r--Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex32
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/litebook.cls26
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/litesolution.cls26
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/thmlist.sty27
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex139
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex8
-rw-r--r--Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls4
9 files changed, 135 insertions, 129 deletions
diff --git a/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf b/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf
index 1b62dc61e1b..bfd33d4fdfb 100644
--- a/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf
+++ b/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex b/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex
index 432e2c58bbd..0b402348f6b 100644
--- a/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex
+++ b/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex
@@ -11,7 +11,7 @@
\coverset
{
title = The \pkg{WhatsNote} Class,
- subtitle = Version 3.0A,
+ subtitle = Version 3.0B,
bioinfo = Mingyu Xia \url{<xiamyphys@gmail.com>},
color = MidnightBlue,
head = universe/3,
@@ -44,10 +44,11 @@
\subsection{Font}
-You can set \keys{\cmdmac~math-font}, \keys{\cmdmac~main-font},
-\keys{\cmdmac~sans-font} and \keys{\cmdmac~mono-font}.
+You can set \keys{\cmdmac~math-font} \keys{\cmdmac~main-font}
+\keys{\cmdmac~sans-font} \keys{\cmdmac~mono-font}.
The \keys{\cmdmac~CJK-font} can be set via \hologo{XeLaTeX} compiler.
+\begin{framed}
\begin{verbatim}
math-font = STIX Two Math,
main-font = { {Libertinus Serif} },
@@ -58,6 +59,7 @@ The \keys{\cmdmac~CJK-font} can be set via \hologo{XeLaTeX} compiler.
CJKsans-font = { {LXGW WenKai} [BoldFont = *-Medium, AutoFakeSlant] },
CJKmono-font = { {LXGW WenKai Mono} [BoldFont = *-Medium, AutoFakeSlant] },
\end{verbatim}
+\end{framed}
\scratch
\begin{solution}
@@ -73,25 +75,15 @@ will be hidden when enable this.
\section{Left Text \& Right Figure}
-\begin{framed}
- \begin{verbatim}
- \begin{textfig}[ key values ]
- <Left Content>
- \textfigsplit
- <Right Content>
- \end{textfig}
- \end{verbatim}
-\end{framed}
+\begin{verbatim}
+ \begin {textfig} [ ratio ]
+ <Left Content> \textfigsplit <Right Content>
+ \end {textfig}
+\end{verbatim}
-The keys in the environment \env{textfig} accepts the following values:
-\begin{tasks}[ label = \ensuremath\bullet ](2)
- \task \keys{\cmdmac~lefthand ratio} accepts float point number.
- \task \keys{\cmdmac~righthand ratio} accepts float point number.
- \task \keys{\cmdmac~lefthand width} accepts diameter.
- \task \keys{\cmdmac~righthand width} accepts diameter.
-\end{tasks}
+The keys in the environment \env{textfig} accepts a ratio that separate by a colon (\cmd:).
-\begin{textfig}[ lefthand ratio = .72 ]
+\begin{textfig}[ 3:2 ]
\begin{problem}[ text-fig layout]
\lipsum [ 1 ]
\begin{tasks}(4)
diff --git a/Master/texmf-dist/tex/latex/whatsnote/litebook.cls b/Master/texmf-dist/tex/latex/whatsnote/litebook.cls
new file mode 100644
index 00000000000..c7e038975c6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/whatsnote/litebook.cls
@@ -0,0 +1,26 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys@gmail.com> *
+%% *
+%% 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. *
+%% *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% ***********************************************************************
+\ProvidesExplClass {litebook} {2024/11/26} {0.2b}
+ {Now replaced by the whatsnote class}
+
+\msg_new:nnn { litebook } { Obsolete~LaTeX~Package }
+ { The~litebook~class~is~now~obsoleted.~
+ Please~load~the~`whatsnote'~class~instead,~or~
+ access~the~'obsolete~packages'~dictionary~on~CTAN. }
+\msg_error:nn { litebook } { Obsolete~LaTeX~Package }
+
+\LoadClass{minimal}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls b/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls
new file mode 100644
index 00000000000..4234fb2dbe2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls
@@ -0,0 +1,26 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys@gmail.com> *
+%% *
+%% 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. *
+%% *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% ***********************************************************************
+\ProvidesExplClass {litesolution} {2024/11/26} {2.4a}
+ {Now replaced by the whatsnote class}
+
+\msg_new:nnn { litesolution } { Obsolete~LaTeX~Package }
+ { The~litesolution~class~is~now~obsoleted.~
+ Please~load~the~`whatsnote'~class~instead,~or~
+ access~the~'obsolete~packages'~dictionary~on~CTAN. }
+\msg_error:nn { litesolution } { Obsolete~LaTeX~Package }
+
+\LoadClass{minimal}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty b/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty
new file mode 100644
index 00000000000..a8124be74ed
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty
@@ -0,0 +1,27 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys@gmail.com> *
+%% *
+%% 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. *
+%% *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% This work has the LPPL maintenance status `obsoleted'. *
+%% ***********************************************************************
+\ProvidesExplPackage {thmlist} {2024/11/26} {0.1b}
+ {Formally a part of the class litebook}
+
+\msg_new:nnn { thmlist } { Obsolete~LaTeX~Package }
+ { The~thmlist~package~is~now~obsoleted.~
+ Its~functions~are~contained~in~the~`whatsnote'~class,~
+ and~its~functions~are~highly~redundant~with~existing~packages,~
+ and~its~functions~can~be~very~easily~achieved~by~expl3.
+ Please~load~the~`whatsnote'~class~instead,~or~
+ access~the~'obsolete~packages'~dictionary~on~CTAN.
+ }
+\msg_error:nn { thmlist } { Obsolete~LaTeX~Package }
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex b/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex
index e6ebbb6adfe..19ab0f7b016 100644
--- a/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex
+++ b/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex
@@ -21,7 +21,7 @@
[ warnings-off = { mathtools-colon, mathtools-overbracket } ]
{unicode-math}
\tl_if_empty:NF \g__whatsnote_math_font
- { \setmathfont{ \g__whatsnote_math_font } }
+ { \setmathfont { \g__whatsnote_math_font } }
\usephysicsmodule{bm-um.legacy}
}
diff --git a/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex b/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex
index 3dead99c381..ff190de2293 100644
--- a/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex
+++ b/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex
@@ -1,11 +1,13 @@
\whatsnote_provide_module:n { layout }
-% \bool_if:NT \g__whatsnote_darkmode_bool
-% {
-% \pagecolor{black!90}
-% \hook_gput_code:nnn { env/document/before } { . }
-% { \color{gray!5}\global\let\default@color\current@color }
-% }
+\bool_if:NTF \g__whatsnote_darkmode_bool
+ {
+ \pagecolor{black!90}
+ \color{black!10}
+ \tl_set:Nn \l__whats_darkmode_fading_tl {!30}
+ \AtBeginDocument{\color_select:n{black!10}}
+ }
+ { \tl_new:N \l__whats_darkmode_fading_tl }
\def\@makechapterhead#1
{
@@ -39,121 +41,54 @@
\renewcommand*{\theproblem}{\arabic{problem}}
\setcounter{section}{0}
\setcounter{problem}{0}
- \vspace*{-35\p@}
{
\centering
\parindent \z@
\normalfont
\interlinepenalty\@M
\huge \bfseries #1\par\nobreak
- \vskip 30\p@
+ \vskip 40\p@
}
}
-\box_new:N \l__whats_left_box
-\box_new:N \l__whats_right_box
-\box_new:N \l__whats_seg_box
-\keys_define:nn { whats / textfig }
- {
- lefthand~ratio .fp_set:N = \l__whats_left_ratio_fp ,
- lefthand~ratio .initial:n = .64 ,
- lefthand~width .dim_set:N = \l__whats_left_dim ,
- righthand~ratio .fp_set:N = \l__whats_right_ratio_fp ,
- righthand~ratio .initial:n = .32 ,
- righthand~width .dim_set:N = \l__whats_right_dim ,
- sidebyside~gap .dim_set:N = \l__whats_gap_dim ,
- sidebyside~gap .initial:n = .02\linewidth ,
- before~left .tl_set:N = \l__whats_before_left_tl ,
- before~right .tl_set:N = \l__whats_before_right_tl ,
- }
-\cs_new_protected:Npn \textfigsplit
- {
- %% Width is too small! Abort!
- \dim_compare:nNnT \l__whats_right_dim > { 10sp }
- {
- \__whats_textfig_end_save:
- \__whats_textfig_save:NN \l__whats_right_box \l__whats_right_dim
- \l__whats_before_right_tl \ignorespaces
- }
- }
-\NewDocumentEnvironment{textfig}{ O{} }
- {
- \medskip \keys_set:nn { whats / textfig } {#1}
- \__whats_calc_width:
- \__whats_textfig_save:NN \l__whats_left_box \l__whats_left_dim
- \l__whats_before_left_tl \ignorespaces
- }
+\NewDocumentEnvironment{textfig}{O{7 \c_colon_str 2}}
{
- \__whats_textfig_end_save:
- \__whats_textfig_typeset:
- \medskip
- }
-\cs_new:Npn \__whats_calc_width:
- {
- \bool_lazy_and:nnTF
- { \dim_compare_p:nNn \l__whats_left_dim = \c_zero_dim }
- { \dim_compare_p:nNn \l__whats_right_dim = \c_zero_dim }
+ \group_begin:
+ \seq_set_split:Nee \l__whats_textfig_ratio_seq {\c_colon_str} {#1}
+ \vspace{4.5pt plus 1.5pt minus 1.5pt} \noindent
+ \minipage
{
- \bool_lazy_and:nnTF
- { \fp_compare_p:nNn { abs ( \l__whats_left_ratio_fp ) } < { 0.0001 } }
- { \fp_compare_p:nNn { abs ( \l__whats_right_ratio_fp ) } < { 0.0001 } }
- {
- \dim_set:Nn \l__whats_left_dim { 0.5\linewidth - 0.5\l__whats_gap_dim }
- \dim_set:Nn \l__whats_right_dim { \l__whats_left_dim }
- }
+ \fp_eval:n
{
- \fp_compare:nNnTF { abs ( \l__whats_left_ratio_fp ) } < { 0.0001 }
- {
- \dim_set:Nn \l__whats_right_dim
- {
- \fp_use:N \l__whats_right_ratio_fp
- \dimexpr \linewidth - \l__whats_gap_dim \relax
- }
- \dim_set:Nn \l__whats_left_dim
- { \linewidth - \l__whats_gap_dim - \l__whats_right_dim }
- }
- {
- \dim_set:Nn \l__whats_left_dim
- {
- \fp_use:N \l__whats_left_ratio_fp
- \dimexpr \linewidth - \l__whats_gap_dim \relax
- }
- \dim_set:Nn \l__whats_right_dim
- { \linewidth - \l__whats_gap_dim - \l__whats_left_dim }
- }
- }
- }
- {
- \dim_compare:nNnTF \l__whats_left_dim = \c_zero_dim
- {
- \dim_set:Nn \l__whats_left_dim
- { \linewidth - \l__whats_gap_dim - \l__whats_right_dim }
- }
- {
- \dim_set:Nn \l__whats_right_dim
- { \linewidth - \l__whats_gap_dim - \l__whats_left_dim }
- }
+ .96*\seq_item:Nn \l__whats_textfig_ratio_seq {1}/
+ (
+ \seq_item:Nn \l__whats_textfig_ratio_seq {1} +
+ \seq_item:Nn \l__whats_textfig_ratio_seq {2}
+ )
+ }\dimexpr \linewidth
}
}
-\cs_new:Npn \__whats_textfig_save:NN #1 #2
- {
- \hbox_set:Nw #1
- \minipage {#2}
- \setlength{\parindent}{0pt}
- }
-\cs_new:Npn \__whats_textfig_end_save:
{
\endminipage
- \hbox_set_end:
+ \vspace{4.5pt plus 1.5pt minus 1.5pt} \par
+ \group_end:
}
-\cs_new:Npn \__whats_textfig_typeset:
+
+\NewDocumentCommand \textfigsplit {}
{
- \hbox_to_wd:nn { \linewidth }
+ \endminipage
+ \hspace{.02\linewidth}
+ \minipage
{
- \hbox_unpack_drop:N \l__whats_left_box
- \hss
- \hbox_unpack_drop:N \l__whats_right_box
- }
+ \fp_eval:n
+ {
+ .96*\seq_item:Nn \l__whats_textfig_ratio_seq {2}/
+ (
+ \seq_item:Nn \l__whats_textfig_ratio_seq {1} +
+ \seq_item:Nn \l__whats_textfig_ratio_seq {2}
+ )
+ }\dimexpr \linewidth
+ }
}
\RequirePackage{ tasks, multirow, multicol }
diff --git a/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex b/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex
index fcde4a0aded..04a7b8fa783 100644
--- a/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex
+++ b/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex
@@ -1,7 +1,7 @@
\whatsnote_provide_module:n { theorem }
\RequirePackage
- { mathtools, amssymb, amsthm, cancel, extarrows,
+ { mathtools, amssymb, keytheorems, cancel, extarrows,
nicematrix, siunitx, physics2, fixdif, derivative }
\newtheorem{theorem}{Theorem}
@@ -19,17 +19,17 @@
{ \ensuremath { \mathcolor { gray } { \blacksquare } } }
\newtheorem { problem }
{
- \sffamily\scshape \color { DarkGreen }
+ \sffamily\scshape \color { DarkGreen \l__whats_darkmode_fading_tl }
\faIcon { pen-square }~Problem
} [ chapter ]
\newtheorem* { solution }
{
- \sffamily\scshape \color { MidnightBlue }
+ \sffamily\scshape \color { MidnightBlue \l__whats_darkmode_fading_tl }
\faIcon { check-square }~Solution
}
\newtheorem* { scratchwork }
{
- \sffamily\scshape \color { MidnightBlue }
+ \sffamily\scshape \color { MidnightBlue \l__whats_darkmode_fading_tl }
\faIcon { eraser }~Scratch~Work
}
\RequirePackage{comment}
diff --git a/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls b/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls
index 1915375e33b..235df439724 100644
--- a/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls
+++ b/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls
@@ -20,8 +20,8 @@
%% and README.md. *
%% available at https://github.com/xiamyphys/whatsnote *
%% ***********************************************************************
-\def\whatsnote@date{2024/11/11}
-\def\whatsnote@version{3.0A}
+\def\whatsnote@date{2024/11/26}
+\def\whatsnote@version{3.0B}
\ProvidesExplClass {whatsnote} {\whatsnote@date} {\whatsnote@version}
{LaTeX Class for taking Note}