texlive[70331] branches/branch2023.final/Master/texmf-dist: litetable

commits+karl at tug.org commits+karl at tug.org
Fri Mar 1 22:49:19 CET 2024


Revision: 70331
          https://tug.org/svn/texlive?view=revision&revision=70331
Author:   karl
Date:     2024-03-01 22:49:19 +0100 (Fri, 01 Mar 2024)
Log Message:
-----------
litetable (branch) (1mar24)

Modified Paths:
--------------
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
    branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
    branches/branch2023.final/Master/texmf-dist/tex/latex/litetable/litetable.cls

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

Modified: branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
===================================================================
--- branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex	2024-03-01 21:49:08 UTC (rev 70330)
+++ branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex	2024-03-01 21:49:19 UTC (rev 70331)
@@ -11,13 +11,13 @@
 \usepackage{geometry,pdfpages,caption,indentfirst,setspace}
 \captionsetup[table]{name={\textsc{Table}},labelsep=period}
 \usepackage[level]{datetime}
-\usepackage{unicode-math,xeCJK,verbatim}
-\usepackage{authblk,xltxtra}
+\usepackage{unicode-math,xeCJK,fontawesome5}
+\usepackage{authblk,xltxtra,bigfoot,enumitem}
 \usepackage{booktabs,diagbox,ragged2e,tabularx}
 \renewcommand\tabularxcolumn[1]{>{\Centering}m{#1}}
 \usepackage[toc]{multitoc}
 \usepackage[mono=false]{libertine}
-\linespread{1.15}
+\setstretch{1.15}
 \setCJKmainfont{Chiron Sung HK}
 [BoldFont=Chiron Sung HK Bold,
   ItalicFont=Kaiti SC]
@@ -34,6 +34,13 @@
 \definecolor{H5}{Hsb}{188,.8,.8} % 青藍色 (Hangzhou MTR L 5 )
 \definecolor{H6}{Hsb}{207,.8,.8} % 海洋蓝 (Hangzhou Metro 6 )
 \definecolor{H7}{Hsb}{290,.8,.8} % 浪漫紫 (Hangzhou Metro 7 )
+\definecolor{W1}{HTML}{CCAD52}
+\definecolor{W2}{HTML}{8FCC52}
+\definecolor{W3}{HTML}{52CC70}
+\definecolor{W4}{HTML}{52CCCC}
+\definecolor{W5}{HTML}{5270CC}
+\definecolor{W6}{HTML}{8F52CC}
+\definecolor{W7}{HTML}{CC52AD}
 \hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
 
 \def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
@@ -49,7 +56,7 @@
 \yyyymmdddate
 \date{\today}
 \affil{\href{mailto:xiamyphys at gmail.com}{\texttt{xiamyphys at gmail.com}}}
-\date{\today\quad Version 2.3a\thanks{%
+\date{\today\quad Version 2.4b\thanks{%
   \url{https://github.com/xiamyphys/litetable}}}
 \begin{document}
 \maketitle
@@ -73,7 +80,7 @@
 同样,你也可以加入我的\textsf\LaTeX{} 技術交流群 \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} 与我交流,来获取模板的内测版本.
 
 \subsection{所需宏集}
-本模板基于 \pkg{standalone} 文档类开发. 其需要 \pkg{tikz} 宏集去绘制图形,\pkg{kvoptions} 和 \pkg{etoolbox} 宏集用于提供全局模式,\pkg{expl3} 宏集用于支持数组,\pkg{ctex}宏集用于支持中文语言,\pkg{fontawesome5} 宏集提供一系列精美的图标.
+本模板基于 \pkg{standalone} 文档类开发. 其需要 \pkg{tikz} 宏集去绘制图形,\pkg{kvoptions} 和 \pkg{etoolbox} 宏集用于提供全局模式,\pkg{expl3}\footnote{请使用 2023/10/10 及以后版本的 \pkg{expl3} 宏集以支持 e-type 变量展开: \verb|\clist_count:e|} 宏集用于支持数组,\pkg{ctex}宏集用于支持中文语言,\pkg{fontawesome5} 宏集提供一系列精美的图标.
 
 \subsection{安装并载入 \pkg{LiteTable} 模板}
 免安装使用方法如下,从 \href{https://github.com/xiamyphys/LiteTable}{GitHub} 或 \href{https://ctan.org/pkg/litetable}{CTAN} 下载最新的 \verb|litetable.cls| 文件并将它保存至你的项目根目录. 这种安装方式是最便捷的,但是当模板更新后,你需要手动替换 \verb|.cls| 文件.
@@ -86,7 +93,7 @@
 
 如果您所在的地区存在网路封锁(如 GFW 干扰),你可以选择合适的镜像网站或其他方法\footnote{请遵守当地的网路条例.}. 欲详细了解,请前往 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my TEX distribution?}
 
-本模板提供了三个选项:\mode{style},\mode{direction} 和 \mode{font}. 只需将你要使用的选项模式分别添加在你的 \verb|.tex| 文件中命令 \verb|\documentclass[ ]{litetable}| 的方括号中即可.
+本模板提供了两个选项:\mode{direction} 和 \mode{font}. 只需将你要使用的选项模式分别添加在你的 \verb|.tex| 文件中命令 \verb|\documentclass[ ]{litetable}| 的方括号中即可.
 
 \subsection{兼容性}
 所使用的测试环境为 macOS + MacTeX 2023 / Overleaf,都可在 \XeLaTeX{} 编译方式下顺利运行, Windows, Linux 和 Unix 平台兼容性未知.
@@ -96,14 +103,11 @@
   \documentclass[options]{litetable}
 \end{verbatim}
 
-\subsection{\mode{style} 选项}
-此选项有两个模式,\mode{round} 和 \mode{sharp},可分别使课程块圆角或直角显示,默认为直角.
-
 \subsection{\mode{direction} 选项}
-此选项有两个模式,\mode{portrait} 和 \mode{landscape}, 可分别使课程表以纵向或横向显示.
+此选项有两个模式,\mode{portrait} 和 \mode{landscape}, 可使课程表纵向或横向显示,默认为纵向.
 
 \subsection{\mode{font} 选项}
-此选项有两个模式,\mode{times} 和 \mode{libertinus},可分别使字体为 ``Times New Roman'' 或 ``Libertinus'',默认为 ``Times New Roman''\footnote{在使用 ``Libertinus'' 模式前请确保电脑中已安装该字体.}.
+此选项有两个模式,\mode{times} 和 \mode{libertinus},可使字体为 ``Times New Roman'' 或 ``Libertinus'',默认为 ``Times New Roman''\footnote{在使用 ``Libertinus'' 模式前请确保电脑中已安装该字体.}.
 
 \section{\pkg{LiteTable} 的命令}
 
@@ -121,53 +125,79 @@
     \bfseries\textcolor{W2}{\faIcon{fire}~星期二},
     \bfseries\textcolor{W3}{\faIcon{water}~星期三},
     \bfseries\textcolor{W4}{\faIcon{tree}~星期四},
-    \bfseries\textcolor{W5}{\faIcon{coins}~星期六}
+    \bfseries\textcolor{W5}{\faIcon{coins}~星期五},
+    \bfseries\textcolor{W6}{\faIcon{mountain}~星期六};
+    0,.175,.35,.525,.7,.875,1
   }
 \end{verbatim}
 
-此命令可在课程表顶部添加工作日,你可以自由决定工作日的显示样式,如名称,颜色甚至是前面的 logo\footnote{由 \pkg{fontawesome5} 宏集支持.}.
+此命令可在课程表顶部添加工作日,你可以自由决定显示样式,包括前面的 logo\footnote{由 \pkg{fontawesome5} 宏集支持.}. 你可以自定义课程表中每一列的宽度,如上图所示.
 
+\begin{figure}[!ht]
+  \centering
+  \tikz
+{
+  \tikzset{every node/.style={font=\footnotesize}}
+  \draw [thick,->,>=stealth] ({-1/16*5.1 in},0) -- (5.1 in,0);
+  \draw ({-5.10 in/16},-.1) --++ (0,.2) node [above] {\verb|-1/15|};
+  \draw ({0.00*5.1 in},-.1) --++ (0,.2) node [above] {\verb|0|};
+  \draw ({.175*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.175|};
+  \draw ({.350*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.35|};
+  \draw ({.525*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.525|};
+  \draw ({.700*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.7|};
+  \draw ({.875*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.875|};
+  \draw ({1.00*5.1 in},-.1) --++ (0,.2) node [above] {\verb|1|};
+  \node [above] at ({.0875*5.1 in},0) {\textcolor{W1}{\faIcon{moon}~星期一}};
+  \node [above] at ({.2625*5.1 in},0) {\textcolor{W2}{\faIcon{fire}~星期二}};
+  \node [above] at ({.4375*5.1 in},0) {\textcolor{W3}{\faIcon{water}~星期三}};
+  \node [above] at ({.6125*5.1 in},0) {\textcolor{W4}{\faIcon{tree}~星期四}};
+  \node [above] at ({.7875*5.1 in},0) {\textcolor{W5}{\faIcon{coins}~星期五}};
+  \node [above] at ({.9375*5.1 in},0) {\textcolor{W6}{\faIcon{mountain}~星期六}};
+}
+\caption*{命令 \cmd{weeklist} 中的第二行数组与坐标相对应.}
+\end{figure}
+
 课程表可根据你输入的时间组数自动生成相应的列数. 如上方代码共有 5 个工作日,就会生成 5 列的课程表.
 
-\subsection{\cmd{timelist} \cmd{classnum} 命令}
+\subsection{\cmd{timelist} 命令}
 \begin{verbatim}
-  \timelist{
+  \timelist [13] {%
     8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
     8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
   }
-
-  \classnum{14}
+  \timelist [13] {}
 \end{verbatim}
 
-命令 \cmd{timelist} 可将时间添加至课程表的左侧,内容的第一行是每节课程开始时间,第二行是每节课程的结束时间,时间之间用逗号(\verb|,|)分隔,第一行与第二行之间用分号(\verb|;|)分隔.
+命令 \cmd{timelist} 有两个参数,第二个参数 \cmd{\ttfamily\{\#2\}} 可将时间添加至课程表的左侧,内容的第一行是每节课程开始时间,第二行是每节课程的结束时间,时间之间用逗号(\verb|,|)分隔,行之间用分号(\verb|;|)分隔.
 
 课程表可根据你输入的时间组数自动生成相应的行数. 如上方代码共有 12 组时间,就会生成 12 行的课程表.
 
-命令 \cmd{classnum} 可直接指定课程表上你想要生成的行数并不会在课程表左侧添加时间,左侧只会有一列\emph{在每行竖直居中}的序号.
+第一个可选参数 \cmd{\ttfamily[\#1]} 可直接指定课程表上你想要生成的行数并不会在课程表左侧添加时间,左侧只会有一列\emph{在每行竖直居中}的序号.
 
-下面的表格整理了两个命令不同使用情况下的不同效果.
 \begin{table}[!ht]
 \centering
-\caption{命令 \cmd{timelist} and \cmd{classnum} 的使用情况.}
+\caption{两个参数的使用情况.}
 
 \begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
   \toprule
-  \diagbox{\cmd{classnum}}{\cmd{timelist}} & \multicolumn{1}{c}{使用} & \multicolumn{1}{c}{不使用}\\
+  \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{使用} & \multicolumn{1}{c}{不使用}\\
   \midrule
   使用   &
-  效果和命令 \cmd{timelist} 描述相同\newline 但生成行数由 \cmd{classnum} 决定 &
-  效果和命令 \cmd{classnum} 描述相同\\
+  效果和 \cmd{\ttfamily\{\#2\}} 描述相同,但生成行数由 \cmd{\ttfamily[\#1]} 决定 &
+  效果和命令 \cmd{\ttfamily[\#1]} 描述相同\\
   \midrule
   不使用 &
-  效果和命令 \cmd{timelist} 描述相同          &
-  效果和命令 \cmd{timelist} 描述相同\newline\emph{并默认生成 12 行}.\\
+  效果和命令 \cmd{\ttfamily\{\#2\}} 描述相同          &
+  效果和命令 \cmd{\ttfamily[\#1]} 描述相同\newline\emph{并默认生成 12 行}.\\
   \bottomrule
 \end{tabularx}
 \end{table}
 
+如果你要只使用第一个参数 \cmd{\ttfamily[\#1]},那么请不要在第二个参数 \cmd{\ttfamily\{\#2\}} 中添加任何东西.
+
 \begin{itemize}
-  \item 若命令 \cmd{timelist} 中有 12 组时间,命令 \cmd{classnum} 传递的数值为 14,那么课程表的左侧会只有 1 -- 12 行有时间标注,最后两行没有时间标注但最后两行的标号仍然偏上方,并不会竖直对齐.
-  \item 若命令 \cmd{timelist} 中有 14 组时间,命令 \cmd{classnum} 传递的数值为 12,那么只会生成 12 行的课程表并且左侧均有时间标注,也就是在命令 \cmd{timelist} 中输入的最后两组时间无效.
+  \item 若参数 \cmd{\ttfamily\{\#2\}} 中有 12 组时间,参数 \cmd{\ttfamily[\#1]} 传递的数值为 14,那么课程表的左侧会只有 1 -- 12 行有时间标注,最后两行没有时间标注但最后两行的标号仍然偏上方,并不会竖直对齐.
+  \item 若命令 \cmd{\ttfamily\{\#2\}} 中有 14 组时间,参数 \cmd{\ttfamily[\#1]} 传递的数值为 12,那么只会生成 12 行的课程表并且左侧均有时间标注,也就是在参数 \cmd{\ttfamily\{\#2\}} 中输入的最后两组时间无效.
 \end{itemize}
 
 \subsection{\cmd{weeks} 命令}
@@ -185,12 +215,16 @@
 此命令共有7个参数.
 \begin{itemize}
   \item 第 1 个为课程块的颜色,从 ``H1'' 到 ``H9'' 供选择,此参数是可选参数,默认为 ``H1''.
-  \item 第 2 个和第 3 个为课程的起始节数和结束节数.
-  \item 第 4, 5, 6 个分别为课程的名称,地址和教师的名字.
+  \item 第 2 -- 6 个为课程的起始节数和结束节数、名称,地址和教师的名字.
   \item 第 7 个为课程的首末周,此参数是可选参数,默认值由命令 \cmd{weeks} 指定,若未指定则默认值为 ``Week 1 -- 12''.
 \end{itemize}
 
+\subsection{\cmd{corner} 命令}
+\begin{verbatim}
+  \corner{6 pt}
+\end{verbatim}
 
+此命令可决定课程块的圆角半径.
 
 \subsection{\cmd{newday} 命令}
 此命令可切换当前日到第二天,此时课程块会右移一格.
@@ -207,52 +241,25 @@
 \end{verbatim}
 在使用此命令后页面的右下方会添加一张贴纸.
 
-\subsection{The \cmd{(re)rotatepage} command}
-\cmd{rotatepage}命令可临时更改课程表的方向,\cmd{rerotatepage} 命令可恢复课程表原来的方向.
-
-\section{已知问题:分辨率溢出}
-\begin{verbatim}
-  Dimension too large. <recently read> \pgfmath at x
-\end{verbatim}
-
-当启用 \mode{landscape} 模式并添加 7 个及以上的工作日 (?虽然 `添加7 个以上工作日' 一般碳基生物做不出来这种事),便会给出该报错.
-
-这主要是因为 \emph{\textsf{\TeX} 没有内置的浮点数表示} (Reference: \cprotect{\href{https://tex.stackexchange.com/a/545416/299948}}{How to solve the error `Dimension too large. <recently read> \verb|\pgfmath at x|' while doing the calculations in the table}).
-
-如果你能通过优化算法或其他方式解决该问题,欢迎通过 GitHub: \url{https://github.com/xiamyphys/litetable} 提交你的代码,或通过邮件 \href{mail:xiamyphys at gmail.com}{\ttfamily xiamyphys at gmail.com} 联络我.
-
 \section{版本历史}
 
-课程表的设计源于杭电助手(\href{https://www.hdu.edu.cn}{杭州电子科技大学})学生课表页面(仅本校师生可访问). 页面排版十分精美,于是本人使用\LaTeX{} 复刻出了课程表样式,并制作成模板分享给大家.
+课程表的设计源于\href{https://www.hdu.edu.cn}{杭州电子科技大学}杭电助手学生课表页面(仅本校师生可访问). 页面排版十分精美,于是本人使用 \textsf{\LaTeX{}} 复刻出了课程表样式,并制作成模板分享给大家.
 
-\textsf{\bfseries Version 1.0} 于01/09/2023完成开发,并发布在\href{https://www.latexstudio.net/index/details/index/mid/3625.html}{\LaTeX{}工作室} (杭州萧山)和\href{http://xhslink.com/od7Ycw}{小红书}上,赢得了许多人的喜爱.
+\textsf{\bfseries Version 1.0} 于01/09/2023完成开发,并发布在 \href{https://www.latexstudio.net/index/details/index/mid/3625.html}{\textsf{\LaTeX}工作室} (杭州萧山)上,赢得了许多人的喜爱.
 
-\textsf{\bfseries Version 2.0a}于01/11/2023完成开发,并发布在\href{https://www.latexstudio.net/index/details/index/mid/3636.html}{\LaTeX{}工作室} (杭州萧山)和\href{http://xhslink.com/od7Ycw}{小红书}上. 此版本使用 \verb|.cls| 文件,使 \verb|main.tex| 文件更简洁. 同时,此版本添加了全局模式,可设置 ``课程块'' 显示为圆角或直角. 此版本也支持一个 \verb|.tex| 文件中生成多张课表.
-
-\textsf{\bfseries Version 2.1a} 于05/11/2023完成开发. 支持 libertinus 字体.
-
-\textsf{\bfseries Version 2.2a} 于31/01/2024完成开发. 此版本修复了分辨率超出的 bug,更改纸张类型为美国信纸并支持自定义课程起始和结束时间.
-
-\textsf{\bfseries Version 2.3a} 于02/02/2024完成开发. 此版本支持根据所输入的时间组数自动生成相应的行数,并支持课程表以纵向或横向显示.
-
-\textsf{\bfseries Version 2.3b} 于03/02/2024完成开发. 此版本优化坐标计算,提升编译速度.
-
-\textsf{\bfseries Version 2.4a} 于24/02/2024完成开发. 元宵节快乐! 此版本支持自定义工作日显示样式,支持隐藏时间并仅显示竖直对齐课程序号,支持设置默认首末周.
-
-\clearpage
-
-\datechange{01/09/2023}{Version 2.0a}
+\setlist[itemize]{noitemsep, topsep=0pt}
+\datechange{2023/11/01}{Version 2.0a}
 \begin{itemize}
     \item 支持课程块显示为圆角或直角.
     \item 支持一个 \verb|.tex| 文件中生成多张课表.
 \end{itemize}
 
-\datechange{05/11/2023}{Version 2.1a}
+\datechange{2023/11/05}{Version 2.1a}
 \begin{itemize}
     \item 支持 libertinus 字体.
 \end{itemize}
 
-\datechange{31/01/2024}{Version 2.2a}
+\datechange{2024/01/31}{Version 2.2a}
 \begin{itemize}
     \item 修复了分辨率超出的 bug.
     \item 更改纸张类型为美国信纸.
@@ -272,7 +279,7 @@
   \item 优化坐标计算,提升编译速度.
 \end{itemize}
 
-\datechange{\today}{Version 2.4a}
+\datechange{2024/02/24}{Version 2.4a}
 \begin{itemize}
   \item 支持自定义工作日显示样式.
   \item 支持隐藏时间,仅显示竖直对齐课程序号.
@@ -279,13 +286,21 @@
   \item 支持设置默认首末周.
 \end{itemize}
 
+\datechange{\today}{Version 2.4b}
+\begin{itemize}
+  \item 修复了在 \mode{landscape} 模式中添加超过 7 个工作日时 \emph{分辨率溢出}的错误.
+  \item 支持自定义课程表中每一列的宽度.
+  \item 优化圆角设计,支持自定义圆角半径.
+\end{itemize}
+
+感谢 @egreg 在 \TeX{} Exchange 上提供的 \href{https://tex.stackexchange.com/a/711657/299948}{输出数组中每一列元素个数} 的代码.
+
 \appendix
-
+\includepdf[pages={1,3}]{litetable-demo.pdf}
 \includepdf[pages={2,4},nup=1x2,pagecommand={
   \tikz[remember picture, overlay]
   \node [rotate=90,below,yshift=-1em] at (current page.west) {\bfseries\LARGE Document Example: \texttt{litetable-demo.tex}};
   }
 ]{litetable-demo.pdf}
-\includepdf[pages={1,3}]{litetable-demo.pdf}
 
 \end{document}
\ No newline at end of file

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

Modified: branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
===================================================================
--- branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex	2024-03-01 21:49:08 UTC (rev 70330)
+++ branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex	2024-03-01 21:49:19 UTC (rev 70331)
@@ -1,23 +1,111 @@
-\documentclass[times,sharp]{litetable}
+\documentclass[times]{litetable}
+% \setCJKfamilyfont{zhhei}{Chiron Sung HK}
+% \renewcommand*{\heiti}{\CJKfamily{zhhei}}
+\corner{6 pt}
+\sticker{favicon}
 
 \begin{document}
+
+\timelist[12]{%
+  8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20;
+  8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05
+}
+\weeklist{
+  \heiti\bfseries\textcolor{W1}{\faIcon{moon}~星期一},
+  \heiti\bfseries\textcolor{W2}{\faIcon{fire}~星期二},
+  \heiti\bfseries\textcolor{W3}{\faIcon{water}~星期三},
+  \heiti\bfseries\textcolor{W4}{\faIcon{tree}~星期四},
+  \heiti\bfseries\textcolor{W5}{\faIcon{coins}~星期五};
+  0,.17,.34,.56,.78,1
+}
+\weeks{Week 1 -- 16}
+
+\begin{tikzpicture}
+  \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 6}
+  
+  % Mon.
+  \course[H5]{7}{8}{凝聚态物理}{第6教研楼 · 中225}{Mn Chen}
+
+  \newday % Tue.
+  \course[H1]{8}{9}{群论}{第6教研楼 · 中211}{Li Ge}
+  \course[H5]{10}{11}{介观物理}{第6教研楼 · 中211}{Yuan Li \& Mn Chen}
+
+  \newday % Wed.
+  \course[H6]{1}{2}{工程制图}{第7教研楼 · 中3012}{Hc Wang}
+  \course[H9]{8}{9}{形势与政策6}{第6教研楼 · 北302}{Xr Qi}[Double Week 10 -- 16]
+  \course[H9]{10}{11}{高级创业运营仿真}{第4教研楼 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
+
+  \newday % Thu.
+  \course[H4]{1}{2}{跨文化交际}{第3教研楼 · 422}{Cl Zuo}
+  \course[H2]{3}{4}{无线电测向}{东边田径场}{Ys Yu}
+  \course[H5]{6}{8}{固体物理}{第6教研楼 · 北408}{Kw Sun}
+
+  \newday % Fri.
+  \course[H8]{1}{2}{光电显示技术}{第7教研楼 · 中3012}{Wt Su}
+  \course[H3]{6}{8}{研究生组会}{第6教研楼 · 中}{Yuan Li}
+
+  \more{ · School Start: 04 / 03 / 2024  · Summer Vacation: 05 / 07 / 2024}
+\end{tikzpicture}
+
+\rotatepage
+
+\weeklist{
+  \bfseries\textcolor{W1}{\faIcon{moon}~Monday},
+  \bfseries\textcolor{W2}{\faIcon{fire}~Tuesday},
+  \bfseries\textcolor{W3}{\faIcon{water}~Wednesday},
+  \bfseries\textcolor{W4}{\faIcon{tree}~Thursday},
+  \bfseries\textcolor{W5}{\faIcon{coins}~Friday},
+  \bfseries\textcolor{W6}{\faIcon{mountain}~Saturday},
+  \bfseries\textcolor{W7}{\faIcon{sun}~Sunday};
+  0,.16,.32,.48,.64,.8,.9,1
+}
+
+\begin{tikzpicture}
+  \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 6}
+  
+  % Mon.
+  \course[H5]{7}{8}{Introduction to Cond.}{Building 6 · Middle 225}{Mn Chen}
+
+  \newday % Tue.
+  \course[H1]{8}{9}{Group Theory}{Building 6 · Middle 211}{Li Ge}
+  \course[H5]{10}{11}{Mesoscopic Physics}{Building 6 · Middle 211}{Yuan Li \& Mn Chen}
+
+  \newday % Wed.
+  \course[H6]{1}{2}{Engineering Drawing}{Building 7 · North 3012}{Hc Wang}
+  \course[H9]{8}{9}{Situation \& Policy 6}{Building 6 · North 302}{Xr Qi}[Double Week 10 -- 16]
+  \course[H9]{10}{11}{Operational Simu.}{Building 4 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
+
+  \newday % Thu.
+  \course[H4]{1}{2}{Intercultural Comm.}{Building 3 · 422}{Cl Zuo}
+  \course[H2]{3}{4}{Radio Direction}{Athletic Field}{Ys Yu}
+  \course[H5]{6}{8}{Solid State Physics}{Building 6 · North 408}{Kw Sun}
+
+  \newday % Fri.
+  \course[H8]{1}{2}{OE. Display}{Building 7 · North 3012}{Wt Su}
+  \course[H3]{6}{8}{Group Meeting}{Building 6 · Middle}{Yuan Li}
+
+  \more{ · School Start: 04 / 03 / 2024  · Summer Vacation: 05 / 07 / 2024}
+\end{tikzpicture}
+
+\rerotatepage
+
 \timelist{
   8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
   8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
 }
-% \classnum{14}
-\weeklist{
+
+\weeklist
+{
   \heiti\bfseries\textcolor{W1}{\faIcon{moon}~星期一},
   \heiti\bfseries\textcolor{W2}{\faIcon{fire}~星期二},
   \heiti\bfseries\textcolor{W3}{\faIcon{water}~星期三},
   \heiti\bfseries\textcolor{W4}{\faIcon{tree}~星期四},
   \heiti\bfseries\textcolor{W5}{\faIcon{coins}~星期五},
-  \heiti\bfseries\textcolor{W6}{\faIcon{mountain}~星期六},
+  \heiti\bfseries\textcolor{W6}{\faIcon{mountain}~星期六};
+  0,.175,.35,.525,.7,.875,1
 }
 \weeks{Week 1 -- 18}
 
-\sticker{favicon}
-
 \begin{tikzpicture}
   \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 5} % make title & background
   % Mon.
@@ -53,7 +141,8 @@
   \bfseries\textcolor{W3}{\faIcon{water}~Wednesday},
   \bfseries\textcolor{W4}{\faIcon{tree}~Thursday},
   \bfseries\textcolor{W5}{\faIcon{coins}~Friday},
-  \bfseries\textcolor{W6}{\faIcon{mountain}~Saturday},
+  \bfseries\textcolor{W6}{\faIcon{mountain}~Saturday};
+  0,.175,.35,.525,.7,.875,1
 }
 
 \begin{tikzpicture}
@@ -83,84 +172,4 @@
        · School Starts: 11 / 09 / 2023  · Winter Vacation: 26 / 01 / 2024 }
 \end{tikzpicture}
 
-\rerotatepage
-
-\timelist{
-  8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20;
-  8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,
-}
-\classnum{11}
-\weeklist{
-  \heiti\bfseries\textcolor{W1}{\faIcon{moon}~星期一},
-  \heiti\bfseries\textcolor{W2}{\faIcon{fire}~星期二},
-  \heiti\bfseries\textcolor{W3}{\faIcon{water}~星期三},
-  \heiti\bfseries\textcolor{W4}{\faIcon{tree}~星期四},
-  \heiti\bfseries\textcolor{W5}{\faIcon{coins}~星期五},
-}
-\weeks{Week 1 -- 16}
-
-\begin{tikzpicture}
-  \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 6}
-  
-  % Mon.
-  \course[H5]{7}{8}{凝聚态物理导论}{第6教研楼 · 中225}{Mn Chen}
-
-  \newday % Tue.
-  \course[H1]{8}{9}{群论}{第6教研楼 · 中211}{Li Ge}
-  \course[H5]{10}{11}{介观物理}{第6教研楼 · 中211}{Yuan Li \& Mn Chen}
-
-  \newday % Wed.
-  \course[H6]{1}{2}{工程制图}{第7教研楼 · 中3012}{Hc Wang}
-  \course[H9]{8}{9}{形势与政策6}{第6教研楼 · 北302}{Xr Qi}[Double Week 10 -- 16]
-  \course[H9]{10}{11}{高级创业运营仿真}{第4教研楼 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
-
-  \newday % Thu.
-  \course[H4]{1}{2}{跨文化交际}{第3教研楼 · 422}{Cl Zuo}
-  \course[H2]{3}{4}{无线电测向}{东边田径场}{Ys Yu}
-  \course[H5]{6}{8}{固体物理}{第6教研楼 · 北408}{Kw Sun}
-
-  \newday % Fri.
-  \course[H8]{1}{2}{光电显示技术}{第7教研楼 · 中3012}{Wt Su}
-  \course[H3]{6}{8}{研究生组会}{第6教研楼 · 中}{Yuan Li}
-
-  \more{ · School Start: 04 / 03 / 2024  · Summer Vacation: 05 / 07 / 2024}
-\end{tikzpicture}
-
-\rotatepage
-
-\weeklist{
-  \bfseries\textcolor{W1}{\faIcon{moon}~Monday},
-  \bfseries\textcolor{W2}{\faIcon{fire}~Tuesday},
-  \bfseries\textcolor{W3}{\faIcon{water}~Wednesday},
-  \bfseries\textcolor{W4}{\faIcon{tree}~Thursday},
-  \bfseries\textcolor{W5}{\faIcon{coins}~Friday},
-}
-
-\begin{tikzpicture}
-  \makeframe{Axia\!\texttt{'}\!s Timetable -- Semester 6}
-  
-  % Mon.
-  \course[H5]{7}{8}{Introduction to Cond.}{Building 6 · Middle 225}{Mn Chen}
-
-  \newday % Tue.
-  \course[H1]{8}{9}{Group Theory}{Building 6 · Middle 211}{Li Ge}
-  \course[H5]{10}{11}{Mesoscopic Physics}{Building 6 · Middle 211}{Yuan Li \& Mn Chen}
-
-  \newday % Wed.
-  \course[H6]{1}{2}{Engineering Drawing}{Building 7 · North 3012}{Hc Wang}
-  \course[H9]{8}{9}{Situation \& Policy 6}{Building 6 · North 302}{Xr Qi}[Double Week 10 -- 16]
-  \course[H9]{10}{11}{Operational Simu.}{Building 4 · 411 -- 413}{Li Zhang}[Week 1 -- 8]
-
-  \newday % Thu.
-  \course[H4]{1}{2}{Intercultural Comm.}{Building 3 · 422}{Cl Zuo}
-  \course[H2]{3}{4}{Radio Direction}{Athletic Field}{Ys Yu}
-  \course[H5]{6}{8}{Solid State Physics}{Building 6 · North 408}{Kw Sun}
-
-  \newday % Fri.
-  \course[H8]{1}{2}{OE. Display}{Building 7 · North 3012}{Wt Su}
-  \course[H3]{6}{8}{Group Meeting}{Building 6 · Middle}{Yuan Li}
-
-  \more{ · School Start: 04 / 03 / 2024  · Summer Vacation: 05 / 07 / 2024}
-\end{tikzpicture}
-
 \end{document}
\ No newline at end of file

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

Modified: branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
===================================================================
--- branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-en.tex	2024-03-01 21:49:08 UTC (rev 70330)
+++ branches/branch2023.final/Master/texmf-dist/doc/latex/litetable/litetable-en.tex	2024-03-01 21:49:19 UTC (rev 70331)
@@ -11,13 +11,13 @@
 \usepackage{geometry,pdfpages,caption,indentfirst,setspace}
 \captionsetup[table]{name={\textsc{Table}},labelsep=period}
 \usepackage[level]{datetime}
-\usepackage{unicode-math,xeCJK}
-\usepackage{authblk,xltxtra}
+\usepackage{unicode-math,xeCJK,fontawesome5}
+\usepackage{authblk,xltxtra,bigfoot,enumitem}
 \usepackage{booktabs,diagbox,ragged2e,tabularx}
 \renewcommand\tabularxcolumn[1]{>{\Centering}m{#1}}
 \usepackage[toc]{multitoc}
 \usepackage[mono=false]{libertine}
-% \setstretch{1.25}
+% \setstretch{1.15}
 \setCJKmainfont{Chiron Sung HK}
 [BoldFont=Chiron Sung HK Bold,
   ItalicFont=Kaiti SC]
@@ -34,6 +34,13 @@
 \definecolor{H5}{Hsb}{188,.8,.8} % 青藍色 (Hangzhou MTR L 5 )
 \definecolor{H6}{Hsb}{207,.8,.8} % 海洋蓝 (Hangzhou Metro 6 )
 \definecolor{H7}{Hsb}{290,.8,.8} % 浪漫紫 (Hangzhou Metro 7 )
+\definecolor{W1}{HTML}{CCAD52}
+\definecolor{W2}{HTML}{8FCC52}
+\definecolor{W3}{HTML}{52CC70}
+\definecolor{W4}{HTML}{52CCCC}
+\definecolor{W5}{HTML}{5270CC}
+\definecolor{W6}{HTML}{8F52CC}
+\definecolor{W7}{HTML}{CC52AD}
 \hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
 
 \def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
@@ -44,12 +51,12 @@
   \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
 \makeatother
 
-\title{\bfseries The \pkg{LiteTable} Template}
+\title{\bfseries The \pkg{LiteTable} Template: Colorful Timetable}
 \author{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
 \yyyymmdddate
 \date{\today}
 \affil{\href{mailto:xiamyphys at gmail.com}{\ttfamily xiamyphys at gmail.com}}
-\date{\today\quad Version 2.4a\thanks{%
+\date{\today\quad Version 2.4b\thanks{%
   \url{https://github.com/xiamyphys/litetable}}}
 \begin{document}
 \maketitle
@@ -73,7 +80,7 @@
 Also, you can join my \textsf\LaTeX{} Template Discussion \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} to communicate with me and get the insider preview edition of the template.
 
 \subsection{Packages required}
-This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global options, \pkg{expl3} package to support \cmd{timelist} array, \pkg{xeCJK} package to support the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provide a set of beautiful icons.
+This template is based on the template \pkg{standalone}. And it requires \pkg{tikz} package to plot some graphics, \pkg{kvoptions} and \pkg{etoolbox} packages to provide global options, \pkg{expl3}\footnote{Please use the \pkg{expl3} version after 2023/10/10 to support the e-type variants for expand: \verb|\clist_count:e|.} package to support \cmd{timelist} array, \pkg{xeCJK} package to support the \textbf{Chinese, Simplified} language and \pkg{fontawesome5} package to provide a set of beautiful icons.
 
 \subsection{Installing \pkg{LiteTable} and loading it}
 For portable version, simply download latest \verb|litetable.cls| file from \href{https://github.com/xiamyphys/LiteTable}{GitHub} or \href{https://ctan.org/pkg/litetable}{CTAN} and save it under your working directory. This way of installation is simple and convenient, but you have to manually update \verb|.cls| now and then.
@@ -86,10 +93,10 @@
 
 If you are in some areas with awful Internet environment (such as GFW), you can choose proper mirror source or use other means\footnote{Please comply with local network regulations.}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX{} distribution?}
 
-The template provides four options, \mode{style}, \mode{direction} and \mode{font}. Just add the modes of the options you want separately in the square bracket of the command \verb|\documentclass[ ]{litetable}| in your \verb|.tex| file.
+The template provides two options, \mode{direction} and \mode{font}. Just add the modes of the options you want separately in the square bracket of the command \verb|\documentclass[ ]{litetable}| in your \verb|.tex| file.
 
 \subsection{Compatibility}
-The test environments are macOS + MacTeX 2023 / Overleaf and they all work fine for \XeLaTeX{} compiler, Windows, Linux and Unix platforms compatibility unknown.
+The test environments are macOS + Mac\TeX{} 2023 / Overleaf and they all work fine for \XeLaTeX{} compiler, Windows, Linux and Unix platforms compatibility unknown.
 
 \section{Global Options of \pkg{LiteTable}}
 \begin{verbatim}
@@ -96,9 +103,6 @@
   \documentclass[options]{litetable}
 \end{verbatim}
 
-\subsection{The \mode{style} option}
-This option has two modes, \mode{round} and \mode{sharp}, which can make the course block's corners be round or sharp, and the default mode is sharp.
-
 \subsection{The \mode{direction} option}
 This option has two modes, \mode{portrait} and \mode{landscape}, which can make the timetable displayed portrait or horizontally.
 
@@ -121,53 +125,79 @@
     \bfseries\textcolor{W2}{\faIcon{fire}~Tuesday},
     \bfseries\textcolor{W3}{\faIcon{water}~Wednesday},
     \bfseries\textcolor{W4}{\faIcon{tree}~Thursday},
-    \bfseries\textcolor{W5}{\faIcon{coins}~Friday}
+    \bfseries\textcolor{W5}{\faIcon{coins}~Friday};
+    0,.17,.34,.56,.78,1
   }
 \end{verbatim}
 
-This command can add workdays to the top side of the timetable, and you can also adjust the format that you like, such as name, color and even the logo\footnote{Supports by the \pkg{fontawesome5} package.} before it.
 
+This command can add workdays to the top side of the timetable, you can also adjust the format that you like, such as name, color and even the icon\footnote{Supports by the \pkg{fontawesome5} package.} before it.
+
+You can also custom every width of the columns in the timetable, just like the Figure above.
+
+\begin{figure}[!ht]
+  \centering
+  \tikz
+{
+  \tikzset{every node/.style={font=\small}}
+  \draw [thick,->,>=stealth] ({-1/16*5.1 in},0) -- (5.1 in,0);
+  \draw ({-5.1 in/16},-.1) --++ (0,.2) node [above] {\verb|-1/15|};
+  \draw ({0.0*5.1 in},-.1) --++ (0,.2) node [above] {\verb|0|};
+  \draw ({.17*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.17|};
+  \draw ({.34*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.34|};
+  \draw ({.56*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.56|};
+  \draw ({.78*5.1 in},-.1) --++ (0,.2) node [above] {\verb|.78|};
+  \draw ({1.0*5.1 in},-.1) --++ (0,.2) node [above] {\verb|1|};
+  \node [above] at ({.085*5.1 in},0) {\sffamily\textcolor{W1}{\faIcon{moon}~Monday}};
+  \node [above] at ({.255*5.1 in},0) {\sffamily\textcolor{W2}{\faIcon{fire}~Tuesday}};
+  \node [above] at ({.45*5.1 in},0) {\sffamily\textcolor{W3}{\faIcon{water}~Wednesday}};
+  \node [above] at ({.67*5.1 in},0) {\sffamily\textcolor{W4}{\faIcon{tree}~Thursday}};
+  \node [above] at ({.89*5.1 in},0) {\sffamily\textcolor{W5}{\faIcon{coins}~Friday}};
+}
+\caption*{The second line of array in the \cmd{weeklist} command corresponds to the axis coordinates.}
+\end{figure}
+
 The timetable can automatically generate the corresponding number of columns based on the number of workdays you enter. For example, the code above has 5 workdays, a 5-column timetable will be generated.
 
-\subsection{The \cmd{timelist} \cmd{classnum} command}
+\subsection{The \cmd{timelist} command}
 \begin{verbatim}
-  \timelist{
+  \timelist [13] {%
     8:05,8:55,10:00,10:50,11:40,13:30,14:20,15:15,16:05,18:30,19:20,20:10;
     8:50,9:40,10:45,11:35,12:25,14:15,15:05,16:00,16:50,19:15,20:05,20:55
   }
-
-  \classnum{14}
+  \timelist [13] {}
 \end{verbatim}
 
-The command \cmd{timelist} can add time to the left side of the timetable, and the first line of the content is the start time of the classes while the second line of the content is the end time of the classes, each time separates with a comma (\verb|,|), the first line and the second line separates with a semicolon (\verb|;|).
+The command \cmd{timelist} has two variables while the second one \cmd{\ttfamily\{\#2\}} can add time to the left side of the timetable, and the first line of the content is the start time of the classes while the second line of the content is the end time of the classes, each time separates with a comma (\verb|,|), the first line and the second line separates with a semicolon (\verb|;|).
 
 The timetable can automatically generate the corresponding number of rows based on the number of time groups you enter. For example, the code above has 12 groups of times, a 12-row timetable will be generated.
 
-The command \cmd{classnum} can directly assign the number of rows on the timetable you want without adding time to the left side of the timetable, and there will only be a series of numbers that \emph{aligned vertically to the center of every line}.
+The first optional variable \cmd{\ttfamily[\#1]} can directly assign the number of rows on the timetable you want without adding time to the left side of the timetable, and there will only be a series of numbers that \emph{aligned vertically to the center of every line}.
 
-The following table shows the effects brought about by the usage of the two commands.
 \begin{table}[!ht]
 \centering
-\caption{Usage of commands \cmd{timelist} and \cmd{classnum}.}
+\caption{Usage of the two variables.}
 
 \begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
   \toprule
-  \diagbox{\cmd{classnum}}{\cmd{timelist}} & \multicolumn{1}{c}{To use}          & \multicolumn{1}{c}{Not to use}\\
+  \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{To use}          & \multicolumn{1}{c}{Not to use}\\
   \midrule
   To use     &
-  The effect is like the description of command \cmd{timelist}\newline But the number of rows will be assigned by \cmd{classnum} &
-  The effect is like the description of command \cmd{classnum} before\\
+  The effect is the description of \cmd{\ttfamily\{\#2\}}, but number of rows assign by \cmd{\ttfamily[\#1]} &
+  The effect is the description of \cmd{\ttfamily[\#1]}\\
   \midrule
   Not to use &
-  The effect is like the description of command \cmd{timelist} before &
-  The effect is like the description of command \cmd{timelist} before with \emph{default format of 12 lines}\\
+  The effect is the description of \cmd{\ttfamily\{\#2\}} &
+  The effect is the description of \cmd{\ttfamily[\#1]} before with \emph{default format of 12 lines}\\
   \bottomrule
 \end{tabularx}
 \end{table}
 
+If you want to use the first variable \cmd{\ttfamily[\#1]} only, not to add anything in the second variable.
+
 \begin{itemize}
-  \item Assume that \cmd{timelist} has 12 groups of times, and \cmd{classnum} passed a value of 14, then the left side of the timetable will have only 1 -- 12 rows with time while the last two rows without time the label of them is still upward, not vertically aligned in the center.
-  \item Assume that \cmd{timelist} has 14 sets of times, and \cmd{classnum} passes a value of 12, then only 12 rows of timetables will be generated with time on the left side of each row, that is, the last two sets of data in \cmd{timelist} will be invalid.
+  \item Assume that \cmd{\ttfamily\{\#2\}} has 12 groups of times, and \cmd{\ttfamily[\#1]} passed a value of 14, then the left side of the timetable will have only 1 -- 12 rows with time while the last two rows without time the label of them is still upward, not vertically aligned in the center.
+  \item Assume that \cmd{\ttfamily\{\#2\}} has 14 sets of times, and \cmd{\ttfamily[\#1]} passes a value of 12, then only 12 rows of timetables will be generated with time on the left side of each row, that is, the last two sets of data in \cmd{\ttfamily\{\#2\}} will be invalid.
 \end{itemize}
 
 \subsection{The \cmd{weeks} command}
@@ -185,13 +215,17 @@
 There are 7 variables in this command.
 \begin{itemize}
   \item The 1st one is the color of the class that you want, from ``H1'' to ``H9'', it's optional and the default value is ``H1''.
-  \item The 2nd and 3rd ones is the starting number and ending number of the class.
-  \item The 4th one is the name of the class.
-  \item The 5th one is the address of the class.
-  \item The 6th one is the name of the teacher(s).
+  \item The 2nd -- 6th ones is the starting number and ending number, name, address, teacher(s) of the class.
   \item The last one is the start week and end week of the timetable, it's optional and the default value is the value that you've adjusted in the command \cmd{weeks} or it will be ``Week 1 -- 12''.
 \end{itemize}
 
+\subsection{The \cmd{corner} command}
+\begin{verbatim}
+  \corner{6 pt}
+\end{verbatim}
+
+This command determines the corner radius of the course block.
+
 \subsection{The \cmd{newday} command}
 This command can switch the current weekday to the next day, then the course will move right one grid.
 
@@ -207,41 +241,14 @@
 \end{verbatim}
 There will be a sticker on the southeast of the page after you add, otherwise it won't.
 
-\subsection{The \cmd{(re)rotatepage} command}
-The \cmd{rotatepage} command can change the direction of the timetable temporarily while the \cmd{rerotatepage} command can restore it.
-
-\section{Known Issue: Resolution exceed}
-\begin{verbatim}
-  Dimension too large. <recently read> \pgfmath at x
-\end{verbatim}
-
-When you choose the \mode{landscape} mode and you've added 7 workdays or more (?although the `above' occasion will not occur), it will return this error.
-
-This is mainly caused by the reason that \emph{\textsf{\TeX} has no built-in floating number representation} (Reference: \cprotect{\href{https://tex.stackexchange.com/a/545416/299948}}{How to solve the error `Dimension too large. <recently read> \verb|\pgfmath at x|' while doing the calculations in the table}).
-
-If one can solve this problem through optimization algorithms or other means, welcome submit your code via GitHub: \url{https://github.com/xiamyphys/litetable}, or contact me via email \href{mail:xiamyphys at gmail.com}{\ttfamily xiamyphys at gmail.com}.
-
 \section{Version History}
 
-The design of this course schedule originated from the student course schedule web page\footnote{Only those studying at or graduated from Hangzhou Dianzi University can have the permission of access.} of the \href{https://www.hduhelp.cn/}{HDUHelp} in \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}\footnote{https://en.wikipedia.org/wiki/Hangzhou\_Dianzi\_University}. The layout is very beautiful and then I used \LaTeX{} to imitate that style and made a class schedule template to share with everyone.
+The design of this course schedule originated from the student course schedule web page (only teachers and students of this school can access) of the \href{https://www.hduhelp.cn/}{HDUHelp} in \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}. The layout is very beautiful and then I used \textsf{\LaTeX} to imitate that style and made a class schedule template to share with everyone.
 
-\textsf{\bfseries Version 1.0} was finished on 1 September, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3625.html}{\LaTeX{} Studio} (Hangzhou) and \href{http://xhslink.com/od7Ycw}{Xiaohongshu}, where won the favor of many people.
+\textsf{\bfseries Version 1.0} was finished on 2023/09/01 and released on \href{https://www.latexstudio.net}{\textsf{\LaTeX} Studio} (Hangzhou), where has won the favor of many people.
 
-\textsf{\bfseries Version 2.0a} was finished developing on 1 November, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3636.html}{\LaTeX{} Studio} (Xiaoshan, Hangzhou) and \href{http://xhslink.com/od7Ycw}{Xiaohongshu}. This version used \verb|.cls| files to make the \verb|main.tex| file more concise. Also, this version has added a global option to choose whether the corners of the ``course Block'' to be round or sharp. And this version support adds multiply class schedules in one \verb|.tex| file.
-
-\textsf{\bfseries Version 2.1a} was finished developing on 5 November, 2023. Supports the libertinus font.
-
-\textsf{\bfseries Version 2.2a} was finished developing on 31 January, 2024. This version fixed the bug of resolution exceeded, changed paper type to US letter and support custom course start time and end time.
-
-\textsf{\bfseries Version 2.3a} was finished developing on 2 February, 2024. This version supports automatically generate the corresponding number of rows based on the number of time groups you enter, and in this version, timetable can be displayed horizontally or portrait as you like.
-
-\textsf{\bfseries Version 2.3b} was finished developing on 3 February, 2024. This version optimized coordinate calculation and improved compilation speed.
-
-\textsf{\bfseries Version 2.4a} was finished developing on 24 February, 2024. Happy Lantern Festival! This version supports custom workday display style, and supports hiding time and only showing course program number vertically aligned.
-
-\clearpage
-
-\datechange{2023/09/01}{Version 2.0a}
+\setlist[itemize]{noitemsep, topsep=0pt}
+\datechange{2023/11/01}{Version 2.0a}
 \begin{itemize}
     \item Supports the course block's corners be round or sharp.
     \item Supports multiply class schedules in one \verb|.tex| file.
@@ -272,7 +279,7 @@
   \item Optimized coordinate calculation and improved compilation speed.
 \end{itemize}
 
-\datechange{\today}{Version 2.4a}
+\datechange{2024/02/24}{Version 2.4a}
 \begin{itemize}
   \item Supports custom workday display style.
   \item Supports hiding time and only showing course program number vertically aligned.
@@ -279,8 +286,16 @@
   \item Supports setting default first and last week.
 \end{itemize}
 
+\datechange{\today}{Version 2.4b}
+\begin{itemize}
+  \item Fixed the error of \emph{resolution exceed} in the \mode{landscape} mode and added over 7 workdays.
+  \item Supports custom every width of the columns in the timetable.
+  \item Optimized the design of round corners, supports custom the radius of corners.
+\end{itemize}
+
+\small Thanks for @egreg's code on \TeX{} Exchange for \href{https://tex.stackexchange.com/a/711657/299948}{print number of each rows' elements of an array}.
+
 \appendix
-
 \includepdf[pages={2,4},nup=1x2,pagecommand={
   \tikz[remember picture, overlay]
   \node [rotate=90,below,yshift=-1em] at (current page.west) {\bfseries\LARGE Document Example: \texttt{litetable-demo.tex}};

Modified: branches/branch2023.final/Master/texmf-dist/tex/latex/litetable/litetable.cls
===================================================================
--- branches/branch2023.final/Master/texmf-dist/tex/latex/litetable/litetable.cls	2024-03-01 21:49:08 UTC (rev 70330)
+++ branches/branch2023.final/Master/texmf-dist/tex/latex/litetable/litetable.cls	2024-03-01 21:49:19 UTC (rev 70331)
@@ -14,7 +14,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \PassOptionsToPackage{quiet}{xeCJK}
 \PassOptionsToPackage{no-math}{fontspec}
-\ProvidesClass{litetable}[2024/02/24/ v2.4a LiteTable document class]
+\ProvidesClass{litetable}[2024/02/24/ v2.4b LiteTable document class]
 
 % ---------- 全局选项 ---------- %
 \RequirePackage{kvoptions}
@@ -21,10 +21,6 @@
 \RequirePackage{etoolbox}
 \SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
 
-\DeclareStringOption[sharp]{style}
-\DeclareVoidOption{round}{\kvsetkeys{LITE}{style=round}}
-\DeclareVoidOption{sharp}{\kvsetkeys{LITE}{style=sharp}}
-
 \DeclareStringOption[portiait]{direction}
 \DeclareVoidOption{portiait}{\kvsetkeys{LITE}{direction=portiait}}
 \DeclareVoidOption{landscape}{\kvsetkeys{LITE}{direction=landscape}}
@@ -73,9 +69,7 @@
 \definecolor{darkergray}{HTML}{F1F3F5} % 深色块
 \definecolor{lightergray}{HTML}{FCFDFE} % 浅色块
 \definecolor{blackgray}{HTML}{1A1D21} % 序号颜色
-
 \pagecolor{lightergray}
-
 \definecolor{H1}{HTML}{74A7A2} % 深绿
 \definecolor{H1*}{HTML}{E9EEED}
 \definecolor{H1**}{HTML}{009787}
@@ -103,7 +97,6 @@
 \definecolor{H9}{HTML}{D09966} % 棕色
 \definecolor{H9*}{HTML}{F2E0D0}
 \definecolor{H9**}{HTML}{C96F1C}
-
 \definecolor{W1}{HTML}{CCAD52}
 \definecolor{W2}{HTML}{8FCC52}
 \definecolor{W3}{HTML}{52CC70}
@@ -125,6 +118,7 @@
     \def\pageheight{-11 in}
   }
 }{\relax}
+
 \ifdefstring{\LITE at direction}{landscape}{
   \def\pagewidth{11 in}
   \def\pageheight{-8.5 in}
@@ -138,96 +132,84 @@
   }
 }{\relax}
 
-\ifdefstring{\LITE at style}{round}{\def\corners{rounded corners}}{\relax}
-\ifdefstring{\LITE at style}{sharp}{\def\corners{}}{\relax}
-
 \ExplSyntaxOn % 数组
-\cs_set:Npn \timelist #1 {
-  \gdef\@timelist{#1}
-  \seq_set_split:Nnn \l_node_row_seq {;} {#1}
-  \int_step_inline:nn{\seq_count:N \l_node_row_seq}
-  {
-    \seq_if_exist:cF {l_node_row_##1_seq}
-    {
-      \seq_new:c {l_node_row_##1_seq}
-    }
-    \exp_args:Ncx\seq_set_from_clist:Nn {l_node_row_##1_seq} {\seq_item:Nn \l_node_row_seq{##1}}
-  }
-}
+% 1. Set up arrays
+\def\definearray#1#2
+ {
+  \seq_clear_new:c { l__litetable_array_#1_seq }
+  \seq_set_split:cnn { l__litetable_array_#1_seq } { ; } { #2 }
+ }
 
-\cs_set:Npn \PrintTime [#1][#2] {
-  \tl_if_empty:nTF { #1 }
-  {
-    \tl_if_empty:nTF { #2 }
-    {
-      \seq_use:Nn \l_node_row_seq {,}
-    }
-    {
-      \int_step_inline:nn{\seq_count:N \l_node_row_seq}
-      {
-        \seq_put_right:Nn \l_node_tmp_seq {\seq_item:cn {l_node_row_##1_seq}{#2}}
-      }
-      \seq_use:Nn \l_node_tmp_seq {,}
-    }
-  }
-  {
-    \tl_if_empty:nTF {#2}
-    {
-      \seq_use:cn {l_node_row_#1_seq}{,}
-    }
-    {
-      \seq_item:cn {l_node_row_#1_seq}{#2}
-    }
-  }
-}
+\cs_generate_variant:Nn \seq_set_split:Nnn { c }
 
-\cs_set:Npn \weeklist #1 {
-  \gdef\@weeklist{#1}
-  \gdef\@weeknum{\clist_count:n {#1}} % 计数模块
-  \seq_set_split:Nnn \r_node_row_seq {;} {#1}
-  \int_step_inline:nn{\seq_count:N \r_node_row_seq}
-  {
-    \exp_args:Ncx\seq_set_from_clist:Nn {r_node_row_##1_seq} {\seq_item:Nn \r_node_row_seq{##1}}
-  }
-}
+% 2. Define commands to work with arrays
+\NewExpandableDocumentCommand{\arraycount}{ o m }
+ {
+  \IfNoValueTF { #1 }
+     {
+      \litetable_array_count_full:n { #2 }
+     }
+     {
+      \litetable_array_count_item:nn { #2 } { #1 }
+     }
+ }
 
-\cs_set:Npn \PrintWeek [#1] {
-  \tl_if_empty:nTF {#1}
-    {
-      \seq_use:cn {r_node_row_1_seq}{,}
-    }
-    {
-      \seq_item:cn {r_node_row_1_seq}{#1}
-    }
-}
+\cs_new:Nn \litetable_array_count_item:nn
+ {
+  \clist_count:e { \seq_item:cn { l__litetable_array_#1_seq } { #2 } }
+ }
+
+\NewExpandableDocumentCommand{\arrayitem}{ m m m }
+ {
+  \clist_item:en { \seq_item:cn { l__litetable_array_#1_seq } { #2 } } { #3 }
+ }
+
 \ExplSyntaxOff
 
-\def\classnum#1{\gdef\@classnum{#1}}
-\ifcsname @classnum\endcsname % 判断`\@classnum'由`\timelist'计数赋值还是`\classnum'直接赋值
+\NewDocumentCommand{\timelist}{ o m }
+{
+  \gdef\@timelist{#2}
+  \definearray{timelist}{#2}
+  \IfNoValueTF{#1}{
+    \ifnum \arraycount[2]{timelist}<\arraycount[1]{timelist}
+      \def\@classnum{\arraycount[1]{timelist}}
+      \else
+      \def\@classnum{\arraycount[2]{timelist}}
+    \fi
+  }{\def\@classnum{#1}}
+}
+\ifcsname @timelist\endcsname
   \relax
   \else
-    \ifcsname @timelist\endcsname
-      \gdef\@classnum{\int_div_round:nn {\clist_count:n {\@timelist}}{2}} % 计数模块
-      \else
-        \def\@classnum{12}
-    \fi
+  \def\@classnum{12}
 \fi
+\def\weeklist#1{
+  \gdef\@weeklist{#1}
+  \definearray{weeklist}{#1}
+}
+\gdef\@weeknum{\arraycount[1]{weeklist}}
 
 \RequirePackage{fontawesome5}
 \newcounter{number}
 \def\sticker#1{\gdef\@sticker{#1}}
+\def\corner#1{\gdef\@corner{#1}}
 \def\makeframe#1{
+    \ifcsname @corner\endcsname
+      \tikzset{corner/.style={rounded corners=\@corner}}
+    \else
+      \tikzset{corner/.style={}}
+    \fi
     \draw [darkergray] (0,0) rectangle (\pagewidth,\pageheight);
-    \fill [fill=darkergray,\corners] (0,0) rectangle (\pagewidth,{1.5*\pageheight/(2*\@classnum+3.5)});% 顶部深灰色块
+    \fill [fill=darkergray,corner] (0,0) rectangle (\pagewidth,{1.5*\pageheight/(2*\@classnum+3.5)});% 顶部深灰色块
     \node at (.5*\pagewidth,{.75*\pageheight/(2*\@classnum+3.5)}) {\huge\bfseries\sffamily #1}; % 标题
 
     \ifodd\@classnum
     \foreach \a in {2,4,...,\@classnum,\@classnum+2}
-    \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5),\corners] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
+    \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5),corner] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
     \else
     \foreach \a in {2,4,...,\@classnum}
-    \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5),\corners] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
-    \fill [fill=darkergray,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),\corners] (0,0) rectangle (\pagewidth,{\pageheight/(2*\@classnum+3.5)}); % 底部深灰色块
+    \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5),corner] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
+    \fill [fill=darkergray,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),corner] (0,0) rectangle (\pagewidth,{\pageheight/(2*\@classnum+3.5)}); % 底部深灰色块
     \fi
 
     \foreach \a in {0,1,2,...,\@classnum}
@@ -235,27 +217,29 @@
     
     % 时间标注
     \setcounter{number}{0}
-    \ifcsname @timelist\endcsname % 若 `\@timelist == empty', 跳过该函数 
-    \foreach \x in {1,2,...,\@classnum}
+    \ifcsempty{@timelist}{
+      \foreach \a in {1,2,...,\@classnum}
     {
+      \node [yshift=(1.5+2*\a)*\pageheight/(2*\@classnum+3.5)] at(\pagewidth/32,0)
+      {\bfseries\large\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
+    }
+    }{
+      \foreach \x in {1,2,...,\@classnum}
+    {
       \node [yshift=(2*\x+.9)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
       {\bfseries\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
       \node[yshift=(2*\x+1.55)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
-      {\color{darkgray}\texttt{\PrintTime[1][\x]}};
+      {\color{darkgray}\texttt{\arrayitem{timelist}{1}{\x}}};
       \node[yshift=(2*\x+2.1)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
-      {\color{darkgray}\texttt{\PrintTime[2][\x]}};
+      {\color{darkgray}\texttt{\arrayitem{timelist}{2}{\x}}};
     }
-    \else
-    \foreach \a in {1,2,...,\@classnum}
-    {
-      \node [yshift=(1.5+2*\a)*\pageheight/(2*\@classnum+3.5)] at(\pagewidth/32,0)
-      {\bfseries\large\color{blackgray}\texttt{\refstepcounter{number}\thenumber}};
     }
-    \fi
+
     % 星期标注
     \foreach \a in {1,2,...,\@weeknum}
-      \node [xshift=3*\a*\pagewidth/16] at ({\pagewidth/16-\a*(15*\pagewidth/16*(1/5-1/\@weeknum))-7.5*\pagewidth/(16*\@weeknum)},{2*\pageheight/(2*\@classnum+3.5)})
-      {\PrintWeek[\a]};
+      \node [xshift=\pagewidth/16] at ({.5*(\arrayitem{weeklist}{2}{\a}+\arrayitem{weeklist}{2}{\a+1})*15*\pagewidth/16},{2*\pageheight/(2*\@classnum+3.5)})
+      {\arrayitem{weeklist}{1}{\a}};
+
     \ifcsname @sticker\endcsname
     \node [opacity=.3,above left,yshift=(1.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),inner sep=0pt,outer sep=auto,scale=15] at (\pagewidth,{\pageheight/(2*\@classnum+3.5)}) {\includegraphics[width=\dimeval{\pagewidth/16/\@weeknum}]{\@sticker}};\fi
 }
@@ -273,39 +257,41 @@
 
 \NewDocumentCommand{\course}{O{H1} m m m m m O{\@weeks}}
 {
-  \fill [#1,\corners,
+  \fill [#1,corner,
   yshift=(2*(#2-1))*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16]
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))},{2.5*\pageheight/(2*\@classnum+3.5)}) rectangle ++
-  ({15*\pagewidth/(16*\@weeknum)},{(2+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}); % frame
+  xshift=\pagewidth/16]
+  ({\arrayitem{weeklist}{2}{\theweekday+1}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)}) rectangle ++
+  ({(\arrayitem{weeklist}{2}{\theweekday+2}-\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},{(2+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}); % frame
 
-  \fill [#1*,\corners,
+  \fill [#1*,
   yshift=(2*(#2-1)+.5)*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16]
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))},{2.5*\pageheight/(2*\@classnum+3.5)}) rectangle ++
-  ({15*\pagewidth/(16*\@weeknum)},{(1.5+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}); % content
+  xshift=\pagewidth/16]
+  ({\arrayitem{weeklist}{2}{\theweekday+1}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)}) --++
+  ({(\arrayitem{weeklist}{2}{\theweekday+2}-\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},0) 
+  { [corner] --++ (0,{(1.5+2*(#3-#2))*\pageheight/(2*\@classnum+3.5)}) --++
+  ({(-\arrayitem{weeklist}{2}{\theweekday+2}+\arrayitem{weeklist}{2}{\theweekday+1})*15*\pagewidth/16},0)} -- cycle; % content
   
   \node [#1**,yshift=(#2+#3-1.25)*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16] at
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))+7.5*\pagewidth/(16*\@weeknum)},{2.5*\pageheight/(2*\@classnum+3.5)})
+  xshift=\pagewidth/16] at
+  ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
   {\heiti\large\bfseries #4}; % course
 
   \node [#1**,above,
   yshift=(#2+#3-.2)*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16] at
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))+7.5*\pagewidth/(16*\@weeknum)},{2.5*\pageheight/(2*\@classnum+3.5)})
+  xshift=\pagewidth/16] at
+  ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
   {\heiti\bfseries\small #5}; % location
 
   \node [#1**,below,
   yshift=(#2+#3-.2)*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16] at
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))+7.5*\pagewidth/(16*\@weeknum)},{2.5*\pageheight/(2*\@classnum+3.5)})
+  xshift=\pagewidth/16] at
+  ({.5*(\arrayitem{weeklist}{2}{\theweekday+1}+\arrayitem{weeklist}{2}{\theweekday+2})*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
   {\heiti\bfseries\small #6}; % teacher
 
   \node [#1**,above left,
   yshift=2*#3*\pageheight/(2*\@classnum+3.5),
-  xshift=3*\theweekday*\pagewidth/16] at
-  ({\pagewidth/16-\theweekday*(15*\pagewidth/16*(1/5-1/\@weeknum))+15*\pagewidth/(16*\@weeknum)},{2.5*\pageheight/(2*\@classnum+3.5)})
+  xshift=\pagewidth/16] at
+  ({\arrayitem{weeklist}{2}{\theweekday+2}*15*\pagewidth/16},{2.5*\pageheight/(2*\@classnum+3.5)})
   {\heiti\footnotesize #7}; % weeks
 }
 



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