texlive[73811] Master/texmf-dist: litetable (9feb25)
commits+karl at tug.org
commits+karl at tug.org
Sun Feb 9 22:12:22 CET 2025
Revision: 73811
https://tug.org/svn/texlive?view=revision&revision=73811
Author: karl
Date: 2025-02-09 22:12:22 +0100 (Sun, 09 Feb 2025)
Log Message:
-----------
litetable (9feb25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/litetable/README.md
trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex
trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex
trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
Modified: trunk/Master/texmf-dist/doc/latex/litetable/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/README.md 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/README.md 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,8 +1,8 @@
# The `litetable` class
-This class provides a beautiful design of timetable with colorful course blocks.
+This class provides a colorful timetable design.
-**Welcome to pull requests [here](https://github.com/xiamyphys/litetable).**
+**Welcome to pull requests [here](https://github.com/myhsia/litetable).**
## License
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-cn.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,143 +0,0 @@
-\documentclass[letterpaper]{l3doc}
-
-\hypersetup{urlcolor = teal, filecolor = violet}
-\usepackage[mono = false]{libertine}
-\usepackage{pdfpages,hologo,framed}
-\hologoFontSetup{general = \sffamily}
-\FrameSep = 0pt
-\usepackage[fontset = none]{ctex}
-\setCJKmainfont[BoldFont = *-Medium]{LXGW WenKai}
-\setCJKsansfont[BoldFont = *-Medium]{LXGW WenKai}
-\setCJKmonofont[BoldFont = *-Medium]{LXGW WenKai Mono}
-\usepackage[os = mac]{menukeys}
-\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
-\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
-
-\title
-{
- \bfseries\cls{litetable} 文档类:多彩的课程表
- \thanks{\url{https://github.com/xiamyphys/litetable}}
-}
-\author
-{
- 夏明宇 \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
- \thanks{\href{https://github.com/ljguo1020}{郭李军}开发了读取 \meta{left} -> \meta{right} 型数据结构模块和低版本 \hologo{TeX} Live 兼容模块.}
-}
-\date{Version 3.1D, \today}
-
-\begin{document}
-
-\maketitle
-
-\section{介绍}
-
-\cls{litetable} 文档类提供了一个多彩的课程表设计,基于 \cls{article} 文档类,由 \pkg{expl3} 和 \pkg{tikz} 构建. 兼容发行版 \hologo{TeX} Live 2019 及更高版本,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. 本文档为 \cls{litetable} 文档类的中文用户手册,手册同时有 \href{./litetable-en.pdf}{英文} 和 \href{./litetable-hk.pdf}{粤语} 版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-
-\section{载入 \cls{litetable} 并生成课程表框架}
-
-同加载其他文档类一样,只需写下
-
-\begin{framed}
- \begin{verbatim}
- \documentclass {litetable}
- \end{verbatim}
-\end{framed}
-
-如需输入中文,可自行载入 \pkg{ctex} 宏包并设置字体.
-
-\begin{function}{\timelist,\weeklist}
- \begin{syntax}
- \cs{timelist} \oarg{rows} \marg{list} \cs{timelist} \marg{list} \oarg{rows}
- \cs{weeklist} \oarg{default weeks} \marg{list} \cs{weeklist} \marg{list} \oarg{default weeks}
- \end{syntax}
-
- 命令 \cs{timelist} 的可选参数可强制设定课程表的行数,命令 \cs{weeklist} 的可选参数可设定默认的星期数目并会在每个课程盒子的右下角显示. 两个命令的强制参数均接收数组,可分别在课程表的左侧添加时间列表、在课程表的顶部添加对应宽度比例的工作日. 输入数组的用例见Appendix \ref{mwe}.
-
- 若命令 \cs{timelist} 中时间数组数大于强制设定的行数,则多余的时间数组将被忽略,并返回一个警告. 如果只需在课程表左侧添加一列序号,使强制参数为空即可.
-\end{function}
-
-\begin{function}{\more}
- \begin{syntax}
- \cs{more} \marg{comment}
- \end{syntax}
-
- 此命令可在页面的右下角添加备注.
-\end{function}
-
-\begin{function}{\maketable}
- \begin{syntax}
- \cs{maketable} \oarg{keyvals} \marg{title} \oarg{keyvals}
- \end{syntax}
-
- 此命令可生成一个空白的课程表框架,需在命令 \cs{timelist},\cs{weeklist} 和 \cs{more} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行. 可选参数接收键 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分别在设置课程表框架的背景色和在页面的右上角添加学期,键 \keys{\cmdmac~color} 的默认值为 \cmd{gray}. 强制参数可设定标题.
-\end{function}
-
-\section{添加课程盒子}
-
-\begin{function}{\course}
- \begin{syntax}
- \cs{course} \oarg{keyvals} \marg{start number} \oarg{keyvals} \marg{end number} \oarg{keyvals}
- \end{syntax}
-
- \cs{course} 命令可在当前工作日添加课程盒子,需在命令 \cs{maketable} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行.
-
- 此命令的可选参数接收下列键:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 键 \keys{\cmdmac~color} 默认值为 \cmd{teal},键 \keys{\cmdmac~weeks} 默认值由命令 \cs{weeklist} 的可选参数设定. 第一个和第二个强制参数分别为课程的开始和结束序号. 命令的用例见Appendix \ref{mwe}.
-
- \begin{itemize}
- \item 若课程盒子的高度只有一格,即$\meta{start number} = \meta{end number}$,则键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \keys{\cmdmac~weeks} 的值将会隐藏.
- \item 若键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 均未赋值,则键 \keys{\cmdmac~subject} 的值将输出在课程盒子中心.
- \item 超出课程表工作日范围的课程盒子将不会显示,并返回一条警告.
- \end{itemize}
-\end{function}
-
-\begin{function}{\newday}
- \begin{syntax}
- \cs{newday} \oarg{integral value}
- \end{syntax}
-
- 此命令可使其后面添加的课程盒子后移 \meta{intergal value} 个工作日. 可选参数的默认值为 \cmd{1},即后移 \cmd{1} 个工作日.
-\end{function}
-
-\clearpage
-\appendix
-
-\section{最小工作示例}\label{mwe}
-
-此MWE生成的课程表有13行但是只有前12行标注时间,课程表顶部共有5个工作日,工作日之间的宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 添加了注释和两个课程盒子.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass{litetable}
-
- \begin{document}
-
- \timelist [ 13 ]
- {
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
- 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
- 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
- }
- \weeklist [ Weeks 1 - 16 ]
- {
- Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
- }
- \more { Author: Mingyu Xia \& Lijun Guo }
-
- \begin{tikzpicture} [ remember picture, overlay ]
- \maketable
- \course [ subject = Keep on {\TeX}ing ] {10} {11}
- \newday
- \course [ color = DarkSlateGray, subject = litetable,
- location = Hong Kong, teacher = M.Y. Xia
- ] {8} {8}
- \end{tikzpicture}
-
- \end{document}
- \end{verbatim}
-\end{framed}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
-
-% End of file litetable-cn.tex
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,67 +1,35 @@
-\documentclass[letterpaper, svgnames]{litetable}
+\documentclass[svgnames]{litetable}
-\usepackage{twemojis,newtxtext}
-\usepackage[scaled = .9]{helvet}
-\renewcommand*\familydefault{\sfdefault}
+\usepackage{libertine, inconsolata, twemojis}
+\usepackage[T1]{fontenc}
\begin{document}
-\timelist [ 13 ]
+\timelist [ numformat = \ttfamily \bfseries, timeformat = \ttfamily ]
{
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
- 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
- 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
- 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
}
-\weeklist [ Weeks 1 - 16 ]
+\weeklist [ format = \bfseries \scshape, sep = \textbar ]
{
- \scshape\texttwemoji{1f312} Mon -> 1,
- \scshape\texttwemoji{1f525} Tue -> 1,
- \scshape\texttwemoji{1f30a} Wed -> 1,
- \scshape\texttwemoji{1f332} Thu -> 1,
- \scshape\texttwemoji{1fa99} Fri -> 1
+ \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+ \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+ \texttwemoji{1fa99} Fri -> 1
}
-\more
- {
- School Starts: 06 / 09 / 2024\quad Summer Vacation: 26 / 01 / 2025
- }
-\begin{tikzpicture} [ remember picture, overlay ]
- \maketable [ color = MidnightBlue,
- sem = SEM 6
- ] { Skyrmion's Course Schedule }
- \course [ color = DarkBlue, subject = interface3,
- teacher = The \LaTeX{} Project
- ] {4} {5}
+\begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+ \course [ subject = interface3, comment = \TeX{} Live 2025,
+ lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
\newday
- \course [ color = Purple, subject = expl3,
- teacher = The \LaTeX{} Project
- ] {8} {8}
- \course [ color = FireBrick, subject = usrguide,
- teacher = \LaTeX{} Project Team, weeks = Weeks 7 - 14
- ] {1} {2}
+ \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
\newday
- \course [ subject = Keep on \TeX{}ing ] {10} {11}
+ \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+ location = Stanford University, Purple ] {10} {11}
\newday
- \course [ color = Crimson, subject = \textup{Ti\textit{k\/}Z},
- teacher = The PGF/\textup{Ti\textit{k\/}Z} Team
- ] {3} {5}
- \newday
- \course [ color = DarkSlateGray, subject = litetable,
- location = Hong Kong, teacher = M.Y. Xia
- ] {8} {8}
-\end{tikzpicture}
+ \course [ subject = Ti\textit k\/Z, lecture = \textsc{pgf},
+ Crimson, comment = Version 3.1.10 ] {3} {5}
+ \more { Programme Duration: 09 / 2021 -- 07 / 2025 }
+\end{litetable}
-\clearpage
-
-\timelist [ 12 ] { }
-\weeklist [ Weeks 1 - 16 ] { Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
-
-\begin{tikzpicture} [ remember picture, overlay ]
- \maketable { Skyrmion's Course Schedule }
- %
-\end{tikzpicture}
-
\end{document}
-
-%%
\ No newline at end of file
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf 2025-02-09 21:12:22 UTC (rev 73811)
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -0,0 +1,166 @@
+\documentclass[10pt, letterpaper]{l3doc}
+\usepackage{pdfpages}
+\AddToHook{env/function/before}{\vspace*{-.6\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.1\baselineskip}}
+\def \TFF {true\textbar \textbf{false}}
+\def \TTF {\textbf{true}\textbar false}
+\setlength \parindent {0pt}
+\setlist[description]
+ {leftmargin = 0pt, topsep = .22\baselineskip, itemsep = .11\baselineskip}
+\def \key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\def \keyval #1#2{\key{#1} \normalfont \texttt{=} \meta{\textup{#2}}}
+%
+%
+
+\title{^^X
+ The \cls{litetable} Class -- Colorful Timetable\thanks
+ {^^X
+ \url{https://github.com/myhsia/litetable},
+ \url{https://ctan.org/pkg/litetable}
+ }
+}
+\author{^^X
+ Mingyu Xia \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}^^X
+ \thanks{
+ \href{https://github.com/ljguo1020}{Lijun Guo} developed an interface to
+ read \meta{left} \cmd{->} \meta{right} data structures, and make
+ compatibility for lower versions of \hologo {TeX} Live.
+ }
+}
+\date{Released 2025-02-10\quad \texttt{v3.2A}}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+
+The \cls{litetable} class provides a colorful timetable design, developed by
+\pkg{expl3} based on \pkg{article} and \pkg{tikz}. It is compatible with
+\hologo{TeX} Live 2019 or later distributions and supports compilation methods
+such as \hologo{pdfLaTeX}, \hologo{XeLaTeX} and \hologo{LuaLaTeX}, etc.
+Click to jump to the
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-zh-cn.pdf^^X
+}{[\textsf{Chinese Version}]}
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-zh-hk.pdf^^X
+}{[\textsf{Cantonese Version}]} of this manual.
+
+\section{Interface}
+
+\DescribeEnv{litetable}
+This environment can create a blank timetable frame,
+and it should execute after commands \cs{timelist} and \cs{weeklist}.
+\begin{quote}
+ |\begin{litetable}|
+ \oarg{keys} \marg{title} \oarg{keys}| ... |^^X
+ |\end{litetable}|
+\end{quote}
+The mandatory argument can set the title of the course schedule, and
+the optional argument accepts the following keys
+\begin{description}
+ \item [\keyval{color}{color}] can set the background color of the timetable,
+ default to \cmd{gray}. The key's name can be omitted.
+ \item [\keyval{sem}{string}] can set the semester information
+ at the northeast corner of the page.
+\end{description}
+
+\begin{function}{\weeklist}
+ \begin{syntax}
+ \cs{weeklist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ The mandatory argument accepts an array to set a list of working days and
+ the width of each column at the top of the course schedule.
+ The optional argument accepts the following keys
+ \begin{description}
+ \item [\keyval{format}{format commands}] can set the font for the list of
+ working days, default to \cmd{\bfseries}\cmd{\scshape}.
+ \item [\keyval{sep}{string}] can set the separator of the list of
+ working days, the default is empty.
+ \end{description}
+ \begin{verbatim}
+ \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ { Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\timelist}
+ \begin{syntax}
+ \cs{timelist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ The mandatory argument accepts an array to set the time list on the left side
+ of the course schedule. The optional argument accepts the following keys
+ \begin{description}
+ \item [\keyval{numformat}{format}]
+ can set the font for the sequence number of the time list,
+ default to \cmd{\ttfamily} \cmd{\bfseries}.
+ \item [\keyval{timefont}{format}]
+ can set the font for the time of the time list, default to \cmd{\ttfamily}.
+ \item [\keyval{hidetime}\TFF] is used to hide the time in the time list and
+ only retain the sequence number. The initial value is \cmd{false}.
+ \end{description}
+ \begin{verbatim}
+ \timelist [ numformat = \bfseries, timeformat = \ttfamily ]
+ { 08:30 -> 10:00, 10:30 -> 12:00, 13:00 -> 14:30, 15:00 -> 16:30 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course} \oarg{keys} \marg{start} \oarg{keys} \marg{end} \oarg{keys}
+ \end{syntax}
+ It's used to add course boxes on the current workday, and needs to be
+ executed within the \env{litetable} environment.
+ The two mandatory arguments can set the start and ends of the course
+ respectively, the optional argument accepts the following keys
+ \begin{description}
+ \item [\keyval{color}{color}] is used to set the color of the course box,
+ default to \cmd{teal}. The key's name can be omitted.
+ \item [\keyval{subject}{string}] is used to set the name of the course.
+ \item [\keyval{location}{string}] is used to set the location of the course.
+ \item [\keyval{lecture}{string}] is used to set the lecture of the course.
+ \item [\keyval{comment}{string}] is used to add footnote to the course.
+ \end{description}
+ \begin{texnote}
+ \begin{itemize}
+ \item If \meta{start} \cmd{=} \meta{end}, that is the
+ height of the course box is 1 unit, then \key{location} and \key{lecture}
+ will be outputted in the same line and \key{comment} will be hidden.
+ \item The template will correct automatically if one input
+ \meta{start} and \meta{end} incorrectly.
+ \item If neither \key{location} nor \key{lecture} is assigned value, then
+ \key{subject} will be outputted in the vertical center of the course box.
+ \item Course boxes that exceed the range of the course schedule won't
+ display and it will return a warning.
+ The input example refers to Appendix \ref{mwe}.
+ \end{itemize}
+ \end{texnote}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday} \oarg{integral value}
+ \end{syntax}
+ It can move the next course boxes right \meta{intergal value} working days.
+ The default value of the optional argument is \cmd{1}.
+\end{function}
+
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more} \marg{comment}
+ \end{syntax}
+ It can add a comment at the southwest corner of the course schedule.
+\end{function}
+
+\clearpage \appendix \linespread{1.25}
+
+\section{Working Example} \label{mwe}
+
+\verbatiminput{litetable-demo.tex}
+
+\includepdf[pages = 1]{litetable-demo.pdf}
+
+\end{document}
+
+% End of file litetable-en-us.tex
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-en.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,143 +0,0 @@
-\documentclass[letterpaper]{l3doc}
-
-\hypersetup{urlcolor = teal, filecolor = violet}
-\usepackage[mono = false]{libertine}
-\usepackage{pdfpages,hologo,framed}
-\hologoFontSetup{general = \sffamily}
-\FrameSep = 0pt
-\linespread{1.12}
-\usepackage{indentfirst}
-\setlength{\parindent}{2em}
-\usepackage[os = mac]{menukeys}
-\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
-\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
-
-\title
-{
- \bfseries
- The \cls{litetable} Class: Colorful Timetable
- \thanks{\url{https://github.com/xiamyphys/litetable}}
-}
-\author
-{
- Mingyu Xia \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
- \thanks{\href{https://github.com/ljguo1020}{Lijun Guo} developed modules for reading \meta{left} -> \meta{right} data structure and supporting low version \hologo {TeX} Live.}
-}
-\date{Version 3.1D, \today}
-
-\begin{document}
-
-\maketitle
-
-\section{Introduction}
-
-The \cls{litetable} class provides a timetable design with colorful course boxes, based on the \pkg{article} class and conducted on \pkg{expl3} and \pkg{tikz}. It is compatible with \hologo{TeX}Live 2019 or later distributions, they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. This is the Chinese manual for the \cls{litetable} class, manuals in \href{./litetable-cn.pdf}{Chinese} and \href{./litetable-hk.pdf}{Cantonese} versions are also provided\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-
-\section{Loading \cls{litetable} and generate the timetable frame}
-
-Just like loading any class, write
-
-\begin{framed}
- \begin{verbatim}
- \documentclass {litetable}
- \end{verbatim}
-\end{framed}
-
-One can load the \pkg{ctex} package and set the font to input the CJK characters, if necessary.
-
-\begin{function}{\timelist,\weeklist}
- \begin{syntax}
- \cs{timelist} \oarg{rows} \marg{list} \cs{timelist} \marg{list} \oarg{rows}
- \cs{weeklist} \oarg{default weeks} \marg{list} \cs{weeklist} \marg{list} \oarg{default weeks}
- \end{syntax}
-
- The optional argument of the command \cs{timelist} can force the number of rows on the timetable, and that of the command \cs{weeklist} can set the default number of weeks and print it at every course box's southeast corner. Each mandatory argument of the two commands accepts an array that can add a time list to the left side of the timetable and add workdays with corresponding width ratios at the top of the timetable, respectively. The example for inputting the arrays is shown in Appendix \ref{mwe}.
-
- If the number of time arrays received by the command \cs{timelist} is greater than the forced number of rows, then the extra time sets are ignored, and it will return a warning. If one wants to add a series of numbers to the left side of the timetable without time, just leave the mandatory argument blank.
-\end{function}
-
-\begin{function}{\more}
- \begin{syntax}
- \cs{more} \marg{comment}
- \end{syntax}
-
- This command can add a comment at the southwest corner of the page.
-\end{function}
-
-\begin{function}{\maketable}
- \begin{syntax}
- \cs{maketable} \oarg{keyvals} \marg{title} \oarg{keyvals}
- \end{syntax}
-
- This command can create a blank timetable frame, and it should execute after commands \cs{timelist} and \cs{weeklist} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}. The optional argument accepts keys, it can set the background color of the timetable, and add the semester at the northeast corner of the page, the default value of the key \keys{\cmdmac~color} is \cmd{gray}. The mandatory argument can set the title.
-\end{function}
-
-\section{Add course boxes}
-
-\begin{function}{\course}
- \begin{syntax}
- \cs{course} \oarg{keyvals} \marg{start number} \oarg{keyvals} \marg{end number} \oarg{keyvals}
- \end{syntax}
-\end{function}
-
-The \cs{course} command can add course boxes on the current workday, it should execute after command \cs{maketable} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}.
-
-The optional argument accepts the following keys: \keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. The default value of the key \keys{\cmdmac~color} is \cmd{teal}, and the default value of the key \keys{\cmdmac~weeks} is determined by the argument of the command \cs{weeklist}. The first and second mandatory arguments are the start and end numbers of the course, respectively. The example of this command is shown in Appendix \ref{mwe}.
-
-\begin{itemize}
- \item If the course box's height is only one unit, that is $\meta{start number} = \meta{end number}$, the values of keys \keys{\cmdmac~location} and \keys{\cmdmac~teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{\cmdmac~weeks} will be hidden.
- \item If neither the key \keys{\cmdmac~location} nor the key \keys{\cmdmac~teacher} is assigned value, then the value of the key \keys{\cmdmac~subject} will print at the center of the course box.
- \item course boxes that are out of the timetable will not display, and it will return a warning.
-\end{itemize}
-
-\begin{function}{\newday}
- \begin{syntax}
- \cs{newday} \oarg{intergal value}
- \end{syntax}
-
- This command has an optional argument that can move the course boxes right \meta{intergal value} working days. The default value of the optional argument is \cmd{1} to move right \cmd{1} workday.
-\end{function}
-
-\clearpage\linespread{1.375}
-\appendix
-
-\section{Minimal Working Example}\label{mwe}
-
-The following MWE could generate a timetable of 13 lines but only the top 12 lines have been marked with time, and there are 5 workdays at the top of the timetable, ratios between them are $4:5:4:6:5$. The default value of the key \keys{\cmdmac~weeks} will be set to \cmd{Weeks 1 - 16}. A comment and two course boxes are added.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass{litetable}
-
- \begin{document}
-
- \timelist [ 13 ]
- {
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
- 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
- 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
- }
- \weeklist [ Weeks 1 - 16 ]
- {
- Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
- }
- \more { Author: Mingyu Xia \& Lijun Guo }
-
- \begin{tikzpicture} [ remember picture, overlay ]
- \maketable
- \course [ subject = Keep on {\TeX}ing ] {10} {11}
- \newday
- \course [ color = DarkSlateGray, subject = litetable,
- location = Hong Kong, teacher = M.Y. Xia
- ] {8} {8}
- \end{tikzpicture}
-
- \end{document}
- \end{verbatim}
-\end{framed}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
-
-% End of file litetable-en.tex
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-hk.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,143 +0,0 @@
-\documentclass[letterpaper]{l3doc}
-
-\hypersetup{urlcolor = teal, filecolor = violet}
-\usepackage[mono = false]{libertine}
-\usepackage{pdfpages,hologo,framed}
-\hologoFontSetup{general = \sffamily}
-\FrameSep = 0pt
-\usepackage[fontset = none]{ctex}
-\setCJKmainfont[BoldFont = *-Medium]{LXGW WenKai}
-\setCJKsansfont[BoldFont = *-Medium]{LXGW WenKai}
-\setCJKmonofont[BoldFont = *-Medium]{LXGW WenKai Mono}
-\usepackage[os = mac]{menukeys}
-\AddToHook{env/function/before}{\vspace{-.3\baselineskip}}
-\AddToHook{env/syntax/after}{\vspace{-.2\baselineskip}}
-
-\title
-{
- \bfseries\cls{litetable} 文檔類:多彩嘅課程表
- \footnote{\url{https://github.com/xiamyphys/litetable}}
-}
-\author
-{
- 夏明宇 \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at gmail.com}>}
- \thanks{\href{https://github.com/ljguo1020}{郭李軍}開發咗讀取 \meta{left} -> \meta{right} 型資料結構糢塊同低版本 \hologo{TeX} Live 相容糢塊.}
-}
-\date{Version 3.1D, \today}
-
-\begin{document}
-
-\maketitle
-
-\section{介紹}
-
-\cls{litetable} 文檔類提供咗個多彩嘅課程表設計,基於 \cls{article} 文檔類,由 \pkg{expl3} 和 \pkg{tikz} 構建. 相容發行版 \hologo{TeX} Live 2019 同更高版本,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. 本文檔系 \cls{litetable} 文檔類嘅用户手冊放,手冊放同時有 \href{./litetable-en.pdf}{英文} 同 \href{./litetable-cn.pdf}{官話} 版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-
-\section{載入 \cls{litetable} 並建置課程表框架}
-
-同載入其他文檔類一樣,只令寫下
-
-\begin{framed}
- \begin{verbatim}
- \documentclass {litetable}
- \end{verbatim}
-\end{framed}
-
-如需輸入中文,可自行載入 \pkg{ctex} 宏包並設置字型.
-
-\begin{function}{\timelist,\weeklist}
- \begin{syntax}
- \cs{timelist} \oarg{rows} \marg{list} \cs{timelist} \marg{list} \oarg{rows}
- \cs{weeklist} \oarg{default weeks} \marg{list} \cs{weeklist} \marg{list} \oarg{default weeks}
- \end{syntax}
-
- 命令 \cs{timelist} 嘅可選參數可強制設定課程表嘅行數,命令 \cs{weeklist} 嘅可選參數可設定預設嘅星期數目並會喺每個課程盒子嘅右下角顯示. 兩個命令嘅強制參數均接受數組,可分別就系課程表嘅左側添加時間表、喺課程表嘅頂部添加對應寬度比例嘅工作日. 輸入數組嘅用例見Appendix \ref{mwe}.
-
- 若命令 \cs{timelist} 中時間數組數字大於可選參數接受值,就多餘嘅時間數組將畀忽略,並返回一個警告. 如果只系課程表左側添加一部序號,令強制參數為空即可.
-\end{function}
-
-\begin{function}{\more}
- \begin{syntax}
- \cs{more} \marg{comment}
- \end{syntax}
-
- 此命令可喺頁面嘅嘅右下角添加備注.
-\end{function}
-
-\begin{function}{\maketable}
- \begin{syntax}
- \cs{maketable} \oarg{keyvals} \marg{title} \oarg{keyvals}
- \end{syntax}
-
- 此命令可建置一個空白嘅課程表框架,使喺命令 \cs{timelist},\cs{weeklist} 同 \cs{more} 後,並喺帶有 \cmd{[remember picture, overaly]} 選項嘅 \env{tikz} 環境中執行. 可選引數接受鍵 \keys{\cmdmac~color} \keys{\cmdmac~sem},可分別就喺設置課程表框架嘅背景色同喺頁面嘅嘅右度角添加學期,鍵 \keys{\cmdmac~color} 嘅默認值為 \cmd{gray}. 強制參數可設定標題.
-\end{function}
-
-\section{添加課程盒子}
-
-\begin{function}{\course}
- \begin{syntax}
- \cs{course} \oarg{keyvals} \marg{start number} \oarg{keyvals} \marg{end number} \oarg{keyvals}
- \end{syntax}
-
- \cs{course} 命令可喺當前工作日添加課程盒子,要喺命令 \cs{maketable} 後,並喺帶有 \cmd{remember picture,overaly} 選項嘅 \env{tikzpicture} 環境中執行.
-
- 此命令嘅可選參數接受下列鍵:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 鍵 \keys{\cmdmac~color} 默認值為 \cmd{teal},鍵 \keys{\cmdmac~weeks} 默認值由命令 \cs{weeklist} 嘅可選參數決定. 第一個同第二個強制參數勒分別為課程嘅開始同結束序號. 命令嘅用例見Appendix \ref{mwe}.
-
- \begin{itemize}
- \item 若課程盒子高度得一格,即$\marg{start number} = \marg{end number}$,就鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \keys{\cmdmac~weeks} 嘅值將會隱藏.
- \item 若鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 均未賦值,就鍵 \keys{\cmdmac~subject} 嘅值將輸出喺課程盒子中心.
- \item 超出課程表工作日範圍嘅課程盒子將唔會顯示,只會返回一條警告.
- \end{itemize}
-\end{function}
-
-\begin{function}{\newday}
- \begin{syntax}
- \cs{newday} \oarg{integral value}
- \end{syntax}
-
- 此命令有一個可選參數,可令其後面添加嘅課程盒子後移 \meta{intergal value} 個工作日. 可選參數嘅默認值為\cmd{1},即後移\cmd{1}個工作日.
-\end{function}
-
-\clearpage
-\appendix
-
-\section{最小工作範例}\label{mwe}
-
-此MWE建置嘅課程表有13行但系得前12行标注时间,課程表顶部共有五个工作日,工作日之间嘅宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 嘅默认值畀赋为 \cmd{Weeks 1 - 16}. 添加咗註解同兩個課程盒子.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass{litetable}
-
- \begin{document}
-
- \timelist [ 13 ]
- {
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
- 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
- 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
- }
- \weeklist [ Weeks 1 - 16 ]
- {
- Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
- }
- \more { Author: Mingyu Xia \& Lijun Guo }
-
- \begin{tikzpicture} [ remember picture, overlay ]
- \maketable
- \course [ subject = Keep on {\TeX}ing ] {10} {11}
- \newday
- \course [ color = DarkSlateGray, subject = litetable,
- location = Hong Kong, teacher = M.Y. Xia
- ] {8} {8}
- \end{tikzpicture}
-
- \end{document}
- \end{verbatim}
-\end{framed}
-
-\includepdf[pages = 1]{litetable-demo.pdf}
-
-\end{document}
-
-% End of file litetable-hk.tex
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf 2025-02-09 21:12:22 UTC (rev 73811)
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -0,0 +1,166 @@
+\documentclass[quiet, 10pt, letterpaper]{l3doc}
+\usepackage{pdfpages}
+\AddToHook{env/function/before}{\vspace*{-.6\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.1\baselineskip}}
+\def \TFF {true\textbar \textbf{false}}
+\def \TTF {\textbf{true}\textbar false}
+\setlength \parindent {0pt}
+\setlist[description]{leftmargin = 0pt}
+\def \key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\def \keyval #1#2{\key{#1} \normalfont \texttt{=} \meta{\textup{#2}}}
+\usepackage{ctex}
+\setCJKmainfont{LXGW WenKai}
+\setCJKsansfont{LXGW Marker Gothic}
+
+\title{^^X
+ \sffamily \cls{litetable} 文档类 -- 多彩的课程表\thanks
+ {^^X
+ \url{https://github.com/myhsia/litetable},
+ \url{https://ctan.org/pkg/litetable}
+ }
+}
+\author{^^X
+ 夏明宇 \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}^^X
+ \thanks{
+ \href{https://github.com/ljguo1020}{郭李军}
+ 开发了读取 \meta{left} \cmd{->} \meta{right} 型数据结构的接口,
+ 并为低版本 \hologo{TeX} Live 做兼容.
+ }
+}
+\date{Released 2025-02-10\quad \texttt{v3.2A}}
+
+\begin{document}
+
+\maketitle
+
+\section{介绍}
+
+\cls{litetable} 文档类提供了一个多彩的课程表设计,
+基于 \cls{article} 和 \pkg{tikz} 由 \pkg{expl3} 开发.
+其兼容发行版 \hologo{TeX} Live 2019 及更高版本,
+支持 \hologo{pdfLaTeX},\hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 等多种编译方式.
+点击跳转至手册的
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-en-us.pdf^^X
+}{[\textsf{English Version}]}
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-zh-hk.pdf^^X
+}{[\textsf{粵語版本}]}.
+
+\section{用户接口}
+
+\DescribeEnv{litetable}
+此环境可生成一个空白课程表框架,
+需在命令 \cs{timelist},\cs{weeklist} 后执行
+\begin{quote}
+ |\begin{litetable}|
+ \oarg{keys} \marg{title} \oarg{keys}| ... |^^X
+ |\end{litetable}|
+\end{quote}
+强制参数用于设定课程表标题,
+可选参数接受以下键
+\begin{description}
+ \item [\keyval{color}{color}] 可设置课程表框架的背景色,
+ 默认值为 \cmd{gray}. 键名可省略.
+ \item [\keyval{sem}{string}]
+ 可设置页面右上角的学期信息.
+\end{description}
+
+\begin{function}{\weeklist}
+ \begin{syntax}
+ \cs{weeklist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ 强制参数接收数组,
+ 用于设置课程表顶部的工作日列表和列宽.
+ 可选参数接受以下键
+ \begin{description}
+ \item [\keyval{format}{format commands}]
+ 可设置工作日列表格式,默认为 \cmd{\bfseries}\cmd{\scshape}.
+ \item [\keyval{sep}{string}] 可设置工作日列表的分隔符,
+ 默认为空.
+ \end{description}
+ \begin{verbatim}
+ \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ { Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\timelist}
+ \begin{syntax}
+ \cs{timelist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ 强制参数均接收数组,用于设置课程表的左侧的时间列表.
+ 可选参数接受以下键
+ \begin{description}
+ \item [\keyval{numformat}{format}]
+ 可设置时间列表的序号字体,
+ 默认为 \cmd{\ttfamily}\cmd{\bfseries}.
+ \item [\keyval{timefont}{format}] 可设置时间列表的时间字体,
+ 默认为 \cmd{\ttfamily}.
+ \item [\keyval{hidetime}\TFF] 用于隐藏时间列表中的时间,只保留序号.
+ 初始为 \cmd{false}.
+ \end{description}
+ \begin{verbatim}
+ \timelist [ numformat = \bfseries, timeformat = \ttfamily ]
+ { 08:30 -> 10:00, 10:30 -> 12:00, 13:00 -> 14:30, 15:00 -> 16:30 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course} \oarg{keys} \marg{start} \oarg{keys} \marg{end} \oarg{keys}
+ \end{syntax}
+ 用于在当前工作日添加课程盒子,
+ 需在 \env{litetable} 环境中执行.
+ 两个强制参数分别用于设置课程的开始和结束序号.
+ 可选参数接收下列键
+ \begin{description}
+ \item [\keyval{color}{color}] 用于设置课程盒子的颜色,
+ 默认为 \cmd{teal}. 键名可省略.
+ \item [\keyval{subject}{string}] 用于设置课程名称.
+ \item [\keyval{location}{string}] 用于设置课程地点.
+ \item [\keyval{lecture}{string}] 用于设置授课教师.
+ \item [\keyval{comment}{string}] 用于给课程添加脚注.
+ \end{description}
+ \begin{texnote}
+ \begin{itemize}
+ \item 若 \meta{start} \cmd{=} \meta{end},即课程盒子的高度为 1,
+ 则 \key{location} 和 \key{lecture} 将输出在同一行,
+ \key{comment} 的值将会隐藏.
+ \item 即使误将 \meta{start} 与 \meta{end} 写反,
+ 模板也会自动纠正.
+ \item 若 \key{location} \key{lecture} 均未使用,
+ 则 \key{subject} 将输出在课程盒子中心.
+ \item 超出课程表范围的课程盒子将不显示,
+ 并会返回警告.
+ 输入用例见 Appendix \ref{mwe}.
+ \end{itemize}
+ \end{texnote}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday} \oarg{integral value}
+ \end{syntax}
+ 使其后面添加的课程盒子后移 \meta{intergal value} 个工作日.
+ 可选参数的默认值为 \cmd{1}.
+\end{function}
+
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more} \marg{comment}
+ \end{syntax}
+ 在课程表的右下角添加备注.
+\end{function}
+
+\clearpage \appendix
+
+\section{工作示例} \label{mwe} \linespread{1.25}
+
+\verbatiminput{litetable-demo.tex}
+
+\includepdf[pages = 1]{litetable-demo.pdf}
+
+\end{document}
+
+% End of file litetable-zh-cn.tex
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf 2025-02-09 21:12:22 UTC (rev 73811)
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex 2025-02-09 21:12:22 UTC (rev 73811)
@@ -0,0 +1,166 @@
+\documentclass[quiet, 10pt, letterpaper]{l3doc}
+\usepackage{pdfpages}
+\AddToHook{env/function/before}{\vspace*{-.6\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.1\baselineskip}}
+\def \TFF {true\textbar \textbf{false}}
+\def \TTF {\textbf{true}\textbar false}
+\setlength \parindent {0pt}
+\setlist[description]{leftmargin = 0pt}
+\def \key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\def \keyval #1#2{\key{#1} \normalfont \texttt{=} \meta{\textup{#2}}}
+\usepackage{ctex}
+\setCJKmainfont{LXGW WenKai}
+\setCJKsansfont{LXGW Marker Gothic}
+
+\title{^^X
+ \sffamily \cls{litetable} 文檔類 -- 多彩嘅課程表\thanks
+ {^^X
+ \url{https://github.com/myhsia/litetable},
+ \url{https://ctan.org/pkg/litetable}
+ }
+}
+\author{^^X
+ 夏明宇 \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}^^X
+ \thanks{
+ \href{https://github.com/ljguo1020}{郭李軍}
+ 開發咗讀取 \meta{left} \cmd{->} \meta{right} 型數據結構嘅接口,
+ 並為低版本 \hologo{TeX} Live 做兼容.
+ }
+}
+\date{Released 2025-02-10\quad \texttt{v3.2A}}
+
+\begin{document}
+
+\maketitle
+
+\section{介紹}
+
+\cls{litetable} 文檔類提供咗一個多彩嘅課程表設計,
+基於 \cls{article} 和 \pkg{tikz} 由 \pkg{expl3} 開發.
+其兼容發行版 \hologo{TeX} Live 2019 及更高版本,
+支持 \hologo{pdfLaTeX},\hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 等多種編譯方式.
+點擊跳轉至手冊嘅
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-en-us.pdf^^X
+}{[\textsf{English Version}]}
+\href{http://mirrors.ctan.org/macros/latex/contrib/^^X
+ litetable/doc/litetable-zh-hk.pdf^^X
+}{[\textsf{粵語版本}]}.
+
+\section{用戶接口}
+
+\DescribeEnv{litetable}
+呢個環境可生成一個空白課程表框架,
+需在命令 \cs{timelist},\cs{weeklist} 後執行
+\begin{quote}
+ |\begin{litetable}|
+ \oarg{keys} \marg{title} \oarg{keys}| ... |^^X
+ |\end{litetable}|
+\end{quote}
+強制參數用於設定課程表標題,
+可選參數接受以下鍵
+\begin{description}
+ \item [\keyval{color}{color}] 可設置課程表框架嘅背景色,
+ 默認值為 \cmd{gray}. 鍵名可省略.
+ \item [\keyval{sem}{string}]
+ 可設置頁面右上角嘅學期信息.
+\end{description}
+
+\begin{function}{\weeklist}
+ \begin{syntax}
+ \cs{weeklist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ 強制參數接收數組,
+ 用於設置課程表頂部嘅工作日列表和列寬.
+ 可選參數接受以下鍵
+ \begin{description}
+ \item [\keyval{format}{format commands}]
+ 可設置工作日列表格式,默認為 \cmd{\bfseries}\cmd{\scshape}.
+ \item [\keyval{sep}{string}] 可設置工作日列表嘅分隔符,
+ 默認為空.
+ \end{description}
+ \begin{verbatim}
+ \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ { Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\timelist}
+ \begin{syntax}
+ \cs{timelist} \oarg{keys} \marg{list} \oarg{keys}
+ \end{syntax}
+ 強制參數均接收數組,用於設置課程表嘅左側嘅時間列表.
+ 可選參數接受以下鍵
+ \begin{description}
+ \item [\keyval{numformat}{format}]
+ 可設置時間列表嘅序號字體,
+ 默認為 \cmd{\ttfamily}\cmd{\bfseries}.
+ \item [\keyval{timefont}{format}] 可設置時間列表嘅時間字體,
+ 默認為 \cmd{\ttfamily}.
+ \item [\keyval{hidetime}\TFF] 用於隱藏時間列表中嘅時間,只保留序號.
+ 初始為 \cmd{false}.
+ \end{description}
+ \begin{verbatim}
+ \timelist [ numformat = \bfseries, timeformat = \ttfamily ]
+ { 08:30 -> 10:00, 10:30 -> 12:00, 13:00 -> 14:30, 15:00 -> 16:30 }
+ \end{verbatim}
+\end{function}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course} \oarg{keys} \marg{start} \oarg{keys} \marg{end} \oarg{keys}
+ \end{syntax}
+ 用於在當前工作日添加課程盒子,
+ 需在 \env{litetable} 環境中執行.
+ 兩個強制參數分別用於設置課程嘅開始和結束序號.
+ 可選參數接收下列鍵
+ \begin{description}
+ \item [\keyval{color}{color}] 用於設置課程盒子嘅顏色,
+ 默認為 \cmd{teal}. 鍵名可省略.
+ \item [\keyval{subject}{string}] 用於設置課程名稱.
+ \item [\keyval{location}{string}] 用於設置課程地點.
+ \item [\keyval{lecture}{string}] 用於設置授課教師.
+ \item [\keyval{comment}{string}] 用於給課程添加腳注.
+ \end{description}
+ \begin{texnote}
+ \begin{itemize}
+ \item 若 \meta{start} \cmd{=} \meta{end},即課程盒子嘅高度為 1,
+ 則 \key{location} 和 \key{lecture} 將輸出在同一行,
+ \key{comment} 嘅值將會隱藏.
+ \item 即使誤將 \meta{start} 與 \meta{end} 寫反,
+ 模板也會自動糾正.
+ \item 若 \key{location} \key{lecture} 均未使用,
+ 則 \key{subject} 將輸出在課程盒子中心.
+ \item 超出課程表範圍嘅課程盒子將不顯示,
+ 並會返回警告.
+ 輸入用例見 Appendix \ref{mwe}.
+ \end{itemize}
+ \end{texnote}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday} \oarg{integral value}
+ \end{syntax}
+ 使其後面添加嘅課程盒子後移 \meta{intergal value} 個工作日.
+ 可選參數嘅默認值為 \cmd{1}.
+\end{function}
+
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more} \marg{comment}
+ \end{syntax}
+ 在課程表嘅右下角添加備注.
+\end{function}
+
+\clearpage \appendix
+
+\section{工作示例} \label{mwe} \linespread{1.25}
+
+\verbatiminput{litetable-demo.tex}
+
+\includepdf[pages = 1]{litetable-demo.pdf}
+
+\end{document}
+
+% End of file litetable-zh-hk.tex
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls 2025-02-09 21:11:58 UTC (rev 73810)
+++ trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls 2025-02-09 21:12:22 UTC (rev 73811)
@@ -1,5 +1,5 @@
%% *********************************************************************
-%% Copyright 2024 by M.Y. XIA <xiamyphys at gmail.com> *
+%% Copyright 2024 by M.Y. XIA <myhsia at outlook.com> *
%% *
%% This work may be distributed and/or modified under the *
%% conditions of the LaTeX Project Public License *
@@ -13,27 +13,23 @@
%% The Current Maintainers of this work are M.Y. XIA & L.J. Guo *
%% *
%% This work consists of the files litetable.cls, *
-%% and README.md. *
-%% available at https://github.com/xiamyphys/litetable *
+%% and README.md. *
+%% available at https://github.com/myhsia/litetable *
%% *********************************************************************
-\RequirePackage{xparse}% For TeX Live 2019 - 2020 Compatibility
-\ProvidesExplClass {litetable} {2024/10/13} {3.1D} {Course Schedule}
+\RequirePackage{xparse}
+\ProvidesExplClass {litetable} {2025/02/10} {3.2A} {Colorful Timetable}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
-\ProcessOptions\relax
-\LoadClass{article}
+\DeclareOption* { \PassOptionsToClass \CurrentOption { article } }
+\ProcessOptions \relax
+\LoadClass { article }
-\pagestyle{empty}
-\RequirePackage{tikz}
+\pagestyle { empty }
+\RequirePackage { tikz }
-% Module for texlive 2021 and later (by @ljguo)
-\cs_if_exist:NF \clist_put_right:Ne
+% Compatibility for texlive 2019 and later (by @ljguo)
+\cs_if_exist:NF \clist_put_right:Ne
{ \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
-\cs_if_exist:NF \clist_set:Ne
- { \cs_generate_variant:Nn \clist_set:Nn { Ne } }
-\cs_if_exist:NT \clist_count:e
- { \cs_generate_variant:Nn \clist_count:n { e } }
-\cs_if_exist:NF \exp_args:NNNe
+\cs_if_exist:NF \exp_args:NNNe
{
\cs_new:Npn \exp_args:NNNe #1#2#3#4
{
@@ -45,76 +41,73 @@
}
% Module for left -> right data structure (by @ljguo)
-\cs_new_protected_nopar:Npn \__litetable_get_left:nN #1#2
+\cs_new_protected_nopar:Npn \__lite_get_left:nN #1#2
{
\group_begin:
- \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } {#1}
- \exp_args:NNNe \group_end: \tl_set:Nn #2
- { \seq_item:Nn \l__litetable_tmpa_seq { 1 } }
+ \seq_set_split:Nnn \l__lite_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l__lite_tmpa_seq { 1 } }
}
-\cs_new_protected_nopar:Npn \__litetable_get_right:nN #1#2
+\cs_new_protected_nopar:Npn \__lite_get_right:nN #1#2
{
\group_begin:
- \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } {#1}
- \exp_args:NNNe \group_end: \tl_set:Nn #2
- { \seq_item:Nn \l__litetable_tmpa_seq { 2 } }
+ \seq_set_split:Nnn \l__lite_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l__lite_tmpa_seq { 2 } }
}
-\cs_generate_variant:Nn \__litetable_get_left:nN { e }
-\cs_generate_variant:Nn \__litetable_get_right:nN { e }
+\cs_generate_variant:Nn \__lite_get_left:nN { e }
+\cs_generate_variant:Nn \__lite_get_right:nN { e }
+% Workshop Broadcast
+\cs_new_protected:Npn \lite_msg_new:nn #1#2
+ { \msg_new:nnn { litetable } {#1} {#2} }
+\cs_new_protected:Npn \lite_msg_warning:n #1
+ { \msg_warning:nn { litetable } {#1} }
+
\int_new:N \l__time_num_int
\dim_new:N \l__time_vunit_dim
-\cs_new_protected:Npn \litetable_msg_new:nn #1#2
- { \msg_new:nnn { litetable } {#1} {#2} }
-\cs_new_protected:Npn \litetable_msg_warning:n #1
- { \msg_warning:nn { litetable } {#1} }
-\litetable_msg_new:nn { timelist }
- { \exp_not:N \timelist~extra~time~group(s)~were~ignored }
-\cs_new_protected_nopar:Npn \litetable_timelist:nn #1#2
+\keys_define:nn { litetable / timelist }
{
- \clist_set:Nn \l__litetable_timelist_clist {#2}
- \tl_if_empty:nTF {#1}
- {
- \int_set:Nn \l__time_num_int
- { \clist_count:N \l__litetable_timelist_clist }
- }
- {
- \int_set:Nn \l__time_num_int {#1}
- \int_compare:nNnTF {#1} <
- { \clist_count:N \l__litetable_timelist_clist }
- {
- \int_set:Nn \l__time_num_int
- { \clist_count:N \l__litetable_timelist_clist }
- \litetable_msg_warning:n { timelist }
- }
- { \int_set:Nn \l__time_num_int {#1} }
- }
+ numformat .tl_set:N = \l__lite_timelist_numformat_tl,
+ numformat .initial:n = \ttfamily \bfseries,
+ timeformat .tl_set:N = \l__lite_timelist_timeformat_tl,
+ timeformat .initial:n = \ttfamily,
+ hidetime .bool_set:N = \l__lite_timelist_hidetime_bool,
+ hidetime .initial:n = false,
+ hidetime .default:n = true
+ }
+\NewDocumentCommand \timelist { O{} m O{} }
+ { \keys_set:nn { litetable / timelist } { #1, #3 } \lite_timelist:n {#2} }
+\cs_new_protected_nopar:Npn \lite_timelist:n #1
+ {
+ \clist_set:Nn \l__lite_time_clist {#1}
+ \int_set:Nn \l__time_num_int { \clist_count:N \l__lite_time_clist }
\dim_set:Nn \l__time_vunit_dim
{ \fp_eval:n { 1/( 2\l__time_num_int + 3.5 ) } \paperheight }
}
-\NewDocumentCommand \timelist { O{} m O{} }
- { \litetable_timelist:nn { #1 #3 } {#2} }
\clist_new:N \l__week_ratio_clist
\clist_new:N \l__week_accum_clist
\int_new:N \l__week_num_int
\dim_new:N \l__week_hunit_dim
-\cs_new_protected_nopar:Npn \litetable_weeklist:nn #1#2
+\NewDocumentCommand \weeklist { O{} m O{} }
+ { \keys_set:nn { litetable / weeklist } { #1, #3 } \lite_weeklist:n {#2} }
+\keys_define:nn { litetable / weeklist }
{
- \tl_set:Nn \l__default_weeks_tl {#1}
- \clist_set:Nn \l__litetable_weeklist_clist {#2}
- \int_step_inline:nn
- { \clist_count:N \l__litetable_weeklist_clist }
+ format .tl_set:N = \l__lite_weeklist_format_tl,
+ format .initial:n = \bfseries \scshape,
+ sep .tl_set:N = \l__lite_weeklist_sep_tl
+ }
+\cs_new_protected_nopar:Npn \lite_weeklist:n #1
+ {
+ \clist_set:Nn \l__lite_week_clist {#1}
+ \int_step_inline:nn { \clist_count:N \l__lite_week_clist }
{
- \__litetable_get_right:eN
- {
- \clist_item:Nn \l__litetable_weeklist_clist {##1}
- } \l__litetable_tmpb_tl
- \clist_put_right:Ne \l__week_ratio_clist
- { \l__litetable_tmpb_tl }
+ \__lite_get_right:eN
+ { \clist_item:Nn \l__lite_week_clist {##1} } \l__lite_tmpb_tl
+ \clist_put_right:Ne \l__week_ratio_clist { \l__lite_tmpb_tl }
}
- \int_step_inline:nn
- { \clist_count:N \l__litetable_weeklist_clist }
+ \int_step_inline:nn { \clist_count:N \l__lite_week_clist }
{
\clist_clear:N \l__week_accumtmp_clist
\int_step_inline:nn {##1}
@@ -128,332 +121,280 @@
\int_set:Nn \l__week_num_int
{
\clist_item:Nn \l__week_accum_clist
- { \clist_count:N \l__litetable_weeklist_clist }
+ { \clist_count:N \l__lite_week_clist }
}
\dim_set:Nn \l__week_hunit_dim
- { \fp_eval:n { 1/\l__week_num_int * 14/15 } \paperwidth }
+ { \dim_eval:n { 14\paperwidth/\l__week_num_int/15 } }
}
-\NewDocumentCommand \weeklist { O{} m O{} }
- { \litetable_weeklist:nn { #1 #3 } {#2} }
-\NewDocumentCommand \more { m }
- { \tl_set:Nn \l__litetable_comment_tl {#1} }
+\int_new:N \l__lite_weekday_int
+\int_set:Nn \l__lite_weekday_int { 1 }
+\NewDocumentCommand \newday { O{1} } { \int_add:Nn \l__lite_weekday_int {#1} }
-\int_new:N \l__litetable_week_day_int
-\int_set:Nn \l__litetable_week_day_int { 1 }
-\NewDocumentCommand \newday { O{1} }
- { \int_add:Nn \l__litetable_week_day_int {#1} }
-
+\dim_new:N \l__lite_timelist_yshift_dim
\keys_define:nn { litetable / frame }
{
- sem.tl_set:N = \l__bg_sem_tl,
- color.tl_set:N = \l__bg_color_tl,
- color.initial:n = gray
+ color .tl_set:N = \l__bg_color_tl,
+ color .initial:n = gray,
+ sem .tl_set:N = \l__bg_sem_tl,
+ unknown .code:n = \tl_if_novalue:nF {#1}
+ { \tl_set_eq:NN \l__bg_color_tl \l_keys_key_tl }
}
-\cs_new_protected_nopar:Npn \litetable_maketable:nn #1
+\NewDocumentEnvironment { litetable } { O{} m O{} }
{
+ \tikzpicture [ remember~picture, overlay ]
+ \group_begin:
+ \keys_set:nn { litetable / frame } { #1, #3 }
+ \lite_maketable:n {#2}
+ } { \group_end: \endtikzpicture }
+\cs_new_protected_nopar:Npn \lite_maketable:n #1
+ {
\fill [ \l__bg_color_tl!5 ]
- (current~page.north~west) rectangle +
- (\paperwidth, -1.5\l__time_vunit_dim)
- node [ midway, black, font = \huge\bfseries ] {#1};
- \tl_if_empty:NF { \l__bg_sem_tl }
+ (current~page.north~west) rectangle +
+ (\paperwidth, -1.5\l__time_vunit_dim)
+ node [ midway, black, font = \huge \bfseries ] {#1};
+ \tl_if_empty:NF \l__bg_sem_tl
{
\node [ shift = {(-.02\paperwidth, -.75\l__time_vunit_dim)},
left, rectangle, fill = DarkBlue!10, text = DarkBlue!60,
inner~sep = 2ex, rounded~corners = 8pt, font = \large
- ] at (current~page.north~east)
- { \ensuremath\rightleftharpoons\ \l__bg_sem_tl };
+ ] at (current~page.north~east) { \l__bg_sem_tl };
}
% Darker Blocks
\int_step_inline:nnnn { 0 } { 2 } { \l__time_num_int }
{
- \filldraw
- [ fill = \l__bg_color_tl!5, draw = gray,
- thick, densely~dashed, line~cap = round
- ]
- ([shift = {(-.4pt, \fp_eval:n { - 2 * ##1 - 2.5 } \l__time_vunit_dim)}]
- current~page.north~west
- ) rectangle + (\paperwidth + .8pt, -2\l__time_vunit_dim);
+ \filldraw [ fill = \l__bg_color_tl!5, draw = gray,
+ thick, densely~dashed, line~cap = round ]
+ ([shift = {(-.4pt, \fp_eval:n { -2 * ##1 - 2.5 } \l__time_vunit_dim)}]
+ current~page.north~west) rectangle +
+ (\paperwidth + .8pt, -2\l__time_vunit_dim);
}
- % Classes numbering
- \clist_if_empty:NTF { \l__litetable_timelist_clist }
+ \bool_if:NTF \l__lite_timelist_hidetime_bool
+ { \dim_set:Nn \l__lite_timelist_yshift_dim { -1.5\l__time_vunit_dim } }
+ { \dim_set:Nn \l__lite_timelist_yshift_dim { -\l__time_vunit_dim } }
+ \int_step_inline:nn { \l__time_num_int }
{
- \int_step_inline:nn { \l__time_num_int }
- {
- \node
- [ shift =
- {(
- \paperwidth/30,
- \fp_eval:n { - 2 * ##1 - 1.5 } \l__time_vunit_dim
- )}, darkgray!80, font = \large\ttfamily\bfseries
+ \node [ darkgray!80, shift =
+ {(
+ \paperwidth/30,
+ -2 * ##1 \l__time_vunit_dim + \l__lite_timelist_yshift_dim
+ )}, font = \large \l__lite_timelist_numformat_tl
] at (current~page.north~west) {##1};
- }
}
+ % Classes time
+ \bool_if:NF \l__lite_timelist_hidetime_bool
{
- \int_step_inline:nn { \l__time_num_int }
+ \int_step_inline:nn { \clist_count:N \l__lite_time_clist }
{
- \node
- [ shift =
- {(
- \paperwidth/30,
- \fp_eval:n { - 2 * ##1 - 1 } \l__time_vunit_dim
- )}, darkgray!80, font = \large\ttfamily\bfseries
- ] at (current~page.north~west) {##1};
+ \__lite_get_left:eN { \clist_item:Nn \l__lite_time_clist {##1} }
+ \l__lite_tmpa_tl
+ \__lite_get_right:eN { \clist_item:Nn \l__lite_time_clist {##1} }
+ \l__lite_tmpb_tl
+ \node [ gray, align = center, shift =
+ {(
+ \paperwidth/30,
+ \fp_eval:n { -1.85 - 2 * ##1 } \l__time_vunit_dim
+ )}, font = \l__lite_timelist_timeformat_tl
+ ] at (current~page.north~west)
+ { \l__lite_tmpa_tl\\ \l__lite_tmpb_tl };
}
- % Classes time
- \int_step_inline:nn
- { \clist_count:N \l__litetable_timelist_clist }
- {
- \__litetable_get_left:eN
- {
- \clist_item:Nn \l__litetable_timelist_clist {##1}
- } \l__litetable_tmpa_tl
- \__litetable_get_right:eN
- {
- \clist_item:Nn \l__litetable_timelist_clist {##1}
- } \l__litetable_tmpb_tl
- \node
- [ shift =
- {(
- \paperwidth/30,
- \fp_eval:n { - 1.9 - 2 * ##1 } \l__time_vunit_dim
- )}, gray, font = \ttfamily, align = center
- ] at (current~page.north~west)
- { \l__litetable_tmpa_tl\\\l__litetable_tmpb_tl };
- }
}
% Weekdays
- \int_step_inline:nn
- { \clist_count:N \l__litetable_weeklist_clist }
+ \int_step_inline:nn { \clist_count:N \l__lite_week_clist }
{
- \__litetable_get_left:eN
+ \int_compare:nNnF { ##1 } = { \clist_count:N \l__lite_week_clist }
{
- \clist_item:Nn \l__litetable_weeklist_clist {##1}
- } \l__litetable_tmpa_tl
- \node
- [ shift =
+ \node [ shift =
+ {(\fp_eval:n
+ {
+ 14 * \clist_item:Nn \l__week_accum_clist {##1}/
+ \l__week_num_int/15 + 1/15
+ } \paperwidth, -2\l__time_vunit_dim
+ )}, darkgray, font = \ttfamily
+ ] at (current~page.north~west) { \l__lite_weeklist_sep_tl };
+ }
+ \__lite_get_left:eN { \clist_item:Nn \l__lite_week_clist {##1} }
+ \l__lite_tmpa_tl
+ \node [ shift =
{(\fp_eval:n
- {(
- \clist_item:Nn \l__week_accum_clist {##1} -
- \clist_item:Nn \l__week_ratio_clist {##1}/2
- )/\l__week_num_int * 14/15 + 1/15
+ {
+ 14(
+ \clist_item:Nn \l__week_accum_clist {##1} -
+ \clist_item:Nn \l__week_ratio_clist {##1}/2
+ )/\l__week_num_int/15 + 1/15
} \paperwidth, -2\l__time_vunit_dim
- )},
- font = \large\bfseries
- ] at (current~page.north~west) { \l__litetable_tmpa_tl };
+ )}, font = \large \l__lite_weeklist_format_tl
+ ] at (current~page.north~west) { \l__lite_tmpa_tl };
}
- % Comment
- \tl_if_empty:NF \l__litetable_comment_tl
- {
- \node [ yshift = .5\l__time_vunit_dim, left = 1ex,
- darkgray, font = \small\bfseries
- ] at (current~page.south~east)
- { \l__litetable_comment_tl };
- }
- \tl_gclear:N \l__litetable_comment_tl
}
-\NewDocumentCommand \maketable { O{} m O{} }
+
+\NewDocumentCommand \more { m }
{
- \group_begin:
- \keys_set:nn { litetable / frame } { #1 #3 }
- \litetable_maketable:nn {#2}
- \group_end:
+ \node [ yshift = .5\l__time_vunit_dim, left = 1ex,
+ darkgray, font = \small \bfseries
+ ] at (current~page.south~east) {#1};
}
\keys_define:nn { litetable / course }
{
- color.tl_set:N = \l__course_color_tl,
- color.initial:n = teal,
- subject.tl_set:N = \l__course_subject_tl,
- teacher.tl_set:N = \l__course_teacher_tl,
- location.tl_set:N = \l__course_location_tl,
- weeks.tl_set:N = \l__default_weeks_tl,
- weeks.initial:n = \l__default_weeks_tl,
+ color .tl_set:N = \l__course_color_tl,
+ color .initial:n = black,
+ subject .tl_set:N = \l__course_subject_tl,
+ lecture .tl_set:N = \l__course_lecture_tl,
+ location .tl_set:N = \l__course_location_tl,
+ comment .tl_set:N = \l__default_comment_tl,
+ unknown .code:n = \tl_if_novalue:nF {#1}
+ { \tl_set_eq:NN \l__course_color_tl \l_keys_key_tl }
}
\dim_new:N \l__course_infoshift_dim
-\cs_new_protected_nopar:Npn \__litetable_course_box_aux:nn #1#2
+\lite_msg_new:nn { course }
+ { \exp_not:N \course~box(s)~exceed~workdays~were~ignored }
+\NewDocumentCommand \course { O{} m O{} m O{} }
{
- % Course box fg
+ \group_begin:
+ \bool_lazy_any:nTF
+ {
+ {
+ \int_compare_p:nNn { \l__lite_weekday_int } >
+ { \clist_count:N \l__lite_week_clist }
+ }
+ { \int_compare_p:nNn { #2 } > { \clist_count:N \l__lite_time_clist } }
+ { \int_compare_p:nNn { #4 } > { \clist_count:N \l__lite_time_clist } }
+ } { \lite_msg_warning:n { course } }
+ {
+ \keys_set:nn { litetable / course } { #1, #3, #5 }
+ \int_compare:nNnTF {#2} < {#4}
+ { \__lite_course_box_aux:nn {#2} {#4} }
+ { \__lite_course_box_aux:nn {#4} {#2} }
+ }
+ \group_end:
+ }
+\cs_new_protected_nopar:Npn \__lite_course_box_aux:nn #1#2
+ {
\begin{scope}
- \clip [ preaction = { draw, ultra~thick, \l__course_color_tl!60 },
- preaction = { fill, \l__course_color_tl!10 },
- rounded~corners = 8pt
- ] ([shift =
- {(
- \fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }
- } \l__week_hunit_dim + \paperwidth/15 + 1.2pt,
- \fp_eval:n { - .5 - 2 * #1 } \l__time_vunit_dim - 1.2pt
- )}
- ]current~page.north~west) rectangle +
- (
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int } \l__week_hunit_dim - 2.4pt,
- \fp_eval:n { 2 * ( #1 - #2 - 1 ) } \l__time_vunit_dim + 2.4pt
- );
- % Course box bg
- \fill [ \l__course_color_tl!60 ]
- ([shift =
+ % Course box fg
+ \clip [ preaction = { draw, ultra~thick, \l__course_color_tl!60 },
+ preaction = { fill, \l__course_color_tl!10 },
+ rounded~corners = 8pt ]
+ ([shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }
+ } \l__week_hunit_dim + \paperwidth/15 + 1.2pt,
+ \fp_eval:n { -.5 - 2 * #1 } \l__time_vunit_dim - 1.2pt
+ )}]current~page.north~west) rectangle +
+ (
+ \clist_item:Nn \l__week_ratio_clist
+ { \l__lite_weekday_int } \l__week_hunit_dim - 2.4pt,
+ \fp_eval:n { 2( #1 - #2 - 1 ) } \l__time_vunit_dim + 2.4pt
+ );
+ % Course box bg
+ \fill [ \l__course_color_tl!60 ]
+ ([shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }
+ } \l__week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -.5 - 2 * #1 } \l__time_vunit_dim
+ )}]current~page.north~west) rectangle +
+ (
+ \clist_item:Nn \l__week_ratio_clist
+ { \l__lite_weekday_int } \l__week_hunit_dim,
+ -\l__time_vunit_dim/2
+ );
+ \end{scope}
+ % Course info
+ \tl_if_eq:NNTF {#1} {#2}
+ {
+ \bool_lazy_and:nnTF % Single-unit height course box
+ { \tl_if_empty_p:N \l__course_location_tl }
+ { \tl_if_empty_p:N \l__course_lecture_tl }
+ { \tl_set:Nn \l__course_anchor_tl { } }
+ { \tl_set:Nn \l__course_anchor_tl { above } }
+ \node
+ [ \l__course_anchor_tl, \l__course_color_tl!60, shift =
{(
\fp_eval:n
{
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }/2
} \l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - .5 - 2 * #1 } \l__time_vunit_dim
- )}
- ]current~page.north~west) rectangle +
- (
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int } \l__week_hunit_dim,
- -\l__time_vunit_dim/2
- );
- \end{scope}
- % Course info
- \tl_if_eq:NNTF {#1} {#2}% Single-unit height course box
- {
- \bool_if:nTF
- {
- \tl_if_empty_p:N \l__course_location_tl &&
- \tl_if_empty_p:N \l__course_teacher_tl
- }
- { \tl_set:Nn \l_shortcourse_anchor_tl { } }
- { \tl_set:Nn \l_shortcourse_anchor_tl { above } }
- \cs_if_exist:NT { \l__course_subject_tl }
- {
- \node
- [ shift =
- {(
- \fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }/2
- } \l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - 1.75 - #1 - #2 } \l__time_vunit_dim
- )}, align = center, font = \large\bfseries,
- \l_shortcourse_anchor_tl, \l__course_color_tl!60
- ] at (current~page.north~west) { \l__course_subject_tl };
- }
- \bool_if:nTF
- {
- !\tl_if_empty_p:N \l__course_location_tl &&
- !\tl_if_empty_p:N \l__course_teacher_tl
- }
- { \tl_set:Nn \l_shortcourse_sep_tl { ,~ } }
- { \tl_set:Nn \l_shortcourse_sep_tl { } }
+ \fp_eval:n { -1.75 - #1 - #2 } \l__time_vunit_dim
+ )}, align = center, font = \bfseries
+ ] at (current~page.north~west) { \l__course_subject_tl };
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:N \l__course_location_tl }
+ { \tl_if_empty_p:N \l__course_lecture_tl }
+ { \tl_set:Nn \l__s at course_sep_tl { } }
+ { \tl_set:Nn \l__s at course_sep_tl { ,~ } }
\node
[ shift =
{(
\fp_eval:n
{
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }/2
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }/2
} \l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - 1.75 - #1 - #2 } \l__time_vunit_dim
+ \fp_eval:n { -1.75 - #1 - #2 } \l__time_vunit_dim
)}, below, \l__course_color_tl!60, align = center
] at (current~page.north~west)
- {
- \tl_if_exist:NT { \l__course_location_tl }
- { \l__course_location_tl }
- \l_shortcourse_sep_tl
- \tl_if_exist:NT { \l__course_teacher_tl }
- { \l__course_teacher_tl }
- };
+ { \l__course_location_tl \l__s at course_sep_tl \l__course_lecture_tl };
}
{
- \bool_if:nTF% Multiply-unit height course box
+ \bool_lazy_and:nnTF % Multiply-unit height course box
+ { \tl_if_empty_p:N \l__course_location_tl }
+ { \tl_if_empty_p:N \l__course_lecture_tl }
{
- \tl_if_empty_p:N \l__course_location_tl &&
- \tl_if_empty_p:N \l__course_teacher_tl
- }
- {
- \tl_set:Nn \l_course_anchor_tl { }
+ \tl_set:Nn \l__course_anchor_tl { }
\dim_set:Nn \l__course_infoshift_dim { 0pt }
}
{
- \tl_set:Nn \l_course_anchor_tl { above }
+ \tl_set:Nn \l__course_anchor_tl { above }
\dim_set:Nn \l__course_infoshift_dim { \l__time_vunit_dim/8 }
}
- \cs_if_exist:NT { \l__course_subject_tl }
- {
- \node
- [ shift =
- {(
- \fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }/2
- } \l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - 1.5 - #1 - #2 } \l__time_vunit_dim +
- \l__course_infoshift_dim
- )}, font = \large\bfseries, \l_course_anchor_tl,
- \l__course_color_tl!60, align = center
- ] at (current~page.north~west) { \l__course_subject_tl };
- }
- \bool_if:nTF
- {
- !\tl_if_empty_p:N \l__course_location_tl &&
- !\tl_if_empty_p:N \l__course_teacher_tl
- }
- { \tl_set:Nn \l_courseinfo_sep_tl { \\ } }
- { \tl_set:Nn \l_courseinfo_sep_tl { } }
\node
+ [ \l__course_color_tl!60, align = center, shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }/2
+ } \l__week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.5 - #1 - #2 } \l__time_vunit_dim +
+ \l__course_infoshift_dim
+ )}, font = \large \bfseries, \l__course_anchor_tl
+ ] at (current~page.north~west) { \l__course_subject_tl };
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:N \l__course_location_tl }
+ { \tl_if_empty_p:N \l__course_lecture_tl }
+ { \tl_set:Nn \l__ at course_sep_tl { } }
+ { \tl_set:Nn \l__ at course_sep_tl { \\ } }
+ \node
[ shift =
{(
\fp_eval:n
{
- \clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int } -
- \clist_item:Nn \l__week_ratio_clist
- { \l__litetable_week_day_int }/2
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int } -
+ \clist_item:Nn \l__week_ratio_clist { \l__lite_weekday_int }/2
} \l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - 1.625 - #1 - #2 } \l__time_vunit_dim
+ \fp_eval:n { -1.625 - #1 - #2 } \l__time_vunit_dim
)}, below, \l__course_color_tl!60, align = center
] at (current~page.north~west)
- {
- \tl_if_exist:NT { \l__course_location_tl }
- { \l__course_location_tl }
- \l_courseinfo_sep_tl
- \tl_if_exist:NT { \l__course_teacher_tl }
- { \l__course_teacher_tl }
- };
+ { \l__course_location_tl \l__ at course_sep_tl \l__course_lecture_tl };
\node
[ shift =
- {(\clist_item:Nn \l__week_accum_clist
- { \l__litetable_week_day_int }
+ {(
+ \clist_item:Nn \l__week_accum_clist { \l__lite_weekday_int }
\l__week_hunit_dim + \paperwidth/15,
- \fp_eval:n { - 2.5 - 2 * #2 } \l__time_vunit_dim
+ \fp_eval:n { -2.5 - 2 * #2 } \l__time_vunit_dim
)}, above~left, \l__course_color_tl!60, outer~sep = .5ex
- ] at (current~page.north~west) { \l__default_weeks_tl };
+ ] at (current~page.north~west) { \l__default_comment_tl };
}
}
-\litetable_msg_new:nn { course }
- { \exp_not:N \course~box(s)~exceed~workdays~were~ignored }
-\NewDocumentCommand \course { O{} m O{} m O{} }
- {
- \group_begin:
- \int_compare:nNnTF { \l__litetable_week_day_int - 1 } <
- { \clist_count:N \l__litetable_weeklist_clist }
- {
- \keys_set:nn { litetable / course } { #1 #3 #5 }
- \__litetable_course_box_aux:nn {#2} {#4}
- }
- { \litetable_msg_warning:n { course } }
- \group_end:
- }
\endinput
-
% End of file litetable.cls
More information about the tex-live-commits
mailing list.