diff options
Diffstat (limited to 'macros/latex/contrib')
20 files changed, 231 insertions, 100 deletions
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md index c4d3db2acc..c0d87f5b74 100644 --- a/macros/latex/contrib/easybook/README.md +++ b/macros/latex/contrib/easybook/README.md @@ -1,5 +1,5 @@ # The `easybook` document class -Easily typesetting Chinese theses or books (v2024cn) +Easily typesetting Chinese theses or books (v2024co) ## Abstract `easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes. diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 1f3f65eac1..4f7a85fc70 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -14,7 +14,7 @@ % This work has the LPPL maintenance status `maintained'. %<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15] %<*class> -\ProvidesExplClass{easybook}{2024/07/03}{2024cn} +\ProvidesExplClass{easybook}{2024/07/06}{2024co} {Easily typesetting Chinese theses or books} \bool_new:N \l__eb_compile_draft_bool @@ -301,7 +301,7 @@ %</class> %<*package> \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2024/07/03}{2024cn} +\ProvidesExplPackage{easybase}{2024/07/06}{2024co} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1422,47 +1422,73 @@ \bool_new:N \l__eb_toc_notitle_bool \newbool{bitoc} \cs_new:Npn \ebifbitoc { \ifbool{bitoc} } +\seq_new:N \l__eb_level_tmpa_seq +\tl_new:N \l__eb_level_tmpa_tl +\cs_generate_variant:Nn \regex_extract_all:nnN { no } +\cs_generate_variant:Nn \keys_define:nn { nx } +\cs_generate_variant:Nn \ctex_set:nn { ox } +\cs_new_protected:Npn \eb_toc_extract_level: + { + \regex_extract_all:noN { \cC. } { \eb@toc@title@level } + \l__eb_level_tmpa_seq + \seq_get_right:NN \l__eb_level_tmpa_seq \l__eb_level_tmpa_tl + \tl_set:Nx \l__eb_level_tmpa_tl + { + \exp_last_unbraced:No + \cs_to_str:N { \l__eb_level_tmpa_tl } + } + \regex_replace_case_once:nN + { + { ^bi(.*) } { \1 } + { .* } { \0 } + } + \l__eb_level_tmpa_tl + } \keys_define:nn { eb/tocouter } { - level .tl_set:N = \eb@toc@title@level, - level .initial:n = + level .code:n = + { + \tl_set:Nn \eb@toc@title@level {#1} + \eb_toc_extract_level: + }, + level .initial:e = { \bool_if:NTF \l__eb_class_mode_book_bool - { \bichapter* } - { \bisection* } + { \exp_not:N \bichapter* } + { \exp_not:N \bisection* } }, - section .meta:n = { level = \bisection* }, - chapter .meta:n = { level = \bichapter* }, - none .code:n = + section .meta:n = { level = \bisection* }, + chapter .meta:n = { level = \bichapter* }, + none .code:n = { \tl_set:Nn \eb@toc@title@level { \par\use_none:nn } \bool_set_true:N \l__eb_toc_notitle_bool }, - multoc .int_set:N = \l__eb_toc_columns_int, - multoc .default:n = 2, - multoc .initial:n = 1, + multoc .int_set:N = \l__eb_toc_columns_int, + multoc .default:n = 2, + multoc .initial:n = 1, plan .choice:, plan .value_required:n = true, - plan/cn .code:n = + plan/cn .code:n = { \bool_set_true:N \l__eb_toc_plan_cn_bool \bool_set_false:N \l__eb_toc_plan_bi_bool }, - plan/bi .code:n = + plan/bi .code:n = { \bool_set_false:N \l__eb_toc_plan_cn_bool \bool_set_true:N \l__eb_toc_plan_bi_bool }, - plan/both .code:n = + plan/both .code:n = { \bool_set_true:N \l__eb_toc_plan_cn_bool \bool_set_true:N \l__eb_toc_plan_bi_bool }, - plan .initial:n = cn, - columns .meta:n = { multoc = {#1} }, - title .code:n = \eb_assign_toc_title:n {#1}, - bilist .code:n = + plan .initial:n = cn, + columns .meta:n = { multoc = {#1} }, + title .code:n = \eb_assign_toc_title:n {#1}, + bilist .code:n = { \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1} \str_if_eq:nnTF {#1} { mix } @@ -1480,12 +1506,16 @@ } } }, - name .tl_set:N = \l__eb_print_index_name_tl, - name .initial:n = \imki@jobname + name .tl_set:N = \l__eb_print_index_name_tl, + name .initial:n = \imki@jobname, + unknown .code:n = + { + \ctex_set:ox { \l__eb_level_tmpa_tl } + { \eb_unknown_kv_handle: } + }, + unknown .default:V = \c_novalue_tl } -\bool_if:NTF \l__eb_class_mode_book_bool - { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/chapter } } - { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/section } } + \NewDocumentCommand{\eb_assign_toc_title:n} {>{\SplitArgument{1}{,}}m} {\eb_toc_assign_title_judge:nn #1} @@ -2634,7 +2664,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/03}{2024cn} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/06}{2024co} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex 638c3e05b6..6c907b1be5 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 43d4afb635..fbc6cc7562 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -23,8 +23,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK使用手册, - version = v2024cn, - date = 2024/07/03, + version = v2024co, + date = 2024/07/06, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, email = toquyi@163.com, @@ -232,13 +232,13 @@ \end{frameverb} \subsection{编译方式} -假设您的 \TeX 源文件名为 \code{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行: +假设您的 \TeX 源文件名为 \code{easybook-demo.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行: \begin{frameverb} - xelatex -shell-escape easybook - bibtex easybook - makeindex easybook - xelatex -shell-escape easybook - xelatex -shell-escape easybook + xelatex -shell-escape easybook-demo + bibtex easybook-demo + makeindex easybook-demo + xelatex -shell-escape easybook-demo + xelatex -shell-escape easybook-demo \end{frameverb} 当然也可以使用 \code{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-shell-escape} 命令行选项。 @@ -510,9 +510,9 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she \keyval{prenote}{参考文献前注} 该选项选择由 \cs{defbibnote} 所定义的前注,缺省状态下不打印任何前注。 \keyval{section}{整数}\Default{0} - 只打印在指定文节中引用的条目。该参考文献节从1开始编号,所有在 \env*{refsection} 环境外给出的引用标记为第零节。 + 只打印第 \meta{整数} 文节中引用的条目。该参考文献节从1开始编号,所有在 \env*{refsection} 环境外给出的引用标记为第零节。 \keyval{type}{条目类型} - 指定条目的打印类型。 + 只打印名为 \meta{条目类型} 的文献条目。 \keyval{filter}{过滤器名} 使用由 \cs{defbibfilter} 定义的 \option*{filter} 来过滤条目。 @@ -990,16 +990,24 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she \UseTocStyle{section}{fancy}{toc} \tableofcontents[bilist = mix] \end{ctexexam} + + 除了上述选项还支持 \CTeX 键值列表所有路径的章节标题样式选项,下面仅列举几个选项例子。需要注意的是标题样式选项根据 \option{level} 选项中的\textbf{最后}一个标题命令判断键路径,所以这个标题命令名必须存在于 \CTeX 键值列表路径中,或带有 \code{\textcolor{cs}{bi}} 前缀表示双语标题。 \keyval{format}{目录标题格式} - 设置目录标题的格式,在标题级别为 \code{chapter} 或者 \cls*{article} 模式且标题级别为 \code{section} 时有效。 + 设置目录标题的格式。 + \begin{ctexexam} + \tableofcontents[ + level = \clearpage\bisection*, + format = \centering\sffamily\Large + ] + \end{ctexexam} \keyval{aftername}{标签后代码} - 目录标题的标签与内容之间插入的代码,生效情形同上。 + 目录标题的标签与内容之间插入的代码。 \keyval{aftertitle}{标题后代码} - 目录标题内容之后插入的代码,生效情形同上。 + 目录标题内容之后插入的代码。 \keyval{break}{格式命令} - 控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点,生效情形同上。 + 控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点。 \keyval{pagestyle}{页面风格}\Default{empty} - 目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 \CTeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。 + 目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。 \end{cnltxlist} \subsection{双语章节标题和新建标题} @@ -1437,8 +1445,9 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she \item 新增统一设置所有目录格式时的条目类型排除命令 \cs{ExcludeEveryTocName}。 \end{version} \shortversion{v = 2024cd,date = 2024/06/14,changes = 修复全局选项 \option{class} 无法正确切换单双面排版的问题。} + \shortversion{v = 2024co,date = 2024/07/06,changes = 目录命令的可选参数支持 \CTeX 键值列表所有路径的章节标题样式选项。} \end{changelog} \nocite{*} -\AddToHook{cmd/printindex/before}{\clearpage} +% \AddToHook{cmd/printindex/before}{\clearpage} \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/esami/README b/macros/latex/contrib/esami/README index 22f183f8d8..b1ef039c0e 100644 --- a/macros/latex/contrib/esami/README +++ b/macros/latex/contrib/esami/README @@ -1,6 +1,6 @@ -The esami package v. 2.8 +The esami package v. 2.9 For generation of texts and solutions of exams in LaTeX -2023/07/21 +2024/07/01 File: README Author: Grazia Messineo and Salvatore Vassallo @@ -14,7 +14,7 @@ varying in random order, with closed or open answer, matching, problems, and so of each group are randomly scrambled across the exam and variants of each exercise are chosen randomly from a file which contains them all and. -Copyright: (C) 2008--2023 Grazia Messineo & Salvatore Vassallo +Copyright: (C) 2008--2024 Grazia Messineo & Salvatore Vassallo Licence: LPPL FILES IN DISTRIBUTION diff --git a/macros/latex/contrib/esami/VERSION b/macros/latex/contrib/esami/VERSION index 64fbb8d2f3..98dd005629 100644 --- a/macros/latex/contrib/esami/VERSION +++ b/macros/latex/contrib/esami/VERSION @@ -1 +1 @@ -VERSION 2.8 DATE=July 17, 2023 +VERSION 2.9 DATE=July 1, 2024 diff --git a/macros/latex/contrib/esami/doc/esami-doc-en.pdf b/macros/latex/contrib/esami/doc/esami-doc-en.pdf Binary files differindex d2d96db33a..8f06ffc33b 100644 --- a/macros/latex/contrib/esami/doc/esami-doc-en.pdf +++ b/macros/latex/contrib/esami/doc/esami-doc-en.pdf diff --git a/macros/latex/contrib/esami/doc/esami-doc-en.tex b/macros/latex/contrib/esami/doc/esami-doc-en.tex index 44da55a481..8adc1c17a1 100644 --- a/macros/latex/contrib/esami/doc/esami-doc-en.tex +++ b/macros/latex/contrib/esami/doc/esami-doc-en.tex @@ -81,6 +81,7 @@ \changes{Version 2.6}{2021/10/11}{Improved the spacing in \cmd{\FPsignpol}. Corrected the code to avoid some spourios spaces. } \changes{Version 2.7}{2022/01/11}{Improved the spacing in \cmd{\sempli} and \cmd{\FPsignpol}. Corrected a misprint in the code.} \changes{Versione 2.8}{2023/07/21}{Documentation modified to solve a problem with the Spanish Language.} +\changes{Versione 2.9}{2024/07/03}{Loaded the package tagpdf-base to avoid an error on the measures of the boxes.} %\IndexPrologue{\section*{Index} Numbers written in italic refer to the page where the item is described; underlined numebers refer to the line of code in which the item is described; other references are to the line of code where the item is used.} \GlossaryPrologue{\section*{Changelog}} \def\MacroFont{\fontencoding\encodingdefault @@ -798,7 +799,8 @@ Inside this file you should use only one command, \cmd{\def \textbackslash eserc \item[Version 2.5 (2018/05/06)] Corrected a misprint in the code. Improved the selection of random exercises. \item[Version 2.6 (2021/10/11)] Improved the spacing in \cmd{\FPsignpol}. Corrected the code to avoid some spourios spaces. \item[Version 2.7 (2021/10/11)] Improved the spacing in \cmd{\sempli} and \cmd{\FPsignpol}. Corrected a misprint in the code -\item[Versione 2.8 (2023/07/21)] Documentation modified to solve a problem with the spanish language. +\item[Version 2.8 (2023/07/21)] Documentation modified to solve a problem with the spanish language. +\item[Version 2.89 ( 2024/07/03)] Loaded the package tagpdf-base to avoid an error on the measures of the boxes. \end{description} \bibliographystyle{plain} diff --git a/macros/latex/contrib/esami/doc/esami-doc-it.pdf b/macros/latex/contrib/esami/doc/esami-doc-it.pdf Binary files differindex c4c9c5f20e..8b83d7bdf1 100644 --- a/macros/latex/contrib/esami/doc/esami-doc-it.pdf +++ b/macros/latex/contrib/esami/doc/esami-doc-it.pdf diff --git a/macros/latex/contrib/esami/doc/esami-doc-it.tex b/macros/latex/contrib/esami/doc/esami-doc-it.tex index 0a2b92414f..dae29f96fe 100644 --- a/macros/latex/contrib/esami/doc/esami-doc-it.tex +++ b/macros/latex/contrib/esami/doc/esami-doc-it.tex @@ -79,6 +79,8 @@ \changes{Versione 2.6}{2021/10/11}{Migliorata la spaziatura in \cmd{\FPsignpol}. Corretto il codice per eliminare alcuni spazi spuri.} \changes{Versione 2.7}{2022/01/11}{Migliorata la spaziatura in \cmd{\sempli} e \cmd{\FPsignpol}. Corretto un errore nel codice} \changes{Versione 2.8}{2023/07/21}{Modificata la documentazione per risolvere un problema con la lingua spagnola.} +\changes{Versione 2.9}{2024/07/03}{Caricato il pacchetto tagpdf-base per evitare un errore sulle misure delle box.} + %\IndexPrologue{\section*{Indice} I numeri scritti in italico rimandano alla pagina dove è descritto l'item; i numeri sottolineati rimandano alla riga di codice in cui l'item è descritto; le altre referenze sono alla riga di codice dove l'item è usato.} \GlossaryPrologue{\section*{Changelog}} \def\MacroFont{\fontencoding\encodingdefault @@ -800,7 +802,7 @@ Al suo interno si deve usare un solo comando, \cmd{\def \textbackslash esercizio \item[Versione 2.6 (2021/10/11)] Migliorata la spaziatura in \cmd{\FPsignpol}. Corretto il codice per eliminare alcuni spazi spuri. \item[Versione 2.7 (2022/01/11)] Migliorata la spaziatura in \cmd{\sempli} e \cmd{\FPsignpol}. Corretto un errore nel codice \item[Versione 2.8 (2023/07/21)] Modificata la documentazione per risolvere un problema con la lingua spagnola. - + \item[Versione 2.8 (2024/07/03)]Caricato il pacchetto tagpdf-base per evitare un errore sulle misure delle box. \end{description} diff --git a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie1.parametri.tex b/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie1.parametri.tex deleted file mode 100644 index 107265dbc4..0000000000 --- a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie1.parametri.tex +++ /dev/null @@ -1,4 +0,0 @@ -\FPeval{a}{round(12:0)} -\FPeval{b}{round(13:0)} -\FPeval{c}{round(3:0)} -\FPeval{k}{round(4:0)} diff --git a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie2.parametri.tex b/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie2.parametri.tex deleted file mode 100644 index e736caa6a0..0000000000 --- a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie2.parametri.tex +++ /dev/null @@ -1,4 +0,0 @@ -\FPeval{a}{round(14:0)} -\FPeval{b}{round(15:0)} -\FPeval{c}{round(2:0)} -\FPeval{k}{round(5:0)} diff --git a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie3.parametri.tex b/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie3.parametri.tex deleted file mode 100644 index 98ef510098..0000000000 --- a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie3.parametri.tex +++ /dev/null @@ -1,4 +0,0 @@ -\FPeval{a}{round(12:0)} -\FPeval{b}{round(15:0)} -\FPeval{c}{round(2:0)} -\FPeval{k}{round(4:0)} diff --git a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie4.parametri.tex b/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie4.parametri.tex deleted file mode 100644 index ab468d8a75..0000000000 --- a/macros/latex/contrib/esami/doc/examples/qftest5-fillinqiie4.parametri.tex +++ /dev/null @@ -1,4 +0,0 @@ -\FPeval{a}{round(13:0)} -\FPeval{b}{round(14:0)} -\FPeval{c}{round(2:0)} -\FPeval{k}{round(4:0)} diff --git a/macros/latex/contrib/esami/doc/examples/testA-xetex-sol.sol.tex b/macros/latex/contrib/esami/doc/examples/testA-xetex-sol.sol.tex new file mode 100644 index 0000000000..00cc5e002c --- /dev/null +++ b/macros/latex/contrib/esami/doc/examples/testA-xetex-sol.sol.tex @@ -0,0 +1,84 @@ +\begin{minipage}{.33\textwidth}{\large\textbf{Soluzione\ Versione\ n. 1}} +\begin{enumerate} +\item\ref{e:1-file:test2-q:i} +\item\ref{e:1-file:test3-q:ii} +\item\ref{e:1-file:test2-q:ii} +\item\ref{e:1-file:test2-q:iii} +\item\ref{e:1-file:test3-q:i} +\item\ref{e:1-file:test1-q:i} +\item\ref{e:1-file:test9-q:ii} +\item\ref{e:1-file:test14-q:i} +\item\ref{e:1-file:test4-q:v} +\item \makeatletter \input{qftest5-fillinqiie1.parametri}\makeatother + \FPsv [2]{b/k} +\item\ref{e:1-file:test11-q:i} +\item\ref{e:1-file:test11-q:ii} +\par\end{enumerate}\vspace{3ex} +\begin{enumerate} +\item\ref{e:1-file:test12-q:i} +\item\ref{e:1-file:test13-q:ii} +\par\end{enumerate}\vspace{3ex} +\end{minipage} +\begin{minipage}{.33\textwidth}{\large\textbf{Soluzione\ Versione\ n. 2}} +\begin{enumerate} +\item\ref{e:2-file:test2-q:iii} +\item\ref{e:2-file:test3-q:i} +\item\ref{e:2-file:test2-q:ii} +\item\ref{e:2-file:test3-q:iv} +\item\ref{e:2-file:test2-q:i} +\item\ref{e:2-file:test1-q:ii} +\item \makeatletter \input{qftest5-fillinqiie2.parametri}\makeatother + \FPsv [2]{a/c} +\item\ref{e:2-file:test9-q:iii} +\item\ref{e:2-file:test14-q:i} +\item\ref{e:2-file:test4-q:ii} +\item\ref{e:2-file:test11-q:i} +\item\ref{e:2-file:test11-q:ii} +\par\end{enumerate}\vspace{3ex} +\begin{enumerate} +\item\ref{e:2-file:test13-q:iii} +\item\ref{e:2-file:test12-q:iii} +\par\end{enumerate}\vspace{3ex} +\end{minipage} +\begin{minipage}{.33\textwidth}{\large\textbf{Soluzione\ Versione\ n. 3}} +\begin{enumerate} +\item\ref{e:3-file:test2-q:iii} +\item\ref{e:3-file:test3-q:i} +\item\ref{e:3-file:test2-q:i} +\item\ref{e:3-file:test3-q:ii} +\item\ref{e:3-file:test2-q:ii} +\item\ref{e:3-file:test14-q:i} +\item \makeatletter \input{qftest5-fillinqiie3.parametri}\makeatother + \FPsv [2]{b/k} +\item\ref{e:3-file:test4-q:iii} +\item\ref{e:3-file:test1-q:i} +\item\ref{e:3-file:test9-q:iv} +\item\ref{e:3-file:test11-q:i} +\item\ref{e:3-file:test11-q:ii} +\par\end{enumerate}\vspace{3ex} +\begin{enumerate} +\item\ref{e:3-file:test12-q:i} +\item\ref{e:3-file:test13-q:iv} +\par\end{enumerate}\vspace{3ex} +\end{minipage} +\begin{minipage}{.33\textwidth}{\large\textbf{Soluzione\ Versione\ n. 4}} +\begin{enumerate} +\item\ref{e:4-file:test2-q:ii} +\item\ref{e:4-file:test2-q:i} +\item\ref{e:4-file:test3-q:i} +\item\ref{e:4-file:test3-q:ii} +\item\ref{e:4-file:test2-q:iii} +\item\ref{e:4-file:test4-q:v} +\item\ref{e:4-file:test9-q:iii} +\item\ref{e:4-file:test1-q:ii} +\item\ref{e:4-file:test14-q:i} +\item \makeatletter \input{qftest5-fillinqiie4.parametri}\makeatother + \FPsv [2]{a/c} +\item\ref{e:4-file:test11-q:i} +\item\ref{e:4-file:test11-q:ii} +\par\end{enumerate}\vspace{3ex} +\begin{enumerate} +\item\ref{e:4-file:test13-q:iii} +\item\ref{e:4-file:test12-q:iii} +\par\end{enumerate}\vspace{3ex} +\end{minipage} diff --git a/macros/latex/contrib/esami/esami.sty b/macros/latex/contrib/esami/esami.sty index 12bf761379..d1f8757d56 100644 --- a/macros/latex/contrib/esami/esami.sty +++ b/macros/latex/contrib/esami/esami.sty @@ -145,6 +145,7 @@ % | PACKAGES | % +=============================+ +\usepackage{tagpdf-base} \usepackage{graphicx} \usepackage{enumerate} \usepackage[nomessages]{fp} diff --git a/macros/latex/contrib/lastpage/README b/macros/latex/contrib/lastpage/README index d9c21d30e2..b7c3c78bb2 100644 --- a/macros/latex/contrib/lastpage/README +++ b/macros/latex/contrib/lastpage/README @@ -1,4 +1,4 @@ -README for lastpage package, 2024-07-03, v2.1b +README for lastpage package, 2024-07-07, v2.1c TABLE OF CONTENTS diff --git a/macros/latex/contrib/lastpage/lastpage-example.pdf b/macros/latex/contrib/lastpage/lastpage-example.pdf Binary files differindex 9752f36fd7..db990f6942 100644 --- a/macros/latex/contrib/lastpage/lastpage-example.pdf +++ b/macros/latex/contrib/lastpage/lastpage-example.pdf diff --git a/macros/latex/contrib/lastpage/lastpage.dtx b/macros/latex/contrib/lastpage/lastpage.dtx index 171c7388de..c447d39cc6 100644 --- a/macros/latex/contrib/lastpage/lastpage.dtx +++ b/macros/latex/contrib/lastpage/lastpage.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: lastpage.dtx -% Version: 2024-07-03 v2.1b +% Version: 2024-07-07 v2.1c % Info: Refers to last page's name % % Copyright © 2010 - 2024 by @@ -65,7 +65,7 @@ \input docstrip.tex \Msg{**********************************************************************} \Msg{* Installation *} -\Msg{* Package: lastpage 2024-07-03 v2.1b Refers to last page's name (HMM)*} +\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*} \Msg{**********************************************************************} \keepsilent @@ -77,7 +77,7 @@ This is a generated file. Project: lastpage -Version: 2024-07-03 v2.1b +Version: 2024-07-07 v2.1c Info: Refers to last page's name Copyright (C) 2010 - 2024 by @@ -184,7 +184,7 @@ In memoriam %<*driver> \NeedsTeXFormat{LaTeX2e}[2023-11-01] \ProvidesFile{lastpage.drv}% - [2024-07-03 v2.1b Refers to last page's name (HMM)] + [2024-07-07 v2.1c Refers to last page's name (HMM)] \documentclass{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class \usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO) \hypersetup{% @@ -233,23 +233,23 @@ In memoriam % \DoNotIndex{\@auxout,\@evenfoot,\@firstofone,\@firstoftwo,\@ifl@t@r,\@ifpackagelater,\@ifpackageloaded} % \DoNotIndex{\@ifundefined,\@kernel@reserved@label@data,\@mainaux,\@number,\@oddfoot} % \DoNotIndex{\addtocounter,\AddToHook,\arabic,\begin} -% \DoNotIndex{\bigskip,\clearpage,\csname,\documentclass,\EdefUnescapeString,\empty,\end,\endcsname} -% \DoNotIndex{\enddocument,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion} +% \DoNotIndex{\bigskip,\clearpage,\csname,\detokenize,\documentclass,\EdefUnescapeString,\empty,\end} +% \DoNotIndex{\endcsname,\enddocument,\expanded,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion} % \DoNotIndex{\g,\gdef,\here,\hfil,\Hy@temp,\Hy@unicodefalse} -% \DoNotIndex{\hypersetup,\if@filesw,\if@nobreak,\ifHy@hypertexnames,\ifHy@pageanchor,\ifHy@plainpages} +% \DoNotIndex{\hypersetup,\if,\if@filesw,\if@nobreak,\ifHy@hypertexnames,\ifHy@pageanchor,\ifHy@plainpages} % \DoNotIndex{\ifdim,\ifnum,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifvmode,\ifx,\immediate,\input} % \DoNotIndex{\label,\lastpage,\lastpage-example.tex,\lastpage.dtx,\lastpage.sty,\lastpagee.sty} % \DoNotIndex{\lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\LaTeX-kernel,\listfiles} -% \DoNotIndex{\makeatletter,\makeatother,\markboth,\mbox,\message,\MessageBreak} +% \DoNotIndex{\makeatletter,\makeatother,\markboth,\meaning,\mbox,\message,\MessageBreak} % \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newline,\newpage,\nobreak} % \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError,\PackageWarning} % \DoNotIndex{\PackageWarningNoLine,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage} % \DoNotIndex{\qquad,\RequirePackage,\section,\ShowHook,\slshape,\smallskip,\space,\test,\textbf} % \DoNotIndex{\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage} -% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write} +% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write,\xlastpage@rmpage,\xxlastpage@rmpage} % % \title{The \xpackage{lastpage} package} -% \date{2024-07-03 v2.1b} +% \date{2024-07-07 v2.1c} % \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\ % invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}} % @@ -744,7 +744,7 @@ In memoriam \usepackage[draft]{showkeys}[2024/05/23]% v3.21 Show cite and label keys (DPC, MH) %% Use final instead of draft to hide the keys. %% \usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h -%% Hypertext links for LaTeX +\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX \hypersetup{extension=pdf,% plainpages=false,% pdflang={en},% @@ -755,9 +755,8 @@ In memoriam pdfview=Fit,% pdfstartview=Fit,% pdfpagelayout=SinglePage% -} -\@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4 -\usepackage{lastpage}[2024/07/03]% v2.1b +}}{\usepackage{url}[2013/09/16]}% v3.4 +\usepackage{lastpage}[2024/07/07]% v2.1c \renewcommand{\@evenfoot}{% \normalsize\slshape \today\hfil \upshape % page \thepage{} of \pageref{LastPage}} @@ -769,7 +768,7 @@ In memoriam \section*{Example for lastpage} \markboth{Example for lastpage}{Example for lastpage} This example demonstrates the use of package\newline -\textsf{lastpage}, v2.1b as of 2024-07-03 (HMM; JPG).\newline +\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline The package takes no options.\newline For more details please see the documentation!\newline @@ -905,7 +904,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \DescribeMacro{lastpage.sty} % We first need to determine whether we are on \TeX~2.09 or \LaTeX2e.\newline % (That line, which is too long for the documentation, reads:\newline -% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/03 v2.1b lastpage:|\linebreak +% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage:|\linebreak % | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.) % % \begin{macrocode} @@ -913,7 +912,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %% Part of the "lastpage" package %% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e %% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM -\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/03 v2.1b lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}} +\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}} \begingroup \expandafter \ifx \csname documentclass\endcsname\relax \endgroup \expandafter \input{lastpage209.sty} \else \endgroup \expandafter \loadlastpage @@ -953,7 +952,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %<*lastpage2e> %% Part of the "lastpage" package \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{lastpage2e}[2024/07/03 v2.1b % +\ProvidesPackage{lastpage2e}[2024/07/07 v2.1c % Decide which 2e lastpage version to use (HMM)] \@ifl@t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{% \RequirePackage{lastpageclassic}} @@ -968,7 +967,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %<*lastpageclassic> %% Part of the "lastpage" package \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{lastpageclassic}[2024/07/03 v2.1b % +\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c % Refers to last page's name (HMM; JPG)] %% allows for things like "Page \thepage{} of \pageref{LastPage}" %% to get "Page 7 of 9" @@ -1386,7 +1385,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %<*lastpagemodern> %% Part of the "lastpage" package \NeedsTeXFormat{LaTeX2e}[2023-06-01] -\ProvidesPackage{lastpagemodern}[2024-07-03 v2.1b % +\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c % Refers to last page's name (HMM; JPG)] %% allows for things like "Page \thepage{} of \pageref{LastPage}" %% to get "Page 7 of 9" or "Page VII of IX"; @@ -1500,9 +1499,19 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook \else% % \end{macrocode} % |\@currentHpage| should be |page.<some number>|, |\lastpage@rmpage| removes the -% \mbox{\textquotedblleft |page.|\textquotedblright .} +% \mbox{\textquotedblleft |page.|\textquotedblright .} Next compilation run, +% |\lastpage@lastpageHy| gets defined via the \xfile{aux} file. +% If we arrived at this place, but the definition is still empty, +% then |\@currentHpage| has some unexpected content. % \begin{macrocode} \gdef\lastpage@Hy{\lastpage@rmpage{\@currentHpage}}% + \ifx\lastpage@lastpageHy\empty\relax% + \PackageWarningNoLine{lastpage}{% + \string\@currentHpage\space is\MessageBreak% + \meaning\@currentHpage\MessageBreak% + not beginning with "page.",\MessageBreak% + \string\lastpage@lastpageHy\space is now let empty.}% + \fi% \fi% \fi% }% @@ -1513,14 +1522,20 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{macrocode} % \end{macro} % \begin{macro}{\lastpage@rmpage} -% |\lastpage@rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright ,} -% but just boldly assumes that |#1| is now |page.<some number>|. +% |\lastpage@rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright.} +% % \begin{macrocode} -%% similar to https://tex.stackexchange.com/a/12811/6865 -\def\lastpage@rmpage#1{\expandafter\lastpage@currentH#1\relax} -\def\lastpage@currentH#1.#2\relax{#2} +%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877 +\def\lastpage@rmpage#1{% + \expandafter\xlastpage@rmpage\expanded{#1}\xlastpage@rmpage page.% + \xlastpage@rmpage\xxlastpage@rmpage{#1}} +\def\xlastpage@rmpage #1page.#2\xlastpage@rmpage#3\xxlastpage@rmpage#4{% + \if$\detokenize{#1}$#2%\else#4 + \fi} % \end{macrocode} +% |\else#4| means, that it did not start with |page.|, and whatever it is, +% we cannot use this |#4| for |\lastpage@Hy|. % \end{macro} % \begin{macro}{\lastpage@putl@bel} % \indent This command does the writing of the label. @@ -1601,7 +1616,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{macrocode} % \end{macro} -% +%\pagebreak % \begin{macro}{\lastpage@fileswtest} % \indent \hspace*{2em}Later it will be determined whether it is allowed to write % to the \xfile{aux} file. If it was \emph{not} allowed, it is checked @@ -1740,7 +1755,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{description} % \item[-] \TeX, \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage} % \end{description} % @@ -1750,7 +1765,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{description} % \item[-] \TeX-format \LaTeX{}, v2.09 % -% \item[-] package \xpackage{lastpage209}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage209}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage} % \end{description} % and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip @@ -1762,7 +1777,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer, % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage} % \end{description} % @@ -1773,7 +1788,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2023-05-31,\newline % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage} % \end{description} % and can use @@ -1790,7 +1805,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage} % \end{description} % and can use @@ -1805,7 +1820,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % The |lastpage-example.tex| requires the same file as all % documents using the \xpackage{lastpage} package, i.\,e. % \begin{description} -% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b, +% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c, % \url{https://ctan.org/pkg/lastpage}\newline % (Well, it is the example file for this package, and because you are reading the % documentation for the \xpackage{lastpage} package, it can be assumed that you already @@ -2086,6 +2101,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % to update it. Further I would like to thank \textsc{Heiko Oberdiek} % for providing a~lot~(!) of useful packages (from which I also learned everything % I know about creating a file in \xfile{dtx} format, OK, say it: copying). +% Thanks to \textsc{David Carlisle} for the new code for |\lastpage@rmpage|. % Thanks for bug reports go to \textsc{Ulrike Fischer} (several times), % \textsc{Sebastian Bank}, \textsc{James Hedges}, \textsc{Mikhail Titov}, % \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and \textsc{James Small}. @@ -2267,8 +2283,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item Replaced |\immediate\write| by a form of (pseudo-code!) |\immediate\protected@write|. % (Thanks to \textsc{Ulrike Fischer} for the error report and solution!) % \item Update of the |\lastpage@putl@bel| code to \pkg{hyperref} 2023-07-08, v7.01b, -% which now allows fnsymbol as page numbering scheme (while links to, for example, -% a page named $\|$ still do not work). +% which now allows fnsymbol as page numbering scheme. % \end{Version} % \begin{Version}{2023-10-06 v2.0d} % \item For plain arabic page numbers only, \pkg{lastpage} again writes the page number @@ -2291,6 +2306,10 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % The defining operation for |\lastpage@Hy| has been changed to catch this % and other different cases. % \end{Version} +% \begin{Version}{2024-07-07 v2.1c} +% \item With help from \textsc{David Carlisle} |\lastpage@rmpage| no longer assumes +% |\@currentHpage| to begin with |page.|. +% \end{Version} % \end{History} % \bigskip % diff --git a/macros/latex/contrib/lastpage/lastpage.pdf b/macros/latex/contrib/lastpage/lastpage.pdf Binary files differindex 70a678fe59..9d224e6772 100644 --- a/macros/latex/contrib/lastpage/lastpage.pdf +++ b/macros/latex/contrib/lastpage/lastpage.pdf |