diff options
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/bxpdfver/README-ja.md | 21 | ||||
-rw-r--r-- | macros/latex/contrib/bxpdfver/README.md | 23 | ||||
-rw-r--r-- | macros/latex/contrib/bxpdfver/bxpdfver.sty | 118 | ||||
-rw-r--r-- | macros/latex/contrib/easybook/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.dtx | 9 | ||||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.pdf | bin | 628163 -> 625245 bytes | |||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.tex | 18 |
7 files changed, 131 insertions, 60 deletions
diff --git a/macros/latex/contrib/bxpdfver/README-ja.md b/macros/latex/contrib/bxpdfver/README-ja.md index 5cc0505780..ea1a7e4ee1 100644 --- a/macros/latex/contrib/bxpdfver/README-ja.md +++ b/macros/latex/contrib/bxpdfver/README-ja.md @@ -43,11 +43,14 @@ bxpdfver パッケージ * `objcompress`(既定): オブジェクトストリームの使用を抑止しない。 * ドライバオプション: 以下の通り。なお、後述の「ドライバ指定」の 節も参照されたい。 - + PDF 出力のエンジンの場合は、既定で適切なドライバが選択される + + LaTeX の新 PDF マネジメントが有効化されている場合は、自動的に + “latex-pdf”モードに切り替わる。ドライバオプションは不要である。 + + PDF 出力のエンジンの場合は、自動的に適切なドライバが選択される のでドライバオプションは不要である。 + `dvipdfmx`: dvipdfmx 用のドライバを指定する。 + `nodvidriver`/`disabled`: 全ての機能を無効化する。 ※この場合 `lenient+` が既定になる。 + + `ignorepdfmanagement`: “latex-pdf”モードへの切替を抑止する。 * `lenient`: サポートしない機能に対するエラーを警告に格下げする。 * `lenient+`: サポートしない機能に対するエラーを完全に抑止する。 * `nolenient`(既定): `lenient(+)` の否定。 @@ -79,11 +82,11 @@ bxpdfver パッケージ ### ドライバ指定に関する補足 \ Drivers (engines) pdfTeX dvipdfmx - Features / LuaTeX / XeTeX others - --------------------------- --------- --------- ------ - \setpdfversion Yes Yes No - \suppresspdfcompression Yes Maybe(*2) No - \suppresspdfobjcompression Yes Maybe(*2) No + Features / LuaTeX / XeTeX latex-pdf + --------------------------- --------- --------- --------- + \setpdfversion Yes Yes Yes + \suppresspdfcompression Yes Maybe(*2) Yes(*4) + \suppresspdfobjcompression Yes Maybe(*2) Yes(*4) \setpdfdecimaldigits Yes Maybe(*2) No \preservepdfdestinations No-op(*1) Maybe(*2) No \setpdfpkresolution Yes Maybe(*3) No @@ -92,6 +95,9 @@ bxpdfver パッケージ `\preservepdfdestinations` は常に有効になっていると見なせる。 2. (x)dvipdfmx のバージョンが 20160307 以上である必要がある。 3. (x)dvipdfmx のバージョンが 20211016 以上である必要がある。 + 4. `\suppresspdfcompression` と `\suppresspdfobjcompression` については + 一方を実行すると他方も自動的に有効になる。l3pdf モジュールで片方のみ + を有効化することはサポートされないからである。 dvipdfmx のバージョン判定について: @@ -119,6 +125,9 @@ dvipdfmx のバージョン判定について: 更新履歴 -------- + * Version 0.8 ‹2024/08/03› + - カーネルの新 PDF マネジメントが有効な場合にも一部の機能が使える + ようにする(“latex-pdf”モード)。 * Version 0.7 ‹2024/07/24› - `\setpdfpkresolution` を(正式に)サポート。(dvipdfmx/XeTeX でも使用可能になった。) diff --git a/macros/latex/contrib/bxpdfver/README.md b/macros/latex/contrib/bxpdfver/README.md index df7995de21..1b78b5da1c 100644 --- a/macros/latex/contrib/bxpdfver/README.md +++ b/macros/latex/contrib/bxpdfver/README.md @@ -44,11 +44,16 @@ The available options are: * `noobjcompress`: Suppresses use of object streams. * `objcompress` (default): Does not suppress use of object streams. * Driver options: As below: + + When the new PDF management of LaTeX is activated, the package + will automatically switch to “latex-pdf” mode. You need not + give driver options. + When using a PDF-output engine, you need not give driver options since the appropriate one is auto-detected. + `dvipdfmx`: Uses dvipdfmx driver. + `nodvidriver`/`disabled`: Disables all functions of the package. NB. This option sets `lenient+` by default. + * `ignorepdfmanagement`: Avoids switching to “latex-pdf” mode, even + when the new PDF management of LaTeX is activated. * `lenient`: Turns the errors for unsupported features into warnings. * `lenient+`: Suppreseses the errors for unsupported features. * `nolenient`: Negation of `lenient(+)`. @@ -78,11 +83,11 @@ when it is already suppressed by other means. ### NOTE ON DRIVERS \ Drivers (engines) pdfTeX dvipdfmx - Features / LuaTeX / XeTeX others - --------------------------- --------- --------- ------ - \setpdfversion Yes Yes No - \suppresspdfcompression Yes Maybe(*2) No - \suppresspdfobjcompression Yes Maybe(*2) No + Features / LuaTeX / XeTeX latex-pdf + --------------------------- --------- --------- --------- + \setpdfversion Yes Yes Yes + \suppresspdfcompression Yes Maybe(*2) Yes(*4) + \suppresspdfobjcompression Yes Maybe(*2) Yes(*4) \setpdfdecimaldigits Yes Maybe(*2) No \preservepdfdestinations No-op(*1) Maybe(*2) No \setpdfpkresolution Yes Maybe(*3) No @@ -92,8 +97,11 @@ when it is already suppressed by other means. always in effect. 2. These features are available only when the version of (x)dvipdfmx is 20160307 or later. - 2. These features are available only when the version of (x)dvipdfmx + 3. These features are available only when the version of (x)dvipdfmx is 20211016 or later. + 4. As for '\suppresspdfcompression' and '\suppresspdfobjcompression', + when one of them is executed, the other will be activated. It is + because l3pdf module does not support activating only one of them. On the detection of dvipdfmx version: @@ -119,6 +127,9 @@ More notices: REVISION HISTORY ---------------- + * Version 0.8 ‹2024/08/03› + - Support some features even when the new PDF management of the + LaTeX kernel is activated (“latex-pdf” mode). * Version 0.7 ‹2024/07/24› - Support (officialy) `\setpdfpkresolution`. * Version 0.6 ‹2022/04/28› diff --git a/macros/latex/contrib/bxpdfver/bxpdfver.sty b/macros/latex/contrib/bxpdfver/bxpdfver.sty index 46c65cd9a2..296774068c 100644 --- a/macros/latex/contrib/bxpdfver/bxpdfver.sty +++ b/macros/latex/contrib/bxpdfver/bxpdfver.sty @@ -10,12 +10,8 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bxpdfver}[2024/07/24 v0.7] +\ProvidesPackage{bxpdfver}[2024/08/03 v0.8] \def\bxpv@pkgname{bxpdfver} - -%% preparations -\RequirePackage{ifthen}[]% for \newboolean -\newif\ifbxpv@ok \providecommand\bxDebug[1]{} %--------------------------------------- package options @@ -124,13 +120,23 @@ \fi \fi -%--------------------------------------- helpers +%--------------------------------------- general + +%% packages +\RequirePackage{ifthen}[]% for \newboolean + +%% variables +\newif\ifbxpv@ok %% unique tokens \def\bxpv@end{\bxpv@end@} \def\bxpv@mt{\bxpv@mt@} \let\bxpv@mk\noindent +%% \ifbxpv@read@file@ok +% Whether or not the last \bxpv@read@file succeeded. +\newif\ifbxpv@read@file@ok + %% \bxpv@csletcs \def\bxpv@csletcs#1#2{% \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname @@ -187,10 +193,51 @@ \bxpv@csletcs{ifbxpv@defined}{% if\ifx\ifdefined\@undefined false\else defined\fi} +%% \bxpv@begin@document@hook +% The begin-document hook. +\@onlypreamble\bxpv@begin@document@hook +\let\bxpv@begin@document@hook\@empty +\AtBeginDocument{\bxpv@begin@document@hook} + +%--------------------------------------- environment check + %% \ifbxpv@old@hook@system \newif\ifbxpv@old@hook@system \@ifl@t@r\fmtversion{2020/10/01}{}{\bxpv@old@hook@systemtrue} +%% \ifbxpv@pdfmanagement@ok +% Whether this package is supporting the LaTeX PDF management +% of the current kernel. +% (If the PDF management is active but this switch is off, +% then this package will switch to no-op mode.) +\newif\ifbxpv@pdfmanagement@ok + +%% check for new PDF management +\if t\bxpv@ignore@pdfmanagement\else + \ifx\IfPDFManagementActiveTF\@undefined\else + \IfPDFManagementActiveTF{% + \let\bxpv@drv@type=m% + \def\bxpv@drv@name{latex-pdf}% + \@ifl@t@r\fmtversion{2022/06/01}{% + \bxpv@pdfmanagement@oktrue + }{} + }{} + \fi +\fi +\ifx m\bxpv@drv@type + \ifbxpv@pdfmanagement@ok + \bxpv@warn + {New PDF management is active.\MessageBreak + The driver is set to '\bxpv@drv@name'}% + % Here \ExplSyntaxOn should be available. + \else + \bxpv@warn + {New PDF management is active, but\MessageBreak + the kernel is too old (before 2022/06/01).\MessageBreak + Thus this package will not work}% + \fi +\fi + %--------------------------------------- internal dispatchers % Initially all dispatchers are "unavailable". @@ -234,24 +281,10 @@ \@onlypreamble\bxpv@cancel@obj@compress \let\bxpv@cancel@obj@compress\relax -%% \bxpv@begin@document@hook -% The begin-document hook. -\@onlypreamble\bxpv@begin@document@hook -\let\bxpv@begin@document@hook\@empty -\AtBeginDocument{\bxpv@begin@document@hook} \g@addto@macro\bxpv@begin@document@hook{% \bxpv@check@hyperref % must come first } -%% check for new PDF management -\if t\bxpv@ignore@pdfmanagement\else - \ifx\IfPDFManagementActiveTF\@undefined\else - \IfPDFManagementActiveTF{% - \global\let\bxpv@drv@type=m% - }{} - \fi -\fi - %% Redefine internal dispatchers. \ifx 0\bxpv@drv@type\else %-------- \begingroup @@ -274,9 +307,31 @@ %% switch \if m\bxpv@drv@type - %% when in new PDF management - \bxpv@warn - {New PDF management is active}% + \ifbxpv@pdfmanagement@ok + % Here all l3pdf function is assumed to be available. + \gdef\bxpv@check@version{\bxpv@oktrue} + \ExplSyntaxOn %!!!!!! + \tl_new:N \g__bxpv_org_version + \exp_args:NNe \tl_gset:Nn \g__bxpv_org_version { \pdf_version: } + \cs_gset:Npn \bxpv@set@version + { + \token_if_eq_meaning:NNTF \bxpdfverMinorVersion \relax + { \pdf_version_gset:n { \g__bxpv_org_version } } + { + \pdf_version_gset:n + { + \int_use:N \bxpdfverMajorVersion + . \int_use:N \bxpdfverMinorVersion + } + } + } + % \pdf_uncompress: does both. + \cs_gset:Npn \bxpv@suppress@compress + { \pdf_uncompress: } + \cs_gset:Npn \bxpv@suppress@obj@compress + { \pdf_uncompress: } + \ExplSyntaxOff %!!!!!! + \fi \else\ifnum\bxpv@pdfoutput>\z@ %% when in PDF mode \global\let\bxpv@drv@type=p @@ -683,7 +738,7 @@ \fi %% variables -\let\bxpv@dvipdfmx@known@min\relax +\let\bxpv@dvipdfmx@known@min\relax % minimum known dviodfmx version \let\bxpv@C@value\relax %% \bxpv@C@bits @@ -765,7 +820,7 @@ % C option value \ifx\bxpv@C@bits\@empty\else % When C option is used, its value is automatically OR'ed with - % the current value, so we need read the config for that. + % the current value, so we need not read the config for that. \def\bxpv@C@value{0}% \def\do##1{% \bxpv@rc@bitset{\bxpv@C@value}{##1}% @@ -792,18 +847,27 @@ } %% \bxpv@get@dvipdfmx@known@min +% Gathers the information and sets \bxpv@dvipdfmx@known@min, +% without actually spawning extractbb. +% (Called in the begin-document hook.) \@onlypreamble\bxpv@get@dvipdfmx@known@min \def\bxpv@get@dvipdfmx@known@min{% + % initially no information \def\bxpv@dvipdfmx@known@min{0}% + % l3backend-dvipdfmx of revision 2022-04-10 or later requires + % dvipdfmx of version 20201111 or later. \def\bxpv@tmpa{def}% \let\bxpv@tmpb\@gobbletwo \@ifl@aded\bxpv@tmpa{l3backend-dvipdfmx}{% \def\bxpv@tmpb{\@ifl@ter\bxpv@tmpa{l3backend-dvipdfmx}}% }{}% + % Just in case.... \@ifl@aded\bxpv@tmpa{l3backend-dvips}{% \def\bxpv@tmpb{\@ifl@ter\bxpv@tmpa{l3backend-dvips}}% }{}% \bxpv@tmpb{2022/04/10}{% + % Now the version is known to be 20201111 or later. + % This information can save much need for spawning extractbb. \def\bxpv@dvipdfmx@known@min{20201111}% }{}% \bxDebug{dvipdfmx-known-min:\bxpv@dvipdfmx@known@min}% @@ -998,10 +1062,6 @@ \let\bxpv@rf@line\relax % line content \let\bxpv@rf@cont\relax % continue to read? -%% \ifbxpv@read@file@ok -% Whether or not the last \bxpv@read@file succeeded. -\newboolean{bxpv@read@file@ok} - %% \bxpv@read@file{<file-name>}{<line-parser-code>} % Reads from a text file. The line parser takes as #1 the % content of each line. diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md index ae05afb8d1..fdb41b709b 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 (v2024dd) +Easily typesetting Chinese theses or books (v2024de) ## 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 4904e90a21..8387f4de4c 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/08/02}{2024dd} +\ProvidesExplClass{easybook}{2024/08/03}{2024de} {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/08/02}{2024dd} +\ProvidesExplPackage{easybase}{2024/08/03}{2024de} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -509,7 +509,6 @@ \ebloadpackage { [text]{spbmark}, - [normalem]{ulem}, [{shortlabels,inline}]{enumitem}, chemformula,siunitx,pifont, geometry,marginnote, @@ -1124,9 +1123,9 @@ \ctex_at_end_package:nn { footmisc } { \eb_package_date_check:nn { footmisc } { 2022/02/10 } - \boolfalse{FN@setspace} \ifbool{FN@para}{} { + \boolfalse{FN@setspace} \cs_set_eq:NN \@makefntext \eb@@makefntext \cs_set_eq:NN \@footnotetext \eb@@footnotetext } @@ -2731,7 +2730,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2024/08/02}{2024dd} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/08/03}{2024de} {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 03b9b72b3f..0b0573b31a 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 114610e5f9..32aae47601 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 = v2024dd, - date = 2024/08/02, + version = v2024de, + date = 2024/08/03, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, email = toquyi@163.com, @@ -249,7 +249,6 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she cells = {cmd = \pkg*}, cell{1}{3,4} = PaleTurquoise, cell{2}{5} = PaleTurquoise, - cell{3}{2} = PaleTurquoise, cell{4}{5} = PaleTurquoise, cell{5}{2} = PaleTurquoise, cell{5}{1} = GreenYellow, @@ -260,7 +259,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she enumitem & etoolbox & fancyhdr & geometry & hyperref \\ imakeidx & listings & marginnote & mathtools & multicol \\ pifont & pdfpages & siunitx & spbmark & thmtools \\ - tcolorbox & titletoc & tabularray & ulem & + tcolorbox & titletoc & tabularray & & \end{longtblr} \section{全局选项} @@ -300,7 +299,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she \newCJKfontfamily[song]\songti{SimSun} \end{ctexexam} - 如果用 \textsf{overleaf} 或 \textsf{TexPage} 等在线平台编译文档,则只有 \code{fandol} 字体可用。使用其它字体可将字体文件上传至项目文件夹,例如上传至 \code{font} 文件夹设置正文和无衬线字体: + 如果用 \textsf{Overleaf} 或 \textsf{TeXPage} 等在线平台编译文档,则只有 \code{fandol} 字体可用。使用其它字体可将字体文件上传至项目文件夹,例如上传至 \code{font} 文件夹设置正文和无衬线字体: \begin{ctexexam} \setCJKmainfont{simsun.ttc}[Path = ./font/] \setCJKsansfont{simhei.ttf}[Path = ./font/] @@ -1392,14 +1391,6 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she 该命令由文档宏包 \pkg*{pdfpages} 提供。可以将其它 \code{pdf} 文档插入当前文档,比如插入其它软件制作的封面。可选参数可以指定插入页数、逻辑页和横向页面等,详情查看宏包文档。 \end{cnltxlist} -\subsection{下划线} -\begin{cnltxlist}[itemsep = 0ex] - \command{uline}[\marg{下划直线}]\default{} - \command{uuline}[\marg{下划双直线}]\default{} - \command{uwave}[\marg{下划波浪线}] - \pkg*{ulem} 宏包提供了多种下划线命令,可以重新定义 \cs{ULthickness} 命令控制下划线的粗细。下划线的深度由 \cs{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。 -\end{cnltxlist} - \appendix \setlist[1]{} \begin{changelog}[title = 更新日志] @@ -1473,6 +1464,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she \shortversion{v = 2024cq,date = 2024/07/12,changes = 新增章节标题格式复制命令 \cs{CopyTitleFormat}。} \shortversion{v = 2024cu,date = 2024/07/20,changes = 修复无编号的定理环境标签命令 \cs*{p@}\meta{定理名} 缺失导致报错的问题。} \shortversion{v = 2024cx,date = 2024/07/28,changes = 新增将脚注置于页面底部的命令 \cs{PushFntBottom}。} + \shortversion{v = 2024de,date = 2024/08/03,changes = 取消默认载入 \pkg*{ulem} 下划线宏包。} \end{changelog} \nocite{*} % \AddToHook{cmd/printindex/before}{\clearpage} |