texlive[72966] Master/texmf-dist: whatsnote (25nov24)
commits+karl at tug.org
commits+karl at tug.org
Mon Nov 25 22:10:57 CET 2024
Revision: 72966
https://tug.org/svn/texlive?view=revision&revision=72966
Author: karl
Date: 2024-11-25 22:10:57 +0100 (Mon, 25 Nov 2024)
Log Message:
-----------
whatsnote (25nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf
trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex
trunk/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex
trunk/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex
trunk/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex
trunk/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex/whatsnote/litebook.cls
trunk/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls
trunk/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty
Modified: trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex 2024-11-25 09:18:37 UTC (rev 72965)
+++ trunk/Master/texmf-dist/doc/latex/whatsnote/whatsnote.tex 2024-11-25 21:10:57 UTC (rev 72966)
@@ -11,7 +11,7 @@
\coverset
{
title = The \pkg{WhatsNote} Class,
- subtitle = Version 3.0A,
+ subtitle = Version 3.0B,
bioinfo = Mingyu Xia \url{<xiamyphys at 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 @@
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 @@
\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)
Added: trunk/Master/texmf-dist/tex/latex/whatsnote/litebook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/litebook.cls (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/litebook.cls 2024-11-25 21:10:57 UTC (rev 72966)
@@ -0,0 +1,26 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys at 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
Property changes on: trunk/Master/texmf-dist/tex/latex/whatsnote/litebook.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls 2024-11-25 21:10:57 UTC (rev 72966)
@@ -0,0 +1,26 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys at 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
Property changes on: trunk/Master/texmf-dist/tex/latex/whatsnote/litesolution.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty 2024-11-25 21:10:57 UTC (rev 72966)
@@ -0,0 +1,27 @@
+%% ***********************************************************************
+%% Copyright 2024 by M.Y. XIA <xiamyphys at 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
Property changes on: trunk/Master/texmf-dist/tex/latex/whatsnote/thmlist.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex 2024-11-25 09:18:37 UTC (rev 72965)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/whats-font-module.code.tex 2024-11-25 21:10:57 UTC (rev 72966)
@@ -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}
}
Modified: trunk/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex 2024-11-25 09:18:37 UTC (rev 72965)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/whats-layout-module.code.tex 2024-11-25 21:10:57 UTC (rev 72966)
@@ -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 at color\current at 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,7 +41,6 @@
\renewcommand*{\theproblem}{\arabic{problem}}
\setcounter{section}{0}
\setcounter{problem}{0}
- \vspace*{-35\p@}
{
\centering
\parindent \z@
@@ -46,114 +47,48 @@
\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 }
+\NewDocumentEnvironment{textfig}{O{7 \c_colon_str 2}}
{
- 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 }
+ \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
{
- \__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
- }
- {
- \__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 }
- {
- \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 } }
+ \fp_eval:n
{
- \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_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 }
- }
- }
+ .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
}
- {
- \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 }
- }
- }
}
-\cs_new:Npn \__whats_textfig_save:NN #1 #2
{
- \hbox_set:Nw #1
- \minipage {#2}
- \setlength{\parindent}{0pt}
+ \endminipage
+ \vspace{4.5pt plus 1.5pt minus 1.5pt} \par
+ \group_end:
}
-\cs_new:Npn \__whats_textfig_end_save:
+
+\NewDocumentCommand \textfigsplit {}
{
\endminipage
- \hbox_set_end:
- }
-\cs_new:Npn \__whats_textfig_typeset:
- {
- \hbox_to_wd:nn { \linewidth }
+ \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 }
Modified: trunk/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex 2024-11-25 09:18:37 UTC (rev 72965)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/whats-theorem-module.code.tex 2024-11-25 21:10:57 UTC (rev 72966)
@@ -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}
Modified: trunk/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls 2024-11-25 09:18:37 UTC (rev 72965)
+++ trunk/Master/texmf-dist/tex/latex/whatsnote/whatsnote.cls 2024-11-25 21:10:57 UTC (rev 72966)
@@ -20,8 +20,8 @@
%% and README.md. *
%% available at https://github.com/xiamyphys/whatsnote *
%% ***********************************************************************
-\def\whatsnote at date{2024/11/11}
-\def\whatsnote at version{3.0A}
+\def\whatsnote at date{2024/11/26}
+\def\whatsnote at version{3.0B}
\ProvidesExplClass {whatsnote} {\whatsnote at date} {\whatsnote at version}
{LaTeX Class for taking Note}
More information about the tex-live-commits
mailing list.