diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf | bin | 71350 -> 71369 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/codebox/codebox-doc-en.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/codebox/codebox.dtx | 53 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/codebox/codebox.pdf | bin | 300058 -> 302033 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/codebox/codebox.sty | 44 |
5 files changed, 64 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf Binary files differindex f8edd671df1..119a64183a5 100644 --- a/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf +++ b/Master/texmf-dist/doc/latex/codebox/codebox-doc-en.pdf 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 %</internal> %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01] %<package>\RequirePackage{expl3} -%<+package>\GetIdInfo$Id: codebox.dtx 1.0.3 2022-01-04 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ +%<+package>\GetIdInfo$Id: codebox.dtx 1.0.4 2022-01-28 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ %<package> {Code Box with tcolorbox and minted/listings.} %<package>\ProvidesExplPackage{\ExplFileName} %<package> {\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 Binary files differindex b82446cb1c2..84addcda668 100644 --- a/Master/texmf-dist/doc/latex/codebox/codebox.pdf +++ b/Master/texmf-dist/doc/latex/codebox/codebox.pdf diff --git a/Master/texmf-dist/tex/latex/codebox/codebox.sty b/Master/texmf-dist/tex/latex/codebox/codebox.sty index fba75f1d460..db68bcb3554 100644 --- a/Master/texmf-dist/tex/latex/codebox/codebox.sty +++ b/Master/texmf-dist/tex/latex/codebox/codebox.sty @@ -27,7 +27,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{expl3} -\GetIdInfo$Id: codebox.dtx 1.0.3 2022-01-04 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ +\GetIdInfo$Id: codebox.dtx 1.0.4 2022-01-28 08:00:00 +0800 Nan Geng <nangeng@nwafu.edu.cn> $ {Code Box with tcolorbox and minted/listings.} \ProvidesExplPackage{\ExplFileName} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -133,7 +133,19 @@ \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} + }, } }% \bool_new:N \l__codebox_minted_bool @@ -169,7 +181,7 @@ }, codestretch .initial:n = 1.0, linenumsep .fp_set:N = \l__codebox_linenumber_sep_fp, - linenumsep .initial:n = 3.00, + linenumsep .initial:n = 1.80, label .tl_set:N = \l__codebox_label_name_tl, label .initial:n = {}, unknown .code:n = { \__codebox_error:n { unknown-option } } @@ -258,9 +270,9 @@ } \NewDocumentEnvironment{ codebox }{O{} m } { - \bool_set_false:N \l__codebox_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l__codebox_comment_bool + \keys_set:nn { codebox } { #1 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tcbset{lang, title={#2} }% @@ -271,9 +283,9 @@ } \NewDocumentEnvironment{ codebox* }{O{} m } { - \bool_set_false:N \l__codebox_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l__codebox_comment_bool + \keys_set:nn { codebox } { #1 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tcbset{lang, title={#2} }% @@ -284,15 +296,14 @@ } \NewDocumentCommand \codefile { s O{} m m } { + \group_begin: \IfBooleanTF{#1} { \bool_set_true:N \l__codebox_comment_bool }{ \bool_set_false:N \l__codebox_comment_bool } - - \group_begin: - \IfNoValueF{#2}{ \keys_set:nn { codebox } { #2 } } + \keys_set:nn { codebox } { #2 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tcbset{ @@ -310,9 +321,9 @@ } \NewDocumentEnvironment{ codeview }{O{} m } { - \bool_set_false:N \l__codebox_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_false:N \l__codebox_comment_bool + \keys_set:nn { codebox } { #1 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tl_if_empty:NF \l__codebox_label_name_tl @@ -340,9 +351,9 @@ } \NewDocumentEnvironment{ codeview* }{O{} m } { - \bool_set_true:N \l__codebox_comment_bool \group_begin: - \IfNoValueF{#1}{ \keys_set:nn { codebox } { #1 } } + \bool_set_true:N \l__codebox_comment_bool + \keys_set:nn { codebox } { #1 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tl_if_empty:NF \l__codebox_label_name_tl @@ -374,15 +385,14 @@ } \NewDocumentCommand \cvfile { s O{} m m } { + \group_begin: \IfBooleanTF{#1} { \bool_set_true:N \l__codebox_comment_bool }{ \bool_set_false:N \l__codebox_comment_bool } - - \group_begin: - \IfNoValueF{#2}{ \keys_set:nn { codebox } { #2 } } + \keys_set:nn { codebox } { #2 } \__codebox_code_engine_tcbset: \__codebox_comment_tcbset: \tl_if_empty:NF \l__codebox_label_name_tl |