summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-09-23 21:20:10 +0000
committerKarl Berry <karl@freefriends.org>2024-09-23 21:20:10 +0000
commitbf133efffe4686795a4fc0eb8590de2553ed5c43 (patch)
treed2aa47d57ca4785c454d063a93c0313bb1969528
parent6e4517f84121a3fdb3c0cee8f38337419eae53d1 (diff)
litetable (23sep24)
git-svn-id: svn://tug.org/texlive/trunk@72362 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/litetable/README.md14
-rw-r--r--Master/texmf-dist/doc/latex/litetable/favicon.pngbin17761 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-cn.pdfbin304570 -> 190787 bytes
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-cn.tex383
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-demo.pdfbin106969 -> 57383 bytes
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-demo.tex197
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-en.pdfbin178911 -> 502959 bytes
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-en.tex383
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-hk.pdfbin0 -> 208137 bytes
-rw-r--r--Master/texmf-dist/doc/latex/litetable/litetable-hk.tex181
-rw-r--r--Master/texmf-dist/tex/latex/litetable/litetable.cls637
11 files changed, 827 insertions, 968 deletions
diff --git a/Master/texmf-dist/doc/latex/litetable/README.md b/Master/texmf-dist/doc/latex/litetable/README.md
index 146ccaf19b3..fe33d9bd763 100644
--- a/Master/texmf-dist/doc/latex/litetable/README.md
+++ b/Master/texmf-dist/doc/latex/litetable/README.md
@@ -1,17 +1,13 @@
-# The `LiteTable` document
+# The `litetable` class
-This template provides a beautiful design of class schedule with colorful course blocks.
+This class provides a beautiful design of timetable with colorful course blocks.
-**Welcome to pull requests
-[here](https://github.com/xiamyphys/LiteTable).**
+**Welcome to pull requests [here](https://github.com/xiamyphys/litetable).**
## License
-This work may be distributed and/or modified under the conditions of the
-[LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
-either version 1.3c of this license or (at your option) any later version.
+This work may be distributed and/or modified under the conditions of the [LaTeX Project Public License](http://www.latex-project.org/lppl.txt), either version 1.3c of this license or (at your option) any later version.
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 Maintainer of this work is [Mingyu Xia](https://www.ctan.org/author/xia-my). \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/litetable/favicon.png b/Master/texmf-dist/doc/latex/litetable/favicon.png
deleted file mode 100644
index 4e105b2ce0c..00000000000
--- a/Master/texmf-dist/doc/latex/litetable/favicon.png
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf b/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
index 6e91dd6280d..f4a6fbad830 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex b/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
index cf2cc129ad3..e5974b21f77 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
@@ -1,302 +1,181 @@
-%% ******************************************************
-%% * This work may be distributed and/or modified under *
-%% * the conditions of the LaTeX Project Public License *
-%% * http://www.latex-project.org/lppl.txt *
-%% * either version 1.3c of this license or any later *
-%% * version. *
-%% ******************************************************
-\PassOptionsToPackage{quiet}{xeCJK}
-\PassOptionsToPackage{quiet, no-math}{fontspec}
-\documentclass[11pt]{article}
-\usepackage{geometry,pdfpages,caption,indentfirst,setspace,xeCJK}
-\captionsetup[table]{name={\textsc{Table}},labelsep=period}
-\usepackage[level]{datetime}
-\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.15}
-\setCJKmainfont{Chiron Sung HK}
-[BoldFont=Chiron Sung HK Bold,
- ItalicFont=Kaiti SC]
-\usepackage{hyperref,xcolor,tikz}
-\hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
-\definecolor{pkgcolor}{Hsb}{103,.8,.5}
-\definecolor{moducolor}{Hsb}{290,.8,.5}
-\definecolor{cmdcolor}{Hsb}{188,.8,.5}
-\definecolor{filecolor}{Hsb}{207,.6,.7}
-\definecolor{H1}{Hsb}{349,.8,.8} % 海棠紅 (Hangzhou MTR L 1 )
-\definecolor{H2}{Hsb}{23, .8,.8} % 丹桂橙 (Hangzhou Metro 2 )
-\definecolor{H3}{Hsb}{48, .8,.8} % 柠檬黄 (Hangzhou Metro 3 )
-\definecolor{H4}{Hsb}{103,.8,.8} % 香樟绿 (Hangzhou Metro 4 )
-\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}
-\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
-\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
-\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
-\def\datechange#1#2{%
- \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
- \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
-
-\title{\bfseries\pkg{LiteTable} -- 多彩的课程表\textsf{\LaTeX} 模板}
-\author{\href{https://www.hdu.edu.cn}{杭州电子科技大学}, 夏明宇}
-\yyyymmdddate
-\date{\today}
-\affil{\href{mailto:xiamyphys@gmail.com}{\texttt{xiamyphys@gmail.com}}}
-\date{\today\quad Version 2.4c\thanks{%
- \url{https://github.com/xiamyphys/litetable}}}
-\begin{document}
-\maketitle
+\documentclass[letterpaper]{l3doc}
-\vspace{-2em}
-\begin{abstract}
-\pkg{LiteTable} 模板提供了一个多彩的课程表设计,本文档为 \pkg{LiteTable} 模板的说明文档.
-\end{abstract}
+\usepackage[mono = false]{libertine}
+\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\hologoFontSetup{general = \sffamily}
+\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
+\fvset{xleftmargin = \parindent}
+\usepackage[fontset = none]{ctex}
+\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\usepackage[os = mac]{menukeys}
-\tableofcontents
+\title{
+ \cls{litetable} 文档类:多彩的课程表
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
+}
-\clearpage
+\author{夏明宇,杭州电子科技大学}
-\section{Introduction}
+\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
-\subsection{本模板的目的}
-本模板提供了一个多彩的课程表设计. 如果在使用本模板时遇到问题或有更好的建议,或者你想参与本模板或本人其他模板的开发,欢迎通过邮件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 联络我.
+\date{Version 3.0a, \today}
-同样,你也可以加入我的\textsf\LaTeX{} 技術交流群 \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} 与我交流,来获取模板的内测版本.
+\begin{document}
-\subsection{所需宏集}
-本模板基于 \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} 宏集提供一系列精美的图标.
+\maketitle
-\subsection{安装并载入 \pkg{LiteTable} 模板}
-免安装使用方法如下,从 \href{https://github.com/xiamyphys/LiteTable}{GitHub} 或 \href{https://ctan.org/pkg/litetable}{CTAN} 下载最新的 \verb|litetable.cls| 文件并将它保存至你的项目根目录. 这种安装方式是最便捷的,但是当模板更新后,你需要手动替换 \verb|.cls| 文件.
+\begin{abstract}
+ 本文档为 \cls{litetable} 文档类的用户手册. 该文档类提供了一个多彩的课程表设计. 欢迎通过邮件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 或 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 提供建议或反馈bug. 本手册提供英文、\textbf{中文}和粤语版本.
+\end{abstract}
-然而我强烈建议您使用终端机去执行以下命令,以将所有宏集更新到最新版本,并安装此模板
-\begin{verbatim}
- sudo tlmgr update --self --all
-\end{verbatim}
+\section{介绍}
-如果您所在的地区存在网路封锁(如 GFW 干扰),你可以选择合适的镜像网站或其他方法\footnote{请遵守当地的网路条例.}. 欲详细了解,请前往 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \textsf{\TeX} distribution?}
+\subsection{所需宏包}
-本模板提供了两个选项:\mode{direction} 和 \mode{font}. 将你要使用的选项模式添加在 \verb|.tex| 文件中命令 \verb|\documentclass[ ]{litetable}| 的方括号中即可.
+该文档类基于 \cls{article} 文档类. 需要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 和 \pkg{xcolor} 宏包.
\subsection{兼容性}
-所使用的测试环境为 macOS + MacTeX 2023 / Overleaf,都可在 \XeLaTeX{} 编译方式下顺利运行, Windows, Linux 和 Unix 平台兼容性未知.
-此模板在 macOS 平台开发,使用 ``Heiti SC'' 字体. 如果你未安装此字体,请在命令 \verb|\documentclass{litetable}| 后使用命令 \verb|\setCJKfamilyfont{zhhei}{ }| 将 ``Heiti SC'' 替换为电脑中存在的字体.
+所需 \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{\pkg{LiteTable} 的全局选项}
-\begin{verbatim}
- \documentclass[options]{litetable}
-\end{verbatim}
+\section{使用}
-\subsection{\mode{direction} 选项}
-此选项有两个模式,\mode{portrait} 和 \mode{landscape}, 可使课程表纵向或横向显示,默认为纵向.
+\subsection{载入 \cls{litetable} 并生成课程表框架}
-\subsection{\mode{font} 选项}
-此选项有两个模式,\mode{times} 和 \mode{libertinus},可使字体为 ``Times New Roman'' 或 ``Libertinus'',默认为 ``Times New Roman''\footnote{使用 \mode{libertinus} 模式时请确保已安装该字体.}.
+同加载其他文档类一样,只需写下
-\section{\pkg{LiteTable} 的命令}
+\begin{Verbatim}
+ \documentclass{litetable}
+\end{Verbatim}
-\subsection{\cmd{makeframe} 命令}
-\begin{verbatim}
- \makeframe[Sem 6]{Axia's Timetable}
-\end{verbatim}
+接下来的命令需要带有 \cmd{remember picture, overaly} 选项的 \cmd{tikzpicture} 环境.
-此命令有两个参数,用于建立空白课程表. 第二个参数用于设置标题,第一个可选参数用于在标题右侧添加可跳转至第二页的学期按钮.
+\subsubsection{命令:\cs{maketable}}
-\subsection{\cmd{weeklist} 命令}
-\begin{verbatim}
- \weeklist{
- \textcolor{W1}{星期一}, \textcolor{W2}{星期二},
- \textcolor{W3}{星期三}, \textcolor{W4}{星期四},
- \textcolor{W5}{星期五}, \textcolor{W6}{星期六};
- 0,.175,.35,.525,.7,.875,1
- }
-\end{verbatim}
+\begin{example}
+ \cs{maketable}\oarg{semester}\marg{title}
+\end{example}
-\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}{星期一}};
- \node [above] at ({.2625*5.1 in},0) {\textcolor{W2}{星期二}};
- \node [above] at ({.4375*5.1 in},0) {\textcolor{W3}{星期三}};
- \node [above] at ({.6125*5.1 in},0) {\textcolor{W4}{星期四}};
- \node [above] at ({.7875*5.1 in},0) {\textcolor{W5}{星期五}};
- \node [above] at ({.9375*5.1 in},0) {\textcolor{W6}{星期六}};
- }
- \caption*{命令 \cmd{weeklist} 中的第二行数组与坐标相对应.}
-\end{figure}
+此命令有两个参数,可生成一个空白的课程表框架. 第一个可选参数可在页面的右上角添加学期块,第二个强制参数可指定标题.
-此命令可在课程表顶部添加工作日,你可以自由决定显示样式,甚至是前面的 logo. 你可以自定义课程表中每一列的宽度,如图所示. 课程表可根据你输入的时间组数自动生成相应的列数. 如上方代码共有 5 个工作日,就会生成 5 列的课程表.
-
-\subsection{\cmd{timelist} 命令}
-\begin{verbatim}
- \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
- }
- \timelist [13] {}
-\end{verbatim}
-
-命令 \cmd{timelist} 有两个参数,第二个参数 \cmd{\ttfamily\{\#2\}} 可将时间添加至课程表的左侧,内容的第一行是每节课程开始时间,第二行是每节课程的结束时间,时间之间用逗号(\verb|,|)分隔,行之间用分号(\verb|;|)分隔.
-
-课程表可根据你输入的时间组数自动生成相应的行数. 如上方代码共有 12 组时间,就会生成 12 行的课程表.
-
-第一个可选参数 \cmd{\ttfamily[\#1]} 可直接指定课程表上你想要生成的行数并不会在课程表左侧添加时间,左侧只会有一列\emph{在每行竖直居中}的序号.
-
-\begin{table}[!ht]
-\centering
-\caption{两个参数的使用情况.}
-
-\begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
- \toprule
- \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{使用} & \multicolumn{1}{c}{不使用}\\
- \midrule
- 使用 &
- 效果和 \cmd{\ttfamily\{\#2\}} 描述相同,但生成行数由 \cmd{\ttfamily[\#1]} 决定 &
- 效果和命令 \cmd{\ttfamily[\#1]} 描述相同\\
- \midrule
- 不使用 &
- 效果和命令 \cmd{\ttfamily\{\#2\}} 描述相同 &
- 效果和命令 \cmd{\ttfamily[\#1]} 描述相同\newline\emph{并默认生成 12 行}.\\
- \bottomrule
-\end{tabularx}
-\end{table}
+\subsubsection{命令:\cs{more}}
-如果你要只使用第一个参数 \cmd{\ttfamily[\#1]},那么请不要在第二个参数 \cmd{\ttfamily\{\#2\}} 中添加任何东西.
+\begin{example}
+ \cs{more}\marg{comment}
+\end{example}
-\begin{itemize}
- \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} 命令}
-\begin{verbatim}
- \weeks{Week 1 -- 16}
-\end{verbatim}
+\subsubsection{命令:\cs{timelist}}
-此命令可指定命令 \cmd{course} 第 7 个参数的默认值.
+\begin{example}
+ \cs{timelist}\oarg{rows}\marg{time list}
+\end{example}
-\subsection{\cmd{course} 命令}
-\begin{verbatim}
- \course[H1]{8}{9}{群论}{第6教研楼 · 中211}{Li Ge}[Week 1 -- 16]
-\end{verbatim}
+此命令有两个参数,第一个可选参数 \oarg{\#1} 可直接决定课程表的行数,第二个强制参数 \marg{\#2} 可在课程表的左侧添加时间列表. 输入列表格式如下:开始时间与结束时间之间用短线 (-) 分隔,并用逗号 (,) 在时间组之间分隔. 例如
-此命令共有7个参数.
-\begin{itemize}
- \item 第 1 个为课程块的颜色,从 ``H1'' 到 ``H9'' 供选择,此参数是可选参数,默认为 ``H1''.
- \item 第 2 -- 6 个为课程的起始节数和结束节数、名称,地址和教师的名字.
- \item 第 7 个为课程的首末周,此参数是可选参数,默认值由命令 \cmd{weeks} 指定,若未指定则默认值为 ``Week 1 -- 12''.
-\end{itemize}
+\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}
-\subsection{\cmd{corner} 命令}
-\begin{verbatim}
- \corner{6 pt}
-\end{verbatim}
+对于两个参数的不同使用情况,\cls{litetable} 会以如下规则生成对应行数的课程表框架.
-此命令可决定课程块的圆角半径.
+\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}
-\subsection{\cmd{newday} 命令}
-此命令可切换当前日到第二天,此时课程块会右移一格.
+\begin{itemize}
+ \item 若强制参数 \marg{\#2} 接收了$X$组时间,可选参数 \oarg{\#1} 接收的值为$X+a$,则课程表的左侧只有$1 \sim X$行会显示时间,后面几行不显示时间.
+ \item 若强制参数 \marg{\#2} 接收了$X+a$组时间,可选参数 \oarg{\#1} 接收的值为$X$, 则会生成只有$X$行的课程表,多余的时间组将被忽略,并返回一个警告.
+\end{itemize}
-\subsection{\cmd{more} 命令}
-\begin{verbatim}
- \more{· School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
-\end{verbatim}
+\subsubsection{命令:\cs{weeklist}}
-此命令可在课程表末尾添加备注信息.
+\begin{example}
+ \cs{weeklist}\oarg{default weeks}\marg{week list}
+\end{example}
-\subsection{\cmd{sticker} 命令}
-\begin{verbatim}
- \sticker{favicon}
-\end{verbatim}
+此命令有两个参数. 第一个可选参数可决定默认的星期数并会在每个课程块的右下角显示,第二个强制参数可在课程表的顶部添加对应宽度比例的工作日. 输入列表的第一行为工作日格式,第二行为对应的宽度比例,两行之间用分号 (;) 分隔. 例如
-在使用此命令后页面的右下方会添加一张贴纸.
+\begin{Verbatim}
+ \weeklist[Weeks 1 - 16]{%
+ \scshape Mon, \scshape Tue, \scshape Wed,
+ \scshape Thu, \scshape Fri; 4,5,4,6,5
+ }
+\end{Verbatim}
-\section{版本历史}
+\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}
-课程表的设计源于\href{https://www.hdu.edu.cn}{杭州电子科技大学}杭电助手学生课表页面(仅本校师生可访问). 页面排版十分精美,于是本人使用 \textsf{\LaTeX{}} 复刻出了课程表样式,并制作成模板分享给大家.
+此时 \cs{course} 命令中键 \keys{weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 如果输入的工作日的数量比输入的宽度比例数量多,则多余的工作日将被忽略并返回一条警告.
-\textsf{\bfseries Version 1.0} 于01/09/2023完成开发,并发布在 \href{https://www.latexstudio.net/index/details/index/mid/3625.html}{\textsf{\LaTeX}工作室} (杭州萧山)上,赢得了许多人的喜爱.
-\clearpage
-\setlist[itemize]{noitemsep, topsep=0pt}
-\datechange{2023/11/01}{Version 2.0a}
-\begin{itemize}
- \item 支持课程块显示为圆角或直角.
- \item 支持一个 \verb|.tex| 文件中生成多张课表.
-\end{itemize}
+\subsection{添加课程块}
-\datechange{2023/11/05}{Version 2.1a}
-\begin{itemize}
- \item 支持 libertinus 字体.
-\end{itemize}
+使用 \cs{course} 命令在当前工作日添加课程块. 此命令有两个参数.
-\datechange{2024/01/31}{Version 2.2a}
-\begin{itemize}
- \item 修复了分辨率超出的 bug.
- \item 更改纸张类型为美国信纸.
- \item 支持自定义课程起始和结束时间.
- \item 支持在页面右下角添加一个你喜欢的小贴纸.
- \item 提供简体中文说明文档.
-\end{itemize}
-\setstretch{1}
-\datechange{2024/02/02}{Version 2.3a}
-\begin{itemize}
- \item 支持根据所输入的时间组数自动生成相应的行数.
- \item 课程表可纵向或横向显示.
-\end{itemize}
+\begin{example}
+ \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
+\end{example}
-\datechange{2024/02/03}{Version 2.3b}
-\begin{itemize}
- \item 优化坐标计算,提升编译速度.
-\end{itemize}
+第一个可选参数接收下列键:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 键 \keys{color} 的默认值为 \cmd{DarkSlateGray},键 \keys{weeks} 的默认值由命令 \cs{weeklist} 的第一个参数决定. 第二个和第三个强制参数分别为课程的开始和结束序号. \cs{course} 命令的用例如下
-\datechange{2024/02/24}{Version 2.4a}
-\begin{itemize}
- \item 支持自定义工作日显示样式.
- \item 支持隐藏时间,仅显示竖直对齐课程序号.
- \item 支持设置默认首末周.
-\end{itemize}
+\begin{Verbatim}
+ \course [ color = DarkGreen, subject = listofitems,
+ location = French, teacher = Christian Tellechea
+ ] {10} {12}
+\end{Verbatim}
-\datechange{2024/03/01}{Version 2.4b}
-\begin{itemize}
- \item 修复了在 \mode{landscape} 模式中添加超过 7 个工作日时 \emph{分辨率溢出}的错误.
- \item 支持自定义课程表中每一列的宽度.
- \item 优化圆角设计,支持自定义圆角半径.
- \item 感谢 @egreg 在 \TeX{} Exchange 上提供的 \href{https://tex.stackexchange.com/a/711657/299948}{输出数组中每一列元素个数} 的代码方案.
-\end{itemize}
+\begin{center}
+ \noindent\fbox{
+ \parbox{.96\linewidth}{
+ 将此课程块的颜色设置为 \cmd{DarkGreen},此课程名称为 \cmd{listofitems},上课地点为 \cmd{French},教师为 \cmd{Christian Tellechea},在当日的第 \cmd{10} 节课开始,第 \cmd{12} 节课结束.
+ }
+ }
+\end{center}
-\datechange{\today}{Version 2.4c}
\begin{itemize}
- \item 支持在标题右侧添加学期按钮.
+ \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}
-\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]{litetable-demo.pdf}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf b/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
index 136369231ab..19a726cd7c9 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex b/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
index f2210298bf2..e26d5455ea6 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
@@ -1,175 +1,50 @@
-\documentclass[times]{litetable}
+\documentclass[letterpaper]{litetable}
-% \setCJKfamilyfont{zhhei}{Chiron Sung HK}
+\usepackage{twemojis,newtxtext}
+\usepackage[scaled = .9]{helvet}
+\renewcommand*\familydefault{\sfdefault}
-\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
+\timelist[13]{%
+ 08:05 - 08:50, 08:55 - 09:40, 10:00 - 10:45, 10:50 - 11:35, 11:40 - 12:25,% morning
+ 13:30 - 14:15, 14:20 - 15:05, 15:15 - 16:00, 16:05 - 16:50,% afternoon
+ 18:30 - 19:15, 19:20 - 20:05, 20:10 - 20:55,% evening
}
-\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[SEM 6]{Axia\!\texttt{'}\!s Timetable}
-
- % 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\sffamily\textcolor{W1}{\faIcon{moon}~Monday},
- \bfseries\sffamily\textcolor{W2}{\faIcon{fire}~Tuesday},
- \bfseries\sffamily\textcolor{W3}{\faIcon{water}~Wednesday},
- \bfseries\sffamily\textcolor{W4}{\faIcon{tree}~Thursday},
- \bfseries\sffamily\textcolor{W5}{\faIcon{coins}~Friday},
- \bfseries\sffamily\textcolor{W6}{\faIcon{mountain}~Saturday},
- \bfseries\sffamily\textcolor{W7}{\faIcon{sun}~Sunday};
- 0,.16,.32,.48,.64,.8,.9,1
+\weeklist[Weeks 1 - 16]{%
+ \scshape\texttwemoji{1f312}~Mon, \scshape\texttwemoji{1f525}~Tue,
+ \scshape\texttwemoji{1f30a}~Wed, \scshape\texttwemoji{1f332}~Thu,
+ \scshape\texttwemoji{1fa99}~Fri; 1,1,1,1,1
}
-\begin{tikzpicture}
- \makeframe[SEM 6]{Axia\!\texttt{'}\!s Timetable}
-
- % 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
-}
-\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}~星期六};
- 0,.175,.35,.525,.7,.875,1
-}
-\weeks{Week 1 -- 18}
+\begin{document}
-\begin{tikzpicture}
- \makeframe[SEM 5]{Axia\!\texttt{'}\!s Timetable} % make title & background
- % Mon.
- \course[H1]{1}{2}{羽毛球}{羽毛球场}{Ys Yu}
- \course[H7]{3}{5}{光学镜头设计实验}{第6教研楼 · 南402}{Hao Ying}[Week 5 -- 15]
- \newday % Tue.
- \course[H9]{3}{5}{马克思主义原理}{第6教研楼 · 北320}{Yang Wang}
- \course[H8]{6}{8}{光电检测技术}{第6教研楼 · 北320}{Xf Huang}
- \newday % Wed.
- \course[H7]{3}{4}{激光原理}{第6教研楼 · 中301}{Hd Mao}
- \course[H9]{6}{7}{就业3 | 形策5}{6教中301 | 6教北208}{MJH | QXR}[Week 5 -- 14]
- \course[H5]{8}{9}{计算物理}{第6教研楼 · 中215}{Wj Rao}
- \course[H1]{10}{11}{论文写作指导}{第6教研楼 · 北416}{Yq Shi}
- \newday % Thu.
- \course[H6]{1}{2}{智能传感系统}{第6教研楼 · 北110}{Bx Cai}
- \course[H5]{3}{5}{高等量子力学}{第6教研楼 · 中225}{Mn Chen \& Yuan Li}
- \course[H3]{6}{8}{近代物理实验2}{第6教研楼 · 南}{Xx Chen}[Week 5 -- 16]
- \course[H8]{10}{12}{光电信息技术实验}{第6教研楼 · 南302}{Yu Zhou}[Week 5 -- 15]
- \newday % Fri.
- \course[H7]{1}{2}{光学镜头设计}{第6教研楼 · 北422}{Hao Ying}
- \course[H5]{3}{5}{光电子学}{第6教研楼 · 北202}{Rx Li \& Yuan Li}
- \course[H8]{6}{7}{光电创新实践4}{第6教研楼 · 南302}{Ql Huang}[Week 5 -- 16]
- \course[H5]{8}{9}{研究生组会}{第6教研楼 · 中}{Yuan Li}
- \more{ · Hangzhou Asian Games: 23 / 09 / 2023 -- 08 / 10 / 2023 · School Starts: 11 / 09 / 2023
- · Winter Vacation: 26 / 01 / 2024}
+\begin{tikzpicture}[remember picture, overlay]
+ \maketable{Skyrmion's Timetable}[SEM 7]
+ \newday
+ \course [subject = {xia-my@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 [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}
\end{tikzpicture}
-\rotatepage
+\clearpage
-\weeklist{
- \bfseries\sffamily\textcolor{W1}{\faIcon{moon}~Monday},
- \bfseries\sffamily\textcolor{W2}{\faIcon{fire}~Tuesday},
- \bfseries\sffamily\textcolor{W3}{\faIcon{water}~Wednesday},
- \bfseries\sffamily\textcolor{W4}{\faIcon{tree}~Thursday},
- \bfseries\sffamily\textcolor{W5}{\faIcon{coins}~Friday},
- \bfseries\sffamily\textcolor{W6}{\faIcon{mountain}~Saturday};
- 0,.175,.35,.525,.7,.875,1
+\timelist[12]{}
+\weeklist{%
+ \scshape\texttwemoji{1f312}~Mon, \scshape\texttwemoji{1f525}~Tue,
+ \scshape\texttwemoji{1f30a}~Wed, \scshape\texttwemoji{1f332}~Thu,
+ \scshape\texttwemoji{1fa99}~Fri; 1,1,1,1,1
}
-\begin{tikzpicture}
- \makeframe[SEM 5]{Axia\!\texttt{'}\!s Timetable} % make title
- % Mon.
- \course[H1]{1}{2}{Badminton}{Badminton Court}{Ys Yu}
- \course[H7]{3}{5}{Lens Design Expt.}{Building 6 · South 402}{Hao Ying}[Week 5 -- 15]
- \newday % Tue.
- \course[H9]{3}{5}{Marx's Principles}{Building 6 · North 320}{Yang Wang}
- \course[H8]{6}{8}{OE Detection Tech.}{Building 6 · North 320}{Xf Huang}
- \newday % Wed.
- \course[H7]{3}{4}{Laster Principle}{Building 6 Middle · 301}{Hd Mao}
- \course[H9]{6}{7}{Empl Guide | Situ Policy}{Build 6 · 301 | Build 6 · 208}{MJH | QXR}[Week 5 -- 14]
- \course[H5]{8}{9}{Computational Phys}{Building 6 · Middle 215}{Wj Rao}
- \course[H1]{10}{11}{Essay Writing}{Building 6 · North 416}{Yq Shi}
- \newday % Thu.
- \course[H6]{1}{2}{Sensing System}{Building 6 · North 110}{Bx Cai}
- \course[H5]{3}{5}{Quantum Mechanics$^\dagger$}{Building 6 · Middle 225}{Mn Chen \& Yuan Li}
- \course[H3]{6}{8}{Modern Phys Expt. 2}{Building 6 · South}{Xx Chen}[Week 5 -- 16]
- \course[H8]{10}{12}{OE Info Experiment}{Building 6 · South 302}{Yu Zhou}[Week 5 -- 15]
- \newday % Fri.
- \course[H7]{1}{2}{Optical Lens Design}{Building 6 · North 422}{Hao Ying}
- \course[H5]{3}{5}{Optoelectronics}{Building 6 · North 202}{Rx Li \& Yuan Li}
- \course[H8]{6}{7}{Innovative Practice 4}{Building 6 · South 302}{Ql Huang}[Week 5 -- 16]
- \course[H5]{8}{9}{Group Meeting}{Building 6 · Middle}{Yuan Li}
- \more{ · Hangzhou Asian Games: 23 / 09 / 2023 -- 08 / 10 / 2023
- · School Starts: 11 / 09 / 2023 · Winter Vacation: 26 / 01 / 2024 }
+\begin{tikzpicture}[remember picture, overlay]
+ \maketable{Skyrmion's Timetable}[SEM 8]
\end{tikzpicture}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf b/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
index 33f8659677c..996bbd37504 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-en.tex b/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
index 267f0f83464..6345b74a78b 100644
--- a/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
@@ -1,304 +1,181 @@
-%% ******************************************************
-%% * This work may be distributed and/or modified under *
-%% * the conditions of the LaTeX Project Public License *
-%% * http://www.latex-project.org/lppl.txt *
-%% * either version 1.3c of this license or any later *
-%% * version. *
-%% ******************************************************
-% \PassOptionsToPackage{quiet}{xeCJK}
-% \PassOptionsToPackage{quiet, no-math}{fontspec}
-\documentclass[11pt]{article}
-\usepackage{geometry,pdfpages,caption,indentfirst,setspace}
-\captionsetup[table]{name={\textsc{Table}},labelsep=period}
-\usepackage[level]{datetime}
-\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.15}
-% \setCJKmainfont{Chiron Sung HK}
-% [BoldFont=Chiron Sung HK Bold,
-% ItalicFont=Kaiti SC]
-\usepackage{hyperref,xcolor,tikz}
-\hypersetup{colorlinks,urlcolor=H6,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
-\definecolor{pkgcolor}{Hsb}{103,.8,.5}
-\definecolor{moducolor}{Hsb}{290,.8,.5}
-\definecolor{cmdcolor}{Hsb}{188,.8,.5}
-\definecolor{filecolor}{Hsb}{207,.6,.7}
-\definecolor{H1}{Hsb}{349,.8,.8} % 海棠紅 (Hangzhou MTR L 1 )
-\definecolor{H2}{Hsb}{23, .8,.8} % 丹桂橙 (Hangzhou Metro 2 )
-\definecolor{H3}{Hsb}{48, .8,.8} % 柠檬黄 (Hangzhou Metro 3 )
-\definecolor{H4}{Hsb}{103,.8,.8} % 香樟绿 (Hangzhou Metro 4 )
-\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}
-\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
-\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
-\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
-\def\datechange#1#2{%
- \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
- \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
-
-\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@gmail.com}{\ttfamily xiamyphys@gmail.com}}
-\date{\today\quad Version 2.4c\thanks{%
- \url{https://github.com/xiamyphys/litetable}}}
-\begin{document}
-\maketitle
-
-\vspace{-2em}
-\begin{abstract}
-This is the document for \pkg{LiteTable} template, which provides a beautiful design of class schedule with colorful course blocks.
-\end{abstract}
+\documentclass[letterpaper]{l3doc}
-\tableofcontents
+\usepackage[mono = false]{libertine}
+\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\hologoFontSetup{general = \sffamily}
+\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
+\fvset{xleftmargin = \parindent}
+% \usepackage[fontset = none]{ctex}
+\linespread{1.15}
+\usepackage{indentfirst}
+\setlength{\parindent}{2em}
+\usepackage[os = mac]{menukeys}
-\clearpage
+\title{
+ The \cls{litetable} Class: Colorful Timetable
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
+}
-\section{Introduction}
+\author{Mingyu Xia, Hangzhou Dianzi University}
-\subsection{The purpose of this template}
-This template provides a beautiful design of class schedule with colorful course blocks.
+\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
-If you meet bugs when using this template, or you have better suggestions or ideas, or you want to participate in the development of the template or other templates by me, welcome to contact via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}.
+\date{Version 3.0a, \today}
-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.
+\begin{document}
-\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}\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.
+\maketitle
-\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.
+\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@gmail.com}{xiamyphys@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}
-However, I strongly suggest that you should use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
-\begin{verbatim}
- sudo tlmgr update --self --all
-\end{verbatim}
+\section{Introduction}
-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 \textsf{\TeX} distribution?}
+\subsection{Packages required}
-The template provides two options, \mode{direction} and \mode{font}. Add the modes of the options you want in the square bracket of the command \verb|\documentclass[ ]{litetable}| in \verb|.tex| file.
+This class is based on the \cls{article} class. It requires \pkg{expl3}, \pkg{xparse}, \pkg{tikz}, \pkg{listofitems}, and \pkg{xcolor} packages.
\subsection{Compatibility}
-The test environments are macOS + Mac\TeX{} 2023 / Overleaf and they all work fine for \XeLaTeX{} compiler, Windows, Linux and Unix platforms compatibility unknown.
-This template is developed on macOS platform and using the font ``Heiti SC''. If this font is not installed on your computer, please use the command \verb|\setCJKfamilyfont{zhhei}{ }| after \verb|\documentclass{litetable}| to replace ``Heiti SC'' to the font exists in your computer.
+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{Global Options of \pkg{LiteTable}}
-\begin{verbatim}
- \documentclass[options]{litetable}
-\end{verbatim}
+\section{Usage}
-\subsection{The \mode{direction} option}
-This option has two modes, \mode{portrait} and \mode{landscape}, which can make the timetable displayed portrait or horizontally.
+\subsection{Loading \cls{litetable} and generate the timetable frame}
-\subsection{The \mode{font} option}
-This option has two modes, \mode{times} and \mode{libertinus}, which can make the font to be ``Times New Roman'' or ``Libertinus'', and the default mode is ``Times New Roman''\footnote{Please ensure that your computer has been already installed the font when using this option.}.
+Just like loading any class, write
-\section{Commands of \pkg{LiteTable}}
+\begin{Verbatim}
+ \documentclass{litetable}
+\end{Verbatim}
-\subsection{The \cmd{makeframe} command}
-\begin{verbatim}
- \makeframe[Sem 6]{Timetable}
-\end{verbatim}
+The following commands need the \cmd{tikzpicture} environment with \cmd{remember picture, overaly} option.
-This command has two variables can create an empty class schedule. The second variable can assign the title while the first optional one can add a button that forward to the next page on the right.
+\subsubsection{The \cs{maketable} command}
-\subsection{The \cmd{weeklist} command}
-\begin{verbatim}
- \weeklist{
- \textcolor{W1}{Monday}, \textcolor{W2}{Tuesday},
- \textcolor{W3}{Wednesday}, \textcolor{W4}{Thursday},
- \textcolor{W5}{Friday};
- 0,.17,.34,.56,.78,1
- }
-\end{verbatim}
+\begin{example}
+ \cs{maketable}\oarg{semester}\marg{title}
+\end{example}
+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, the second mandatory argument can assign the title.
-\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}{Monday}};
- \node [above] at ({.255*5.1 in},0) {\sffamily\textcolor{W2}{Tuesday}};
- \node [above] at ({.45*5.1 in},0) {\sffamily\textcolor{W3}{Wednesday}};
- \node [above] at ({.67*5.1 in},0) {\sffamily\textcolor{W4}{Thursday}};
- \node [above] at ({.89*5.1 in},0) {\sffamily\textcolor{W5}{Friday}};
- }
- \caption*{The second line of array in the \cmd{weeklist} command corresponds to the axis coordinates.}
-\end{figure}
+\subsubsection{The \cs{more} command}
+\begin{example}
+ \cs{more}\marg{comment}
+\end{example}
-This command can add workdays to the top side of the timetable, you can adjust the format (the icon before it), every width of the columns in the timetable like the 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} command}
-\begin{verbatim}
- \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
- }
- \timelist [13] {}
-\end{verbatim}
-
-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 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}.
-
-\begin{table}[!ht]
-\centering
-\caption{Usage of the two variables.}
-
-\begin{tabularx}{\textwidth}{c >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}X}
- \toprule
- \diagbox{\cmd{\ttfamily[\#1]}}{\cmd{\ttfamily\{\#2\}}} & \multicolumn{1}{c}{To use} & \multicolumn{1}{c}{Not to use}\\
- \midrule
- To use &
- 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 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}
+This command can add a comment at the southwest corner of the page.
-If you want to use the first variable \cmd{\ttfamily[\#1]} only, not to add anything in the second variable.
+\subsubsection{The \cs{timelist} command}
-\begin{itemize}
- \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}
+\begin{example}
+ \cs{timelist}\oarg{rows}\marg{time list}
+\end{example}
-\subsection{The \cmd{weeks} command}
-\begin{verbatim}
- \weeks{Week 1 -- 16}
-\end{verbatim}
+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. Format for inputting array is the following: separate the start time and the end time with a dash (-) and separate the time groups with a comma (,). For example
-This command can assign the default value of the 7th variable of the command \cmd{course}.
+\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}
-\subsection{The \cmd{course} command}
-\begin{verbatim}
- \course[H1]{8}{9}{Group Theory}{Building 6 · 211}{Li Ge}[Week 1 -- 16]
-\end{verbatim}
+For different usage scenarios of the two arguments, \cls{litetable} will generate a corresponding row-based timetable frame according to the following rules.
+
+\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}
-There are 7 variables in this command.
\begin{itemize}
- \item The 1st one is the color of the class, from ``H1'' to ``H9'', it's optional and the default is ``H1''.
- \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''.
+ \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 there will generate a timetable with only $X$ rows with extra time sets ignored, and it will return a warning.
\end{itemize}
-\subsection{The \cmd{corner} command}
-\begin{verbatim}
- \corner{6 pt}
-\end{verbatim}
+\subsubsection{The \cs{weeklist} command}
-This command determines the corner radius of the course block.
+\begin{example}
+ \cs{weeklist}\oarg{default weeks}\marg{week list}
+\end{example}
-\subsection{The \cmd{newday} command}
-This command can switch the current weekday to the next day, then the course will move right one grid.
+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 first line of the input array is the formats of the working days, and the second line is the corresponding width ratio. Two lines are separated by a semicolon (;). For example
-\subsection{The \cmd{more} command}
-\begin{verbatim}
- \more{· School Start: 04 / 03 / 2024 · Summer Vacation: 05 / 07 / 2024}
-\end{verbatim}
+\begin{Verbatim}
+ \weeklist[Weeks 1 - 16]{%
+ \scshape Mon, \scshape Tue, \scshape Wed,
+ \scshape Thu, \scshape Fri; 4,5,4,6,5
+ }
+\end{Verbatim}
-This command can add remark at the end of the class schedule.
-
-\subsection{The \cmd{sticker} command}
-\begin{verbatim}
- \sticker{favicon}
-\end{verbatim}
-
-There will be a sticker on the southeast of the page after you add, otherwise it won't.
-
-\section{Version History}
-
-The design of this course schedule originated from the student course schedule web page (only personnel 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 I used \textsf{\LaTeX} to imitate that style and made a template to share with everyone.
+\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}
-\textsf{\bfseries Version 1.0} was finished on 2023/09/01 and released on \href{https://www.latexstudio.net}{\textsf{\LaTeX} Studio} (Hsiaoshan, Hangzhou), where has won the favor of many people.
-\clearpage
-\setlist[itemize]{noitemsep, topsep=0pt}
-\datechange{2023/11/01}{Version 2.0a}
-\begin{itemize}
- \item Supports to set the course block's corners be round or sharp.
- \item Supports to add multiply class schedules in one \verb|.tex| file.
-\end{itemize}
+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.
-\datechange{2023/11/05}{Version 2.1a}
-\begin{itemize}
- \item Supports to use the libertinus font.
-\end{itemize}
+\subsection{Add course blocks}
-\datechange{2024/01/31}{Version 2.2a}
-\begin{itemize}
- \item Fixed the bug of resolution exceeded.
- \item Changed paper type to US letter.
- \item Support to custom course start time and end time.
- \item Support to add sticker as you like at the southeast of the page.
- \item Provide simplified Chinese documentation.
-\end{itemize}
+Using the \cs{course} command to add course blocks on the current workday. This command has two arguments.
-\datechange{2024/02/02}{Version 2.3a}
-\begin{itemize}
- \item Supports to generate the corresponding number of rows based on the number of time groups you enter automatically.
- \item Timetable can be displayed portrait or horizontally as you like.
-\end{itemize}
+\begin{example}
+ \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
+\end{example}
-\datechange{2024/02/03}{Version 2.3b}
-\begin{itemize}
- \item Optimized coordinate calculation and improved compilation speed.
-\end{itemize}
+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}
-\datechange{2024/02/24}{Version 2.4a}
-\begin{itemize}
- \item Supports to custom workday display style.
- \item Supports to hide time and only showing course program number vertically aligned.
- \item Supports to set default first and last week.
-\end{itemize}
+\begin{Verbatim}
+ \course [ color = DarkGreen, subject = listofitems,
+ location = French, teacher = Christian Tellechea
+ ] {10} {12}
+\end{Verbatim}
-\datechange{2024/03/01}{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 to custom every width of the columns in the timetable.
- \item Optimized the design of round corners, supports custom the radius of corners.
- \item Thanks for @egreg's code solution on \TeX{} StackExchange for \href{https://tex.stackexchange.com/a/711657/299948}{Printing the number of each rows' elements in an array respectively}.
-\end{itemize}
+\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}
-\datechange{\today}{Version 2.4c}
\begin{itemize}
- \item Supports to add the `Semester' button on the right side of the title.
+ \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}
-\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}};
- }
-]{litetable-demo.pdf}
-\includepdf[pages={1,3}]{litetable-demo.pdf}
+\includepdf[pages = 1]{litetable-demo.pdf}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf b/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
new file mode 100644
index 00000000000..3d318b82cac
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex b/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
new file mode 100644
index 00000000000..ebb2bee438b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
@@ -0,0 +1,181 @@
+\documentclass[letterpaper]{l3doc}
+
+\usepackage[mono = false]{libertine}
+\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\hologoFontSetup{general = \sffamily}
+\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
+\fvset{xleftmargin = \parindent}
+\usepackage[fontset = none]{ctex}
+\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\usepackage[os = mac]{menukeys}
+
+\title{
+ \cls{litetable} 文檔類:多彩嘅課程表
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
+}
+
+\author{夏明宇,杭州電子科技大學}
+
+\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
+
+\date{Version 3.0a, \today}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ 本文檔系 \cls{litetable} 文檔类嘅用戶手冊放. 應該文檔類提供咗個多彩嘅課程表設計. 歡迎通過郵件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 或者 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 建議或者反饋bug. 本手冊提供英語、中文和\textbf{粵語}版本.
+\end{abstract}
+
+\section{介紹}
+
+\subsection{所使宏包}
+
+應該文檔類基於 \cls{article} 文檔类. 要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 同 \pkg{xcolor} 宏包.
+
+\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}
+ \documentclass{litetable}
+\end{Verbatim}
+
+跟住落嚟嘅命令需要帶有 \cmd{remember picture,overaly} 選項嘅 \cmd{tikzpicture} 環境.
+
+\subsubsection{命令:\cs{maketable}}
+
+\begin{example}
+ \cs{maketable}\oarg{semester}\marg{title}
+\end{example}
+
+此命令有兩個參數,可建置一個空白嘅課程表框架. 第一個可選參數可喺頁面嘅嘅右度角添加學期塊,第二個強制參數可指定標題.
+
+\subsubsection{命令:\cs{more}}
+
+\begin{example}
+ \cs{more}\marg{comment}
+\end{example}
+
+此命令可喺頁面嘅嘅右下角添加備注.
+
+\subsubsection{命令:\cs{timelist}}
+
+\begin{example}
+ \cs{timelist}\oarg{rows}\marg{time list}
+\end{example}
+
+此命令有兩個參數,第一個可選參數可直接決定課程表嘅行數,第二個強制参数可喺課程表嘅左側添加時間表. 輸入表格式如下:開始時間同結束時間之間用短線 (-) 分隔,並用逗號 (,) 系咪喺時間組之間分隔. 例如
+
+\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}
+
+对于两个参数唔同使用情况,\cls{litetable} 会以如下规则建置对应行数嘅课程表框架.
+
+\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{\#2} 接受咗$X$组时间,可选参数 \oarg{\#1} 接受嘅值为$X+a$,就课程表嘅左侧得$1 \sim X$行会显示时间,后面几行唔显示时间.
+ \item 若强制参数 \marg{\#2} 接受咗$X+a$组时间,可选参数 \oarg{\#1} 接收嘅值为$X$, 就课程表嘅左侧得$X$行嘅課程表,多餘嘅時間組將畀忽略,並返回一個警告.
+\end{itemize}
+
+\subsubsection{命令:\cs{weeklist}}
+
+\begin{example}
+ \cs{weeklist}\oarg{default weeks}\marg{week list}
+\end{example}
+
+此命令有两个参数. 第一个可选参数可决定预设嘅星期数并会喺每课程塊嘅嘅右下角显示,第二个强制参数可喺课程表嘅顶部添加对应宽度比例嘅工作日. 输入表嘅第一行为工作日格式,第二行为对应嘅宽度比例,两得之间用分号 (;) 分隔. 例如
+
+\begin{Verbatim}
+ \weeklist[Weeks 1 - 16]{%
+ \scshape Mon, \scshape Tue, \scshape Wed,
+ \scshape Thu, \scshape Fri; 4,5,4,6,5
+ }
+\end{Verbatim}
+
+\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}
+
+此時 \cs{course} 命令中鍵 \keys{weeks} 嘅默認值畀賦為 \cmd{Weeks 1 - 16}. 如果輸入工作日嘅數量過輸入嘅寬度比例數量多,就多餘工作日將畀忽略並返回一條警告.
+
+\subsection{添加課程塊}
+
+使用 \cs{course} 命令喺當前工作日添加課程塊. 此命令有兩個參數.
+
+\begin{example}
+ \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
+\end{example}
+
+第一個可選參數接受下列鍵:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 鍵 \keys{color} 嘅默認值為 \cmd{DarkSlateGray},鍵 \keys{weeks} 嘅默認值由命令 \cs{weeklist} 嘅第一個參數決定. 第二個同第三個強制參數勒分別為課程嘅開始同結束序號. \cs{course} 命令嘅用例如下
+
+\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
diff --git a/Master/texmf-dist/tex/latex/litetable/litetable.cls b/Master/texmf-dist/tex/latex/litetable/litetable.cls
index a52c0d5abd8..22fffd3f7c2 100644
--- a/Master/texmf-dist/tex/latex/litetable/litetable.cls
+++ b/Master/texmf-dist/tex/latex/litetable/litetable.cls
@@ -1,314 +1,365 @@
-%% ************************************************************************************************************
-%% ****************************************************** *
-%% * This work may be distributed and/or modified under * * ***** * * *
-%% * the conditions of the LaTeX Project Public License * * ** * * *** * * *
-%% * http://www.latex-project.org/lppl.txt * * * ** * ***** * *
-%% * either version 1.3c of this license or any later * * * ** * ***** * *
-%% * version. * * * ** * * * * *
-%% ****************************************************** ***** ** * * *** * * *
-%% start of file `litetable.cls'. *
-%% Copyright 2023-2024 LiteLaTeX (xiamyphys@gmail.com) *
-%% available at https://github.com/xiamyphys/LiteTable *
-% !Mode:: "TeX:UTF-8" *
-%% ************************************************************************************************************
-\NeedsTeXFormat{LaTeX2e}
-\PassOptionsToPackage{quiet}{xeCJK}
-\PassOptionsToPackage{no-math}{fontspec}
-\ProvidesClass{litetable}[2024/03/03/ v2.4c LiteTable document class]
+%% ***********************************************************
+%% Copyright 2024 by Mingyu XIA <xiamyphys@gmail.com> *
+%% *
+%% This work may be distributed and/or modified under *
+%% the conditions of the LaTeX Project Public License *
+%% *
+%% http://www.latex-project.org/lppl.txt *
+%% *
+%% either version 1.3c of this license or any later *
+%% version. *
+%% *
+%% This work has the LPPL maintenance status `maintained'. *
+%% *
+%% The Current Maintainer of this work is Mingyu XIA. *
+%% *
+%% This work consists of the files litetable.cls, *
+%% and README.md. *
+%% available at https://github.com/xiamyphys/litetable *
+%% ***********************************************************
+% !Mode:: "TeX:UTF-8"
+\ProvidesExplClass {litetable} {2024/09/22} {3.0a} {Colorful timetable class}
-% ---------- 全局选项 ---------- %
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
-
-\DeclareStringOption[portiait]{direction}
-\DeclareVoidOption{portiait}{\kvsetkeys{LITE}{direction=portiait}}
-\DeclareVoidOption{landscape}{\kvsetkeys{LITE}{direction=landscape}}
-
-\DeclareStringOption[times]{font}
-\DeclareVoidOption{times}{\kvsetkeys{LITE}{font=times}}
-\DeclareVoidOption{libertinus}{\kvsetkeys{LITE}{font=libertinus}}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{standalone}}
-\ProcessKeyvalOptions*\relax
-
-\LoadClass[tikz]{standalone}
+\ExplSyntaxOff
-% ---- 文本中的数字 & 字母设置 ---- %
-\RequirePackage{xeCJK}
-\setCJKfamilyfont{zhhei}{Heiti SC}
-\newcommand*\heiti{\CJKfamily{zhhei}}
-\ifdefstring{\LITE@font}{libertinus}{
-\RequirePackage{libertine}
-}{\relax}
-\ifdefstring{\LITE@font}{times}{
-\ifXeTeX
- \RequirePackage[no-math]{fontspec}
- \setmainfont{texgyretermes}[
- UprightFont = *-regular ,
- BoldFont = *-bold ,
- ItalicFont = *-italic ,
- BoldItalicFont = *-bolditalic ,
- Extension = .otf ,
- Scale = 1.0]
- \setsansfont{texgyreheros}[
- UprightFont = *-regular ,
- BoldFont = *-bold ,
- ItalicFont = *-italic ,
- BoldItalicFont = *-bolditalic ,
- Extension = .otf ,
- Scale = 0.9]
-\else
- \RequirePackage{newtxtext}
- \RequirePackage[scaled=.90]{helvet}
-\fi
-}{\relax}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions\relax
+\LoadClass{article}
-% ---------- 色彩组合 ---------- %
-\definecolor{darkgray}{HTML}{727477} % 时间颜色
-\definecolor{darkergray}{HTML}{F1F3F5} % 深色块
-\definecolor{lightergray}{HTML}{FCFDFE} % 浅色块
-\definecolor{blackgray}{HTML}{1A1D21} % 序号颜色
-\definecolor{SEM}{HTML}{DEEAF8} % 学期按钮
-\definecolor{SEM*}{HTML}{3085F3}
-\definecolor{SEM**}{HTML}{007DC3}
+\RequirePackage[svgnames]{xcolor}
+\definecolor{darkergray}{HTML}{F1F3F5}% Blocks
+\definecolor{lightergray}{HTML}{FCFDFE}% Pagecolor
\pagecolor{lightergray}
-\definecolor{H1}{HTML}{74A7A2} % 深绿
-\definecolor{H1*}{HTML}{E9EEED}
-\definecolor{H1**}{HTML}{009787}
-\definecolor{H2}{HTML}{50C9BD} % 浅绿
-\definecolor{H2*}{HTML}{E1F3F2}
-\definecolor{H2**}{HTML}{009D8F}
-\definecolor{H3}{HTML}{86AFFE} % 深蓝
-\definecolor{H3*}{HTML}{DBE7FF}
-\definecolor{H3**}{HTML}{1663F5}
-\definecolor{H4}{HTML}{6BC0EB} % 浅蓝
-\definecolor{H4*}{HTML}{D8EFFA}
-\definecolor{H4**}{HTML}{0072B1}
-\definecolor{H5}{HTML}{D58DFB} % 深紫
-\definecolor{H5*}{HTML}{F2E3FB}
-\definecolor{H5**}{HTML}{A83FDF}
-\definecolor{H6}{HTML}{FF9393} % 浅紫
-\definecolor{H6*}{HTML}{FFDEDE}
-\definecolor{H6**}{HTML}{E73030}
-\definecolor{H7}{HTML}{FFA17D} % 深橙
-\definecolor{H7*}{HTML}{F5E1DA}
-\definecolor{H7**}{HTML}{E2612F}
-\definecolor{H8}{HTML}{F3C06A} % 浅橙
-\definecolor{H8*}{HTML}{F3EADB}
-\definecolor{H8**}{HTML}{E09B14}
-\definecolor{H9}{HTML}{D09966} % 棕色
-\definecolor{H9*}{HTML}{F2E0D0}
-\definecolor{H9**}{HTML}{C96F1C}
-\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}
+\RequirePackage{tikz}
+\tikzset{%
+ every picture/.append style = { line join = round, line cap = round }
+}
\usetikzlibrary{calc}
-\ifdefstring{\LITE@direction}{portiait}{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
- \def\rotatepage{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
- }
- \def\rerotatepage{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
- }
-}{\relax}
-
-\ifdefstring{\LITE@direction}{landscape}{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
- \def\rotatepage{
- \def\pagewidth{8.5 in}
- \def\pageheight{-11 in}
- }
- \def\rerotatepage{
- \def\pagewidth{11 in}
- \def\pageheight{-8.5 in}
- }
-}{\relax}
-\ExplSyntaxOn % 数组
-% 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 }
- }
+\RequirePackage{listofitems}
+\ignoreemptyitems
-\cs_generate_variant:Nn \seq_set_split:Nnn { c }
+\ExplSyntaxOn
-% 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_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
-
-\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
- \def\@classnum{12}
-\fi
-\def\weeklist#1{
- \gdef\@weeklist{#1}
- \definearray{weeklist}{#1}
+\int_new:N \l_course_num_int
+\dim_new:N \l_course_vunit_dim
+\NewDocumentCommand{\timelist}{om}{%
+ \setsepchar{,/-}
+ \IfBlankTF{#2}{%
+ \int_set:Nn \l_course_num_int { #1 }
+ \tl_clear:N \@timelist
+ }{%
+ \readlist*\@timelist{#2}
+ \IfNoValueTF{#1}{%
+ \int_set:Nn \l_course_num_int { \@timelistlen }
+ }{%
+ \int_set:Nn \l_course_num_int { #1 }
+ \int_compare:nNnT {\@timelistlen} > {#1} {%
+ \msg_new:nnn {litetable} {timelist}
+ {\noexpand\timelist~extra~time~group(s)~were~ignored}
+ \msg_warning:nn {litetable} {timelist}
+ }
+ }
+ }
+ \dim_set:Nn \l_course_vunit_dim {%
+ \fp_eval:n {1/(2*\l_course_num_int+3.5)}\paperheight
+ }
}
-\gdef\@weeknum{\arraycount[1]{weeklist}}
-\RequirePackage{fontawesome5}
-\RequirePackage[hidelinks]{hyperref}
-\newcounter{number}
-\tikzset{
- hyperlink node/.style={
- alias=sourcenode,
- append after command={
- let \p1 = (sourcenode.north west),
- \p2 = (sourcenode.south east),
- \n1 = {\x2-\x1}, \n2 = {\y1-\y2} in
- node [inner sep=0pt, outer sep=auto, anchor=north west,at=(\p1)]
- {\Acrobatmenu{#1}{\XeTeXLinkBox{\phantom{\rule{\n1}{\n2}}}}}
+\NewDocumentCommand{\partialsums}{mmm}{%
+ % #1 = list name, #2 = row, #3 = macro name for storing
+ \clist_set:Ne \l__sums_in_clist { #1[#2] }
+ \clist_clear:N \l__sums_out_clist
+ \int_step_inline:nn { \clist_count:N \l__sums_in_clist }{%
+ % ##1 is the highest term
+ \clist_clear:N \l__sums_tmp_clist
+ \int_step_inline:nn { ##1 }{%
+ % populate the tmp clist
+ \clist_put_right:Ne \l__sums_tmp_clist
+ { \clist_item:Nn \l__sums_in_clist {####1} }
+ }
+ \clist_put_right:Ne \l__sums_out_clist{%
+ % do the partial sum
+ \int_eval:n { \clist_use:Nn \l__sums_tmp_clist { + } }
+ }
}
- }
+ \tl_set:Ne #3 { \clist_use:Nn \l__sums_out_clist {,} }
}
-\NewDocumentCommand{\makeframe}{ o m }{
- \draw [lightergray] (0,0) rectangle (\pagewidth,\pageheight);
- \fill [fill=darkergray] (0,0) rectangle (\pagewidth,{1.5*\pageheight/(2*\@classnum+3.5)});% 顶部深灰色块
- \node at (.5*\pagewidth,{.75*\pageheight/(2*\@classnum+3.5)}) {\huge\bfseries\sffamily #2}; % 标题
- \IfNoValueF{#1}{
- \node [outer sep=auto,hyperlink node=NextPage,left,rectangle,fill=SEM,text=SEM*,draw=none,inner sep=1.75ex,rounded corners=6pt] at (.98*\pagewidth,{.75*\pageheight/(2*\@classnum+3.5)}) {\large\sffamily\;$\rightleftharpoons$~#1\;}; % 学期
- }
- \ifodd\@classnum
- \foreach \a in {2,4,...,\@classnum,\@classnum+2}
- \fill [fill=darkergray,yshift=(2*\a-1.5)*\pageheight/(2*\@classnum+3.5)] (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)] (0,0) rectangle (\pagewidth,{2*\pageheight/(2*\@classnum+3.5)}); % 中间深灰色块(循环)
- \fill [fill=darkergray,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5)] (0,0) rectangle (\pagewidth,{\pageheight/(2*\@classnum+3.5)}); % 底部深灰色块
- \fi
- \foreach \a in {0,1,2,...,\@classnum}
- \draw [densely dashed,gray!75,yshift=(2.5+2*\a)*\pageheight/(2*\@classnum+3.5)] (0,0)--(\pagewidth,0); % 分割虚线
-
- % 时间标注
- \setcounter{number}{0}
- \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}};
+\dim_new:N \l_course_hunit_dim
+\NewDocumentCommand{\weeklist}{om}{%
+ \IfValueT{#1}{\tl_set:Nn \l_weeks_tl { #1 }}
+ \setsepchar{;/,}
+ \readlist*\@weeklist{#2}
+ \partialsums{\@weeklist}{2}{\@weeklistaccumulate}
+ \int_compare:nNnT {\listlen\@weeklist[1]} > {\listlen\@weeklist[2]} {%
+ \msg_new:nnn {litetable} {weeklist}
+ {\noexpand\weeklist~extra~weekday~item(s)~were~ignored}
+ \msg_warning:nn {litetable} {weeklist}
}
- }{
- \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{\arrayitem{timelist}{1}{\x}}};
- \node[yshift=(2*\x+2.1)*\pageheight/(2*\@classnum+3.5)] at (\pagewidth/32,0)
- {\color{darkgray}\texttt{\arrayitem{timelist}{2}{\x}}};
+ \readlist*\@weeklistshifts{\@weeklistaccumulate}
+ \dim_set:Nn \l_course_hunit_dim {%
+ \fp_eval:n {%
+ 1/\@weeklistshifts[1,\int_eval:n {\listlen\@weeklist[2]}]*14/15
+ }\paperwidth
}
- }
-
- % 星期标注
- \foreach \a in {1,2,...,\@weeknum}
- \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
}
-\newcounter{weekday}
-\def\newday{\addtocounter{weekday}{1}}
-\AtEndEnvironment{tikzpicture}{\setcounter{weekday}{0}}
-\def\sticker#1{\gdef\@sticker{#1}}
-\def\corner#1{\gdef\@corner{#1}}
-\def\weeks#1{\gdef\@weeks{#1}}
-
-\NewDocumentCommand{\course}{O{H1} m m m m m O{\@weeks}}
-{
- \ifcsname @corner\endcsname
- \tikzset{corner/.style={rounded corners=\@corner}}
- \else
- \tikzset{corner/.style={}}
- \fi
- \fill [#1,corner,
- yshift=(2*(#2-1))*\pageheight/(2*\@classnum+3.5),
- 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*,
- yshift=(2*(#2-1)+.5)*\pageheight/(2*\@classnum+3.5),
- 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=\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=\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=\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
+\NewDocumentCommand{\maketable}{mo}{%
+ % Gray Block at top
+ \fill [ darkergray ] (current~page.north~west)
+ rectangle + (\paperwidth,{-1.5*\l_course_vunit_dim})
+ node [ midway, black, font = \huge\bfseries ] {#1};
+ % Semester
+ \IfNoValueF{#2}{%
+ \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_course_vunit_dim)
+ $) {$\rightleftharpoons$~#2};
+ }
+ % Darker Blocks
+ \foreach \a in {0,2,...,\l_course_num_int}
+ \fill [ densely~dashed,darkergray ]
+ ([yshift=-2*\a*\l_course_vunit_dim]$
+ (current~page.north~west)+
+ (0,-2.5*\l_course_vunit_dim)
+ $) rectangle +
+ (\paperwidth,-2*\l_course_vunit_dim);
+ % Sepdashes
+ \foreach \a in {0,1,2,...,\l_course_num_int}
+ \draw [ densely~dashed, gray, thick ]
+ ([yshift = -2*\a*\l_course_vunit_dim]$
+ (current~page.north~west)+
+ (0,-2.5*\l_course_vunit_dim)
+ $) --++ (\paperwidth,0);
+ \tl_if_empty:NTF {\@timelist}{%
+ % Classes numbering without time
+ \foreach \a in {1,2,...,\l_course_num_int}
+ \node [ yshift = -2*(\a-1)*\l_course_vunit_dim, darkgray!80,
+ font = \bfseries\large\ttfamily ]
+ at ($
+ (current~page.north~west)+
+ (\paperwidth/30,-3.5*\l_course_vunit_dim)
+ $){\a};
+ }{%
+ % Classes numbering with time
+ \foreach \a in {1,2,...,\l_course_num_int}
+ \node [ yshift = -2*(\a-1)*\l_course_vunit_dim,
+ darkgray!80, font = \bfseries\large\ttfamily]
+ at ($
+ (current~page.north~west)+
+ (\paperwidth/30,-3*\l_course_vunit_dim)
+ $){\a};
+ % Classes start time
+ \foreach \a in {1,2,...,\@timelistlen}
+ \node [ yshift = -2*(\a-1)*\l_course_vunit_dim,
+ gray, font = \ttfamily ]
+ at ($
+ (current~page.north~west)+
+ (\paperwidth/30,-3.65*\l_course_vunit_dim)
+ $){\@timelist[\a,1]};
+ % Classes end time
+ \foreach \a in {1,2,...,\@timelistlen}
+ \node [ yshift=-2*(\a-1)*\l_course_vunit_dim,
+ gray, font = \ttfamily ]
+ at ($
+ (current~page.north~west)+
+ (\paperwidth/30,-4.15*\l_course_vunit_dim)
+ $){\@timelist[\a,2]};
+ }
+ % Weekdays
+ \foreach \a in {1,2,...,\listlen\@weeklist[2]}
+ \node [ font = \large\bfseries,
+ xshift = \fp_eval:n {(
+ \@weeklistshifts[1,\a]-\@weeklist[2,\a]/2)/
+ \@weeklistshifts[1,\int_eval:n {\listlen\@weeklist[2]}]
+ *14/15}*\paperwidth ]
+ at ($
+ (current~page.north~west)+
+ (\paperwidth/15,-2*\l_course_vunit_dim)
+ $){\@weeklist[1,\a]};
+}
- \ifcsname @weeks\endcsname
- \node [#1**,above left,
- yshift=2*#3*\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};
- \fi % weeks
+\int_new:N \l_course_weekday_int
+\newcommand{\newday}{\int_add:Nn \l_course_weekday_int {1}}
+\keys_define:nn{course}{%
+ color.tl_set:N = \l_color_tl,
+ color.initial:n = DarkSlateGray,
+ color.default:n = DarkSlateGray,
+ 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,
+ weeks.default:n = \l_weeks_tl,
+}
+\dim_new:N \l_course_shift_dim
+\NewDocumentCommand{\course}{O{}mm}{%
+ \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 {
+ \@weeklistshifts[1,\int_use:N \l_course_weekday_int]-
+ \@weeklist[2,\int_use:N \l_course_weekday_int]
+ }*\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-.5-2*#2}*\l_course_vunit_dim)
+ $) rectangle ($
+ (current~page.north~west)+(-.4pt,.4pt)+
+ (\@weeklistshifts[1,\int_use:N \l_course_weekday_int]
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#3}*\l_course_vunit_dim)
+ $);
+ % Course block bg
+ \fill [ \l_color_tl!10 ] ($
+ (current~page.north~west)+(1.2pt,-.4pt)+
+ (\fp_eval:n {
+ \@weeklistshifts[1,\int_use:N \l_course_weekday_int]-
+ \@weeklist[2,\int_use:N \l_course_weekday_int]
+ }*\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1-2*#2}*\l_course_vunit_dim)
+ $) -- ($
+ (current~page.north~west)+(-1.2pt,-.4pt)+
+ (\@weeklistshifts[1,\int_use:N \l_course_weekday_int]
+ *\l_course_hunit_dim+\paperwidth/15,
+ {\fp_eval:n {-1-2*#2}*\l_course_vunit_dim})
+ $) {[rounded~corners = 7.2pt] -- ($
+ (current~page.north~west)+(-1.2pt,1.2pt)+
+ (\@weeklistshifts[1,\int_use:N \l_course_weekday_int]
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#3}*\l_course_vunit_dim)
+ $) -- ($
+ (current~page.north~west)+(1.2pt,1.2pt)+
+ (\fp_eval:n {
+ \@weeklistshifts[1,\int_use:N \l_course_weekday_int]
+ -\@weeklist[2,\int_use:N \l_course_weekday_int]
+ }*\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#3}*\l_course_vunit_dim)
+ $)} -- cycle;
+ % Course info
+ \tl_if_eq:NNTF {#2} {#3} {%
+ % Single-unit height course block
+ \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 {%
+ \@weeklistshifts[1,
+ \int_use:N \l_course_weekday_int]-
+ \@weeklist[2,
+ \int_use:N \l_course_weekday_int]/2}
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#2-#3}*\l_course_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 {%
+ \@weeklistshifts[1,
+ \int_use:N \l_course_weekday_int]-
+ \@weeklist[2,\int_use:N \l_course_weekday_int]/2}
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#2-#3}*\l_course_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 }
+ };
+ }{%
+ % Multiply-unit height course block
+ \bool_if:nTF {%
+ \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_shift_dim { 0\l_course_vunit_dim }
+ }{%
+ \tl_set:Nn \l_course_anchor_tl { above }
+ \dim_set:Nn \l_course_shift_dim { .125\l_course_vunit_dim }
+ }
+ \cs_if_exist:NT { \l_subject_tl }{%
+ \node [%
+ \l_course_anchor_tl,
+ yshift = \dim_use:N \l_course_shift_dim,
+ \l_color_tl!60, align = center,
+ font = \large\bfseries ]
+ at ($
+ (current~page.north~west)+
+ (\fp_eval:n {%
+ \@weeklistshifts[1,
+ \int_use:N \l_course_weekday_int]-
+ \@weeklist[2,
+ \int_use:N \l_course_weekday_int]/2}
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.5-#2-#3}*\l_course_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 {%
+ \@weeklistshifts[1,
+ \int_use:N \l_course_weekday_int]-
+ \@weeklist[2,\int_use:N \l_course_weekday_int]/2}
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.625-#2-#3}*\l_course_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,
+ inner~sep = {7.2pt-.5ex} ]
+ at ($
+ (current~page.north~west)+
+ (\@weeklistshifts[1,\int_use:N \l_course_weekday_int]
+ *\l_course_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#3}*\l_course_vunit_dim)
+ $) { \l_weeks_tl };
+ }
+ \group_end:
}
-\def\more#1{
- \node [xshift=-1em,yshift=(2.5+2*\@classnum)*\pageheight/(2*\@classnum+3.5),left] at (\pagewidth,{.5*\pageheight/(2*\@classnum+3.5)}){\small\bfseries\color{darkgray}#1};
-} \ No newline at end of file
+% Additional info
+\newcommand{\more}[1]{%
+ \node [ left = 1ex, darkgray, font = \small\bfseries ] at
+ ($(current~page.south~east)+(0,.5*\l_course_vunit_dim)$) {#1};
+}
+\tl_clear:N \thepage
+\endinput
+%% \ No newline at end of file