texlive[74372] Master/texmf-dist: litetable (1mar25)
commits+karl at tug.org
commits+karl at tug.org
Sat Mar 1 22:32:17 CET 2025
Revision: 74372
https://tug.org/svn/texlive?view=revision&revision=74372
Author: karl
Date: 2025-03-01 22:32:17 +0100 (Sat, 01 Mar 2025)
Log Message:
-----------
litetable (1mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/litetable/README.md
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
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf
trunk/Master/texmf-dist/source/latex/litetable/
trunk/Master/texmf-dist/source/latex/litetable/litetable.dtx
trunk/Master/texmf-dist/source/latex/litetable/litetable.ins
trunk/Master/texmf-dist/tex/latex/litetable/litetable.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/litetable/License
trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex
trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/License
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/License 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/License 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,415 +0,0 @@
-The LaTeX Project Public License
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-LPPL Version 1.3c 2008-05-04
-
-Copyright 1999 2002-2008 LaTeX3 Project
- Everyone is allowed to distribute verbatim copies of this
- license document, but modification of it is not allowed.
-
-
-PREAMBLE
-========
-
-The LaTeX Project Public License (LPPL) is the primary license under
-which the LaTeX kernel and the base LaTeX packages are distributed.
-
-You may use this license for any work of which you hold the copyright
-and which you wish to distribute. This license may be particularly
-suitable if your work is TeX-related (such as a LaTeX package), but
-it is written in such a way that you can use it even if your work is
-unrelated to TeX.
-
-The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
-below, gives instructions, examples, and recommendations for authors
-who are considering distributing their works under this license.
-
-This license gives conditions under which a work may be distributed
-and modified, as well as conditions under which modified versions of
-that work may be distributed.
-
-We, the LaTeX3 Project, believe that the conditions below give you
-the freedom to make and distribute modified versions of your work
-that conform with whatever technical specifications you wish while
-maintaining the availability, integrity, and reliability of
-that work. If you do not see how to achieve your goal while
-meeting these conditions, then read the document `cfgguide.tex'
-and `modguide.tex' in the base LaTeX distribution for suggestions.
-
-
-DEFINITIONS
-===========
-
-In this license document the following terms are used:
-
- `Work'
- Any work being distributed under this License.
-
- `Derived Work'
- Any work that under any applicable law is derived from the Work.
-
- `Modification'
- Any procedure that produces a Derived Work under any applicable
- law -- for example, the production of a file containing an
- original file associated with the Work or a significant portion of
- such a file, either verbatim or with modifications and/or
- translated into another language.
-
- `Modify'
- To apply any procedure that produces a Derived Work under any
- applicable law.
-
- `Distribution'
- Making copies of the Work available from one person to another, in
- whole or in part. Distribution includes (but is not limited to)
- making any electronic components of the Work accessible by
- file transfer protocols such as FTP or HTTP or by shared file
- systems such as Sun's Network File System (NFS).
-
- `Compiled Work'
- A version of the Work that has been processed into a form where it
- is directly usable on a computer system. This processing may
- include using installation facilities provided by the Work,
- transformations of the Work, copying of components of the Work, or
- other activities. Note that modification of any installation
- facilities provided by the Work constitutes modification of the Work.
-
- `Current Maintainer'
- A person or persons nominated as such within the Work. If there is
- no such explicit nomination then it is the `Copyright Holder' under
- any applicable law.
-
- `Base Interpreter'
- A program or process that is normally needed for running or
- interpreting a part or the whole of the Work.
-
- A Base Interpreter may depend on external components but these
- are not considered part of the Base Interpreter provided that each
- external component clearly identifies itself whenever it is used
- interactively. Unless explicitly specified when applying the
- license to the Work, the only applicable Base Interpreter is a
- `LaTeX-Format' or in the case of files belonging to the
- `LaTeX-format' a program implementing the `TeX language'.
-
-
-
-CONDITIONS ON DISTRIBUTION AND MODIFICATION
-===========================================
-
-1. Activities other than distribution and/or modification of the Work
-are not covered by this license; they are outside its scope. In
-particular, the act of running the Work is not restricted and no
-requirements are made concerning any offers of support for the Work.
-
-2. You may distribute a complete, unmodified copy of the Work as you
-received it. Distribution of only part of the Work is considered
-modification of the Work, and no right to distribute such a Derived
-Work may be assumed under the terms of this clause.
-
-3. You may distribute a Compiled Work that has been generated from a
-complete, unmodified copy of the Work as distributed under Clause 2
-above, as long as that Compiled Work is distributed in such a way that
-the recipients may install the Compiled Work on their system exactly
-as it would have been installed if they generated a Compiled Work
-directly from the Work.
-
-4. If you are the Current Maintainer of the Work, you may, without
-restriction, modify the Work, thus creating a Derived Work. You may
-also distribute the Derived Work without restriction, including
-Compiled Works generated from the Derived Work. Derived Works
-distributed in this manner by the Current Maintainer are considered to
-be updated versions of the Work.
-
-5. If you are not the Current Maintainer of the Work, you may modify
-your copy of the Work, thus creating a Derived Work based on the Work,
-and compile this Derived Work, thus creating a Compiled Work based on
-the Derived Work.
-
-6. If you are not the Current Maintainer of the Work, you may
-distribute a Derived Work provided the following conditions are met
-for every component of the Work unless that component clearly states
-in the copyright notice that it is exempt from that condition. Only
-the Current Maintainer is allowed to add such statements of exemption
-to a component of the Work.
-
- a. If a component of this Derived Work can be a direct replacement
- for a component of the Work when that component is used with the
- Base Interpreter, then, wherever this component of the Work
- identifies itself to the user when used interactively with that
- Base Interpreter, the replacement component of this Derived Work
- clearly and unambiguously identifies itself as a modified version
- of this component to the user when used interactively with that
- Base Interpreter.
-
- b. Every component of the Derived Work contains prominent notices
- detailing the nature of the changes to that component, or a
- prominent reference to another file that is distributed as part
- of the Derived Work and that contains a complete and accurate log
- of the changes.
-
- c. No information in the Derived Work implies that any persons,
- including (but not limited to) the authors of the original version
- of the Work, provide any support, including (but not limited to)
- the reporting and handling of errors, to recipients of the
- Derived Work unless those persons have stated explicitly that
- they do provide such support for the Derived Work.
-
- d. You distribute at least one of the following with the Derived Work:
-
- 1. A complete, unmodified copy of the Work;
- if your distribution of a modified component is made by
- offering access to copy the modified component from a
- designated place, then offering equivalent access to copy
- the Work from the same or some similar place meets this
- condition, even though third parties are not compelled to
- copy the Work along with the modified component;
-
- 2. Information that is sufficient to obtain a complete,
- unmodified copy of the Work.
-
-7. If you are not the Current Maintainer of the Work, you may
-distribute a Compiled Work generated from a Derived Work, as long as
-the Derived Work is distributed to all recipients of the Compiled
-Work, and as long as the conditions of Clause 6, above, are met with
-regard to the Derived Work.
-
-8. The conditions above are not intended to prohibit, and hence do not
-apply to, the modification, by any method, of any component so that it
-becomes identical to an updated version of that component of the Work as
-it is distributed by the Current Maintainer under Clause 4, above.
-
-9. Distribution of the Work or any Derived Work in an alternative
-format, where the Work or that Derived Work (in whole or in part) is
-then produced by applying some process to that format, does not relax or
-nullify any sections of this license as they pertain to the results of
-applying that process.
-
-10. a. A Derived Work may be distributed under a different license
- provided that license itself honors the conditions listed in
- Clause 6 above, in regard to the Work, though it does not have
- to honor the rest of the conditions in this license.
-
- b. If a Derived Work is distributed under a different license, that
- Derived Work must provide sufficient documentation as part of
- itself to allow each recipient of that Derived Work to honor the
- restrictions in Clause 6 above, concerning changes from the Work.
-
-11. This license places no restrictions on works that are unrelated to
-the Work, nor does this license place any restrictions on aggregating
-such works with the Work by any means.
-
-12. Nothing in this license is intended to, or may be used to, prevent
-complete compliance by all parties with all applicable laws.
-
-
-NO WARRANTY
-===========
-
-There is no warranty for the Work. Except when otherwise stated in
-writing, the Copyright Holder provides the Work `as is', without
-warranty of any kind, either expressed or implied, including, but not
-limited to, the implied warranties of merchantability and fitness for a
-particular purpose. The entire risk as to the quality and performance
-of the Work is with you. Should the Work prove defective, you assume
-the cost of all necessary servicing, repair, or correction.
-
-In no event unless required by applicable law or agreed to in writing
-will The Copyright Holder, or any author named in the components of the
-Work, or any other party who may distribute and/or modify the Work as
-permitted above, be liable to you for damages, including any general,
-special, incidental or consequential damages arising out of any use of
-the Work or out of inability to use the Work (including, but not limited
-to, loss of data, data being rendered inaccurate, or losses sustained by
-anyone as a result of any failure of the Work to operate with any other
-programs), even if the Copyright Holder or said author or said other
-party has been advised of the possibility of such damages.
-
-
-MAINTENANCE OF THE WORK
-=======================
-
-The Work has the status `author-maintained' if the Copyright Holder
-explicitly and prominently states near the primary copyright notice in
-the Work that the Work can only be maintained by the Copyright Holder
-or simply that it is `author-maintained'.
-
-The Work has the status `maintained' if there is a Current Maintainer
-who has indicated in the Work that they are willing to receive error
-reports for the Work (for example, by supplying a valid e-mail
-address). It is not required for the Current Maintainer to acknowledge
-or act upon these error reports.
-
-The Work changes from status `maintained' to `unmaintained' if there
-is no Current Maintainer, or the person stated to be Current
-Maintainer of the work cannot be reached through the indicated means
-of communication for a period of six months, and there are no other
-significant signs of active maintenance.
-
-You can become the Current Maintainer of the Work by agreement with
-any existing Current Maintainer to take over this role.
-
-If the Work is unmaintained, you can become the Current Maintainer of
-the Work through the following steps:
-
- 1. Make a reasonable attempt to trace the Current Maintainer (and
- the Copyright Holder, if the two differ) through the means of
- an Internet or similar search.
-
- 2. If this search is successful, then enquire whether the Work
- is still maintained.
-
- a. If it is being maintained, then ask the Current Maintainer
- to update their communication data within one month.
-
- b. If the search is unsuccessful or no action to resume active
- maintenance is taken by the Current Maintainer, then announce
- within the pertinent community your intention to take over
- maintenance. (If the Work is a LaTeX work, this could be
- done, for example, by posting to comp.text.tex.)
-
- 3a. If the Current Maintainer is reachable and agrees to pass
- maintenance of the Work to you, then this takes effect
- immediately upon announcement.
-
- b. If the Current Maintainer is not reachable and the Copyright
- Holder agrees that maintenance of the Work be passed to you,
- then this takes effect immediately upon announcement.
-
- 4. If you make an `intention announcement' as described in 2b. above
- and after three months your intention is challenged neither by
- the Current Maintainer nor by the Copyright Holder nor by other
- people, then you may arrange for the Work to be changed so as
- to name you as the (new) Current Maintainer.
-
- 5. If the previously unreachable Current Maintainer becomes
- reachable once more within three months of a change completed
- under the terms of 3b) or 4), then that Current Maintainer must
- become or remain the Current Maintainer upon request provided
- they then update their communication data within one month.
-
-A change in the Current Maintainer does not, of itself, alter the fact
-that the Work is distributed under the LPPL license.
-
-If you become the Current Maintainer of the Work, you should
-immediately provide, within the Work, a prominent and unambiguous
-statement of your status as Current Maintainer. You should also
-announce your new status to the same pertinent community as
-in 2b) above.
-
-
-WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
-======================================================
-
-This section contains important instructions, examples, and
-recommendations for authors who are considering distributing their
-works under this license. These authors are addressed as `you' in
-this section.
-
-Choosing This License or Another License
-----------------------------------------
-
-If for any part of your work you want or need to use *distribution*
-conditions that differ significantly from those in this license, then
-do not refer to this license anywhere in your work but, instead,
-distribute your work under a different license. You may use the text
-of this license as a model for your own license, but your license
-should not refer to the LPPL or otherwise give the impression that
-your work is distributed under the LPPL.
-
-The document `modguide.tex' in the base LaTeX distribution explains
-the motivation behind the conditions of this license. It explains,
-for example, why distributing LaTeX under the GNU General Public
-License (GPL) was considered inappropriate. Even if your work is
-unrelated to LaTeX, the discussion in `modguide.tex' may still be
-relevant, and authors intending to distribute their works under any
-license are encouraged to read it.
-
-A Recommendation on Modification Without Distribution
------------------------------------------------------
-
-It is wise never to modify a component of the Work, even for your own
-personal use, without also meeting the above conditions for
-distributing the modified component. While you might intend that such
-modifications will never be distributed, often this will happen by
-accident -- you may forget that you have modified that component; or
-it may not occur to you when allowing others to access the modified
-version that you are thus distributing it and violating the conditions
-of this license in ways that could have legal implications and, worse,
-cause problems for the community. It is therefore usually in your
-best interest to keep your copy of the Work identical with the public
-one. Many works provide ways to control the behavior of that work
-without altering any of its licensed components.
-
-How to Use This License
------------------------
-
-To use this license, place in each of the components of your work both
-an explicit copyright notice including your name and the year the work
-was authored and/or last substantially modified. Include also a
-statement that the distribution and/or modification of that
-component is constrained by the conditions in this license.
-
-Here is an example of such a notice and statement:
-
- %% pig.dtx
- %% Copyright 2008 M. Y. Name
- %
- % This work may be distributed and/or modified under the
- % conditions of the LaTeX Project Public License, either version 1.3
- % of this license or (at your option) any later version.
- % The latest version of this license is in
- % https://www.latex-project.org/lppl.txt
- % and version 1.3c or later is part of all distributions of LaTeX
- % version 2008 or later.
- %
- % This work has the LPPL maintenance status `maintained'.
- %
- % The Current Maintainer of this work is M. Y. Name.
- %
- % This work consists of the files pig.dtx and pig.ins
- % and the derived file pig.sty.
-
-Given such a notice and statement in a file, the conditions
-given in this license document would apply, with the `Work' referring
-to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
-generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
-referring to any `LaTeX-Format', and both `Copyright Holder' and
-`Current Maintainer' referring to the person `M. Y. Name'.
-
-If you do not want the Maintenance section of LPPL to apply to your
-Work, change `maintained' above into `author-maintained'.
-However, we recommend that you use `maintained', as the Maintenance
-section was added in order to ensure that your Work remains useful to
-the community even when you can no longer maintain and support it
-yourself.
-
-Derived Works That Are Not Replacements
----------------------------------------
-
-Several clauses of the LPPL specify means to provide reliability and
-stability for the user community. They therefore concern themselves
-with the case that a Derived Work is intended to be used as a
-(compatible or incompatible) replacement of the original Work. If
-this is not the case (e.g., if a few lines of code are reused for a
-completely different task), then clauses 6b and 6d shall not apply.
-
-
-Important Recommendations
--------------------------
-
- Defining What Constitutes the Work
-
- The LPPL requires that distributions of the Work contain all the
- files of the Work. It is therefore important that you provide a
- way for the licensee to determine which files constitute the Work.
- This could, for example, be achieved by explicitly listing all the
- files of the Work near the copyright notice of each file or by
- using a line such as:
-
- % This work consists of all files listed in manifest.txt.
-
- in that place. In the absence of an unequivocal list it might be
- impossible for the licensee to determine what is considered by you
- to comprise the Work and, in such a case, the licensee would be
- entitled to make reasonable conjectures as to which files comprise
- the Work.
Modified: trunk/Master/texmf-dist/doc/latex/litetable/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/README.md 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/README.md 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,13 +1,26 @@
-# The `litetable` class
+The `litetable` Package
+=======================
-This class provides a colorful timetable design.
+The `litetable` package provides a colorful design of timetable.
-**Welcome to pull requests [here](https://github.com/myhsia/litetable).**
+See `litetable.pdf` for more. Happy TeXing!
-## License
+Issues
+------
-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.
+The issue tracker for `litetable` is currently located
+[on GitHub](https://github.com/myhsia/litetable/issues).
-This work has the LPPL maintenance status `maintained`.
+Copyright and License
+---------------------
-The Current Maintainers of this work are [Mingyu Xia](https://www.ctan.org/author/xia-my) and [Lijun Guo](https://ctan.org/author/guo).
\ No newline at end of file
+ Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com>
+
+ It may be distributed and/or modified under the conditions of the
+ LaTeX Project Public License (LPPL), either version 1.3c of this
+ license or (at your option) any later version. The latest version
+ of this license is in the file <http://www.latex-project.org/lppl.txt>
+
+ This work has the LPPL maintenance status `maintained`.
+
+ The Current Maintainer of this work is Mingyu Xia.
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-demo.tex 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,35 +0,0 @@
-\documentclass[svgnames]{litetable}
-
-\usepackage{libertine, inconsolata, twemojis}
-\usepackage[T1]{fontenc}
-
-\begin{document}
-
-\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
- }
-\weeklist [ format = \bfseries \scshape, sep = \textbar ]
- {
- \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
- \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
- \texttwemoji{1fa99} Fri -> 1
- }
-
-\begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
- \course [ subject = interface3, comment = \TeX{} Live 2025,
- lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
- \newday
- \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
- \newday
- \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
- location = Stanford University, Purple ] {10} {11}
- \newday
- \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}
-
-\end{document}
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-en-us.tex 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,166 +0,0 @@
-\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
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-cn.tex 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,34 +1,42 @@
-\documentclass[quiet, 10pt, letterpaper]{l3doc}
-\usepackage{pdfpages}
-\AddToHook{env/function/before}{\vspace*{-.6\baselineskip}}
-\AddToHook{env/syntax/after}{\par\vspace*{.1\baselineskip}}
+\documentclass[svgnames, onlydoc]{l3doc}
+\usepackage{litetable, twemojis, titlesec}
+\usepackage[mono = false]{libertine}
+\usepackage[fontset = none]{ctex} \setlength \parindent {0pt}
+\setCJKmainfont{LXGW WenKai}
+\setCJKsansfont[AutoFakeBold]{LXGW Marker Gothic}
+\setCJKmonofont{LXGW WenKai Mono}
+\titleformat*{\section}{\sffamily\Large\bfseries}
+\AddToHook{env/function/before}{\vspace*{-.65\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.15\baselineskip}}
+\makeatletter
+\def \@key #1{\textcolor{red}{\textbf{\texttt{#1}}} \normalfont \texttt{=}}
+\def \s at key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\DeclareRobustCommand \key {\@ifstar\s at key\@key}
+\def \val #1{\meta{\textup{#1}}}
\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}
+\def \HoLogo at ApTeX #1{\HOLOGO at mbox {Ap\kern -.1667em\TeX}}
+\makeatother
+\makeindex
-\title{^^X
- \sffamily \cls{litetable} 文档类 -- 多彩的课程表\thanks
- {^^X
- \url{https://github.com/myhsia/litetable},
- \url{https://ctan.org/pkg/litetable}
- }
+\title{%
+ \sffamily \cls{litetable} 文档类 --- 多彩的课程表\thanks{%
+ \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{
+
+\author{%
+ 夏明宇
+ \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}\thanks{
\href{https://github.com/ljguo1020}{郭李军}
- 开发了读取 \meta{left} \cmd{->} \meta{right} 型数据结构的接口,
+ 开发了读取 \meta{left} \cmd[no-index]{->} \meta{right} 型数据结构的接口,
并为低版本 \hologo{TeX} Live 做兼容.
}
}
-\date{Released 2025-02-10\quad \texttt{v3.2A}}
+\date{Released 2025-03-01\quad \texttt{v3.3A}}
+
\begin{document}
\maketitle
@@ -36,35 +44,36 @@
\section{介绍}
\cls{litetable} 文档类提供了一个多彩的课程表设计,
-基于 \cls{article} 和 \pkg{tikz} 由 \pkg{expl3} 开发.
+基于 \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{粵語版本}]}.
+支持 \hologo{pdfLaTeX},\hologo{XeLaTeX},\hologo{ApTeX} 和 \hologo{LuaLaTeX}
+等多种编译方式. 点击跳转至手册的
+\href{litetable-en-us.pdf}{[\textsf{English Version}]}
+\href{litetable-zh-hk.pdf}{[\textsf{粤語版本}]}.
\section{用户接口}
+要加载此宏包,只需写下
+\begin{quote}
+ |\usepackage{litetable}|
+\end{quote}
+
\DescribeEnv{litetable}
-此环境可生成一个空白课程表框架,
-需在命令 \cs{timelist},\cs{weeklist} 后执行
+环境 \env{litetable} 可生成空白课程表框架,
+需在命令 \cs{timelist} 和 \cs{weeklist} 后执行
\begin{quote}
|\begin{litetable}|
- \oarg{keys} \marg{title} \oarg{keys}| ... |^^X
+ \oarg{keys} \marg{title} \oarg{keys}| ... |%
|\end{litetable}|
\end{quote}
强制参数用于设定课程表标题,
可选参数接受以下键
-\begin{description}
- \item [\keyval{color}{color}] 可设置课程表框架的背景色,
- 默认值为 \cmd{gray}. 键名可省略.
- \item [\keyval{sem}{string}]
+\begin{itemize}[leftmargin = 0pt]
+ \item [\key{color}] \val{color} 可设置课程表框架的背景色
+ (默认值:\cmd[no-index]{gray}),键名可省略.
+ \item [\key{sem}] \val{string}
可设置页面右上角的学期信息.
-\end{description}
+\end{itemize}
\begin{function}{\weeklist}
\begin{syntax}
@@ -73,12 +82,12 @@
强制参数接收数组,
用于设置课程表顶部的工作日列表和列宽.
可选参数接受以下键
- \begin{description}
- \item [\keyval{format}{format commands}]
- 可设置工作日列表格式,默认为 \cmd{\bfseries}\cmd{\scshape}.
- \item [\keyval{sep}{string}] 可设置工作日列表的分隔符,
- 默认为空.
- \end{description}
+ \begin{itemize}[leftmargin = 0pt]
+ \item [\key{format}] \val{format commands}
+ 可设置工作日列表格式 (默认值:\cmd[no-index]{\bfseries}).
+ \item [\key{sep}] \val{string} 可设置工作日列表的分隔符
+ (默认为空).
+ \end{itemize}
\begin{verbatim}
\weeklist [ format = \bfseries \scshape, sep = \textbar ]
{ Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
@@ -91,15 +100,15 @@
\end{syntax}
强制参数均接收数组,用于设置课程表的左侧的时间列表.
可选参数接受以下键
- \begin{description}
- \item [\keyval{numformat}{format}]
+ \begin{itemize}[leftmargin = 0pt]
+ \item [\key{numformat}] \val{format}
可设置时间列表的序号字体,
- 默认为 \cmd{\ttfamily}\cmd{\bfseries}.
- \item [\keyval{timefont}{format}] 可设置时间列表的时间字体,
- 默认为 \cmd{\ttfamily}.
- \item [\keyval{hidetime}\TFF] 用于隐藏时间列表中的时间,只保留序号.
- 初始为 \cmd{false}.
- \end{description}
+ (默认值:\cmd[no-index]{\ttfamily} \cmd[no-index]{\bfseries}).
+ \item [\key{timefont}] \val{format} 可设置时间列表的时间字体,
+ (默认值:\cmd[no-index]{\ttfamily}).
+ \item [\key{hidetime}] \val\TFF 用于隐藏时间列表中的时间,只保留序号.
+ (初始值:\cmd[no-index]{false}).
+ \end{itemize}
\begin{verbatim}
\timelist [ numformat = \bfseries, timeformat = \ttfamily ]
{ 08:30 -> 10:00, 10:30 -> 12:00, 13:00 -> 14:30, 15:00 -> 16:30 }
@@ -114,23 +123,24 @@
需在 \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{itemize}[leftmargin = 0pt]
+ \item [\key{color}] \val{color} 用于设置课程盒子的颜色,
+ (默认值:\cmd[no-index]{teal}). 键名可省略.
+ \item [\key{subject}] \val{string} 用于设置课程名称.
+ \item [\key{location}] \val{string} 用于设置课程地点.
+ \item [\key{lecture}] \val{string} 用于设置授课教师.
+ \item [\key{comment}] \val{string} 用于给课程添加脚注.
+ \end{itemize}
\begin{texnote}
- \begin{itemize}
- \item 若 \meta{start} \cmd{=} \meta{end},即课程盒子的高度为 1,
- 则 \key{location} 和 \key{lecture} 将输出在同一行,
- \key{comment} 的值将会隐藏.
+ \begin{itemize}[leftmargin = 0pt]
+ \item 若 \meta{start} \cmd[no-index]{=} \meta{end}(课程盒子高度为 $1$),
+ 则 \key*{location} \key*{lecture} 将输出在同一行,
+ \key*{comment} 将隐藏.
\item 即使误将 \meta{start} 与 \meta{end} 写反,
模板也会自动纠正.
- \item 若 \key{location} \key{lecture} 均未使用,
- 则 \key{subject} 将输出在课程盒子中心.
+ \item 若 \key*{location} 和 \key*{lecture} 均未使用,
+ 则 \key*{subject} 将输出在课程盒子的
+ 竖直方向中心.
\item 超出课程表范围的课程盒子将不显示,
并会返回警告.
输入用例见 Appendix \ref{mwe}.
@@ -143,7 +153,7 @@
\cs{newday} \oarg{integral value}
\end{syntax}
使其后面添加的课程盒子后移 \meta{intergal value} 个工作日.
- 可选参数的默认值为 \cmd{1}.
+ 可选参数的默认值为 \cmd[no-index]{1}.
\end{function}
\begin{function}{\more}
@@ -153,14 +163,64 @@
在课程表的右下角添加备注.
\end{function}
-\clearpage \appendix
+\appendix \linespread{1.05}
-\section{工作示例} \label{mwe} \linespread{1.25}
+\section{工作示例} \label{mwe}
-\verbatiminput{litetable-demo.tex}
+\begin{verbatim}
+ \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ {
+ \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+ \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+ \texttwemoji{1fa99} Fri -> 1
+ }
+ \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
+ }
+ \begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+ \course [ subject = interface3, comment = \TeX{} Live 2025,
+ lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+ \newday
+ \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+ \newday
+ \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+ location = Stanford University, Purple ] {10} {11}
+ \newday
+ \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}
+\end{verbatim}
-\includepdf[pages = 1]{litetable-demo.pdf}
+\PrintIndex
-\end{document}
+\weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ {
+ \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+ \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+ \texttwemoji{1fa99} Fri -> 1
+ }
+\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
+ }
+\begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+ \course [ subject = interface3, comment = \TeX{} Live 2025,
+ lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+ \newday
+ \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+ \newday
+ \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+ location = Stanford University, Purple ] {10} {11}
+ \newday
+ \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}
-% End of file litetable-zh-cn.tex
+\end{document}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable-zh-hk.tex 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,34 +1,42 @@
-\documentclass[quiet, 10pt, letterpaper]{l3doc}
-\usepackage{pdfpages}
-\AddToHook{env/function/before}{\vspace*{-.6\baselineskip}}
-\AddToHook{env/syntax/after}{\par\vspace*{.1\baselineskip}}
+\documentclass[svgnames, onlydoc]{l3doc}
+\usepackage{litetable, twemojis, titlesec}
+\usepackage[mono = false]{libertine}
+\usepackage[fontset = none]{ctex} \setlength \parindent {0pt}
+\setCJKmainfont{LXGW WenKai}
+\setCJKsansfont[AutoFakeBold]{LXGW Marker Gothic}
+\setCJKmonofont{LXGW WenKai Mono}
+\titleformat*{\section}{\sffamily\Large\bfseries}
+\AddToHook{env/function/before}{\vspace*{-.65\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.15\baselineskip}}
+\makeatletter
+\def \@key #1{\textcolor{red}{\textbf{\texttt{#1}}} \normalfont \texttt{=}}
+\def \s at key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\DeclareRobustCommand \key {\@ifstar\s at key\@key}
+\def \val #1{\meta{\textup{#1}}}
\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}
+\def \HoLogo at ApTeX #1{\HOLOGO at mbox {Ap\kern -.1667em\TeX}}
+\makeatother
+\makeindex
-\title{^^X
- \sffamily \cls{litetable} 文檔類 -- 多彩嘅課程表\thanks
- {^^X
- \url{https://github.com/myhsia/litetable},
- \url{https://ctan.org/pkg/litetable}
- }
+\title{%
+ \sffamily \cls{litetable} 文檔類 --- 多彩嘅課程表\thanks{%
+ \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{
+
+\author{%
+ 夏明宇
+ \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}\thanks{
\href{https://github.com/ljguo1020}{郭李軍}
- 開發咗讀取 \meta{left} \cmd{->} \meta{right} 型數據結構嘅接口,
+ 開發咗讀取 \meta{left} \cmd[no-index]{->} \meta{right} 型數據結構嘅接口,
並為低版本 \hologo{TeX} Live 做兼容.
}
}
-\date{Released 2025-02-10\quad \texttt{v3.2A}}
+\date{Released 2025-03-01\quad \texttt{v3.3A}}
+
\begin{document}
\maketitle
@@ -36,35 +44,36 @@
\section{介紹}
\cls{litetable} 文檔類提供咗一個多彩嘅課程表設計,
-基於 \cls{article} 和 \pkg{tikz} 由 \pkg{expl3} 開發.
+基於 \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{粵語版本}]}.
+支持 \hologo{pdfLaTeX},\hologo{XeLaTeX},\hologo{ApTeX} 和 \hologo{LuaLaTeX}
+等多種編譯方式. 點擊跳轉至手冊嘅
+\href{litetable-en-us.pdf}{[\textsf{English Version}]}
+\href{litetable-zh-cn.pdf}{[\textsf{官话版本}]}.
\section{用戶接口}
+要加載此宏包,只需寫下
+\begin{quote}
+ |\usepackage{litetable}|
+\end{quote}
+
\DescribeEnv{litetable}
-呢個環境可生成一個空白課程表框架,
-需在命令 \cs{timelist},\cs{weeklist} 後執行
+環境 \env{litetable} 可生成空白課程表框架,
+需在命令 \cs{timelist} 和 \cs{weeklist} 後執行
\begin{quote}
|\begin{litetable}|
- \oarg{keys} \marg{title} \oarg{keys}| ... |^^X
+ \oarg{keys} \marg{title} \oarg{keys}| ... |%
|\end{litetable}|
\end{quote}
強制參數用於設定課程表標題,
可選參數接受以下鍵
-\begin{description}
- \item [\keyval{color}{color}] 可設置課程表框架嘅背景色,
- 默認值為 \cmd{gray}. 鍵名可省略.
- \item [\keyval{sem}{string}]
+\begin{itemize}[leftmargin = 0pt]
+ \item [\key{color}] \val{color} 可設置課程表框架嘅背景色
+ (默認值:\cmd[no-index]{gray}),鍵名可省略.
+ \item [\key{sem}] \val{string}
可設置頁面右上角嘅學期信息.
-\end{description}
+\end{itemize}
\begin{function}{\weeklist}
\begin{syntax}
@@ -73,12 +82,12 @@
強制參數接收數組,
用於設置課程表頂部嘅工作日列表和列寬.
可選參數接受以下鍵
- \begin{description}
- \item [\keyval{format}{format commands}]
- 可設置工作日列表格式,默認為 \cmd{\bfseries}\cmd{\scshape}.
- \item [\keyval{sep}{string}] 可設置工作日列表嘅分隔符,
- 默認為空.
- \end{description}
+ \begin{itemize}[leftmargin = 0pt]
+ \item [\key{format}] \val{format commands}
+ 可設置工作日列表格式 (默認值:\cmd[no-index]{\bfseries}).
+ \item [\key{sep}] \val{string} 可設置工作日列表嘅分隔符
+ (默認為空).
+ \end{itemize}
\begin{verbatim}
\weeklist [ format = \bfseries \scshape, sep = \textbar ]
{ Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1 }
@@ -91,15 +100,15 @@
\end{syntax}
強制參數均接收數組,用於設置課程表嘅左側嘅時間列表.
可選參數接受以下鍵
- \begin{description}
- \item [\keyval{numformat}{format}]
+ \begin{itemize}[leftmargin = 0pt]
+ \item [\key{numformat}] \val{format}
可設置時間列表嘅序號字體,
- 默認為 \cmd{\ttfamily}\cmd{\bfseries}.
- \item [\keyval{timefont}{format}] 可設置時間列表嘅時間字體,
- 默認為 \cmd{\ttfamily}.
- \item [\keyval{hidetime}\TFF] 用於隱藏時間列表中嘅時間,只保留序號.
- 初始為 \cmd{false}.
- \end{description}
+ (默認值:\cmd[no-index]{\ttfamily} \cmd[no-index]{\bfseries}).
+ \item [\key{timefont}] \val{format} 可設置時間列表嘅時間字體,
+ (默認值:\cmd[no-index]{\ttfamily}).
+ \item [\key{hidetime}] \val\TFF 用於隱藏時間列表中嘅時間,只保留序號.
+ (初始值:\cmd[no-index]{false}).
+ \end{itemize}
\begin{verbatim}
\timelist [ numformat = \bfseries, timeformat = \ttfamily ]
{ 08:30 -> 10:00, 10:30 -> 12:00, 13:00 -> 14:30, 15:00 -> 16:30 }
@@ -114,23 +123,24 @@
需在 \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{itemize}[leftmargin = 0pt]
+ \item [\key{color}] \val{color} 用於設置課程盒子嘅顏色,
+ (默認值:\cmd[no-index]{teal}). 鍵名可省略.
+ \item [\key{subject}] \val{string} 用於設置課程名稱.
+ \item [\key{location}] \val{string} 用於設置課程地點.
+ \item [\key{lecture}] \val{string} 用於設置授課教師.
+ \item [\key{comment}] \val{string} 用於給課程添加腳注.
+ \end{itemize}
\begin{texnote}
- \begin{itemize}
- \item 若 \meta{start} \cmd{=} \meta{end},即課程盒子嘅高度為 1,
- 則 \key{location} 和 \key{lecture} 將輸出在同一行,
- \key{comment} 嘅值將會隱藏.
+ \begin{itemize}[leftmargin = 0pt]
+ \item 若 \meta{start} \cmd[no-index]{=} \meta{end}(課程盒子高度為 $1$),
+ 則 \key*{location} \key*{lecture} 將輸出在同一行,
+ \key*{comment} 將隱藏.
\item 即使誤將 \meta{start} 與 \meta{end} 寫反,
模板也會自動糾正.
- \item 若 \key{location} \key{lecture} 均未使用,
- 則 \key{subject} 將輸出在課程盒子中心.
+ \item 若 \key*{location} 和 \key*{lecture} 均未使用,
+ 則 \key*{subject} 將輸出在課程盒子嘅
+ 竪直方向中心.
\item 超出課程表範圍嘅課程盒子將不顯示,
並會返回警告.
輸入用例見 Appendix \ref{mwe}.
@@ -143,7 +153,7 @@
\cs{newday} \oarg{integral value}
\end{syntax}
使其後面添加嘅課程盒子後移 \meta{intergal value} 個工作日.
- 可選參數嘅默認值為 \cmd{1}.
+ 可選參數嘅默認值為 \cmd[no-index]{1}.
\end{function}
\begin{function}{\more}
@@ -153,14 +163,64 @@
在課程表嘅右下角添加備注.
\end{function}
-\clearpage \appendix
+\appendix \linespread{1.05}
-\section{工作示例} \label{mwe} \linespread{1.25}
+\section{工作範例} \label{mwe}
-\verbatiminput{litetable-demo.tex}
+\begin{verbatim}
+ \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ {
+ \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+ \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+ \texttwemoji{1fa99} Fri -> 1
+ }
+ \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
+ }
+ \begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+ \course [ subject = interface3, comment = \TeX{} Live 2025,
+ lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+ \newday
+ \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+ \newday
+ \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+ location = Stanford University, Purple ] {10} {11}
+ \newday
+ \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}
+\end{verbatim}
-\includepdf[pages = 1]{litetable-demo.pdf}
+\PrintIndex
-\end{document}
+\weeklist [ format = \bfseries \scshape, sep = \textbar ]
+ {
+ \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+ \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+ \texttwemoji{1fa99} Fri -> 1
+ }
+\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
+ }
+\begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+ \course [ subject = interface3, comment = \TeX{} Live 2025,
+ lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+ \newday
+ \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+ \newday
+ \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+ location = Stanford University, Purple ] {10} {11}
+ \newday
+ \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}
-% End of file litetable-zh-hk.tex
+\end{document}
\ No newline at end of file
Added: trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf 2025-03-01 21:32:17 UTC (rev 74372)
Property changes on: trunk/Master/texmf-dist/doc/latex/litetable/litetable.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/litetable/litetable.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/litetable/litetable.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/litetable/litetable.dtx 2025-03-01 21:32:17 UTC (rev 74372)
@@ -0,0 +1,826 @@
+% \iffalse meta-comment
+%
+% File: litetable.dtx
+% -----------------------------------------------------------------------
+% Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com> *
+% *
+% It may be distributed and/or modified under the conditions of the *
+% LaTeX Project Public License (LPPL), either version 1.3c of this *
+% license or (at your option) any later version. The latest version *
+% of this license is in the file *
+% *
+% http://www.latex-project.org/lppl.txt *
+% *
+% This work has the LPPL maintenance status `maintained'. *
+% *
+% The Current Maintainer of this work is Mingyu Xia. *
+% *
+% This work consists of the files litetable.dtx, *
+% and litetable.ins, *
+% and the derived files litetable.sty, *
+% litetable.pdf, *
+% and README.md. *
+% -----------------------------------------------------------------------
+%
+% Any modification of this file should ensure that the copyright and
+% license information is placed in the derived files.
+%
+% -----------------------------------------------------------------------
+%
+%<*internal>
+\iffalse
+%</internal>
+%
+%<*readme>
+The `litetable` Package
+=======================
+
+The `litetable` package provides a colorful design of timetable.
+
+See `litetable.pdf` for more. Happy TeXing!
+
+Issues
+------
+
+The issue tracker for `litetable` is currently located
+[on GitHub](https://github.com/myhsia/litetable/issues).
+
+Copyright and License
+---------------------
+
+ Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com>
+
+ It may be distributed and/or modified under the conditions of the
+ LaTeX Project Public License (LPPL), either version 1.3c of this
+ license or (at your option) any later version. The latest version
+ of this license is in the file <http://www.latex-project.org/lppl.txt>
+
+ This work has the LPPL maintenance status `maintained`.
+
+ The Current Maintainer of this work is Mingyu Xia.
+%</readme>
+%
+%<*internal>
+\fi
+%</internal>
+%
+%<*driver|package>
+\RequirePackage{expl3, xparse}
+%</driver|package>
+%<*driver>
+\documentclass[svgnames, onlydoc]{l3doc}
+\usepackage{litetable, twemojis}
+\usepackage[mono = false]{libertine}
+\AddToHook{env/function/before}{\vspace*{-.65\baselineskip}}
+\AddToHook{env/syntax/after}{\par\vspace*{.15\baselineskip}}
+\makeatletter
+\def \@key #1{\textcolor{red}{\textbf{\texttt{#1}}} \normalfont \texttt{=}}
+\def \s at key #1{\textcolor{red}{\textbf{\texttt{#1}}}}
+\DeclareRobustCommand \key {\@ifstar\s at key\@key}
+\def \val #1{\meta{\textup{#1}}}
+\def \TFF {true\textbar \textbf{false}}
+\def \TTF {\textbf{true}\textbar false}
+\def \HoLogo at ApTeX #1{\HOLOGO at mbox {Ap\kern -.1667em\TeX}}
+\makeatother
+\makeindex
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \title{^^A
+% The \cls{litetable} Package --- Colorful Timetable\thanks{^^A
+% \url{https://github.com/myhsia/litetable},
+% \url{https://ctan.org/pkg/litetable}
+% }
+% }
+%
+% \author{^^A
+% Mingyu Xia
+% \texttt{<\href{mailto:myhsia at outlook.com}{myhsia at outlook.com}>}\thanks{^^A
+% \href{https://github.com/ljguo1020}{Lijun Guo} developed an interface to
+% read \meta{left} \cmd[no-index]{->} \meta{right} data structures, and make
+% compatibility for lower versions of \hologo{TeX} Live.
+% }
+% }
+%
+% \date{Released 2025-03-01\quad \texttt{v3.3A}}
+%
+% \maketitle
+%
+% \begin{documentation}
+%
+% \section{Introduction}
+%
+% The \cls{litetable} package provides a colorful design of timetable, developed
+% by \pkg{expl3} based on \pkg{tikz}. It is compatible with \hologo{TeX} Live
+% 2019 or later distributions and supports various compilation methods, such as
+% \hologo{pdfLaTeX}, \hologo{XeLaTeX}, \hologo{ApTeX}, \hologo{LuaLaTeX}, etc.
+% Click to jump to the manual's
+% \href{litetable-zh-cn.pdf}{[\textsf{Chinese Version}]}
+% \href{litetable-zh-hk.pdf}{[\textsf{Cantonese Version}]}.
+%
+% \section{Usage}
+%
+% To load this package, write the line
+% \begin{quote}
+% |\usepackage{litetable}|
+% \end{quote}
+%
+% \DescribeEnv{litetable}
+% The \env{litetable} environment can create a blank timetable frame, and it
+% should be executed after commands \cs{timelist} and \cs{weeklist}.
+% \begin{quote}
+% |\begin{litetable}|
+% \oarg{keys} \marg{title} \oarg{keys}| ... |
+% |\end{litetable}|
+% \end{quote}
+% The mandatory argument can set the title of the timetable, and the
+% optional argument accepts the following keys
+% \begin{itemize}[leftmargin = 0pt]
+% \item [\key{color}] \val{string} can set the background color
+% (Default: \cmd[no-index]{gray}), this key's name could be omitted.
+% \item [\key{sem}] \val{string} can set the semester information at the
+% northeast corner of the page.
+% \end{itemize}
+%
+% \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 timetable.
+% The optional argument accepts the following keys
+% \begin{itemize}[leftmargin = 0pt]
+% \item [\key{format}] \val{format commands} can set the font for the list
+% of working days (Default: \cmd[no-index]{\bfseries}).
+% \item [\key{sep}] \val{dim} can set the separator of the list of working
+% days (Default is empty).
+% \end{itemize}
+% \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 timetable. The optional argument accepts the following keys
+% \begin{itemize}[leftmargin = 0pt]
+% \item [\key{numformat}] \val{format commands} can set the font for the
+% sequence number of the time list
+% (Default: \cmd[no-index]{\ttfamily} \cmd[no-index]{\bfseries}).
+% \item [\key{timefont}] \val{format commands} can set the font for the time
+% of the time list. (Default: \cmd[no-index]{\ttfamily}).
+% \item [\key{hidetime}] \val{\TFF} hide the time in the time list and only
+% retain the sequence number. The initial value is \cmd[no-index]{false}.
+% \end{itemize}
+% \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{itemize}[leftmargin = 0pt]
+% \item [\key{color}] \val{string} can set the color of the course box
+% (Default: \cmd[no-index]{teal}), this key's name could be omitted.
+% \item [\key{subject}] \val{string} can set the name of the course.
+% \item [\key{location}] \val{string} can set the location of the course.
+% \item [\key{lecture}] \val{string} can set the lecture of the course.
+% \item [\key{comment}] \val{string} can add footnote to the course.
+% \end{itemize}
+% \begin{texnote}
+% \begin{itemize}[leftmargin = 0pt]
+% \item If \meta{start} \cmd[no-index]{=} \meta{end} (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 \meta{start} and
+% \meta{end} were misplaced.
+% \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 timetable 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{integral value} working days.
+% The default value of the optional argument is \cmd[no-index]{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 timetable.
+% \end{function}
+%
+% \appendix \linespread{1.15}
+%
+% \section{Working Example} \label{mwe}
+%
+% \begin{verbatim}
+% \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+% {
+% \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+% \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+% \texttwemoji{1fa99} Fri -> 1
+% }
+% \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
+% }
+% \begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+% \course [ subject = interface3, comment = \TeX{} Live 2025,
+% lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+% \newday
+% \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+% \newday
+% \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+% location = Stanford University, Purple ] {10} {11}
+% \newday
+% \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}
+% \end{verbatim}
+%
+% \PrintIndex
+%
+% \weeklist [ format = \bfseries \scshape, sep = \textbar ]
+% {
+% \texttwemoji{1f312} Mon -> 1, \texttwemoji{1f525} Tue -> 1,
+% \texttwemoji{1f30a} Wed -> 1, \texttwemoji{1f332} Thu -> 1,
+% \texttwemoji{1fa99} Fri -> 1
+% }
+% \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
+% }
+% \begin{litetable} [ MidnightBlue, sem = SEM 7 ] { Course Schedule }
+% \course [ subject = interface3, comment = \TeX{} Live 2025,
+% lecture = The \LaTeX{} Project, DarkBlue ] {4} {5}
+% \newday
+% \course [ subject = expl3, lecture = The \LaTeX{} Project ] {8} {8}
+% \newday
+% \course [ subject = Keep on \TeX ing, lecture = Donald E. Knuth,
+% location = Stanford University, Purple ] {10} {11}
+% \newday
+% \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}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+% \linespread{1.18}
+% \section{The Source Code}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=ltbl>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvidesExplPackage {litetable} {2025-03-01} {3.3A} {Colorful Timetable}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{tikz}
+% \end{macrocode}
+% Warning Broadcast
+% \begin{macrocode}
+\cs_new_protected:Npn \msg_@@_new:nn #1#2
+ { \msg_new:nnn { litetable } {#1} {#2} }
+\cs_new_protected:Npn \msg_@@_warning:n #1
+ { \msg_warning:nn { litetable } {#1} }
+\msg_@@_new:nn { course }
+ { \exp_not:N \course ~ box(s) ~ exceed ~ workdays ~ were ~ ignored }
+% \end{macrocode}
+% Compatibility for \hologo{TeX} Live 2019 and later
+% (by \href{https://github.com/ljguo1020}{Lijun Guo})
+% \begin{macrocode}
+\cs_if_exist:NF \clist_put_right:Ne
+ { \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
+\cs_if_exist:NF \exp_args:NNNe
+ {
+ \cs_new:Npn \exp_args:NNNe #1#2#3#4
+ {
+ \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3
+ \tex_expanded:D { {#4} }
+ }
+ }
+% \end{macrocode}
+% \begin{macro}{\@@_get_left:nN, \@@_get_right:nN}
+% Handle \meta{left} \cmd[no-index]{->} \meta{right} data structures
+% (by \href{https://github.com/ljguo1020}{Lijun Guo})
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_get_left:nN #1#2
+ {
+ \group_begin: \seq_set_split:Nnn \l_@@_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l_@@_tmpa_seq { 1 } }
+ }
+\cs_new_protected_nopar:Npn \@@_get_right:nN #1#2
+ {
+ \group_begin: \seq_set_split:Nnn \l_@@_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l_@@_tmpa_seq { 2 } }
+ }
+\cs_generate_variant:Nn \@@_get_left:nN { e }
+\cs_generate_variant:Nn \@@_get_right:nN { e }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{User's Interface}
+%
+% \begin{macro}{\weeklist}
+% Set a list of working days and the width of each column at the top of the
+% timetable.
+% \begin{macrocode}
+\NewDocumentCommand \weeklist { O{} m O{} }
+ { \keys_set:nn { litetable / weeklist } { #1, #3 } \@@_weeklist:n {#2} }
+% \end{macrocode}
+% \begin{variable}{\l_@@_weeklist_format_tl, \l_@@_weeklist_sep_tl}
+% Key--value definitions for the \cs{weeklist} command.
+% \begin{macrocode}
+\keys_define:nn { litetable / weeklist }
+ {
+ format .tl_set:N = \l_@@_weeklist_format_tl,
+ format .initial:n = \bfseries,
+ sep .tl_set:N = \l_@@_weeklist_sep_tl
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \begin{macro}{\timelist}
+% Set the time list on the left side of the timetable.
+% \begin{macrocode}
+\NewDocumentCommand \timelist { O{} m O{} }
+ { \keys_set:nn { litetable / timelist } { #1, #3 } \@@_timelist:n {#2} }
+% \end{macrocode}
+% \begin{variable}
+% {
+% \l_@@_timelist_numformat_tl, \l_@@_timelist_timeformat_tl,
+% \l_@@_timelist_hidetime_bool
+% }
+% Key--value definitions for the \cs{timelist} command.
+% \begin{macrocode}
+\keys_define:nn { litetable / timelist }
+ {
+ numformat .tl_set:N = \l_@@_timelist_numformat_tl,
+ numformat .initial:n = \ttfamily \bfseries,
+ timeformat .tl_set:N = \l_@@_timelist_timeformat_tl,
+ timeformat .initial:n = \ttfamily,
+ hidetime .bool_set:N = \l_@@_timelist_hidetime_bool,
+ hidetime .initial:n = false,
+ hidetime .default:n = true
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \begin{environment}{litetable}
+% Create a blank timetable frame.
+% \begin{macrocode}
+\NewDocumentEnvironment { litetable } { O{} m O{} }
+ {
+ \clearpage \thispagestyle{empty}
+ \tikzpicture [ remember~picture, overlay ]
+ \group_begin:
+ \keys_set:nn { litetable / frame } { #1, #3 }
+ \@@_maketable:n {#2}
+ } { \group_end: \endtikzpicture \clearpage }
+% \end{macrocode}
+% \begin{variable}{\l_@@_bg_color_tl, \l_@@_bg_sem_tl}
+% Key--value definitions for the \env{litetable} command.
+% \begin{macrocode}
+\keys_define:nn { litetable / frame }
+ {
+ 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 }
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{environment}
+% \begin{macro}{\course}
+% Add course boxes on the current workday
+% \begin{macrocode}
+\NewDocumentCommand \course { O{} m O{} m O{} }
+ {
+ \group_begin:
+ \bool_lazy_any:nTF
+ {
+ {
+ \int_compare_p:nNn { \l_@@_weekday_int } >
+ { \clist_count:N \l_@@_week_clist }
+ }
+ { \int_compare_p:nNn { #2 } > { \clist_count:N \l_@@_time_clist } }
+ { \int_compare_p:nNn { #4 } > { \clist_count:N \l_@@_time_clist } }
+ } { \msg_@@_warning:n { course } }
+ {
+ \keys_set:nn { litetable / course } { #1, #3, #5 }
+ \int_compare:nNnTF {#2} < {#4}
+ { \@@_course_box_aux:nn {#2} {#4} }
+ { \@@_course_box_aux:nn {#4} {#2} }
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% \begin{variable}
+% {
+% \l_@@_course_color_tl, \l_@@_course_subject_tl,
+% \l_@@_course_lecture_tl, \l_@@_course_lecture_tl,
+% \l_@@_course_location_tl, \l_@@_course_comment_tl
+% }
+% Key--value definitions for the \cs{course} command.
+% \begin{macrocode}
+\keys_define:nn { litetable / course }
+ {
+ 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_@@_course_comment_tl,
+ unknown .code:n = \tl_if_novalue:nF {#1}
+ { \tl_set_eq:NN \l_@@_course_color_tl \l_keys_key_tl }
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \begin{macro}{\more}
+% Add a comment at the southwest corner of the timetable.
+% \begin{macrocode}
+\NewDocumentCommand \more { m }
+ {
+ \node [ yshift = .5\l_@@_time_vunit_dim, left = 1ex,
+ darkgray, font = \small \bfseries
+ ] at (current~page.south~east) {#1};
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\newday}
+% Move the next course boxes right \meta{integral value} working days.
+% \begin{macrocode}
+\NewDocumentCommand \newday { O{1} } { \int_add:Nn \l_@@_weekday_int {#1} }
+\int_new:N \l_@@_weekday_int \int_set:Nn \l_@@_weekday_int { 1 }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Internal Auxiliary}
+%
+% \begin{variable}
+% {
+% \l_@@_week_ratio_clist, \l_@@_week_accum_clist,
+% \l_@@_week_num_int, \l_@@_week_hunit_dim
+% }
+% The ratios of every working days, the accumulation of the ratios of every
+% working days, the sequence number of every working days, the horizontal
+% width unit of the timetable.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\@@_weeklist:n}
+% Define the auxiliary command of \cs{weeklist}.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_weeklist:n #1
+ {
+ \clist_set:Nn \l_@@_week_clist {#1}
+ \int_step_inline:nn { \clist_count:N \l_@@_week_clist }
+ {
+ \@@_get_right:eN
+ { \clist_item:Nn \l_@@_week_clist {##1} } \l_@@_tmpb_tl
+ \clist_put_right:Ne \l_@@_week_ratio_clist { \l_@@_tmpb_tl }
+ }
+ \int_step_inline:nn { \clist_count:N \l_@@_week_clist }
+ {
+ \clist_clear:N \l_@@_week_accumtmp_clist
+ \int_step_inline:nn {##1}
+ {
+ \clist_put_right:Ne \l_@@_week_accumtmp_clist
+ { \clist_item:Nn \l_@@_week_ratio_clist {####1} }
+ }
+ \clist_put_right:Ne \l_@@_week_accum_clist
+ { \int_eval:n { \clist_use:Nn \l_@@_week_accumtmp_clist { + } } }
+ }
+ \int_set:Nn \l_@@_week_num_int
+ {
+ \clist_item:Nn \l_@@_week_accum_clist
+ { \clist_count:N \l_@@_week_clist }
+ }
+ \dim_set:Nn \l_@@_week_hunit_dim
+ { \dim_eval:n { 14\paperwidth/\l_@@_week_num_int/15 } }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_time_num_int, \l_@@_time_vunit_dim}
+% The sequence number of the time list, and the vertical gap between the
+% start and end time.
+% \begin{macrocode}
+\int_new:N \l_@@_time_num_int
+\dim_new:N \l_@@_time_vunit_dim
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\@@_timelist:n}
+% Define the auxiliary command of \cs{timelist}.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_timelist:n #1
+ {
+ \clist_set:Nn \l_@@_time_clist {#1}
+ \int_set:Nn \l_@@_time_num_int { \clist_count:N \l_@@_time_clist }
+ \dim_set:Nn \l_@@_time_vunit_dim
+ { \fp_eval:n { 1/( 2\l_@@_time_num_int + 3.5 ) } \paperheight }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_timelist_shift_dim}
+% Store the vertical shift of the sequence number of the time list.
+% \begin{macrocode}
+\dim_new:N \l_@@_timelist_shift_dim
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\@@_maketable:n}
+% Define the auxiliary command of the \env{litetable} environment.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_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
+ {
+ \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) { \l_@@_bg_sem_tl };
+ }
+ \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);
+ }
+ \bool_if:NTF \l_@@_timelist_hidetime_bool
+ {
+ \dim_set:Nn \l_@@_timelist_shift_dim
+ { -1.5\l_@@_time_vunit_dim }
+ }
+ {
+ \dim_set:Nn \l_@@_timelist_shift_dim
+ { -\l_@@_time_vunit_dim }
+ }
+ \int_step_inline:nn { \l_@@_time_num_int }
+ {
+ \node [ darkgray!80, shift =
+ {(
+ \paperwidth/30,
+ -2 * ##1 \l_@@_time_vunit_dim +
+ \l_@@_timelist_shift_dim
+ )}, font = \large \l_@@_timelist_numformat_tl
+ ] at (current~page.north~west) {##1};
+ }
+ \bool_if:NF \l_@@_timelist_hidetime_bool
+ {
+ \int_step_inline:nn { \clist_count:N \l_@@_time_clist }
+ {
+ \@@_get_left:eN
+ { \clist_item:Nn \l_@@_time_clist {##1} } \l_@@_tmpa_tl
+ \@@_get_right:eN
+ { \clist_item:Nn \l_@@_time_clist {##1} } \l_@@_tmpb_tl
+ \node [ gray, align = center, shift =
+ {(
+ \paperwidth/30,
+ \fp_eval:n { -1.85 - 2 * ##1 } \l_@@_time_vunit_dim
+ )}, font = \l_@@_timelist_timeformat_tl
+ ] at (current~page.north~west)
+ { \l_@@_tmpa_tl\\ \l_@@_tmpb_tl };
+ }
+ }
+ \int_step_inline:nn { \clist_count:N \l_@@_week_clist }
+ {
+ \int_compare:nNnF { ##1 } = { \clist_count:N \l_@@_week_clist }
+ {
+ \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_@@_weeklist_sep_tl };
+ }
+ \@@_get_left:eN
+ { \clist_item:Nn \l_@@_week_clist {##1} } \l_@@_tmpa_tl
+ \node [ shift =
+ {(\fp_eval:n
+ {
+ 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 \l_@@_weeklist_format_tl
+ ] at (current~page.north~west) { \l_@@_tmpa_tl };
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_course_shift_dim}
+% Store the vertical shift of the course subject in course box.
+% \begin{macrocode}
+\dim_new:N \l_@@_course_shift_dim
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\@@_course_box_aux:nn}
+% Define the auxiliary command of \cs{course}.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_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_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_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_@@_weekday_int } \l_@@_week_hunit_dim - 2.4pt,
+ \fp_eval:n { 2( #1 - #2 - 1 ) } \l_@@_time_vunit_dim + 2.4pt
+ );
+ \fill [ \l_@@_course_color_tl!60 ]
+ ([shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l_@@_week_accum_clist
+ { \l_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_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_@@_weekday_int } \l_@@_week_hunit_dim,
+ -\l_@@_time_vunit_dim/2
+ );
+ \end{scope}
+ \int_compare:nNnTF {#1} = {#2}
+ {
+ \bool_lazy_and:nnTF
+ { \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_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_weekday_int }/2
+ } \l_@@_week_hunit_dim + \paperwidth/15,
+ \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_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_weekday_int }/2
+ } \l_@@_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.75 - #1 - #2 } \l_@@_time_vunit_dim
+ )}, below, \l_@@_course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \l_@@_course_location_tl
+ \l_@@_s at course_sep_tl
+ \l_@@_course_lecture_tl
+ };
+ }
+ {
+ \bool_lazy_and:nnTF
+ { \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 { }
+ \dim_set:Nn \l_@@_course_shift_dim { 0pt }
+ }
+ {
+ \tl_set:Nn \l_@@_course_anchor_tl { above }
+ \dim_set:Nn \l_@@_course_shift_dim
+ { \l_@@_time_vunit_dim/8 }
+ }
+ \node
+ [ \l_@@_course_color_tl!60, align = center, shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l_@@_week_accum_clist
+ { \l_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_weekday_int }/2
+ } \l_@@_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.5 - #1 - #2 } \l_@@_time_vunit_dim +
+ \l_@@_course_shift_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_@@_course_sep_tl { } }
+ { \tl_set:Nn \l_@@_course_sep_tl { \\ } }
+ \node
+ [ shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l_@@_week_accum_clist
+ { \l_@@_weekday_int } -
+ \clist_item:Nn \l_@@_week_ratio_clist
+ { \l_@@_weekday_int }/2
+ } \l_@@_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.625 - #1 - #2 } \l_@@_time_vunit_dim
+ )}, below, \l_@@_course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \l_@@_course_location_tl
+ \l_@@_course_sep_tl
+ \l_@@_course_lecture_tl
+ };
+ \node
+ [ shift =
+ {(
+ \clist_item:Nn \l_@@_week_accum_clist
+ { \l_@@_weekday_int } \l_@@_week_hunit_dim +
+ \paperwidth/15,
+ \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_@@_course_comment_tl };
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \end{implementation}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/source/latex/litetable/litetable.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/litetable/litetable.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/litetable/litetable.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/litetable/litetable.ins 2025-03-01 21:32:17 UTC (rev 74372)
@@ -0,0 +1,75 @@
+\iffalse meta-comment
+
+File: litetable.ins
+-----------------------------------------------------------------------
+ Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com> *
+ *
+ It may be distributed and/or modified under the conditions of the *
+ LaTeX Project Public License (LPPL), either version 1.3c of this *
+ license or (at your option) any later version. The latest version *
+ of this license is in the file *
+ *
+ http://www.latex-project.org/lppl.txt *
+ *
+ This work has the LPPL maintenance status `maintained'. *
+ *
+ The Current Maintainer of this work is Mingyu Xia. *
+ *
+ This work consists of the files litetable.dtx, *
+ and litetable.ins, *
+ and the derived files litetable.sty, *
+ litetable.pdf, *
+ and README.md. *
+-----------------------------------------------------------------------
+
+ Any modification of this file should ensure that the copyright and
+ license information is placed in the derived files.
+
+-----------------------------------------------------------------------
+
+\fi
+
+\input docstrip %
+\askforoverwritefalse
+
+\preamble
+-----------------------------------------------------------------------
+ Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com> *
+ *
+ It may be distributed and/or modified under the conditions of the *
+ LaTeX Project Public License (LPPL), either version 1.3c of this *
+ license or (at your option) any later version. The latest version *
+ of this license is in the file *
+ *
+ http://www.latex-project.org/lppl.txt *
+ *
+ This work has the LPPL maintenance status `maintained'. *
+ *
+ The Current Maintainer of this work is Mingyu Xia. *
+-----------------------------------------------------------------------
+\endpreamble
+
+\postamble
+-----------------------------------------------------------------------
+ This work consists of the files litetable.dtx, *
+ and litetable.ins, *
+ and the derived files litetable.sty, *
+ litetable.pdf, *
+ and README.md. *
+-----------------------------------------------------------------------
+\endpostamble
+
+\keepsilent
+
+\generate{
+ \usedir{tex/latex/litetable}
+ \file{\jobname.sty} {\from{\jobname.dtx}{package}}
+ \usedir{doc/latex/litetable}
+ \nopreamble\nopostamble
+ \file{README.md} {\from{\jobname.dtx}{readme}}
+ }
+
+\endbatchfile
+\endinput
+%%
+%% End of file `litetable.ins'
Deleted: trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls 2025-03-01 21:31:58 UTC (rev 74371)
+++ trunk/Master/texmf-dist/tex/latex/litetable/litetable.cls 2025-03-01 21:32:17 UTC (rev 74372)
@@ -1,400 +0,0 @@
-%% *********************************************************************
-%% 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 *
-%% *
-%% 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 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/myhsia/litetable *
-%% *********************************************************************
-\RequirePackage{xparse}
-\ProvidesExplClass {litetable} {2025/02/10} {3.2A} {Colorful Timetable}
-
-\DeclareOption* { \PassOptionsToClass \CurrentOption { article } }
-\ProcessOptions \relax
-\LoadClass { article }
-
-\pagestyle { empty }
-\RequirePackage { tikz }
-
-% 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 \exp_args:NNNe
- {
- \cs_new:Npn \exp_args:NNNe #1#2#3#4
- {
- \exp_after:wN #1
- \exp_after:wN #2
- \exp_after:wN #3
- \tex_expanded:D { {#4} }
- }
- }
-
-% Module for left -> right data structure (by @ljguo)
-\cs_new_protected_nopar:Npn \__lite_get_left:nN #1#2
- {
- \group_begin:
- \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 \__lite_get_right:nN #1#2
- {
- \group_begin:
- \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 \__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
-\keys_define:nn { litetable / timelist }
- {
- 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 }
- }
-
-\clist_new:N \l__week_ratio_clist
-\clist_new:N \l__week_accum_clist
-\int_new:N \l__week_num_int
-\dim_new:N \l__week_hunit_dim
-\NewDocumentCommand \weeklist { O{} m O{} }
- { \keys_set:nn { litetable / weeklist } { #1, #3 } \lite_weeklist:n {#2} }
-\keys_define:nn { litetable / weeklist }
- {
- 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 }
- {
- \__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__lite_week_clist }
- {
- \clist_clear:N \l__week_accumtmp_clist
- \int_step_inline:nn {##1}
- {
- \clist_put_right:Ne \l__week_accumtmp_clist
- { \clist_item:Nn \l__week_ratio_clist {####1} }
- }
- \clist_put_right:Ne \l__week_accum_clist
- { \int_eval:n { \clist_use:Nn \l__week_accumtmp_clist { + } } }
- }
- \int_set:Nn \l__week_num_int
- {
- \clist_item:Nn \l__week_accum_clist
- { \clist_count:N \l__lite_week_clist }
- }
- \dim_set:Nn \l__week_hunit_dim
- { \dim_eval:n { 14\paperwidth/\l__week_num_int/15 } }
- }
-
-\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} }
-
-\dim_new:N \l__lite_timelist_yshift_dim
-\keys_define:nn { litetable / frame }
- {
- 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 }
- }
-\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
- {
- \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) { \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);
- }
- \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 }
- {
- \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 { \clist_count:N \l__lite_time_clist }
- {
- \__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 };
- }
- }
- % Weekdays
- \int_step_inline:nn { \clist_count:N \l__lite_week_clist }
- {
- \int_compare:nNnF { ##1 } = { \clist_count:N \l__lite_week_clist }
- {
- \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
- {
- 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 \l__lite_weeklist_format_tl
- ] at (current~page.north~west) { \l__lite_tmpa_tl };
- }
- }
-
-\NewDocumentCommand \more { m }
- {
- \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 = 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
-\lite_msg_new:nn { course }
- { \exp_not:N \course~box(s)~exceed~workdays~were~ignored }
-\NewDocumentCommand \course { O{} m O{} m O{} }
- {
- \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}
- % 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__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
- )}, 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__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
- )}, below, \l__course_color_tl!60, align = center
- ] at (current~page.north~west)
- { \l__course_location_tl \l__s at course_sep_tl \l__course_lecture_tl };
- }
- {
- \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_set:Nn \l__course_anchor_tl { }
- \dim_set:Nn \l__course_infoshift_dim { 0pt }
- }
- {
- \tl_set:Nn \l__course_anchor_tl { above }
- \dim_set:Nn \l__course_infoshift_dim { \l__time_vunit_dim/8 }
- }
- \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__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
- )}, below, \l__course_color_tl!60, align = center
- ] at (current~page.north~west)
- { \l__course_location_tl \l__ at course_sep_tl \l__course_lecture_tl };
- \node
- [ shift =
- {(
- \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
- )}, above~left, \l__course_color_tl!60, outer~sep = .5ex
- ] at (current~page.north~west) { \l__default_comment_tl };
- }
- }
-
-\endinput
-% End of file litetable.cls
Added: trunk/Master/texmf-dist/tex/latex/litetable/litetable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/litetable/litetable.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/litetable/litetable.sty 2025-03-01 21:32:17 UTC (rev 74372)
@@ -0,0 +1,411 @@
+%%
+%% This is file `litetable.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% litetable.dtx (with options: `package')
+%% -----------------------------------------------------------------------
+%% Copyright (C) 2023-2025 by Mingyu Xia <myhsia at outlook.com> *
+%% *
+%% It may be distributed and/or modified under the conditions of the *
+%% LaTeX Project Public License (LPPL), either version 1.3c of this *
+%% license or (at your option) any later version. The latest version *
+%% of this license is in the file *
+%% *
+%% http://www.latex-project.org/lppl.txt *
+%% *
+%% This work has the LPPL maintenance status `maintained'. *
+%% *
+%% The Current Maintainer of this work is Mingyu Xia. *
+%% -----------------------------------------------------------------------
+\RequirePackage{expl3, xparse}
+\ProvidesExplPackage {litetable} {2025-03-01} {3.3A} {Colorful Timetable}
+\RequirePackage{tikz}
+\cs_new_protected:Npn \msg__ltbl_new:nn #1#2
+ { \msg_new:nnn { litetable } {#1} {#2} }
+\cs_new_protected:Npn \msg__ltbl_warning:n #1
+ { \msg_warning:nn { litetable } {#1} }
+\msg__ltbl_new:nn { course }
+ { \exp_not:N \course ~ box(s) ~ exceed ~ workdays ~ were ~ ignored }
+\cs_if_exist:NF \clist_put_right:Ne
+ { \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
+\cs_if_exist:NF \exp_args:NNNe
+ {
+ \cs_new:Npn \exp_args:NNNe #1#2#3#4
+ {
+ \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3
+ \tex_expanded:D { {#4} }
+ }
+ }
+\cs_new_protected_nopar:Npn \__ltbl_get_left:nN #1#2
+ {
+ \group_begin: \seq_set_split:Nnn \l__ltbl_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l__ltbl_tmpa_seq { 1 } }
+ }
+\cs_new_protected_nopar:Npn \__ltbl_get_right:nN #1#2
+ {
+ \group_begin: \seq_set_split:Nnn \l__ltbl_tmpa_seq { -> } {#1}
+ \exp_args:NNNe \group_end:
+ \tl_set:Nn #2 { \seq_item:Nn \l__ltbl_tmpa_seq { 2 } }
+ }
+\cs_generate_variant:Nn \__ltbl_get_left:nN { e }
+\cs_generate_variant:Nn \__ltbl_get_right:nN { e }
+\NewDocumentCommand \weeklist { O{} m O{} }
+ { \keys_set:nn { litetable / weeklist } { #1, #3 } \__ltbl_weeklist:n {#2} }
+\keys_define:nn { litetable / weeklist }
+ {
+ format .tl_set:N = \l__ltbl_weeklist_format_tl,
+ format .initial:n = \bfseries,
+ sep .tl_set:N = \l__ltbl_weeklist_sep_tl
+ }
+\NewDocumentCommand \timelist { O{} m O{} }
+ { \keys_set:nn { litetable / timelist } { #1, #3 } \__ltbl_timelist:n {#2} }
+\keys_define:nn { litetable / timelist }
+ {
+ numformat .tl_set:N = \l__ltbl_timelist_numformat_tl,
+ numformat .initial:n = \ttfamily \bfseries,
+ timeformat .tl_set:N = \l__ltbl_timelist_timeformat_tl,
+ timeformat .initial:n = \ttfamily,
+ hidetime .bool_set:N = \l__ltbl_timelist_hidetime_bool,
+ hidetime .initial:n = false,
+ hidetime .default:n = true
+ }
+\NewDocumentEnvironment { litetable } { O{} m O{} }
+ {
+ \clearpage \thispagestyle{empty}
+ \tikzpicture [ remember~picture, overlay ]
+ \group_begin:
+ \keys_set:nn { litetable / frame } { #1, #3 }
+ \__ltbl_maketable:n {#2}
+ } { \group_end: \endtikzpicture \clearpage }
+\keys_define:nn { litetable / frame }
+ {
+ color .tl_set:N = \l__ltbl_bg_color_tl,
+ color .initial:n = gray,
+ sem .tl_set:N = \l__ltbl_bg_sem_tl,
+ unknown .code:n = \tl_if_novalue:nF {#1}
+ { \tl_set_eq:NN \l__ltbl_bg_color_tl \l_keys_key_tl }
+ }
+\NewDocumentCommand \course { O{} m O{} m O{} }
+ {
+ \group_begin:
+ \bool_lazy_any:nTF
+ {
+ {
+ \int_compare_p:nNn { \l__ltbl_weekday_int } >
+ { \clist_count:N \l__ltbl_week_clist }
+ }
+ { \int_compare_p:nNn { #2 } > { \clist_count:N \l__ltbl_time_clist } }
+ { \int_compare_p:nNn { #4 } > { \clist_count:N \l__ltbl_time_clist } }
+ } { \msg__ltbl_warning:n { course } }
+ {
+ \keys_set:nn { litetable / course } { #1, #3, #5 }
+ \int_compare:nNnTF {#2} < {#4}
+ { \__ltbl_course_box_aux:nn {#2} {#4} }
+ { \__ltbl_course_box_aux:nn {#4} {#2} }
+ }
+ \group_end:
+ }
+\keys_define:nn { litetable / course }
+ {
+ color .tl_set:N = \l__ltbl_course_color_tl,
+ color .initial:n = black,
+ subject .tl_set:N = \l__ltbl_course_subject_tl,
+ lecture .tl_set:N = \l__ltbl_course_lecture_tl,
+ location .tl_set:N = \l__ltbl_course_location_tl,
+ comment .tl_set:N = \l__ltbl_course_comment_tl,
+ unknown .code:n = \tl_if_novalue:nF {#1}
+ { \tl_set_eq:NN \l__ltbl_course_color_tl \l_keys_key_tl }
+ }
+\NewDocumentCommand \more { m }
+ {
+ \node [ yshift = .5\l__ltbl_time_vunit_dim, left = 1ex,
+ darkgray, font = \small \bfseries
+ ] at (current~page.south~east) {#1};
+ }
+\NewDocumentCommand \newday { O{1} } { \int_add:Nn \l__ltbl_weekday_int {#1} }
+\int_new:N \l__ltbl_weekday_int \int_set:Nn \l__ltbl_weekday_int { 1 }
+\clist_new:N \l__ltbl_week_ratio_clist
+\clist_new:N \l__ltbl_week_accum_clist
+\int_new:N \l__ltbl_week_num_int
+\dim_new:N \l__ltbl_week_hunit_dim
+\cs_new_protected_nopar:Npn \__ltbl_weeklist:n #1
+ {
+ \clist_set:Nn \l__ltbl_week_clist {#1}
+ \int_step_inline:nn { \clist_count:N \l__ltbl_week_clist }
+ {
+ \__ltbl_get_right:eN
+ { \clist_item:Nn \l__ltbl_week_clist {##1} } \l__ltbl_tmpb_tl
+ \clist_put_right:Ne \l__ltbl_week_ratio_clist { \l__ltbl_tmpb_tl }
+ }
+ \int_step_inline:nn { \clist_count:N \l__ltbl_week_clist }
+ {
+ \clist_clear:N \l__ltbl_week_accumtmp_clist
+ \int_step_inline:nn {##1}
+ {
+ \clist_put_right:Ne \l__ltbl_week_accumtmp_clist
+ { \clist_item:Nn \l__ltbl_week_ratio_clist {####1} }
+ }
+ \clist_put_right:Ne \l__ltbl_week_accum_clist
+ { \int_eval:n { \clist_use:Nn \l__ltbl_week_accumtmp_clist { + } } }
+ }
+ \int_set:Nn \l__ltbl_week_num_int
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \clist_count:N \l__ltbl_week_clist }
+ }
+ \dim_set:Nn \l__ltbl_week_hunit_dim
+ { \dim_eval:n { 14\paperwidth/\l__ltbl_week_num_int/15 } }
+ }
+\int_new:N \l__ltbl_time_num_int
+\dim_new:N \l__ltbl_time_vunit_dim
+\cs_new_protected_nopar:Npn \__ltbl_timelist:n #1
+ {
+ \clist_set:Nn \l__ltbl_time_clist {#1}
+ \int_set:Nn \l__ltbl_time_num_int { \clist_count:N \l__ltbl_time_clist }
+ \dim_set:Nn \l__ltbl_time_vunit_dim
+ { \fp_eval:n { 1/( 2\l__ltbl_time_num_int + 3.5 ) } \paperheight }
+ }
+\dim_new:N \l__ltbl_timelist_shift_dim
+\cs_new_protected_nopar:Npn \__ltbl_maketable:n #1
+ {
+ \fill [ \l__ltbl_bg_color_tl!5 ]
+ (current~page.north~west) rectangle +
+ (\paperwidth, -1.5\l__ltbl_time_vunit_dim)
+ node [ midway, black, font = \huge \bfseries ] {#1};
+ \tl_if_empty:NF \l__ltbl_bg_sem_tl
+ {
+ \node [ shift = {(-.02\paperwidth, -.75\l__ltbl_time_vunit_dim)},
+ left, rectangle, fill = DarkBlue!10, text = DarkBlue!60,
+ inner~sep = 2ex, rounded~corners = 8pt, font = \large
+ ] at (current~page.north~east) { \l__ltbl_bg_sem_tl };
+ }
+ \int_step_inline:nnnn { 0 } { 2 } { \l__ltbl_time_num_int }
+ {
+ \filldraw [ fill = \l__ltbl_bg_color_tl!5, draw = gray,
+ thick, densely~dashed, line~cap = round ]
+ ([shift =
+ {(-.4pt, \fp_eval:n { -2 * ##1 - 2.5 } \l__ltbl_time_vunit_dim)}
+ ]current~page.north~west
+ ) rectangle + (\paperwidth + .8pt, -2\l__ltbl_time_vunit_dim);
+ }
+ \bool_if:NTF \l__ltbl_timelist_hidetime_bool
+ {
+ \dim_set:Nn \l__ltbl_timelist_shift_dim
+ { -1.5\l__ltbl_time_vunit_dim }
+ }
+ {
+ \dim_set:Nn \l__ltbl_timelist_shift_dim
+ { -\l__ltbl_time_vunit_dim }
+ }
+ \int_step_inline:nn { \l__ltbl_time_num_int }
+ {
+ \node [ darkgray!80, shift =
+ {(
+ \paperwidth/30,
+ -2 * ##1 \l__ltbl_time_vunit_dim +
+ \l__ltbl_timelist_shift_dim
+ )}, font = \large \l__ltbl_timelist_numformat_tl
+ ] at (current~page.north~west) {##1};
+ }
+ \bool_if:NF \l__ltbl_timelist_hidetime_bool
+ {
+ \int_step_inline:nn { \clist_count:N \l__ltbl_time_clist }
+ {
+ \__ltbl_get_left:eN
+ { \clist_item:Nn \l__ltbl_time_clist {##1} } \l__ltbl_tmpa_tl
+ \__ltbl_get_right:eN
+ { \clist_item:Nn \l__ltbl_time_clist {##1} } \l__ltbl_tmpb_tl
+ \node [ gray, align = center, shift =
+ {(
+ \paperwidth/30,
+ \fp_eval:n { -1.85 - 2 * ##1 } \l__ltbl_time_vunit_dim
+ )}, font = \l__ltbl_timelist_timeformat_tl
+ ] at (current~page.north~west)
+ { \l__ltbl_tmpa_tl\\ \l__ltbl_tmpb_tl };
+ }
+ }
+ \int_step_inline:nn { \clist_count:N \l__ltbl_week_clist }
+ {
+ \int_compare:nNnF { ##1 } = { \clist_count:N \l__ltbl_week_clist }
+ {
+ \node [ shift =
+ {(\fp_eval:n
+ {
+ 14 * \clist_item:Nn \l__ltbl_week_accum_clist {##1}/
+ \l__ltbl_week_num_int/15 + 1/15
+ } \paperwidth, -2\l__ltbl_time_vunit_dim
+ )}, darkgray, font = \ttfamily
+ ] at (current~page.north~west) { \l__ltbl_weeklist_sep_tl };
+ }
+ \__ltbl_get_left:eN
+ { \clist_item:Nn \l__ltbl_week_clist {##1} } \l__ltbl_tmpa_tl
+ \node [ shift =
+ {(\fp_eval:n
+ {
+ 14(
+ \clist_item:Nn \l__ltbl_week_accum_clist {##1} -
+ \clist_item:Nn \l__ltbl_week_ratio_clist {##1}/2
+ )/\l__ltbl_week_num_int/15 + 1/15
+ } \paperwidth, -2\l__ltbl_time_vunit_dim
+ )}, font = \large \l__ltbl_weeklist_format_tl
+ ] at (current~page.north~west) { \l__ltbl_tmpa_tl };
+ }
+ }
+\dim_new:N \l__ltbl_course_shift_dim
+\cs_new_protected_nopar:Npn \__ltbl_course_box_aux:nn #1#2
+ {
+ \begin{scope}
+ \clip [ preaction = { draw, ultra~thick, \l__ltbl_course_color_tl!60 },
+ preaction = { fill, \l__ltbl_course_color_tl!10 },
+ rounded~corners = 8pt ]
+ ([shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }
+ } \l__ltbl_week_hunit_dim + \paperwidth/15 + 1.2pt,
+ \fp_eval:n { -.5 - 2 * #1 } \l__ltbl_time_vunit_dim - 1.2pt
+ )}]current~page.north~west) rectangle +
+ (
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int } \l__ltbl_week_hunit_dim - 2.4pt,
+ \fp_eval:n { 2( #1 - #2 - 1 ) } \l__ltbl_time_vunit_dim + 2.4pt
+ );
+ \fill [ \l__ltbl_course_color_tl!60 ]
+ ([shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }
+ } \l__ltbl_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -.5 - 2 * #1 } \l__ltbl_time_vunit_dim
+ )}]current~page.north~west) rectangle +
+ (
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int } \l__ltbl_week_hunit_dim,
+ -\l__ltbl_time_vunit_dim/2
+ );
+ \end{scope}
+ \int_compare:nNnTF {#1} = {#2}
+ {
+ \bool_lazy_and:nnTF
+ { \tl_if_empty_p:N \l__ltbl_course_location_tl }
+ { \tl_if_empty_p:N \l__ltbl_course_lecture_tl }
+ { \tl_set:Nn \l__ltbl_course_anchor_tl { } }
+ { \tl_set:Nn \l__ltbl_course_anchor_tl { above } }
+ \node
+ [ \l__ltbl_course_anchor_tl, \l__ltbl_course_color_tl!60, shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }/2
+ } \l__ltbl_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.75 - #1 - #2 } \l__ltbl_time_vunit_dim
+ )}, align = center, font = \bfseries
+ ] at (current~page.north~west) { \l__ltbl_course_subject_tl };
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:N \l__ltbl_course_location_tl }
+ { \tl_if_empty_p:N \l__ltbl_course_lecture_tl }
+ { \tl_set:Nn \l__ltbl_s at course_sep_tl { } }
+ { \tl_set:Nn \l__ltbl_s at course_sep_tl { ,~ } }
+ \node
+ [ shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }/2
+ } \l__ltbl_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.75 - #1 - #2 } \l__ltbl_time_vunit_dim
+ )}, below, \l__ltbl_course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \l__ltbl_course_location_tl
+ \l__ltbl_s at course_sep_tl
+ \l__ltbl_course_lecture_tl
+ };
+ }
+ {
+ \bool_lazy_and:nnTF
+ { \tl_if_empty_p:N \l__ltbl_course_location_tl }
+ { \tl_if_empty_p:N \l__ltbl_course_lecture_tl }
+ {
+ \tl_set:Nn \l__ltbl_course_anchor_tl { }
+ \dim_set:Nn \l__ltbl_course_shift_dim { 0pt }
+ }
+ {
+ \tl_set:Nn \l__ltbl_course_anchor_tl { above }
+ \dim_set:Nn \l__ltbl_course_shift_dim
+ { \l__ltbl_time_vunit_dim/8 }
+ }
+ \node
+ [ \l__ltbl_course_color_tl!60, align = center, shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }/2
+ } \l__ltbl_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.5 - #1 - #2 } \l__ltbl_time_vunit_dim +
+ \l__ltbl_course_shift_dim
+ )}, font = \large \bfseries, \l__ltbl_course_anchor_tl
+ ] at (current~page.north~west) { \l__ltbl_course_subject_tl };
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:N \l__ltbl_course_location_tl }
+ { \tl_if_empty_p:N \l__ltbl_course_lecture_tl }
+ { \tl_set:Nn \l__ltbl_course_sep_tl { } }
+ { \tl_set:Nn \l__ltbl_course_sep_tl { \\ } }
+ \node
+ [ shift =
+ {(
+ \fp_eval:n
+ {
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } -
+ \clist_item:Nn \l__ltbl_week_ratio_clist
+ { \l__ltbl_weekday_int }/2
+ } \l__ltbl_week_hunit_dim + \paperwidth/15,
+ \fp_eval:n { -1.625 - #1 - #2 } \l__ltbl_time_vunit_dim
+ )}, below, \l__ltbl_course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \l__ltbl_course_location_tl
+ \l__ltbl_course_sep_tl
+ \l__ltbl_course_lecture_tl
+ };
+ \node
+ [ shift =
+ {(
+ \clist_item:Nn \l__ltbl_week_accum_clist
+ { \l__ltbl_weekday_int } \l__ltbl_week_hunit_dim +
+ \paperwidth/15,
+ \fp_eval:n { -2.5 - 2 * #2 } \l__ltbl_time_vunit_dim
+ )}, above~left, \l__ltbl_course_color_tl!60, outer~sep = .5ex
+ ] at (current~page.north~west) { \l__ltbl_course_comment_tl };
+ }
+ }
+%% -----------------------------------------------------------------------
+%% This work consists of the files litetable.dtx, *
+%% and litetable.ins, *
+%% and the derived files litetable.sty, *
+%% litetable.pdf, *
+%% and README.md. *
+%% -----------------------------------------------------------------------
+%%
+%% End of file `litetable.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/litetable/litetable.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list.