texlive[72444] Master/texmf-dist: litetable (1oct24)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 1 21:51:28 CEST 2024


Revision: 72444
          https://tug.org/svn/texlive?view=revision&revision=72444
Author:   karl
Date:     2024-10-01 21:51:28 +0200 (Tue, 01 Oct 2024)
Log Message:
-----------
litetable (1oct24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/litetable/README.md
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
    trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
    trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls

Modified: trunk/Master/texmf-dist/doc/latex/litetable/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/README.md	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/doc/latex/litetable/README.md	2024-10-01 19:51:28 UTC (rev 72444)
@@ -10,4 +10,4 @@
 
 This work has the LPPL maintenance status `maintained`.
 
-The Current Maintainer of this work is [Mingyu Xia](https://www.ctan.org/author/xia-my).
\ No newline at end of file
+The Current Maintainers of this work are [Mingyu Xia](https://www.ctan.org/author/xia-my) and [Lijun Guo](https://ctan.org/author/guo).
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex	2024-10-01 19:51:28 UTC (rev 72444)
@@ -1,179 +1,143 @@
 \documentclass[letterpaper]{l3doc}
 
+\hypersetup{urlcolor = teal, filecolor = violet}
 \usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
 \hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
+\FrameSep = 0pt
 \usepackage[fontset = none]{ctex}
-\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
 \usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
 
-\title{
-    \cls{litetable} 文档类:多彩的课程表
-    \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{
+  \bfseries\cls{litetable} 文档类:多彩的课程表
+  \thanks{\url{https://github.com/xiamyphys/litetable}}
 }
+\author
+{
+  夏明宇 \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
+  \thanks{\href{https://github.com/ljguo1020}{郭李军}开发了读取 \meta{left} -> \meta{right} 型数据结构模块和低版本 \hologo{TeX} Live 兼容模块.}
+}
+\date{Version 3.1B, \today}
 
-\author{夏明宇,杭州电子科技大学}
-
-\affil{\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}}
-
-\date{Version 3.0B, \today}
-
 \begin{document}
 
 \maketitle
 
-\begin{abstract}
-    本文档为 \cls{litetable} 文档类的用户手册. 该文档类提供了一个多彩的课程表设计. 欢迎通过邮件 \href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com} 或 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 提供建议或反馈bug. 本手册提供英文、\textbf{中文}和粤语版本.
-\end{abstract}
-
 \section{介绍}
 
-\subsection{所需宏包}
+\cls{litetable} 文档类提供了一个多彩的课程表设计,基于 \cls{article} 文档类,由 \pkg{expl3} 和 \pkg{tikz} 构建. 兼容发行版 \hologo{TeX} Live 2019 及更高版本,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. 本文档为 \cls{litetable} 文档类的中文用户手册,手册同时有\href{./litetable-en.pdf}{英文}和\href{./litetable-hk.pdf}{粤语}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
 
-该文档类基于 \cls{article} 文档类. 需要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 和 \pkg{xcolor} 宏包. 
+\section{载入 \cls{litetable} 并生成课程表框架}
 
-\subsection{兼容性}
-
-所需 \pkg{expl3} 宏包的版本需支持``e-type'' 变体,所以该文档类不能在 \hologo{TeX}Live 2023及更早的版本上运行. 所用的测试平台为 macOS 15.1 / Overleaf / Ubuntu 22.04.2,并使用 \hologo{TeX}Live 2024发行版,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. Windows 和 Unix 平台的兼容性未知.
-
-\section{使用}
-
-\subsection{载入 \cls{litetable} 并生成课程表框架}
-
 同加载其他文档类一样,只需写下
 
-\begin{Verbatim}
+\begin{framed}
+  \begin{verbatim}
     \documentclass{litetable}
-\end{Verbatim}
+  \end{verbatim}
+\end{framed}
 
-接下来的命令需要带有 \cmd{remember picture, overaly} 选项的 \cmd{tikzpicture} 环境.
+如需输入中文,可自行载入 \pkg{ctex} 宏包并设置字体.
 
-\subsubsection{命令:\cs{maketable}}
+\begin{function}{\timelist,\weeklist}
+  \begin{syntax}
+    \cs{timelist}\oarg{rows}\marg{time list}             \cs{timelist}\marg{time list}\oarg{rows}
+    \cs{weeklist}\oarg{default weeks}\marg{week list}    \cs{weeklist}\marg{week list}\oarg{default weeks}
+  \end{syntax}
 
-\begin{example}
-    \cs{maketable}\oarg{semester}\marg{title}
-\end{example}
+  命令 \cs{timelist} 的可选参数可强制设定课程表的行数,命令 \cs{weeklist} 的可选参数可设定默认的星期数目并会在每个课程盒子的右下角显示. 两个命令的强制参数均接收数组,可分别在课程表的左侧添加时间列表、在课程表的顶部添加对应宽度比例的工作日. 输入数组的用例见Appendix \ref{mwe}.
 
-此命令有两个参数,可生成一个空白的课程表框架. 第一个可选参数可在页面的右上角添加学期块,第二个强制参数可指定标题.
+  若命令 \cs{timelist} 中时间数组数大于强制设定的行数,则多余的时间数组将被忽略,并返回一个警告. 如果只需在课程表左侧添加一列序号,使强制参数为空即可.
+\end{function}
 
-\subsubsection{命令:\cs{more}}
-
-\begin{example}
+\begin{function}{\more}
+  \begin{syntax}
     \cs{more}\marg{comment}
-\end{example}
+  \end{syntax}
 
-此命令可在页面的右下角添加备注.
+  此命令可在页面的右下角添加备注.
+\end{function}
 
-\subsubsection{命令:\cs{timelist}}
+\begin{function}{\maketable}
+  \begin{syntax}
+    \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+  \end{syntax}
 
-\begin{example}
-    \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
+  此命令可生成一个空白的课程表框架,需在命令 \cs{timelist},\cs{weeklist} 和 \cs{more} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行. 可选参数接收键 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分别在设置课程表框架的背景色和在页面的右上角添加学期,键 \keys{\cmdmac~color} 的默认值为 \cmd{gray}. 强制参数可设定标题.
+\end{function}
 
-此命令有两个参数,第一个可选参数 \oarg{\#1} 可直接决定课程表的行数,第二个强制参数 \marg{\#2} 可在课程表的左侧添加时间列表. 输入数组的用例如下
+\section{添加课程盒子}
 
-\begin{Verbatim}
-    \timelist[13]{
-        08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
-        10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
-        14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
-        18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
-    }
-\end{Verbatim}
+\begin{function}{\course}
+  \begin{syntax}
+    \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+  \end{syntax}
 
-对于两个参数的不同使用情况,\cls{litetable} 会以如下规则生成对应行数的课程表框架.
+  \cs{course} 命令可在当前工作日添加课程盒子,需在命令 \cs{maketable} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行.
+  
+  此命令的可选参数接收下列键:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 键 \keys{\cmdmac~color} 默认值为 \cmd{teal},键 \keys{\cmdmac~weeks} 默认值由命令 \cs{weeklist} 的可选参数设定. 第一个和第二个强制参数分别为课程的开始和结束序号. 命令的用例见Appendix \ref{mwe}.
+  
+  \begin{itemize}
+    \item 若课程盒子的高度只有一格,即$\meta{start number} = \meta{end number}$,则键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \keys{\cmdmac~weeks} 的值将会隐藏.
+    \item 若键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 均未赋值,则键 \keys{\cmdmac~subject} 的值将输出在课程盒子中心.
+    \item 超出课程表工作日范围的课程盒子将不会显示,并返回一条警告.
+  \end{itemize}
+\end{function}
 
-\begin{table}[htbp]
-    \centering
-    \begin{tabularx}{.9\textwidth}{c X X}
-      \toprule
-        $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
-        \multicolumn{1}{c}{使用} &
-        \multicolumn{1}{c}{不使用}\\
-      \midrule
-        使用 &
-        效果与 \marg{\#2} 所描述的相同,但课程表的行数由 \oarg{\#1} 决定 &
-        效果与 \oarg{\#1} 所描述的相同\\
-      \midrule
-        不使用 &
-        效果与 \marg{\#2} 所描述的相同&
-        ERROR!\\
-      \bottomrule
-    \end{tabularx}
-\end{table}
+\begin{function}{\newday}
+  \begin{syntax}
+    \cs{newday}\oarg{integral value}
+  \end{syntax}
 
-\begin{itemize}
-    \item 若强制参数 \marg{\#2} 接收了$X$组时间,可选参数 \oarg{\#1} 接收的值为$X+a$,则课程表的左侧只有$1 \sim X$行会显示时间,后面几行不显示时间.
-    \item 若强制参数 \marg{\#2} 接收了$X+a$组时间,可选参数 \oarg{\#1} 接收的值为$X$, 则会生成只有$X$行的课程表,多余的时间组将被忽略,并返回一个警告.
-\end{itemize}
+  此命令可使其后面添加的课程盒子后移 \meta{intergal value} 个工作日. 可选参数的默认值为 \cmd{1},即后移 \cmd{1} 个工作日.
+\end{function}
 
-\subsubsection{命令:\cs{weeklist}}
+\clearpage
+\appendix
 
-\begin{example}
-    \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
+\section{最小工作示例}\label{mwe}
 
-此命令有两个参数. 第一个可选参数可决定默认的星期数并会在每个课程块的右下角显示,第二个强制参数可在课程表的顶部添加对应宽度比例的工作日. 输入列表的第一行为工作日格式,第二行为对应的宽度比例,两行之间用分号 (;) 分隔. 例如
+此MWE生成的课程表有13行但是只有前12行标注时间,课程表顶部共有5个工作日,工作日之间的宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 添加了注释和两个课程盒子.
 
-\begin{Verbatim}
-    \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
+\begin{framed}
+  \begin{verbatim}
+    \documentclass{litetable}
 
-\begin{figure}[!ht]
-    \centering
-    \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
-        \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
-        \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
-        \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
-        \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
-        \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
-        \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
-        \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
-        \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
-        \node [above] at (2*5 in/24,0) {Mon};
-        \node [above] at (6.5*5 in/24,0) {Tue};
-        \node [above] at (11*5 in/24,0) {Wed};
-        \node [above] at (16*5 in/24,0) {Thu};
-        \node [above] at (21.5*5 in/24,0) {Fri};
-    \end{tikzpicture}
-\end{figure}
+    \begin{document}
 
-此时 \cs{course} 命令中键 \keys{weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 如果输入的工作日的数量比输入的宽度比例数量多,则多余的工作日将被忽略并返回一条警告.
+    \timelist[13]
+    {
+      08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+      11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+      16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+    }
+    \weeklist[Weeks 1 - 16]
+    {
+      Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+    }
+    \more{Author: Mingyu Xia \& Lijun Guo}
 
-\subsection{添加课程块}
+    \begin{tikzpicture}[remember picture, overlay]
+      \maketable
+      \course [ subject = Keep on {\TeX}ing ] {10} {11}
+      \newday
+      \course [ color = DarkSlateGray, subject = litetable,
+                location = Hong Kong, teacher = M.Y. Xia
+              ] {8} {8}
+    \end{tikzpicture}
 
-使用 \cs{course} 命令在当前工作日添加课程块. 此命令有两个参数.
+    \end{document}
+  \end{verbatim}
+\end{framed}
 
-\begin{example}
-    \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
+\includepdf[pages = 1]{litetable-demo.pdf}
 
-第一个可选参数接收下列键:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 键 \keys{color} 的默认值为 \cmd{DarkSlateGray},键 \keys{weeks} 的默认值由命令 \cs{weeklist} 的第一个参数决定. 第二个和第三个强制参数分别为课程的开始和结束序号. \cs{course} 命令的用例如下
+\end{document}
 
-\begin{Verbatim}
-    \course [ color = DarkGreen, subject = listofitems, 
-              location = French, teacher = Christian Tellechea
-            ] {10} {12}
-\end{Verbatim}
-
-\begin{center}
-    \noindent\fbox{
-        \parbox{.96\linewidth}{
-            将此课程块的颜色设置为 \cmd{DarkGreen},此课程名称为 \cmd{listofitems},上课地点为 \cmd{French},教师为 \cmd{Christian Tellechea},在当日的第 \cmd{10} 节课开始,第 \cmd{12} 节课结束.
-        }
-    }
-\end{center}
-
-\begin{itemize}
-    \item 可通过 \cs{newday} 命令切换到下一个工作日.
-    \item 若课程块的高度只有一个单位,即$\marg{class start number} = \marg{class end number}$,则键 \keys{location} 和 \keys{teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \cmd{weeks} 的值将不会输出.
-    \item 若键 \keys{location} 和 \keys{teacher} 均未赋值,则键 \keys{subject} 的值将输出在课程块的中心.
-\end{itemize}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
\ No newline at end of file
+% End of file litetable-cn.tex

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex	2024-10-01 19:51:28 UTC (rev 72444)
@@ -3,68 +3,68 @@
 \usepackage{twemojis,newtxtext}
 \usepackage[scaled = .9]{helvet}
 \renewcommand*\familydefault{\sfdefault}
+
+\begin{document}
+
 \timelist [ 13 ]
 {
-    08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
-    10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
-    14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
-    18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+  08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
+  10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
+  14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
+  18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
 }
 \weeklist [ Weeks 1 - 16 ]
 {
-    \texttwemoji{1f312}\scshape~Mon -> 1,
-    \texttwemoji{1f525}\scshape~Tue -> 1,
-    \texttwemoji{1f30a}\scshape~Wed -> 1,
-    \texttwemoji{1f332}\scshape~Thu -> 1,
-    \texttwemoji{1fa99}\scshape~Fri -> 1
+  \scshape\texttwemoji{1f312} Mon -> 1,
+  \scshape\texttwemoji{1f525} Tue -> 1,
+  \scshape\texttwemoji{1f30a} Wed -> 1,
+  \scshape\texttwemoji{1f332} Thu -> 1,
+  \scshape\texttwemoji{1fa99} Fri -> 1
 }
+\more
+{
+  School Starts: 06 / 09 / 2024\quad Summer Vacation: 26 / 01 / 2025
+}
 
-\begin{document}
-
 \begin{tikzpicture}[remember picture, overlay]
-    \maketable [SEM 6] {Skyrmion's Timetable}
-    \newday
-    \course [ subject = {xia-my at ctan}] {4} {4}
-    \course [ color = DarkBlue, subject = interface3,
-              teacher = The {\LaTeX} Project
-            ] {7} {9}
-    \newday
-    \course [ color = FireBrick, subject = usrguide,
-              teacher = {\LaTeX} Project Team,
-              weeks = Weeks 7 - 14
-            ] {1} {2}
-    \newday
-    \course [ color = DarkSlateGray,
-              subject = Keep on {\TeX}ing
-            ] {7} {8}
-    \course [ color = DarkGreen, subject = listofitems,
-              location = French, teacher = Christian Tellechea
-            ] {10} {12}
-    \newday
-    \course [ color = Crimson,
-              subject = Ti\textit{k\/}Z\\library: calc,
-              teacher = The PGF/Ti\textit{k\/}Z Team
-            ] {3} {5}
-    \newday
-    \course [ color = DarkViolet, subject = xcolor,
-              weeks = Week 1 - 16, location = Germany,
-              teacher = Dr. Uwe Kern
-            ] {8} {8}
-    \more {School Starts: 06 / 09 / 2024\quad
-           Summer Vacation: 26 / 01 / 2025
-          }
+  \maketable [ color = MidnightBlue,
+               sem = SEM 6
+             ] { Skyrmion's Course Schedule }
+  \course [ color = DarkBlue, subject = interface3,
+            teacher = The {\LaTeX} Project
+          ] {4} {5}
+  \newday
+  \course [ color = Purple, subject = expl3,
+          teacher = The {\LaTeX} Project
+          ] {8} {8}
+  \course [ color = FireBrick, subject = usrguide,
+          teacher = {\LaTeX} Project Team, weeks = Weeks 7 - 14
+          ] {1} {2}
+  \newday
+  \course [ subject = Keep on {\TeX}ing ] {10} {11}
+  \newday
+  \course [ color = Crimson, subject = Ti\textit kZ,
+            teacher = The PGF/Ti\textit kZ Team
+          ] {3} {5}
+  \newday
+  \course [ color = DarkSlateGray, subject = litetable,
+            location = Hong Kong, teacher = M.Y. Xia
+          ] {8} {8}
 \end{tikzpicture}
 
 \clearpage
 
-\timelist[12]{}
-\weeklist[Weeks 1 - 16]
+\timelist [ 12 ] { }
+\weeklist [ Weeks 1 - 16 ]
 {
-    Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1
+  Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1
 }
 
 \begin{tikzpicture}[remember picture, overlay]
-    \maketable [SEM 7] {Skyrmion's Timetable}
+  \maketable { Skyrmion's Course Schedule }
+  %
 \end{tikzpicture}
 
-\end{document}
\ No newline at end of file
+\end{document}
+
+%%
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex	2024-10-01 19:51:28 UTC (rev 72444)
@@ -1,179 +1,143 @@
 \documentclass[letterpaper]{l3doc}
 
+\hypersetup{urlcolor = teal, filecolor = violet}
 \usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
 \hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
-% \usepackage[fontset = none]{ctex}
-\linespread{1.15}
+\FrameSep = 0pt
+\linespread{1.12}
 \usepackage{indentfirst}
 \setlength{\parindent}{2em}
 \usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
 
-\title{
-    The \cls{litetable} Class: Colorful Timetable
-    \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{
+  \bfseries
+  The \cls{litetable} Class: Colorful Timetable
+  \thanks{\url{https://github.com/xiamyphys/litetable}}
 }
+\author
+{
+  Mingyu Xia \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
+  \thanks{\href{https://github.com/ljguo1020}{Lijun Guo} developed modules for reading \meta{left} -> \meta{right} data structure and supporting low version \hologo {TeX} Live.}
+}
+\date{Version 3.1B, \today}
 
-\author{Mingyu Xia, Hangzhou Dianzi University}
-
-\affil{\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}}
-
-\date{Version 3.0B, \today}
-
 \begin{document}
 
 \maketitle
 
-\begin{abstract}
-    This is the manual for \cls{litetable} class, which provides a design of timetable with colorful course blocks. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com} or \href{https://github.com/xiamyphys/litetable/issues}{GitHub}. This manual is available in three versions: \textbf{English}, Chinese, and Cantonese.
-\end{abstract}
-
 \section{Introduction}
 
-\subsection{Packages required}
+The \cls{litetable} class provides a design of timetable with colorful course boxes, which is based on the \cls{article} class, and conducted on \pkg{expl3} and \pkg{tikz}. It is compatible with \hologo{TeX}Live 2019 or later distributions, they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. This is the Chinese manual for the \cls{litetable} class, manuals in \href{./litetable-cn.pdf}{Chinese} and \href{./litetable-hk.pdf}{Cantonese} versions are also provided\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
 
-This class is based on the \cls{article} class. It requires \pkg{expl3}, \pkg{xparse}, \pkg{tikz}, \pkg{listofitems}, and \pkg{xcolor} packages. 
+\section{Loading \cls{litetable} and generate the timetable frame}
 
-\subsection{Compatibility}
-
-The required version of the \pkg{expl3} package should support ``e-type'' variants, so it cannot run on the version of \hologo{TeX}Live 2023 or earlier. The test platforms are macOS 15.1 / Overleaf / Ubuntu 22.04.2 with \hologo{TeX}Live 2024 distribution. They all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows and Unix platforms' compatibility is unknown.
-
-\section{Usage}
-
-\subsection{Loading \cls{litetable} and generate the timetable frame}
-
 Just like loading any class, write
 
-\begin{Verbatim}
+\begin{framed}
+  \begin{verbatim}
     \documentclass{litetable}
-\end{Verbatim}
+  \end{verbatim}
+\end{framed}
 
-The following commands need the \cmd{tikzpicture} environment with \cmd{remember picture, overaly} option.
+One can load the \pkg{ctex} package and set the font to input the CJK characters, if necessary.
 
-\subsubsection{The \cs{maketable} command}
+\begin{function}{\timelist,\weeklist}
+  \begin{syntax}
+    \cs{timelist}\oarg{rows}\marg{time list}             \cs{timelist}\marg{time list}\oarg{rows}
+    \cs{weeklist}\oarg{default weeks}\marg{week list}    \cs{weeklist}\marg{week list}\oarg{default weeks}
+  \end{syntax}
 
-\begin{example}
-    \cs{maketable}\oarg{semester}\marg{title}
-\end{example}
+  The optional argument of the command \cs{timelist} can force the number of rows on the timetable, and that of the command \cs{weeklist} can set the default number of weeks and print it at every course box's southeast corner. Each mandatory argument of the two commands accepts an array that can add a time list to the left side of the timetable and add workdays with corresponding width ratios at the top of the timetable, respectively. The example for inputting the arrays is shown in Appendix \ref{mwe}
 
-This command has two arguments that can create an empty timetable frame. The first optional argument can add the semester block at the northeast corner of the page, and the second mandatory argument can assign the title.
+  If the number of time arrays received by the command \cs{timelist} is greater than the forced number of rows, then the extra time sets are ignored, and it will return a warning. If one wants to add a series of numbers to the left side of the timetable without time, just leave the mandatory argument blank.
+\end{function}
 
-\subsubsection{The \cs{more} command}
-
-\begin{example}
+\begin{function}{\more}
+  \begin{syntax}
     \cs{more}\marg{comment}
-\end{example}
+  \end{syntax}
 
-This command can add a comment at the southwest corner of the page.
+  This command can add a comment at the southwest corner of the page.
+\end{function}
 
-\subsubsection{The \cs{timelist} command}
+\begin{function}{\maketable}
+  \begin{syntax}
+    \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+  \end{syntax}
 
-\begin{example}
-    \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
+  This command can create a blank timetable frame, and it should execute after commands \cs{timelist} and \cs{weeklist} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}. The optional argument accepts keys, it can set the background color of the timetable, and add the semester at the northeast corner of the page, the default value of the key \keys{\cmdmac~color} is \cmd{gray}. The mandatory argument can set the title.
+\end{function}
 
-This command has two arguments, the first optional argument \oarg{\#1} can directly assign the number of rows on the timetable, and the second mandatory argument \marg{\#2} can add time to the left side of the timetable. The following example is the format for inputting array
+\section{Add course boxes}
 
-\begin{Verbatim}
-    \timelist[13]{
-        08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
-        10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
-        14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
-        18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
-    }
-\end{Verbatim}
+\begin{function}{\course}
+  \begin{syntax}
+    \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+  \end{syntax}
+\end{function}
 
-For different usage scenarios of the two arguments, \cls{litetable} will generate a corresponding row-based timetable frame according to the following rules.
+The \cs{course} command can add course boxes on the current workday, it should execute after command \cs{maketable} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}.
 
-\begin{table}[htbp]
-    \centering
-    \begin{tabularx}{\linewidth}{c X X}
-      \toprule
-        $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
-        \multicolumn{1}{c}{To use} &
-        \multicolumn{1}{c}{Not to use}\\
-      \midrule
-        To use &
-        The effect is the same as described in \marg{\#2}, but the number of rows in the timetable is determined by \oarg{\#1} &
-        The effect is the same as described in \oarg{\#1}\\
-      \midrule
-        Not to use &
-        The effect is the same as described in \marg{\#2} &
-        ERROR!\\
-      \bottomrule
-    \end{tabularx}
-\end{table}
+The optional argument accepts the following keys: \keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. The default value of the key \keys{\cmdmac~color} is \cmd{teal}, and the default value of the key \keys{\cmdmac~weeks} is determined by the argument of the command \cs{weeklist}. The first and second mandatory arguments are the start and end numbers of the course, respectively.  The example of this command is shown in Appendix \ref{mwe}
 
 \begin{itemize}
-    \item If the mandatory argument \marg{\#2} receives $X$ sets of time, and the optional argument \oarg{\#1} receives a value of $X+a$, then only lines $1\sim X$ on the left side of the timetable display the time, while the other lines do not display the time.
-    \item If the mandatory argument \marg{\#2} receives $X+a$ sets of time, and the optional \oarg{\#1} receives a value of $X$, then the extra time sets ignored, and it will return a warning.
+  \item If the course box's height is only one unit, that is $\meta{start number} = \meta{end number}$, the values of keys \keys{\cmdmac~location} and \keys{\cmdmac~teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{\cmdmac~weeks} will be hidden.
+  \item If neither the key \keys{\cmdmac~location} nor the key \keys{\cmdmac~teacher} is assigned value, then the value of the key \keys{\cmdmac~subject} will print at the center of the course box.
+  \item course boxes that are out of the timetable will not display, and it will return a warning.
 \end{itemize}
 
-\subsubsection{The \cs{weeklist} command}
+\begin{function}{\newday}
+  \begin{syntax}
+    \cs{newday}\oarg{intergal value}
+  \end{syntax}
 
-\begin{example}
-    \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
+  This command has an optional argument that can move the course boxes right \meta{intergal value} working days. The default value of the optional argument is \cmd{1} to move right \cmd{1} workday.
+\end{function}
 
-This command has two arguments. The first optional argument can determine the default number of weeks and print at every course block's southeast corner. The second mandatory argument can add workdays with corresponding width ratios at the top of the timetable. The following example is the format for inputting array
+\clearpage\linespread{1.375}
+\appendix
 
-\begin{Verbatim}
-    \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
+\section{Minimal Working Example}\label{mwe}
 
-\begin{figure}[!ht]
-    \centering
-    \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
-        \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
-        \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
-        \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
-        \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
-        \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
-        \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
-        \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
-        \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
-        \node [above] at (2*5 in/24,0) {Mon};
-        \node [above] at (6.5*5 in/24,0) {Tue};
-        \node [above] at (11*5 in/24,0) {Wed};
-        \node [above] at (16*5 in/24,0) {Thu};
-        \node [above] at (21.5*5 in/24,0) {Fri};
-    \end{tikzpicture}
-\end{figure}
+The following MWE could generate a timetable of 13 lines but only the top 12 lines have been marked with time, and there are 5 workdays at the top of the timetable, ratios between them are $4:5:4:6:5$. The default value of the key \keys{\cmdmac~weeks} will be set to \cmd{Weeks 1 - 16}. A comment and two course boxes are added.
 
-Now, the default value of the key \keys{weeks} is set to \cmd{Weeks 1 - 16}. If the number of workdays is larger than the ratios you input, then the extra workdays will be ignored and it will return a warning.
+\begin{framed}
+  \begin{verbatim}
+    \documentclass{litetable}
 
-\subsection{Add course blocks}
+    \begin{document}
 
-Using the \cs{course} command to add course blocks on the current workday. This command has two arguments.
+    \timelist[13]
+    {
+      08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+      11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+      16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+    }
+    \weeklist[Weeks 1 - 16]
+    {
+      Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+    }
+    \more{Author: Mingyu Xia \& Lijun Guo}
 
-\begin{example}
-    \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
+    \begin{tikzpicture}[remember picture, overlay]
+      \maketable
+      \course [ subject = Keep on {\TeX}ing ] {10} {11}
+      \newday
+      \course [ color = DarkSlateGray, subject = litetable,
+              location = Hong Kong, teacher = M.Y. Xia
+              ] {8} {8}
+    \end{tikzpicture}
 
-The first optional argument accepts the following keys: \keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. The default value of the key \keys{color} is \cmd{DarkSlateGray}, and the default value of the key \keys{weeks} is determined by the first argument of the command \cs{weeklist}. The second and third mandatory arguments are the start and end numbers of the course, respectively. The following is a use case of the command \cs{course}
+    \end{document}
+  \end{verbatim}
+\end{framed}
 
-\begin{Verbatim}
-    \course [ color = DarkGreen, subject = listofitems, 
-              location = French, teacher = Christian Tellechea
-            ] {10} {12}
-\end{Verbatim}
+\includepdf[pages = 1]{litetable-demo.pdf}
 
-\begin{center}
-    \noindent\fbox{
-        \parbox{.94\linewidth}{\footnotesize
-            Set the color of this course block to \cmd{DarkGreen}, the course name to \cmd{listofitems}, the class location to \cmd {French}, and the teacher to \cmd{Christian Tellechea}, starting from the \cmd{10}th class of the day and ending from the \cmd{12}th class of the same day.
-        }
-    }
-\end{center}
+\end{document}
 
-\begin{itemize}
-    \item One can switch to the next workday via the command \cs{newday}.
-    \item If the course block's height is only one unit, that is $\marg{class start number} = \marg{class end number}$, the values of keys \keys{location} and \keys{teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{weeks} will not be printed.
-    \item If neither the key \cmd{location} nor the key \cmd{teacher} is assigned value, then the value of the key \keys{subject} will print at the center of the course block.
-\end{itemize}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
\ No newline at end of file
+% End of file litetable-en.tex

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex	2024-10-01 19:51:28 UTC (rev 72444)
@@ -1,179 +1,143 @@
 \documentclass[letterpaper]{l3doc}
 
+\hypersetup{urlcolor = teal, filecolor = violet}
 \usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
 \hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
+\FrameSep = 0pt
 \usepackage[fontset = none]{ctex}
-\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
 \usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
+\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
 
-\title{
-    \cls{litetable} 文檔類:多彩嘅課程表
-    \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{
+  \bfseries\cls{litetable} 文檔類:多彩嘅課程表
+  \footnote{\url{https://github.com/xiamyphys/litetable}}
 }
+\author
+{
+  夏明宇 \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
+  \thanks{\href{https://github.com/ljguo1020}{郭李軍}開發咗讀取 \meta{left} -> \meta{right} 型資料結構糢塊同低版本 \hologo{TeX} Live 相容糢塊.}
+}
+\date{Version 3.1B, \today}
 
-\author{夏明宇,杭州電子科技大學}
-
-\affil{\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}}
-
-\date{Version 3.0B, \today}
-
 \begin{document}
 
 \maketitle
 
-\begin{abstract}
-    本文檔系 \cls{litetable} 文檔類嘅用户手冊放. 應該文檔類提供咗個多彩嘅課程表設計. 歡迎通過郵件 \href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com} 或者 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 建議或者反饋bug. 本手冊提供英語、中文和\textbf{粵語}版本.
-\end{abstract}
-
 \section{介紹}
 
-\subsection{所使宏包}
+\cls{litetable} 文檔類提供咗個多彩嘅課程表設計,基於 \cls{article} 文檔類,由 \pkg{expl3} 和 \pkg{tikz} 構建. 相容發行版 \hologo{TeX} Live 2019 同更高版本,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. 本文檔系 \cls{litetable} 文檔類嘅用户手冊放,手冊放同時有\href{./litetable-en.pdf}{英文}同\href{./litetable-cn.pdf}{官話}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
 
-應該文檔類基於 \cls{article} 文檔類. 要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 同 \pkg{xcolor} 宏包. 
+\section{載入 \cls{litetable} 並建置課程表框架}
 
-\subsection{相容性}
-
-所使 \pkg{expl3} 宏包嘅版本使支持``e-type''變體,所以要文檔類唔可以喺 \hologo{TeX}Live 2023 同更早嘅版本上運行. 所用嘅測試平台為 macOS 15.1 / Overleaf / Ubuntu 22.04.2,並使用 \hologo{TeX}Live 2024 發行版,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. Windows 同 Unix 平台嘅相容性未知.
-
-\section{使用}
-
-\subsection{載入 \cls{litetable} 並建置課程表框架}
-
 同載入其他文檔類一樣,只令寫下
 
-\begin{Verbatim}
+\begin{framed}
+  \begin{verbatim}
     \documentclass{litetable}
-\end{Verbatim}
+  \end{verbatim}
+\end{framed}
 
-跟住落嚟嘅命令需要帶有 \cmd{remember picture,overaly} 選項嘅 \cmd{tikzpicture} 環境.
+如需輸入中文,可自行載入 \pkg{ctex} 宏包並設置字型.
 
-\subsubsection{命令:\cs{maketable}}
+\begin{function}{\timelist,\weeklist}
+  \begin{syntax}
+    \cs{timelist}\oarg{rows}\marg{time list}             \cs{timelist}\marg{time list}\oarg{rows}
+    \cs{weeklist}\oarg{default weeks}\marg{week list}    \cs{weeklist}\marg{week list}\oarg{default weeks}
+  \end{syntax}
 
-\begin{example}
-    \cs{maketable}\marg{title}\oarg{semester}
-\end{example}
+  命令 \cs{timelist} 嘅可選參數可強制設定課程表嘅行數,命令 \cs{weeklist} 嘅可選參數可設定預設嘅星期數目並會喺每個課程盒子嘅右下角顯示. 兩個命令嘅強制參數均接受數組,可分別就系課程表嘅左側添加時間表、喺課程表嘅頂部添加對應寬度比例嘅工作日. 輸入數組嘅用例見Appendix \ref{mwe}.
+  
+  若命令 \cs{timelist} 中時間數組數字大於可選參數接受值,就多餘嘅時間數組將畀忽略,並返回一個警告. 如果只系課程表左側添加一部序號,令強制參數為空即可.
+\end{function}
 
-此命令有兩個參數,可建置一個空白嘅課程表框架. 第一個可選參數可喺頁面嘅嘅右度角添加學期,第二個強制參數可指定標題.
-
-\subsubsection{命令:\cs{more}}
-
-\begin{example}
+\begin{function}{\more}
+  \begin{syntax}
     \cs{more}\marg{comment}
-\end{example}
+  \end{syntax}
 
-此命令可喺頁面嘅嘅右下角添加備注.
+  此命令可喺頁面嘅嘅右下角添加備注.
+\end{function}
 
-\subsubsection{命令:\cs{timelist}}
+\begin{function}{\maketable}
+  \begin{syntax}
+    \cs{maketable}\oarg{keyvals}\marg{title}\oarg{keyvals}
+  \end{syntax}
 
-\begin{example}
-    \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
+  此命令可建置一個空白嘅課程表框架,使喺命令 \cs{timelist},\cs{weeklist} 同 \cs{more} 後,並喺帶有 \cmd{[remember picture, overaly]} 選項嘅 \env{tikz} 環境中執行. 可選引數接受鍵 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分別就喺設置課程表框架嘅背景色同喺頁面嘅嘅右度角添加學期,鍵 \keys{\cmdmac~color} 嘅默認值為 \cmd{gray}. 強制參數可設定標題.
+\end{function}
 
-此命令有兩個參數,第一個可選參數可直接決定課程表嘅行數,第二個強制參數可喺課程表嘅左側添加時間表. 輸入數組嘅用例如下
+\section{添加課程盒子}
 
-\begin{Verbatim}
-    \timelist[13]{
-        08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
-        10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
-        14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
-        18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
-    }
-\end{Verbatim}
+\begin{function}{\course}
+  \begin{syntax}
+    \cs{course}\oarg{keyvals}\marg{start number}\oarg{keyvals}\marg{end number}\oarg{keyvals}
+  \end{syntax}
 
-對於兩個參數唔同使用情況,\cls{litetable} 會以如下規則建置對應行數嘅課程表框架.
+  \cs{course} 命令可喺當前工作日添加課程盒子,要喺命令 \cs{maketable} 後,並喺帶有 \cmd{remember picture,overaly} 選項嘅 \env{tikzpicture} 環境中執行.
+  
+  此命令嘅可選參數接受下列鍵:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 鍵 \keys{\cmdmac~color} 默認值為 \cmd{teal},鍵 \keys{\cmdmac~weeks} 默認值由命令 \cs{weeklist} 嘅可選參數決定. 第一個同第二個強制參數勒分別為課程嘅開始同結束序號. 命令嘅用例見Appendix \ref{mwe}.
 
-\begin{table}[htbp]
-    \centering
-    \begin{tabularx}{.9\textwidth}{c X X}
-      \toprule
-        $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
-        \multicolumn{1}{c}{使用} &
-        \multicolumn{1}{c}{唔使用}\\
-      \midrule
-        使用 &
-        效果與 \marg{\#2} 所描述嘅相同,但課程表嘅行數由 \oarg{\#1} 決定 &
-        效果與 \oarg{\#1} 所描述嘅相同\\
-      \midrule
-        不使用 &
-        效果與 \marg{\#2} 所描述嘅相同&
-        ERROR!\\
-      \bottomrule
-    \end{tabularx}
-\end{table}
+  \begin{itemize}
+    \item 若課程盒子高度得一格,即$\marg{start number} = \marg{end number}$,就鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \keys{\cmdmac~weeks} 嘅值將會隱藏.
+    \item 若鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 均未賦值,就鍵 \keys{\cmdmac~subject} 嘅值將輸出喺課程盒子中心.
+    \item 超出課程表工作日範圍嘅課程盒子將唔會顯示,只會返回一條警告.
+  \end{itemize}
+\end{function}
 
-\begin{itemize}
-    \item 若強制參數 \marg{\#2} 接受咗$X$組時間,可選參數 \oarg{\#1} 接受嘅值為$X+a$,就課程表嘅左側得$1 \sim X$行會顯示時間,後面幾行唔顯示時間.
-    \item 若強制參數 \marg{\#2} 接受咗$X+a$組時間,可選參數 \oarg{\#1} 接收嘅值為$X$, 就課程表嘅左側得$X$行嘅課程表,多餘嘅時間組將畀忽略,並返回一個警告.
-\end{itemize}
+\begin{function}{\newday}
+  \begin{syntax}
+    \cs{newday}\oarg{integral value}
+  \end{syntax}
 
-\subsubsection{命令:\cs{weeklist}}
+  此命令有一個可選參數,可令其後面添加嘅課程盒子後移 \meta{intergal value} 個工作日. 可選參數嘅默認值為\cmd{1},即後移\cmd{1}個工作日.
+\end{function}
 
-\begin{example}
-    \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
+\clearpage
+\appendix
 
-此命令有兩個參數. 第一個可選參數可決定預設嘅星期數並會喺每課程塊嘅嘅右下角顯示,第二個強制參數可喺課程表嘅頂部添加對應寬度比例嘅工作日. 輸入數組嘅用例如下
+\section{最小工作範例}\label{mwe}
 
-\begin{Verbatim}
-    \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
+此MWE建置嘅課程表有13行但系得前12行标注时间,課程表顶部共有五个工作日,工作日之间嘅宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 嘅默认值畀赋为 \cmd{Weeks 1 - 16}. 添加咗註解同兩個課程盒子.
 
-\begin{figure}[!ht]
-    \centering
-    \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
-        \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
-        \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
-        \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
-        \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
-        \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
-        \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
-        \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
-        \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
-        \node [above] at (2*5 in/24,0) {Mon};
-        \node [above] at (6.5*5 in/24,0) {Tue};
-        \node [above] at (11*5 in/24,0) {Wed};
-        \node [above] at (16*5 in/24,0) {Thu};
-        \node [above] at (21.5*5 in/24,0) {Fri};
-    \end{tikzpicture}
-\end{figure}
+\begin{framed}
+  \begin{verbatim}
+    \documentclass{litetable}
 
-此時 \cs{course} 命令中鍵 \keys{weeks} 嘅默認值畀賦為 \cmd{Weeks 1 - 16}. 如果輸入工作日嘅數量過輸入嘅寬度比例數量多,就多餘工作日將畀忽略並返回一條警告.
+    \begin{document}
 
-\subsection{添加課程塊}
+    \timelist[13]
+    {
+      08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+      11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+      16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+    }
+    \weeklist[Weeks 1 - 16]
+    {
+      Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
+    }
+    \more{Author: Mingyu Xia \& Lijun Guo}
 
-使用 \cs{course} 命令喺當前工作日添加課程塊. 此命令有兩個參數.
+    \begin{tikzpicture}[remember picture, overlay]
+      \maketable
+      \course [ subject = Keep on {\TeX}ing ] {10} {11}
+      \newday
+      \course [ color = DarkSlateGray, subject = litetable,
+              location = Hong Kong, teacher = M.Y. Xia
+              ] {8} {8}
+    \end{tikzpicture}
 
-\begin{example}
-    \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
+    \end{document}
+  \end{verbatim}
+\end{framed}
 
-第一個可選參數接受下列鍵:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 鍵 \keys{color} 嘅默認值為 \cmd{DarkSlateGray},鍵 \keys{weeks} 嘅默認值由命令 \cs{weeklist} 嘅第一個參數決定. 第二個同第三個強制參數勒分別為課程嘅開始同結束序號. \cs{course} 命令嘅用例如下
+\includepdf[pages = 1]{litetable-demo.pdf}
 
-\begin{Verbatim}
-    \course [ color = DarkGreen, subject = listofitems, 
-              location = French, teacher = Christian Tellechea
-            ] {10} {12}
-\end{Verbatim}
+\end{document}
 
-\begin{center}
-    \noindent\fbox{
-        \parbox{.96\linewidth}{
-            將此課程塊嘅顏色設置為 \cmd{DarkGreen},此課程名為 \cmd{listofitems},上堂地方為 \cmd{French},老師為 \cmd{Christian Tellechea},喺當日嘅第 \cmd{10} 節課開始,第 \cmd{12} 節課結束.
-        }
-    }
-\end{center}
-
-\begin{itemize}
-    \item 可通過 \cs{newday} 命令切換到落個工作日.
-    \item 若課程塊嘅高度淨系得個單位,即$\marg{class start number} = \marg{class end number}$,就鍵 \keys{location} 同 \keys{teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \cmd{weeks} 嘅值將唔會輸出.
-    \item 若鍵 \keys{location} 同 \keys{teacher} 均未賦值,就鍵 \keys{subject} 嘅值將輸出喺課程塊嘅中心.
-\end{itemize}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
\ No newline at end of file
+% End of file litetable-hk.tex

Modified: trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls	2024-10-01 19:51:14 UTC (rev 72443)
+++ trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls	2024-10-01 19:51:28 UTC (rev 72444)
@@ -1,5 +1,5 @@
 %% ***********************************************************
-%%   Copyright 2024 by Mingyu XIA <xiamyphys at gmail.com>      *
+%%   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      *
@@ -11,410 +11,440 @@
 %%                                                           *
 %%   This work has the LPPL maintenance status `maintained'. *
 %%                                                           *
-%%   The Current Maintainer of this work is Mingyu XIA.      *
+% The Current Maintainers of this work are M.Y. XIA & L.J. Guo
 %%                                                           *
 %%   This work consists of the files litetable.cls,          *
 %%                               and README.md.              *
 %%   available at https://github.com/xiamyphys/litetable     *
 %% ***********************************************************
-\ProvidesExplClass{litetable}{2024/09/25}{3.0B}{Course Schedule}
+\RequirePackage{xparse}% For TeX Live 2019 - 2020 Compatibility
+\ProvidesExplClass{litetable}{2024/10/01}{3.1B}{Course Schedule}
 
-\ExplSyntaxOff
-
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
 \ProcessOptions\relax
 \LoadClass{article}
+
 \pagestyle{empty}
-\RequirePackage{listofitems,tikz,xcolor}
-\ignoreemptyitems\setsepchar{,/->}
-\usetikzlibrary{calc}
-\definecolor{darkergray}{HTML}{F4F6F8}% Blocks
+\RequirePackage{tikz}
 
-\ExplSyntaxOn
+% Module for texlive 2021 and later (by @ljguo)
+\cs_if_exist:NF \clist_put_right:Ne 
+{ \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
+\cs_if_exist:NF \clist_set:Ne 
+{ \cs_generate_variant:Nn \clist_set:Nn { Ne } }
+\cs_if_exist:NT \clist_count:e 
+{ \cs_generate_variant:Nn \clist_count:n { e } }
+\cs_if_exist:NF \exp_args:NNNe 
+{
+  \cs_new:Npn \exp_args:NNNe #1#2#3#4
+  {
+    \exp_after:wN #1
+    \exp_after:wN #2
+    \exp_after:wN #3
+    \tex_expanded:D { {#4} }
+  }
+}
 
-\int_new:N \l_time_num_int
+% Module for left -> right data structure (by @ljguo)
+\cs_new_protected_nopar:Npn \__litetable_get_left:nN #1#2
+{
+  \group_begin:
+  \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+  \exp_args:NNNe \group_end: \tl_set:Nn #2
+  { \seq_item:Nn \l__litetable_tmpa_seq { 1 } }
+}
+\cs_new_protected_nopar:Npn \__litetable_get_right:nN #1#2
+{
+  \group_begin:
+  \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+  \exp_args:NNNe \group_end: \tl_set:Nn #2 
+  { \seq_item:Nn \l__litetable_tmpa_seq { 2 } }
+}
+\cs_generate_variant:Nn \__litetable_get_left:nN { e }
+\cs_generate_variant:Nn \__litetable_get_right:nN { e }
+
+\int_new:N \l__time_num_int
 \dim_new:N \l__time_vunit_dim
-\msg_new:nnn {litetable} {timelist}
-{\noexpand\timelist~extra~time~group(s)~were~ignored}
-\NewDocumentCommand{\timelist}{om}
+\cs_new_protected:Npn \litetable_msg_new:nn #1#2 
+{ \msg_new:nnn { litetable} { #1 } { #2 } }
+\cs_new_protected:Npn \litetable_msg_warning:n #1 
+{ \msg_warning:nn { litetable } { #1 } }
+\litetable_msg_new:nn { timelist }
+{ \exp_not:N \timelist~extra~time~group(s)~were~ignored }
+\cs_new_protected_nopar:Npn \litetable_timelist:nn #1#2
 {
-    \IfBlankTF{#2}
+  \clist_set:Nn \l__litetable_timelist_clist { #2 }
+  \tl_if_empty:nTF { #1 }
+  {
+    \int_set:Nn \l__time_num_int
     {
-        \int_set:Nn \l_time_num_int { #1 }
-        \tl_clear:N \@timelist
-    }{
-        \readlist*\@timelist{#2}
-        \IfNoValueTF{#1}
-        {
-            \int_set:Nn \l_time_num_int {\@timelistlen}
-        }{
-            \int_set:Nn \l_time_num_int { #1 }
-            \int_compare:nNnT {\@timelistlen} > {#1}
-            {
-                \msg_warning:nn {litetable} {timelist}
-            }
-        }
+      \clist_count:N \l__litetable_timelist_clist
     }
-    \dim_set:Nn \l__time_vunit_dim
+  }
+  {
+    \int_set:Nn \l__time_num_int { #1 }
+    \int_compare:nNnTF { #1 } <
+    { \clist_count:N \l__litetable_timelist_clist }
     {
-        \fp_eval:n {1/(2*\l_time_num_int+3.5)}\paperheight
-    }
+      \int_set:Nn \l__time_num_int
+      {
+        \clist_count:N \l__litetable_timelist_clist
+      }
+      \litetable_msg_warning:n { timelist }
+    } { \int_set:Nn \l__time_num_int { #1 } }
+  }
+  \dim_set:Nn \l__time_vunit_dim
+  {
+    \fp_eval:n {1/(2\l__time_num_int+3.5)}\paperheight
+  }
 }
+\NewDocumentCommand \timelist { O{} m O{} } 
+{ \litetable_timelist:nn { #1#3 } { #2 } }
 
-\clist_new:N \l__week_ratios_clist
+\clist_new:N \l__week_ratio_clist
 \clist_new:N \l__week_accum_clist
 \int_new:N \l__week_num_int
 \dim_new:N \l__week_hunit_dim
-\NewDocumentCommand{\weeklist}{om}
-{   
-    \IfValueT{ #1 }{\tl_set:Nn \l_weeks_tl { #1 }}
-    \readlist*\@weeklist{#2}
-    \int_step_inline:nn {\@weeklistlen}
+\cs_new_protected_nopar:Npn \litetable_weeklist:nn #1#2
+{
+  \tl_set:Nn \l__default_weeks_tl { #1 }
+  \clist_set:Nn \l__litetable_weeklist_clist { #2 }
+  \int_step_inline:nn 
+  {
+    \clist_count:N \l__litetable_weeklist_clist
+  }
+  {
+    \__litetable_get_right:eN
     {
-        \clist_put_right:Ne \l__week_ratios_clist
-        {
-            \@weeklist[##1,2]
-        }
+      \clist_item:Nn \l__litetable_weeklist_clist {##1}
+    } \l__litetable_tmpb_tl
+    \clist_put_right:Ne \l__week_ratio_clist
+    {
+      \l__litetable_tmpb_tl
     }
-    \int_step_inline:nn {\@weeklistlen}
+  }
+  \int_step_inline:nn 
+  {
+    \clist_count:N \l__litetable_weeklist_clist
+  }
+  {
+    \clist_clear:N \l__week_accumtmp_clist
+    \int_step_inline:nn { ##1 }
     {
-        \clist_clear:N \l__week_accumtmp_clist
-        \int_step_inline:nn { ##1 }
-        {
-            \clist_put_right:Ne \l__week_accumtmp_clist
-            {
-                \clist_item:Nn \l__week_ratios_clist { ####1 }
-            }
-        }
-        \clist_put_right:Ne \l__week_accum_clist
-        {
-            \int_eval:n
-            {
-                \clist_use:Nn \l__week_accumtmp_clist { + }
-            }
-        }
+      \clist_put_right:Ne \l__week_accumtmp_clist
+      {
+        \clist_item:Nn \l__week_ratio_clist { ####1 }
+      }
     }
-    \int_set:Nn \l__week_num_int
+    \clist_put_right:Ne \l__week_accum_clist
     {
-        \clist_item:Nn \l__week_accum_clist
-        {
-            \@weeklistlen
-        }
+      \int_eval:n { \clist_use:Nn \l__week_accumtmp_clist { + } }
     }
-    \dim_set:Nn \l__week_hunit_dim
+  }
+  \int_set:Nn \l__week_num_int
+  {
+    \clist_item:Nn \l__week_accum_clist
     {
-        \fp_eval:n {1/\l__week_num_int*14/15}\paperwidth
+      \clist_count:N \l__litetable_weeklist_clist
     }
+  }
+  \dim_set:Nn \l__week_hunit_dim
+  {
+    \fp_eval:n {1/\l__week_num_int*14/15}\paperwidth
+  }
 }
+\NewDocumentCommand \weeklist { O{} m O{} } 
+{ \litetable_weeklist:nn { #1#3 } { #2 } }
 
-\int_new:N \l__week_day_int
-\newcommand{\newday}{\int_incr:N \l__week_day_int}
-\NewDocumentCommand{\maketable}{om}{
-    % Gray Block at top
-    \fill [ darkergray ] (current~page.north~west)
-            rectangle + (\paperwidth,{-1.5*\l__time_vunit_dim})
-            node [ midway, black, font = \huge\bfseries ] {#2};
-    \IfValueT{#1}% Semester
+\NewDocumentCommand \more { m }
+{ \tl_set:Nn \l__litetable_comment_tl { #1 } }
+
+\int_new:N \l__litetable_week_day_int
+\int_set:Nn \l__litetable_week_day_int {1}
+\NewDocumentCommand \newday { O {1} }
+{ \int_add:Nn \l__litetable_week_day_int { #1 } }
+
+\keys_define:nn { litetable / frame }
+{
+  sem.tl_set:N = \l__bg_sem_tl,
+  color.tl_set:N = \l__bg_color_tl,
+  color.initial:n = gray,
+}
+\cs_new_protected_nopar:Npn \litetable_maketable:nn #1
+{
+  % Darker Block at top
+  \fill [ \l__bg_color_tl!5 ] (current~page.north~west)
+          rectangle + (\paperwidth,-1.5\l__time_vunit_dim)
+          node [ midway, black, font = \huge\bfseries ] {#1};
+  \tl_if_empty:NF { \l__bg_sem_tl }% Semester
+  {
+    \node [ shift = {(-.02\paperwidth,-.75\l__time_vunit_dim)},
+            left, rectangle, fill = DarkBlue!10,
+            text = DarkBlue!60, inner~sep = 2ex,
+            rounded~corners = 8pt, font = \large
+          ] at (current~page.north~east)
+    {\ensuremath\rightleftharpoons\ \l__bg_sem_tl};
+  }
+  % Darker Blocks
+  \int_step_inline:nnnn {0} {2} {\l__time_num_int}
+  {
+    \filldraw [ fill = \l__bg_color_tl!5, draw = gray,
+                thick, densely~dashed, line~cap = round
+              ]
+    ([shift = {(-.4pt,\fp_eval:n {-2*##1-2.5}\l__time_vunit_dim)}]
+    current~page.north~west) rectangle +
+    ({\paperwidth+.8pt},-2\l__time_vunit_dim);
+  }
+  % Classes numbering
+  \clist_if_empty:NTF {\l__litetable_timelist_clist}
+  {
+    \int_step_inline:nn {\l__time_num_int}
     {
-        \node [ left, rectangle, fill = DarkBlue!10,
-                text = DarkBlue!60, inner~sep = 2ex,
-                rounded~corners = 8pt, font = \large
-              ] at ($
-                (current~page.north~east)+
-                (-.02\paperwidth,-.75*\l__time_vunit_dim)
-                $) {\ensuremath\rightleftharpoons\ #1};
+      \node [ shift = {(\paperwidth/30,{\fp_eval:n {
+              -2*##1-1.5}\l__time_vunit_dim})
+              }, darkgray!80, font = \large\ttfamily\bfseries
+            ] at (current~page.north~west) {##1};
     }
-    % Darker Blocks
-    \int_step_inline:nnnn {0} {2} {\l_time_num_int} {
-        \filldraw [ fill = darkergray, draw = gray, thick,
-                    densely~dashed, line~cap = round
-                  ] ([yshift = -2*##1*\l__time_vunit_dim]$
-                        (current~page.north~west)+(-.4pt,0)+
-                        (0,-2.5*\l__time_vunit_dim)
-                    $) rectangle + ($
-                        (\paperwidth,-2*\l__time_vunit_dim)+
-                        (.8pt,0)
-                    $);
+  }
+  {
+    \int_step_inline:nn {\l__time_num_int}
+    {
+      \node [ shift = {(\paperwidth/30,\fp_eval:n {
+              -2*##1-1}\l__time_vunit_dim)
+              }, darkgray!80, font = \large\ttfamily\bfseries
+            ] at (current~page.north~west) {##1};
     }
-    \tl_if_empty:NTF {\@timelist}% Classes numbering
+    % Classes time
+    \int_step_inline:nn 
     {
-        \int_step_inline:nn {\l_time_num_int} {
-            \node [ yshift = -2*##1*\l__time_vunit_dim,
-                    darkgray!80, font = \bfseries\large\ttfamily
-                  ] at ($
-                        (current~page.north~west)+
-                        (\paperwidth/30,-1.5*\l__time_vunit_dim)
-                    $) {##1};
-        }
-    }{
-        \int_step_inline:nn {\l_time_num_int} {
-            \node [ yshift = -2*##1*\l__time_vunit_dim,
-                    darkgray!80, font = \bfseries\large\ttfamily
-                  ] at ($
-                        (current~page.north~west)+
-                        (\paperwidth/30,-\l__time_vunit_dim)
-                    $) {##1};
-        }
-        % Classes time
-        \int_step_inline:nn {\@timelistlen} {
-            \node [ yshift = -2*##1*\l__time_vunit_dim,
-                    gray, font = \ttfamily ,align = center]
-                    at ($
-                        (current~page.north~west)+
-                        (\paperwidth/30,-1.9*\l__time_vunit_dim)
-                    $) {\@timelist[##1,1]\\\@timelist[##1,2]};
-        }
+      \clist_count:N \l__litetable_timelist_clist
     }
-    % Weekdays
-    \int_step_inline:nn {\@weeklistlen}
     {
-        \node [ font = \large\bfseries,
-                xshift = \clist_item:Nn \l__week_accum_clist {##1}/
-                \l__week_num_int*14/15*\paperwidth
-              ]
-                at ($
-                    (current~page.north~west)-
-                    (\fp_eval:n {(
-                        \clist_item:Nn 
-                            \l__week_ratios_clist { ##1 }
-                      /2)/\l__week_num_int*14/15-1/15
-                    }*\paperwidth,2*\l__time_vunit_dim)
-                $) {\@weeklist[##1,1]};
+      \__litetable_get_left:eN
+      {
+        \clist_item:Nn \l__litetable_timelist_clist {##1}
+      } \l__litetable_tmpa_tl
+      \__litetable_get_right:eN
+      {
+        \clist_item:Nn \l__litetable_timelist_clist {##1}
+      } \l__litetable_tmpb_tl
+      \node [ shift = {(\paperwidth/30,\fp_eval:n {
+              -1.9-2*##1}\l__time_vunit_dim)
+              }, gray, font = \ttfamily ,align = center
+            ] at (current~page.north~west)
+      {\l__litetable_tmpa_tl\\\l__litetable_tmpb_tl};
     }
+  }
+  % Weekdays
+  \int_step_inline:nn
+  {
+    \clist_count:N \l__litetable_weeklist_clist
+  }
+  {
+    \__litetable_get_left:eN
+    {
+      \clist_item:Nn \l__litetable_weeklist_clist {##1}
+    } \l__litetable_tmpa_tl
+    \node [ font = \large\bfseries,
+            shift = {(\fp_eval:n {
+            (\clist_item:Nn \l__week_accum_clist {##1}
+            -\clist_item:Nn \l__week_ratio_clist {##1}/2)/
+            \l__week_num_int*14/15+1/15}\paperwidth,
+            -2\l__time_vunit_dim)}
+          ] at (current~page.north~west) { \l__litetable_tmpa_tl };
+  }
+  % Comment
+  \tl_if_empty:NF \l__litetable_comment_tl
+  {
+    \node [ yshift = .5\l__time_vunit_dim, 
+          left = 1ex, darkgray, font = \small\bfseries
+        ] at (current~page.south~east)
+    { \l__litetable_comment_tl };
+  }
+  \tl_gclear:N \l__litetable_comment_tl
 }
+\NewDocumentCommand \maketable { O{} m O{} } 
+{
+  \group_begin:
+  \keys_set:nn { litetable / frame } { #1#3 }
+  \litetable_maketable:nn { #2 }
+  \group_end:
+}
 
-\keys_define:nn{course}{
-    color.tl_set:N = \l_color_tl,
-    color.initial:n = teal,
-    subject.tl_set:N = \l_subject_tl,
-    teacher.tl_set:N = \l_teacher_tl,
-    location.tl_set:N = \l_location_tl,
-    weeks.tl_set:N = \l_weeks_tl,
-    weeks.initial:n = \l_weeks_tl,
+\keys_define:nn { litetable / course }
+{
+  color.tl_set:N = \l__course_color_tl,
+  color.initial:n = teal,
+  subject.tl_set:N = \l__course_subject_tl,
+  teacher.tl_set:N = \l__course_teacher_tl,
+  location.tl_set:N = \l__course_location_tl,
+  weeks.tl_set:N = \l__default_weeks_tl,
+  weeks.initial:n = \l__default_weeks_tl,
 }
 \dim_new:N \l__course_infoshift_dim
-\NewDocumentCommand{\course}{O{}mm}
+\cs_new_protected_nopar:Npn \__litetable_course_box_aux:nn #1#2
 {
-    \group_begin:
-    \keys_set:nn { course } { #1 }
-    % Course block fg
-    \fill [ \l_color_tl!60, rounded~corners = 8pt ] ($
-            (current~page.north~west)+(.4pt,-.4pt)+
-            (\fp_eval:n
-            {
-                \clist_item:Nn \l__week_accum_clist
-                {
-                    \l__week_day_int
-                }-
-                \clist_item:Nn \l__week_ratios_clist
-                {
-                    \l__week_day_int 
-                }
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-.5-2*#2}*\l__time_vunit_dim)
-        $) rectangle ($
-            (current~page.north~west)+(-.4pt,.4pt)+
-            (\clist_item:Nn \l__week_accum_clist
-            {
-                \l__week_day_int
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
-        $);
-    % Course block bg
-    \fill [ \l_color_tl!10 ] ($
-            (current~page.north~west)+(1.2pt,-.4pt)+
-            (\fp_eval:n
-            {
-                \clist_item:Nn \l__week_accum_clist
-                {
-                    \l__week_day_int
-                }-
-                \clist_item:Nn \l__week_ratios_clist
-                {
-                    \l__week_day_int
-                }
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-1-2*#2}*\l__time_vunit_dim)
-        $) -- ($
-            (current~page.north~west)+(-1.2pt,-.4pt)+
-            (\clist_item:Nn \l__week_accum_clist
-            {
-                \l__week_day_int
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-1-2*#2}*\l__time_vunit_dim)
-        $) {[rounded~corners = 7.2pt] -- ($
-            (current~page.north~west)+(-1.2pt,1.2pt)+
-            (\clist_item:Nn \l__week_accum_clist
-            {
-                \l__week_day_int
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
-        $) -- ($
-            (current~page.north~west)+(1.2pt,1.2pt)+
-            (\fp_eval:n
-            {
-                \clist_item:Nn \l__week_accum_clist
-                {
-                    \l__week_day_int
-                }-
-                \clist_item:Nn \l__week_ratios_clist
-                {
-                    \l__week_day_int 
-                }
-            }*\l__week_hunit_dim+\paperwidth/15,
-            \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
-        $)} -- cycle;
-    % Course info
-    \tl_if_eq:NNTF {#2} {#3}% Single-unit height course block
+  % Course box fg
+  \begin{scope}
+  \clip [ preaction = {draw, ultra~thick, \l__course_color_tl!60},
+          preaction = {fill, \l__course_color_tl!10},
+          rounded~corners = 8pt ] 
+  ([shift = {(
+    \fp_eval:n
     {
-        \bool_if:nTF
-        {
-            \tl_if_empty_p:N \l_location_tl &&
-            \tl_if_empty_p:N \l_teacher_tl
-        }{
-            \tl_set:Nn \l_shortcourse_anchor_tl { }
-        }{
-            \tl_set:Nn \l_shortcourse_anchor_tl { above }
-        }
-        \cs_if_exist:NT {\l_subject_tl }
-        {
-            \node [ \l_shortcourse_anchor_tl,
-                    \l_color_tl!60, align = center,
-                    font = \large\bfseries ]
-                    at ($
-                        (current~page.north~west)+
-                        (\fp_eval:n
-                        {
-                            \clist_item:Nn \l__week_accum_clist
-                            {
-                                \l__week_day_int
-                            }-
-                            \clist_item:Nn \l__week_ratios_clist
-                            {
-                                \l__week_day_int 
-                            }/2
-                        }*\l__week_hunit_dim+\paperwidth/15,
-                        \fp_eval:n {-1.75-#2-#3}*\l__time_vunit_dim)
-                    $) { \l_subject_tl };
-        }
-        \bool_if:nTF
-        {
-            !\tl_if_empty_p:N \l_location_tl &&
-            !\tl_if_empty_p:N \l_teacher_tl
-        }{
-            \tl_set:Nn \l_shortcourse_sep_tl { ,~ }
-        }{
-            \tl_set:Nn \l_shortcourse_sep_tl { }
-        }
-        \node [ below, \l_color_tl!60, align = center ]
-                at ($
-                    (current~page.north~west)+
-                    (\fp_eval:n
-                    {
-                        \clist_item:Nn \l__week_accum_clist
-                        {
-                            \l__week_day_int
-                        }-
-                        \clist_item:Nn \l__week_ratios_clist
-                        {
-                            \l__week_day_int 
-                        }/2
-                    }*\l__week_hunit_dim+\paperwidth/15,
-                    \fp_eval:n {-1.75-#2-#3}*\l__time_vunit_dim)
-                    $) {
-                        \tl_if_exist:NT
-                            { \l_location_tl } { \l_location_tl }
-                            \l_shortcourse_sep_tl
-                        \tl_if_exist:NT
-                            { \l_teacher_tl } { \l_teacher_tl }
-                       };
-    }{
-        \bool_if:nTF% Multiply-unit height course block
-        {
-            \tl_if_empty_p:N \l_location_tl &&
-            \tl_if_empty_p:N \l_teacher_tl
-        }{
-            \tl_set:Nn \l_course_anchor_tl {}
-            \dim_set:Nn \l__course_infoshift_dim { 0pt }
-        }{
-            \tl_set:Nn \l_course_anchor_tl { above }
-            \dim_set:Nn \l__course_infoshift_dim
-            {
-                .125\l__time_vunit_dim
-            }
-        }
-        \cs_if_exist:NT { \l_subject_tl }
-        {
-            \node [ \l_course_anchor_tl,
-                    yshift = \l__course_infoshift_dim,
-                    \l_color_tl!60, align = center,
-                    font = \large\bfseries
-                  ] at ($
-                        (current~page.north~west)+
-                        (\fp_eval:n
-                        {
-                            \clist_item:Nn \l__week_accum_clist
-                            {
-                                \l__week_day_int
-                            }-
-                            \clist_item:Nn \l__week_ratios_clist
-                            {
-                                \l__week_day_int 
-                            }/2
-                        }*\l__week_hunit_dim+\paperwidth/15,
-                        \fp_eval:n {-1.5-#2-#3}*\l__time_vunit_dim)
-                    $) { \l_subject_tl };
-        }
-        \bool_if:nTF
-        {
-            !\tl_if_empty_p:N \l_location_tl && 
-            !\tl_if_empty_p:N \l_teacher_tl
-        }{
-            \tl_set:Nn \l_courseinfo_sep_tl { \\ }
-        }{
-            \tl_set:Nn \l_courseinfo_sep_tl { }
-        }
-        \node [ below, \l_color_tl!60, align = center ]
-                at ($
-                    (current~page.north~west)+
-                    (\fp_eval:n
-                    {
-                        \clist_item:Nn \l__week_accum_clist
-                        {
-                            \l__week_day_int
-                        }-
-                        \clist_item:Nn \l__week_ratios_clist
-                        {
-                            \l__week_day_int 
-                        }/2
-                    }*\l__week_hunit_dim+\paperwidth/15,
-                    \fp_eval:n {-1.625-#2-#3}*\l__time_vunit_dim)
-                    $) {
-                        \tl_if_exist:NT
-                            { \l_location_tl } { \l_location_tl }
-                            \l_courseinfo_sep_tl
-                        \tl_if_exist:NT
-                            { \l_teacher_tl } { \l_teacher_tl }
-                       };
-        \node [ above~left, \l_color_tl!60, outer~sep = .5ex ]
-                at ($
-                    (current~page.north~west)+
-                    (\clist_item:Nn \l__week_accum_clist
-                    {
-                        \l__week_day_int
-                    }*\l__week_hunit_dim+\paperwidth/15,
-                    \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
-                $) { \l_weeks_tl };
+      \clist_item:Nn \l__week_accum_clist
+        {\l__litetable_week_day_int}-
+      \clist_item:Nn \l__week_ratio_clist
+        {\l__litetable_week_day_int}
+    }\l__week_hunit_dim+\paperwidth/15+1.2pt,
+    \fp_eval:n {-.5-2*#1}\l__time_vunit_dim-1.2pt)
+  }]current~page.north~west) rectangle + (
+  \clist_item:Nn \l__week_ratio_clist {\l__litetable_week_day_int}
+  \l__week_hunit_dim-2.4pt,
+  \fp_eval:n {2*(#1-#2-1)}\l__time_vunit_dim+2.4pt);
+  % Course box bg
+  \fill [ \l__course_color_tl!60 ]
+  ([shift = {(
+    \fp_eval:n {
+      \clist_item:Nn \l__week_accum_clist
+        {\l__litetable_week_day_int}-
+      \clist_item:Nn \l__week_ratio_clist
+        {\l__litetable_week_day_int}
+    }\l__week_hunit_dim+\paperwidth/15,
+    \fp_eval:n {-.5-2*#1}\l__time_vunit_dim)
+  }]current~page.north~west) rectangle + (
+  \clist_item:Nn \l__week_ratio_clist{\l__litetable_week_day_int}
+  \l__week_hunit_dim,-.5\l__time_vunit_dim);
+  \end{scope}
+  % Course info
+  \tl_if_eq:NNTF {#1} {#2}% Single-unit height course box
+  {
+    \bool_if:nTF
+    {
+      \tl_if_empty_p:N \l__course_location_tl &&
+      \tl_if_empty_p:N \l__course_teacher_tl
     }
-    \group_end:
+    {\tl_set:Nn \l_shortcourse_anchor_tl { }}
+    {\tl_set:Nn \l_shortcourse_anchor_tl { above }}
+    \cs_if_exist:NT {\l__course_subject_tl }
+    {
+      \node [ shift = {(\fp_eval:n {
+              \clist_item:Nn \l__week_accum_clist
+                {\l__litetable_week_day_int}-
+              \clist_item:Nn \l__week_ratio_clist
+                {\l__litetable_week_day_int}/2
+            }\l__week_hunit_dim+\paperwidth/15,
+            \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+            \l_shortcourse_anchor_tl, \l__course_color_tl!60,
+            align = center, font = \large\bfseries
+            ] at (current~page.north~west)
+      { \l__course_subject_tl };
+    }
+    \bool_if:nTF
+    {
+      !\tl_if_empty_p:N \l__course_location_tl &&
+      !\tl_if_empty_p:N \l__course_teacher_tl
+    }
+    {\tl_set:Nn \l_shortcourse_sep_tl { ,~ }}
+    {\tl_set:Nn \l_shortcourse_sep_tl { }}
+    \node [ shift = {(\fp_eval:n {
+            \clist_item:Nn \l__week_accum_clist
+              {\l__litetable_week_day_int}-
+            \clist_item:Nn \l__week_ratio_clist
+              {\l__litetable_week_day_int}/2
+            }\l__week_hunit_dim+\paperwidth/15,
+            \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+            below, \l__course_color_tl!60, align = center
+          ] at (current~page.north~west)
+    {
+      \tl_if_exist:NT { \l__course_location_tl }
+                      { \l__course_location_tl }
+      \l_shortcourse_sep_tl
+      \tl_if_exist:NT { \l__course_teacher_tl }
+                      { \l__course_teacher_tl }
+    };
+  }
+  {
+    \bool_if:nTF% Multiply-unit height course box
+    {
+      \tl_if_empty_p:N \l__course_location_tl &&
+      \tl_if_empty_p:N \l__course_teacher_tl
+    }
+    {
+      \tl_set:Nn \l_course_anchor_tl {}
+      \dim_set:Nn \l__course_infoshift_dim { 0pt }
+    }
+    {
+      \tl_set:Nn \l_course_anchor_tl { above }
+      \dim_set:Nn \l__course_infoshift_dim { \l__time_vunit_dim/8 }
+    }
+    \cs_if_exist:NT { \l__course_subject_tl }
+    {
+      \node [ font = \large\bfseries, \l_course_anchor_tl,
+              shift = {(\fp_eval:n {
+              \clist_item:Nn \l__week_accum_clist
+                {\l__litetable_week_day_int}-
+              \clist_item:Nn \l__week_ratio_clist
+                {\l__litetable_week_day_int }/2
+              }\l__week_hunit_dim+\paperwidth/15,
+              \fp_eval:n {-1.5-#1-#2}\l__time_vunit_dim)},
+              yshift = \l__course_infoshift_dim,
+              \l__course_color_tl!60, align = center,
+            ] at (current~page.north~west)
+      { \l__course_subject_tl };
+    }
+    \bool_if:nTF
+    {
+      !\tl_if_empty_p:N \l__course_location_tl && 
+      !\tl_if_empty_p:N \l__course_teacher_tl
+    }
+    {
+      \tl_set:Nn \l_courseinfo_sep_tl { \\ }
+    }
+    {
+      \tl_set:Nn \l_courseinfo_sep_tl { }
+    }
+    \node [ below, \l__course_color_tl!60, align = center,
+            shift = {(\fp_eval:n {
+            \clist_item:Nn \l__week_accum_clist
+              {\l__litetable_week_day_int}-
+            \clist_item:Nn \l__week_ratio_clist
+              {\l__litetable_week_day_int}/2
+            }\l__week_hunit_dim+\paperwidth/15,
+            \fp_eval:n {-1.625-#1-#2}\l__time_vunit_dim
+        )}] at (current~page.north~west)
+    {
+      \tl_if_exist:NT { \l__course_location_tl }
+                      { \l__course_location_tl }
+      \l_courseinfo_sep_tl
+      \tl_if_exist:NT { \l__course_teacher_tl }
+                      { \l__course_teacher_tl }
+    };
+    \node [ above~left, \l__course_color_tl!60, outer~sep = .5ex,
+            shift = {(
+            \clist_item:Nn \l__week_accum_clist
+              {\l__litetable_week_day_int}
+            \l__week_hunit_dim+\paperwidth/15,
+            \fp_eval:n {-2.5-2*#2}\l__time_vunit_dim
+        )}] at (current~page.north~west) { \l__default_weeks_tl };
+  }
 }
-
-\newcommand{\more}[1]% Additional info
-{
-    \node [ left = 1ex, darkgray, font = \small\bfseries ]
-            at ($
-                (current~page.south~east)+(0,.5*\l__time_vunit_dim)
-            $) {#1};
+\litetable_msg_new:nn { course }
+{ \exp_not:N \course~box(s)~exceed~workdays~were~ignored }
+\NewDocumentCommand \course { O{} m O{} m O{} }
+{ 
+  \group_begin:
+  \int_compare:nNnTF {\l__litetable_week_day_int-1} <
+  {\clist_count:N \l__litetable_weeklist_clist}
+  {
+    \keys_set:nn { litetable / course } { #1#3#5 }
+    \__litetable_course_box_aux:nn { #2 } { #4 }
+  }{
+    \litetable_msg_warning:n { course }
+  }
+  \group_end:
 }
 
-\endinput
\ No newline at end of file
+\endinput
+
+% End of file litetable.cls
\ No newline at end of file



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