From ce1d30c382bcb760de50cd531c395abecdcddd82 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 28 Jan 2022 22:22:47 +0000 Subject: codebox (28jan22) git-svn-id: svn://tug.org/texlive/trunk@61771 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/codebox/codebox-doc-en.pdf | Bin 71350 -> 71369 bytes .../doc/latex/codebox/codebox-doc-en.tex | 6 +-- Master/texmf-dist/doc/latex/codebox/codebox.dtx | 53 +++++++++++++-------- Master/texmf-dist/doc/latex/codebox/codebox.pdf | Bin 300058 -> 302033 bytes 4 files changed, 37 insertions(+), 22 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf index f8edd671df1..119a64183a5 100644 Binary files a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf and b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf differ diff --git a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.tex b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.tex index 3ad34985ded..7fe079a045f 100644 --- a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.tex +++ b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.tex @@ -14,7 +14,7 @@ \title{\bfseries\pkg{codebox}:programming code box} \author{Nan Geng\\ \url{nangeng@nwafu.edu.cn}} -\date{2022/01/04\qquad v1.0.3\thanks{\url{https://github.com/registor/codebox}} +\date{2022/01/28\qquad v1.0.4\thanks{\url{https://github.com/registor/codebox}} \thanks{\url{https://gitee.com/nwafu_nan/codebox}}} \begin{document} @@ -312,9 +312,9 @@ or command's \oarg{options}. \subsection{seperation between line number and code} -\begin{function}[added=2021-12-26,updated=2021-12-26]{linenumsep} +\begin{function}[added=2021-12-26,updated=2022-1-28]{linenumsep} \begin{syntax} - linenumsep = \Arg{float number} \init{3.0} + linenumsep = \Arg{float number} \init{1.80} \end{syntax} \opt{linenumsep} is used to set the seperation between line number and code, valid only for \pkg{minted} engine. diff --git a/Master/texmf-dist/doc/latex/codebox/codebox.dtx b/Master/texmf-dist/doc/latex/codebox/codebox.dtx index 8365020d9f5..c1923d450e1 100644 --- a/Master/texmf-dist/doc/latex/codebox/codebox.dtx +++ b/Master/texmf-dist/doc/latex/codebox/codebox.dtx @@ -148,7 +148,7 @@ Copyright and Licence % %\NeedsTeXFormat{LaTeX2e}[2020/10/01] %\RequirePackage{expl3} -%<+package>\GetIdInfo$Id: codebox.dtx 1.0.3 2022-01-04 08:00:00 +0800 Nan Geng $ +%<+package>\GetIdInfo$Id: codebox.dtx 1.0.4 2022-01-28 08:00:00 +0800 Nan Geng $ % {Code Box with tcolorbox and minted/listings.} %\ProvidesExplPackage{\ExplFileName} % {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -477,9 +477,9 @@ Copyright and Licence % % \subsection{行号间距} % -% \begin{function}[added=2021-12-26,updated=2021-12-26]{linenumsep} +% \begin{function}[added=2021-12-26,updated=2022-1-28]{linenumsep} % \begin{syntax} -% linenumsep = \Arg{浮点数} \init{3.0} +% linenumsep = \Arg{浮点数} \init{1.80} % \end{syntax} % \opt{linenumsep} 用于设置代码盒子行号与代码的间距,仅对\textbf{minted} % 引擎有效,取浮点数,单位是mm。默认值为\textbf{3.0}。 @@ -723,6 +723,8 @@ Copyright and Licence }% % \end{macrocode} % +% \changes{v1.0.4}{2022/1/28}{修订分页代码盒子无行号底色问题} +% % 代码盒子cv样式 % % \begin{macrocode} @@ -748,7 +750,19 @@ Copyright and Licence \begin{tcbclipinterior} \fill[cvblue] (frame.south~west) rectangle ([xshift=5.0mm,yshift=0mm]frame.north~west); \end{tcbclipinterior} - } + }, + underlay~middle = { + \begin{tcbclipinterior} + \fill[cvblue] (frame.south~west) rectangle + ([xshift=5.0mm,yshift=0mm]frame.north~west); + \end{tcbclipinterior} + }, + underlay~last = { + \begin{tcbclipinterior} + \fill[cvblue] (frame.south~west) rectangle + ([xshift=5.0mm,yshift=0mm]frame.north~west); + \end{tcbclipinterior} + }, } }% % \end{macrocode} @@ -787,6 +801,8 @@ Copyright and Licence % \end{macrocode} % \end{variable} % +% \changes{v1.0.4}{2022/1/28}{修正linenumsep为默认值1.80以避免3位行号溢出边界} +% % \subsection{选项处理} % % 定义 |codebox| 键值类。 @@ -865,7 +881,7 @@ Copyright and Licence % 行号与文本之间的距离(单位:mm) % \begin{macrocode} linenumsep .fp_set:N = \l_@@_linenumber_sep_fp, - linenumsep .initial:n = 3.00, + linenumsep .initial:n = 1.80, % \end{macrocode} % \end{macro} % @@ -1021,6 +1037,7 @@ Copyright and Licence % \end{macro} % % \changes{v1.0.1}{2021/12/27}{修订代码盒子前多一个逗号的问题} +% \changes{v1.0.4}{2022/1/28}{修改用户接口的{group_begin}到开始位置} % % \subsection{不计数代码盒子用户接口} % @@ -1029,9 +1046,9 @@ Copyright and Licence % \begin{macrocode} \NewDocumentEnvironment{ codebox }{O{} m } { - \bool_set_false:N \l_@@_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l_@@_comment_bool + \keys_set:nn { codebox } { #1 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tcbset{lang, title={#2} }% @@ -1047,9 +1064,9 @@ Copyright and Licence % \begin{macrocode} \NewDocumentEnvironment{ codebox* }{O{} m } { - \bool_set_false:N \l_@@_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l_@@_comment_bool + \keys_set:nn { codebox } { #1 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tcbset{lang, title={#2} }% @@ -1065,15 +1082,14 @@ Copyright and Licence % \begin{macrocode} \NewDocumentCommand \codefile { s O{} m m } { + \group_begin: \IfBooleanTF{#1} { \bool_set_true:N \l_@@_comment_bool }{ \bool_set_false:N \l_@@_comment_bool } - - \group_begin: - \IfNoValueF{#2}{ \keys_set:nn { codebox } { #2 } } + \keys_set:nn { codebox } { #2 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tcbset{ @@ -1106,9 +1122,9 @@ Copyright and Licence } \NewDocumentEnvironment{ codeview }{O{} m } { - \bool_set_false:N \l_@@_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l_@@_comment_bool + \keys_set:nn { codebox } { #1 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tl_if_empty:NF \l_@@_label_name_tl @@ -1142,9 +1158,9 @@ Copyright and Licence % \begin{macrocode} \NewDocumentEnvironment{ codeview* }{O{} m } { - \bool_set_true:N \l_@@_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_true:N \l_@@_comment_bool + \keys_set:nn { codebox } { #1 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tl_if_empty:NF \l_@@_label_name_tl @@ -1181,15 +1197,14 @@ Copyright and Licence } \NewDocumentCommand \cvfile { s O{} m m } { + \group_begin: \IfBooleanTF{#1} { \bool_set_true:N \l_@@_comment_bool }{ \bool_set_false:N \l_@@_comment_bool } - - \group_begin: - \IfNoValueF{#2}{ \keys_set:nn { codebox } { #2 } } + \keys_set:nn { codebox } { #2 } \@@_code_engine_tcbset: \@@_comment_tcbset: \tl_if_empty:NF \l_@@_label_name_tl diff --git a/Master/texmf-dist/doc/latex/codebox/codebox.pdf b/Master/texmf-dist/doc/latex/codebox/codebox.pdf index b82446cb1c2..84addcda668 100644 Binary files a/Master/texmf-dist/doc/latex/codebox/codebox.pdf and b/Master/texmf-dist/doc/latex/codebox/codebox.pdf differ -- cgit v1.2.3