texlive[61414] Master: termsim (26dec21)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 26 22:21:18 CET 2021


Revision: 61414
          http://tug.org/svn/texlive?view=revision&revision=61414
Author:   karl
Date:     2021-12-26 22:21:18 +0100 (Sun, 26 Dec 2021)
Log Message:
-----------
termsim (26dec21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/latex/termsim/termsim.dtx
    trunk/Master/texmf-dist/tex/latex/termsim/termsim.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls
    trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
    trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex
    trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/termsim/termsim-en.pdf
    trunk/Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdf

Added: trunk/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls
===================================================================
--- trunk/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls	2021-12-26 21:21:18 UTC (rev 61414)
@@ -0,0 +1,883 @@
+%%
+%% File ctxdoc.cls
+%%
+%%     Copyright (C) 2016--2020
+%%     CTEX.ORG and any individual authors listed in the documentation.
+%%---------------------------------------------------------------------
+%%
+%%     This work may be distributed and/or modified under the
+%%     conditions of the LaTeX Project Public License, either
+%%     version 1.3c of this license or (at your option) any later
+%%     version. This version of this license is in
+%%        http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%     and the latest version of this license is in
+%%        http://www.latex-project.org/lppl.txt
+%%     and version 1.3 or later is part of all distributions of
+%%     LaTeX version 2005/12/01 or later.
+%%
+%%     This work has the LPPL maintenance status "maintained".
+%%
+%%---------------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\GetIdInfo$Id$
+  {ctex documentation (CTEX)}
+\ProvidesExplClass{ctxdoc}{\ExplFileDate}{}{\ExplFileDescription}
+\ExplSyntaxOff
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}}
+\PassOptionsToClass{a4paper,full}{l3doc}
+\ProcessOptions
+\LoadClass{l3doc}
+\RequirePackage[UTF8, punct=kaiming, heading, linespread=1.2, sub3section,scheme=plain]{ctex}
+
+\RequirePackage[toc]{multitoc}
+\RequirePackage{geometry}
+\RequirePackage{tabularx}
+\RequirePackage{makecell}
+\RequirePackage{threeparttable}
+\RequirePackage{siunitx}
+\RequirePackage{unicode-math}
+\RequirePackage{xcolor}
+\RequirePackage{caption}
+\RequirePackage{fancyvrb-ex}
+\RequirePackage{zref-base}
+\geometry{includemp, hmargin={0mm,15mm}, vmargin={25mm,15mm}, footskip=7mm}
+\hypersetup{pdfstartview=FitH, bookmarksdepth=subparagraph}
+\setcounter{secnumdepth}{4}
+\setcounter{tocdepth}{2}
+\newcommand*\email{\nolinkurl}
+\setmainfont{texgyrepagella}[
+  Extension      = .otf,
+  UprightFont    = *-regular,
+  BoldFont       = *-bold,
+  ItalicFont     = *-italic,
+  BoldItalicFont = *-bolditalic]
+\setsansfont{texgyreheros}[
+  Extension      = .otf,
+  UprightFont    = *-regular,
+  BoldFont       = *-bold,
+  ItalicFont     = *-italic,
+  BoldItalicFont = *-bolditalic]
+\setmonofont{cmun}[
+  Extension      = .otf,
+  UprightFont    = *btl,
+  BoldFont       = *tb,
+  ItalicFont     = *bto,
+  BoldItalicFont = *tx,
+  HyphenChar     = None]
+\setmathfont{texgyrepagella-math.otf}
+\captionsetup{%
+  strut=off, labelsep=quad, labelfont+=bf,
+  figureposition = bottom, tableposition = top}
+%% <--- http://tex.stackexchange.com/a/40896
+\patchcmd{\@addtocurcol}%
+    {\vskip \intextsep}%
+    {\edef\save at first@penalty{\the\lastpenalty}\unpenalty
+     \ifnum \lastpenalty = \@M  % hopefully the OR penalty
+        \unpenalty
+     \else
+        \penalty \save at first@penalty \relax % put it back
+     \fi
+      \ifnum\outputpenalty <-\@Mii
+                         \addvspace\intextsep
+                         \vskip\parskip
+      \else
+                         \addvspace\intextsep
+      \fi}%
+    {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}
+\patchcmd{\@addtocurcol}%
+    {\vskip\intextsep \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi}%
+    {\ifnum\outputpenalty <-\@Mii
+       \aftergroup\vskip\aftergroup\intextsep
+       \aftergroup\nointerlineskip
+     \else
+       \vskip\intextsep
+     \fi}%
+    {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}
+\patchcmd{\@getpen}{\@M}{\@Mi}
+  {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}
+%% --->
+%% 不对代码实现的 \section 以下标题编目录。
+\AtBeginEnvironment{implementation}{%
+  \ifnum\value{tocdepth}>\@ne
+    \addtocontents{toc}{\protect\value{tocdepth}=1\relax}%
+  \fi}
+\ifxetex
+  \let\ctexdocverbaddon\xeCJKVerbAddon
+  \def\ctexdisableecglue{\xeCJKsetup{CJKecglue}}
+  \def\ctexplainps{\xeCJKsetup{PunctStyle=plain}}
+  \appto\meta at font@select{\ifinner\ctexdisableecglue\fi}
+\else
+  \let\ctexdocverbaddon\relax
+  \let\ctexplainps\relax
+  \def\ctexdisableecglue{\ltjsetparameter{autoxspacing=false}}
+  \appto\meta at font@select{\ctexdisableecglue}
+\fi
+\setlist{noitemsep,topsep=\smallskipamount}
+\setlist[1]{labelindent=\parindent}
+\setlist[enumerate]{leftmargin=*}
+\setlist[itemize]{leftmargin=*}
+\newlist{optdesc}{description}{3}
+%% 设置间距为 \marginparsep,与 l3doc 一致
+\setlist[optdesc]{%
+  font=\mdseries\small\ttfamily,align=right,listparindent=\parindent,
+  labelsep=\marginparsep,labelindent=-\marginparsep,leftmargin=0pt}
+%% 重新定义 threeparttable 包的 tablenotes 环境
+\renewlist{tablenotes}{description}{1}
+\setlist[tablenotes]{%
+  format=\normalfont\tnote at item,align=right,listparindent=\parindent,
+  labelindent=\tabcolsep,leftmargin=*,rightmargin=\tabcolsep,
+  after=\@noparlisttrue}
+\AtBeginEnvironment{tablenotes}{%
+  \setlength\parindent{2\ccwd}%
+  \normalfont\footnotesize}
+\AtBeginEnvironment{threeparttable}{%
+  \stepcounter{tpt at id}%
+  \edef\curr at tpt@id{tpt@\arabic{tpt at id}}}
+\newcounter{tpt at id}
+\def\tnote at item#1{%
+  \Hy at raisedlink{\hyper at anchor{\curr at tpt@id-#1}}#1}
+\def\TPTtagStyle#1{\hyperlink{\curr at tpt@id-#1}{#1}}
+\fvset{
+  fontsize=\small,baselinestretch=1,numbersep=5pt,
+  formatcom=\ctexdocverbaddon,
+  listparameters=\setlength\topsep{\MacrocodeTopsep}}
+\DefineVerbatimEnvironment{frameverb}{Verbatim}{%
+  gobble=4,
+  frame=single,framesep=8pt,
+  listparameters=
+    \setlength\topsep{\medskipamount}%
+    \appto\FV at EndList{\nointerlineskip}}
+\DefineVerbatimEnvironment{ctexexam}{Verbatim}{%
+  gobble=4,
+  frame=single,framesep=10pt,
+  label=\rule{0pt}{12pt}\textnormal{\bfseries 例 \arabic{ctexexam}},
+  listparameters=
+    \setlength\topsep{\bigskipamount}%
+    \refstepcounter{ctexexam}\ctexexamlabelref
+    \appto\FV at EndList{\nointerlineskip}}
+\define at key{FV}{labelref}{\def\ctexexamlabelref{\label{#1}}}
+\let\ctexexamlabelref\empty
+\newcounter{ctexexam}
+\BeforeBeginEnvironment{function}{\par\nointerlineskip}
+\AtEndEnvironment{function}{%
+  \par\xdef\ctexfixprevdepth{\prevdepth=\the\prevdepth\space}}
+\AfterEndEnvironment{function}{\ctexfixprevdepth}
+\AtBeginEnvironment{syntax}{\linespread{1}\ctexplainps\ctexdisableecglue}
+\BeforeBeginEnvironment{SideBySideExample}{\par\addvspace{\medskipamount}}
+\newrobustcmd\exptarget{%
+  \AddLineBeginMainAux{\csgdef{Codedoc at expstar}{}}%
+  \Hy at raisedlink{\hypertarget{expstar}{}}}
+\newrobustcmd\rexptarget{%
+  \AddLineBeginMainAux{\csgdef{Codedoc at rexpstar}{}}%
+  \Hy at raisedlink{\hypertarget{rexpstar}{}}}
+\newrobustcmd\expstar{\hyperlink{expstar}{$\star$}}
+\newrobustcmd\rexpstar{\hyperlink{rexpstar}{\ding{73}}}
+\ExplSyntaxOn
+%% l3doc 会设置列表环境中 \listparindent=\z@,我们在这里恢复它。
+\cs_set_eq:NN \list \__codedoc_oldlist:nn
+\cs_new_nopar:Npn \zihaopt #1
+  {
+    \exp_last_unbraced:Nf \tl_head:w
+      { \prop_item:Nn \c__ctex_font_size_prop {#1} } { } \q_stop
+  }
+%% 抑制首段的 \parskip
+\ctex_patch_cmd_once:NnnnTF \__codedoc_function_descr_start:w
+  { }
+  { \noindent }
+  { \skip_vertical:n { -\parskip } \noindent }
+  { \iow_term:n { *** ~ SUCCESS ~ *** } }
+  { \iow_term:n { *** ~ FAIL ~ *** } }
+%% l3doc 会在 function 环境的 syntax 和 descr 盒子中间加上 \medskipamount 的距离。
+%% 但是若 syntax 盒子为空(未使用 syntax 环境),就会显得不好看。
+%% 此时我们通过将 \medskipamount 设置为零来修正。若盒子非空,则将 \parskip 还回去。
+\ctex_preto_cmd:NnnTF \__codedoc_function_assemble:
+  { }
+  { \ctex_doc_fix_yoffset: }
+  { \iow_term:n { *** ~ SUCCESS ~ *** } }
+  { \iow_term:n { *** ~ FAIL ~ *** } }
+\cs_new_protected_nopar:Npn \ctex_doc_fix_yoffset:
+  {
+    \box_if_empty:NTF \g__codedoc_syntax_box
+      { \skip_zero:N \medskipamount }
+      { \skip_add:Nn \medskipamount { \parskip } }
+  }
+%% 左侧边注的函数列表采用单倍行距
+\ctex_preto_cmd:NnnTF \__codedoc_typeset_functions:
+  { }
+  { \MacroFont }
+  { \iow_term:n { *** ~ SUCCESS ~ *** } }
+  { \iow_term:n { *** ~ FAIL ~ *** } }
+\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_init:
+  { }
+  { \hbox:n }
+  { \MacroFont \hbox:n }
+  { \iow_term:n { *** ~ SUCCESS ~ *** } }
+  { \iow_term:n { *** ~ FAIL ~ *** } }
+\ctex_patch_cmd_once:NnnnTF \__codedoc_macro_dump:
+  { }
+  { \hbox_unpack_drop:N }
+  { \MacroFont \hbox_unpack_drop:N }
+  { \iow_term:n { *** ~ SUCCESS ~ *** } }
+  { \iow_term:n { *** ~ FAIL ~ *** } }
+\cs_set_eq:NN \__codedoc_macro_end_style:n \use_none:n
+\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
+  {
+    \vbox_set:Nn \l__codedoc_macro_box
+      {
+        \MacroFont
+        \vbox_unpack_drop:N \l__codedoc_macro_box
+        \hbox_set:Nn \l_tmpa_box
+          { \__codedoc_print_macroname:nN {#1} #2 }
+        \dim_set:Nn \l_tmpa_dim { \marginparwidth - \labelsep }
+        \dim_compare:nNnT { \box_wd:N \l_tmpa_box } > \l_tmpa_dim
+          {
+            \box_resize_to_wd_and_ht:Nnn \l_tmpa_box
+              { \l_tmpa_dim }
+              { \box_ht:N \l_tmpa_box }
+          }
+        \hbox_overlap_left:n
+          {
+            \box_use:N \l_tmpa_box
+            \skip_horizontal:n { \marginparsep - \labelsep }
+          }
+      }
+    \int_incr:N \l__codedoc_macro_int
+  }
+\cs_set_protected:Npn \__codedoc_print_macroname:nN #1#2
+  {
+    \strut
+    \__codedoc_get_hyper_target:xN
+      {
+        \exp_not:n {#1}
+        \bool_if:NT #2 { \tl_to_str:n {TF} }
+      }
+      \l__codedoc_tmpa_tl
+    \cs_if_exist:cTF { r@ \l__codedoc_tmpa_tl }
+      { \exp_args:NNo \label at hyperref [ \l__codedoc_tmpa_tl ] }
+      { \use:n }
+      {
+        \tl_set:Nn \l__codedoc_tmpa_tl {#1}
+        \tl_replace_all:Non \l__codedoc_tmpa_tl
+          { \c_catcode_other_space_tl }
+          { \fontspec_visible_space: }
+        \__codedoc_macroname_prefix:o \l__codedoc_tmpa_tl
+        \__codedoc_macroname_suffix:N #2
+      }
+  }
+\AtBeginEnvironment { syntax }
+  {
+    \char_set_catcode_active:N \|
+    \char_set_active_eq:NN \| \orbar
+    \char_set_catcode_active:N \(
+    \char_set_active_eq:NN \( \defaultvalaux
+  }
+%% 不对目录中出现的 \cs 和 \tn 等编索引
+\DeclareDocumentCommand \StopSpecialIndexModule { }
+  { \cs_set_eq:NN \__codedoc_special_index_module:nnnnN \use_none:nnnnn }
+\tl_map_inline:nn { \actualchar \encapchar \levelchar }
+  { \exp_args:Nx \DoNotIndex { \bslash \tl_to_str:N #1 } }
+\DeclareDocumentCommand \package { o m }
+  {
+    \exp_args:Nx \href
+      {
+        http \c_colon_str //www.ctan.org/pkg/
+        \IfNoValueTF {#1} { \str_lowercase:n {#2} } {#1}
+      }
+      { \pkg {#2} }
+  }
+\DeclareDocumentCommand \GetFileId { m }
+  {
+    \GetFileInfo {#1}
+    \file_get:nnNTF { \c_sys_jobname_str .id }
+      { \int_set:Nn \tex_endlinechar:D { -1 } } \l__ctxdoc_tmp_tl
+      { \exp_after:wN \GetIdInfo \l__ctxdoc_tmp_tl }
+      { \GetIdInfo $Id$ }
+      { \fileinfo }
+  }
+\cs_new_eq:NN \__ctxdoc_ltx_changes:nnn \changes@
+\cs_set_protected:Npn \changes@ #1#2
+  {
+    \__ctxdoc_save_version_date:nn {#1} {#2}
+    \tl_if_empty:nTF {#1}
+      { \__ctxdoc_ltx_changes:nnn }
+      { \__ctxdoc_version_zfill:wnnn #1 \q_stop }
+      {#1} {#2}
+  }
+\cs_new_protected:Npn \__ctxdoc_version_zfill:wnnn #1#2 \q_stop
+  {
+    \str_if_eq:nnTF {#1} { v }
+      { \__ctxdoc_version_zfill:nnnn {#2} }
+      { \__ctxdoc_ltx_changes:nnn }
+  }
+\cs_new_protected:Npn \__ctxdoc_version_zfill:nnnn #1#2
+  {
+    \tl_clear:N \l__ctxdoc_tmp_tl
+    \int_zero:N \l_tmpa_int
+    \seq_set_split:Nnn \l_tmpa_seq { . } {#1}
+    \seq_map_function:NN \l_tmpa_seq \__ctxdoc_version_zfill:n
+    \int_compare:nNnF \l_tmpa_int > 2
+      {
+        \tl_put_right:Nx \l__ctxdoc_tmp_tl
+          { \prg_replicate:nn { 3 - \l_tmpa_int } { 00000 } }
+      }
+    \__ctxdoc_ltx_changes:nnn { \l__ctxdoc_tmp_tl \actualchar #2 }
+  }
+\tl_new:N \l__ctxdoc_tmp_tl
+\cs_new_protected:Npn \__ctxdoc_version_zfill:n #1
+  {
+    \int_incr:N \l_tmpa_int
+    \tl_put_right:Nx \l__ctxdoc_tmp_tl
+      {
+        \prg_replicate:nn
+          { \int_max:nn { 0 } { 5 - \tl_count:n {#1} } } { 0 }
+        \exp_not:n {#1}
+      }
+  }
+\cs_new_protected:Npn \__ctxdoc_save_version_date:nn #1#2
+  {
+    \prop_get:NnNTF \g__ctxdoc_version_date_prop {#1} \l__ctxdoc_tmp_tl
+      { \exp_after:wN \__ctxdoc_save_version_date:nnnn \l__ctxdoc_tmp_tl {#2} {#1} }
+      { \__ctxdoc_save_version_date:nnn {#1} {#2} {#2} }
+  }
+\cs_new_protected:Npn \__ctxdoc_save_version_date:nnnn #1#2#3#4
+  {
+    \__ctxdoc_if_date_later:nnTF {#1} {#3}
+      { \__ctxdoc_save_version_date:nnn {#4} {#3} {#2} }
+      {
+        \__ctxdoc_if_date_later:nnT {#3} {#2}
+          { \__ctxdoc_save_version_date:nnn {#4} {#1} {#3} }
+      }
+  }
+\prg_new_conditional:Npnn \__ctxdoc_if_date_later:nn #1#2 { TF , T }
+  {
+    \if_int_compare:w \__ctxdoc_parse_date:w #1 / / / 0 \q_stop >
+                      \__ctxdoc_parse_date:w #2 / / / 0 \q_stop \exp_stop_f:
+      \prg_return_true: \else: \prg_return_false: \fi:
+  }
+\cs_new:Npn \__ctxdoc_parse_date:w #1/#2/#3/ #4 \q_stop
+  { #1#2#3 }
+\cs_new_protected:Npn \__ctxdoc_save_version_date:nnn #1#2#3
+  { \prop_gput:Nnn \g__ctxdoc_version_date_prop {#1} { {#2} {#3} } }
+\cs_new_protected:Npn \CTEX at versionitem #1 \efill
+  {
+    \@idxitem
+    \prop_get:NnNTF \g__ctxdoc_version_date_prop {#1} \l__ctxdoc_tmp_tl
+      { \exp_after:wN \__ctxdoc_version_item:nnn \l__ctxdoc_tmp_tl {#1} }
+      { \BOOM }
+  }
+\cs_new_protected:Npn \__ctxdoc_version_item:nnn #1#2#3
+  {
+    \noindent
+    \Hy at raisedlink { \belowpdfbookmark {#3} { HD.#3 } }
+    \textbf {#3} \hfill
+    \hbox:n
+      {
+        \footnotesize
+        \str_if_eq:nnTF {#1} {#2}
+          { ( #1 ) }
+          { ( #1 ~ -- ~ #2 ) }
+      }
+    \par \nopagebreak
+  }
+\prop_new:N \g__ctxdoc_version_date_prop
+\ctex_patch_cmd:Nnn \HDorg at theglossary
+  { \let \item \@idxitem }
+  { \let \item \CTEX at versionitem }
+\ctex_patch_cmd:Nnn \l at section    { 2.5em } { 1.5em }
+\ctex_patch_cmd:Nnn \l at subsection { 2.5em } { 1.5em }
+\ctex_patch_cmd:Nnn \@wrglossary
+  { hdpindex }
+  {
+    \ifnum \c at HD@hypercount = \z@
+      hdpindex
+    \else
+      hdclindex { \the \c at HD@hypercount }
+    \fi
+  }
+%% 重定义 macrocode 环境的实现,逐行处理
+\cs_set_protected_nopar:Npn \xmacro at code
+  { \__ctxdoc_marco_code:w }
+\cs_set_protected_nopar:Npn \sxmacro at code
+  {
+    \fontspec_print_visible_spaces:
+    \xmacro at code
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_marco_code:w
+  {
+    \ifcodeline at index
+      \__ctxdoc_marco_every_par:n { \__ctxdoc_code_line_no: }
+    \else:
+      \__ctxdoc_marco_every_par:n { }
+    \fi:
+    \exp_args:Nx \__ctxdoc_make_finish_tag:n { \@currenvir }
+    \__ctxdoc_verbatim_start:w
+  }
+\cs_new_protected:Npn \__ctxdoc_marco_every_par:n #1
+  {
+    \everypar
+      {
+        \everypar {#1}
+        \if at inlabel
+          \global \@inlabelfalse
+          \@noparlistfalse
+          \llap { \box \@labels \hskip \leftskip }
+        \fi
+        #1
+      }
+  }
+\ctex_patch_cmd:Nnn \macro at code
+  { \if at inlabel \leavevmode \fi }
+  { \partopsep \z at skip }
+\group_begin:
+  \int_set:Nn \tex_endlinechar:D { -1 }
+  \use:n
+    {
+      \char_set_catcode_active:n { 32 }
+      \tl_const:Nn \c__ctxdoc_active_space_tl
+    }
+    { }
+\group_end:
+\group_begin:
+  \char_set_catcode_active:n { 13 }
+  \cs_new_protected:Npx \__ctxdoc_make_finish_tag:n #1
+    {
+      \tl_set:Nn \exp_not:N \l__ctxdoc_verbatim_finish_tl
+        {
+          \c_percent_str
+          \prg_replicate:nn { 4 }
+            { \exp_not:o { \c__ctxdoc_active_space_tl } }
+          \exp_not:o { \active at escape@char } end
+          \c_left_brace_str #1 \c_right_brace_str
+          \exp_not:N ^^M
+        }
+    }
+  \cs_new_protected:Npn \__ctxdoc_verbatim_start:w #1
+    {
+      \str_if_eq:nnTF {#1} { ^^M }
+        { \__ctxdoc_verbatim_read_line:w }
+        { \__ctxdoc_verbatim_read_line:w #1 }
+    }
+  \cs_new_protected:Npn \__ctxdoc_verbatim_read_line:w #1 ^^M
+    {
+      \tl_set:Nn \l__ctxdoc_verbatim_line_tl { #1 ^^M }
+      \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \l__ctxdoc_verbatim_finish_tl
+        { \exp_args:Nx \end { \@currenvir } }
+        {
+          \__ctxdoc_verbatim_process_line:
+          \__ctxdoc_verbatim_read_line:w
+        }
+    }
+  \cs_new_protected:Npn \__ctxdoc_swap_cr:
+    { \exp_after:wN \__ctxdoc_swap_cr:w \l__ctxdoc_verbatim_line_tl }
+  \cs_new_protected:Npn \__ctxdoc_swap_cr:w #1 ^^M
+    {
+      \group_insert_after:N ^^M
+      \tl_set:Nn \l__ctxdoc_verbatim_line_tl {#1}
+    }
+  \tl_const:Nn \c__ctxdoc_active_cr_tl { ^^M }
+\group_end:
+\tl_new:N \l__ctxdoc_verbatim_line_tl
+\tl_new:N \l__ctxdoc_verbatim_finish_tl
+\tl_new:N \g__ctxdoc_verbatim_verb_stop_tl
+\cs_new_protected_nopar:Npn \__ctxdoc_process_normal_line:
+  {
+    \str_if_eq:eeTF
+      { \str_head:N \l__ctxdoc_verbatim_line_tl } { \c_percent_str }
+      { \__ctxdoc_check_angle:x { \tl_tail:N \l__ctxdoc_verbatim_line_tl } }
+      { \__ctxdoc_output_line: }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_process_verb_line:
+  {
+    \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \g__ctxdoc_verbatim_verb_stop_tl
+      {
+        \tl_gclear:N \g__ctxdoc_verbatim_verb_stop_tl
+        \cs_gset_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line:
+        \__ctxdoc_output_module:nn
+          { \color { verb at guard } }
+          {
+            \__ctxdoc_swap_cr:
+            \__ctxdoc_module_pop:n { \l__ctxdoc_verbatim_line_tl }
+          }
+      }
+      { \tl_use:N \l__ctxdoc_verbatim_line_tl }
+  }
+\cs_new_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line:
+\DeclareDocumentCommand \CheckModules { }
+  { \cs_set_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line: }
+\DeclareDocumentCommand \DontCheckModules { }
+  { \cs_set_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_output_line: }
+\cs_new_protected:Npn \__ctxdoc_check_angle:n #1
+  {
+     \str_if_eq:eeTF { \str_head:n {#1} } { < }
+      { \__ctxdoc_check_module:x { \tl_tail:n {#1} } }
+      { \__ctxdoc_output_percent_line: }
+  }
+\cs_generate_variant:Nn \__ctxdoc_check_angle:n { x }
+\cs_new_protected:Npn \__ctxdoc_check_module:n #1
+  {
+    \exp_args:Nx \str_case:nnF { \str_head:n {#1} }
+      {
+        { * } { \__ctxdoc_module_star:w }
+        { / } { \__ctxdoc_module_slash:w }
+        { @ } { \__ctxdoc_module_at:w }
+        { < } { \__ctxdoc_module_verb:w }
+      }
+      { \__ctxdoc_module_pm:w }
+    #1 \q_stop
+  }
+\cs_generate_variant:Nn \__ctxdoc_check_module:n { x }
+\group_begin:
+  \char_set_catcode_active:N \>
+  \cs_new_protected:Npn \__ctxdoc_module_star:w #1 > #2 \q_stop
+    {
+      \__ctxdoc_output_module:nn
+        { \__ctxdoc_star_color: }
+        { \__ctxdoc_module_push:n { \__ctxdoc_module_angle:n {#1} } }
+      \__ctxdoc_output_line:n {#2}
+      \__ctxdoc_star_format:
+    }
+  \cs_new_protected:Npn \__ctxdoc_module_slash:w #1 > #2 \q_stop
+    {
+      \__ctxdoc_output_module:nn
+        { \__ctxdoc_slash_color: }
+        { \__ctxdoc_module_pop:n { \__ctxdoc_module_angle:n {#1} } }
+      \__ctxdoc_output_line:n {#2}
+      \__ctxdoc_slash_format:
+    }
+  \cs_new_protected:Npn \__ctxdoc_module_at:w @ @ = #1 > #2 \q_stop
+    {
+      \__ctxdoc_output_module:nn
+        { \color { at at guard } }
+        { \__ctxdoc_module_angle:n { @ @ = #1 } }
+      \tl_gset:Nn \g__codedoc_module_name_tl {#1}
+      \__ctxdoc_output_line:n {#2}
+    }
+  \cs_new_protected:Npn \__ctxdoc_module_pm:w #1 > #2 \q_stop
+    {
+      \tex_noindent:D
+      \hbox_overlap_left:n
+        {
+          \__ctxdoc_output_module:nn
+            { \__ctxdoc_pm_color: }
+            { \__ctxdoc_module_angle:n {#1} }
+          \skip_horizontal:n { \leftskip + \smallskipamount }
+        }
+      \group_begin:
+        \__ctxdoc_pm_format:
+        \__ctxdoc_output_line:n {#2}
+      \group_end:
+    }
+  \cs_new_protected:Npn \__ctxdoc_module_verb:w #1 \q_stop
+    {
+      \cs_gset_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_verb_line:
+      \tl_gset:Nx \g__ctxdoc_verbatim_verb_stop_tl
+        { \c_percent_str \tl_tail:n {#1} }
+      \__ctxdoc_output_module:nn
+        { \color { verb at guard } }
+        {
+          \__ctxdoc_swap_cr:
+          \__ctxdoc_module_push:n { \l__ctxdoc_verbatim_line_tl }
+        }
+    }
+\group_end:
+\cs_new_protected_nopar:Npn \__ctxdoc_output_line:
+  {
+    \tex_noindent:D
+    \__ctxdoc_replace_at_at:N \l__ctxdoc_verbatim_line_tl
+    \tl_use:N \l__ctxdoc_verbatim_line_tl
+  }
+\cs_new_protected:Npn \__ctxdoc_replace_at_at:N #1
+  {
+    \tl_if_empty:NF \g__codedoc_module_name_tl
+      {
+        \exp_args:NNo \__ctxdoc_replace_at_at_aux:Nn
+          #1 \g__codedoc_module_name_tl
+      }
+  }
+\cs_new_protected:Npx \__ctxdoc_replace_at_at_aux:Nn #1#2
+  {
+    \tl_replace_all:Nnn #1 { \token_to_str:N @ } { @ }
+    \tl_replace_all:Nnn #1 { \token_to_str:N _ } { _ }
+    \tl_replace_all:Nnn #1 { @ @ @ @ } { \token_to_str:N a a }
+    \tl_replace_all:Nnn #1 { _ _ @ @ } { _ _ #2 }
+    \tl_replace_all:Nnn #1 {   _ @ @ } { _ _ #2 }
+    \tl_replace_all:Nnn #1 {     @ @ } { _ _ #2 }
+    \tl_replace_all:Nnn #1 { \token_to_str:N a a } { @ @ }
+  }
+\cs_new_protected:Npn \__ctxdoc_output_line:n #1
+  {
+    \tl_set:Nn \l__ctxdoc_verbatim_line_tl {#1}
+    \tl_if_eq:NNTF \l__ctxdoc_verbatim_line_tl \c__ctxdoc_active_cr_tl
+      { \tl_use:N \l__ctxdoc_verbatim_line_tl }
+      {
+        \str_if_eq:eeTF
+          { \str_head:N \l__ctxdoc_verbatim_line_tl }
+          { \c_percent_str }
+          { \__ctxdoc_output_percent_line: }
+          { \__ctxdoc_output_line: }
+      }
+  }
+\cs_new_protected:Npn \__ctxdoc_output_percent_line:
+  {
+    \tex_noindent:D
+    \group_begin:
+      \color { code at gray }
+      \__ctxdoc_swap_cr:
+      \str_if_eq:eeTF { \f at shape } { \updefault }
+        { \slshape }
+        { \upshape }
+      \__ctxdoc_output_line:
+    \group_end:
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_module_push:n
+  { \exp_args:No \__ctxdoc_module_push_aux:nn { \int_use:N \c at HD@hypercount } }
+\cs_new_protected:Npn \__ctxdoc_module_push_aux:nn #1
+  {
+    \seq_gpush:Nn \g__ctxdoc_module_dest_seq {#1}
+    \hypersetup { hidelinks }
+    \exp_args:Nx \hdclindex
+      { \zref at extractdefault { HD.#1 } { guard at end } { 1 } } { }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_module_pop:n
+  {
+    \seq_gpop:NNTF \g__ctxdoc_module_dest_seq \l__ctxdoc_tmp_tl
+      { \exp_args:No \__ctxdoc_module_pop_aux:nn { \l__ctxdoc_tmp_tl } }
+      { \BOOM \use:n }
+  }
+\cs_new_protected:Npn \__ctxdoc_module_pop_aux:nn #1
+  {
+    \zref at labelbylist { HD.#1 } { ctxdoc }
+    \hypersetup { hidelinks }
+    \hdclindex {#1} { }
+  }
+\seq_new:N \g__ctxdoc_module_dest_seq
+\zref at newlist { ctxdoc }
+\zref at newprop { guard at end } [ 1 ]
+  { \int_eval:n { \c at HD@hypercount - 1 } }
+\zref at addprop { ctxdoc } { guard at end }
+\cs_new_protected_nopar:Npn \__ctxdoc_star_format:
+  {
+    \seq_gpush:No \g__ctxdoc_slash_format_seq { \macro at font }
+    \seq_gpop:NNF \g__ctxdoc_star_format_seq \l__ctxdoc_format_tl
+      { \__ctxdoc_pop_format: }
+    \__ctxdoc_select_format:
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_slash_format:
+  {
+    \seq_gpop:NNTF \g__ctxdoc_slash_format_seq \l__ctxdoc_format_tl
+      {
+        \seq_gpush:No \g__ctxdoc_star_format_seq { \macro at font }
+        \__ctxdoc_select_format:
+      }
+      { \BOOM }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_pm_format:
+  {
+    \seq_get:NNF \g__ctxdoc_star_format_seq \l__ctxdoc_format_tl
+      {
+        \__ctxdoc_pop_format:
+        \seq_gpush:No \g__ctxdoc_star_format_seq { \l__ctxdoc_format_tl }
+      }
+    \cs_if_eq:NNF \macro at font \l__ctxdoc_format_tl
+      { \l__ctxdoc_format_tl }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_pop_format:
+  {
+    \seq_gpop_left:NN \g__ctxdoc_format_seq \l__ctxdoc_format_tl
+    \seq_gput_right:No \g__ctxdoc_format_seq { \l__ctxdoc_format_tl }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_select_format:
+  {
+    \cs_if_eq:NNF \macro at font \l__ctxdoc_format_tl
+      {
+        \cs_gset_eq:NN \macro at font \l__ctxdoc_format_tl
+        \macro at font
+      }
+  }
+\tl_new:N \l__ctxdoc_format_tl
+\seq_new:N \g__ctxdoc_format_seq
+\seq_new:N \g__ctxdoc_star_format_seq
+\seq_new:N \g__ctxdoc_slash_format_seq
+\seq_gput_right:Nn \g__ctxdoc_format_seq { \MacroFont }
+\seq_gput_right:Nn \g__ctxdoc_format_seq { \AltMacroFont }
+\cs_set_protected:Npn \MacroFont
+  {
+    \linespread { 1 }
+    \small
+    \fontseries { \mddefault }
+    \fontshape  { \updefault }
+    \ttfamily
+    \ctexdocverbaddon
+  }
+\cs_set_protected:Npn \AltMacroFont
+  {
+    \linespread { 1 }
+    \small
+    \fontseries { \mddefault }
+    \fontshape  { \sldefault }
+    \ttfamily
+    \ctexdocverbaddon
+  }
+\AtBeginDocument
+  {
+    \tl_gset:Nx \macro at font
+      { \seq_item:Nn \g__ctxdoc_format_seq { 1 } }
+  }
+\cs_new_protected:Npn \__ctxdoc_output_module:nn #1#2
+  {
+    \tex_noindent:D
+    \group_begin:
+      #1
+      \footnotesize \normalfont \sffamily #2
+    \group_end:
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_star_color:
+  {
+    \seq_gpop:NNTF \g__ctxdoc_star_color_seq \current at color
+      { \set at color }
+      { \__ctxdoc_select_color: }
+    \seq_gpush:No \g__ctxdoc_slash_color_seq { \current at color }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_slash_color:
+  {
+    \seq_gpop:NNTF \g__ctxdoc_slash_color_seq \current at color
+      {
+        \set at color
+        \seq_gpush:No \g__ctxdoc_star_color_seq { \current at color }
+      }
+      { \BOOM }
+  }
+\cs_new_protected_nopar:Npn \__ctxdoc_pm_color:
+  {
+    \seq_get:NNTF \g__ctxdoc_star_color_seq \current at color
+      { \set at color }
+      {
+        \__ctxdoc_select_color:
+        \seq_gpush:No \g__ctxdoc_star_color_seq { \current at color }
+      }
+  }
+\seq_new:N \g__ctxdoc_star_color_seq
+\seq_new:N \g__ctxdoc_slash_color_seq
+\cs_new_protected_nopar:Npn \__ctxdoc_select_color:
+  { \color { guard at series!!+ } }
+\definecolorseries { guard at series }
+  { cmyk } { last } { blue } { purple }
+\resetcolorseries [ 3 ] { guard at series }
+\definecolor { verb at guard } { rgb }  { 0.5  , 0.5 , 0 }
+\definecolor { at at guard }   { rgb }  { 0.5  , 0   , 0.5 }
+\definecolor { code at gray }  { gray } { 0.5 }
+\cs_new_protected:Npn \__ctxdoc_module_angle:n #1
+  { \textlangle #1 \textrangle }
+\cs_new_protected_nopar:Npn \__ctxdoc_code_line_no:
+  {
+    \int_gincr:N \c at CodelineNo
+    \hbox_overlap_left:n
+      {
+        \hbox_to_wd:nn
+          { \MacroIndent }
+          {
+            \HD at target
+            \tex_hss:D
+            \__ctxdoc_code_line_no_style:
+            \theCodelineNo \enspace
+          }
+        \tex_kern:D \@totalleftmargin
+      }
+  }
+\tl_set:Nn \theCodelineNo
+  { \arabic { CodelineNo } }
+\cs_new_protected_nopar:Npn \__ctxdoc_code_line_no_style:
+  { \color { code at gray } \normalfont \sffamily \tiny }
+\cs_set_protected:Npn \HD at SetMacroIndent #1
+  {
+    \group_begin:
+      \settowidth \MacroIndent
+        {
+          \__ctxdoc_code_line_no_style:
+          \prg_replicate:nn { \tl_count:n {#1} } { 0 }
+          \enspace
+        }
+      \dim_gset_eq:NN \MacroIndent \MacroIndent
+    \group_end:
+  }
+\ExplSyntaxOff
+\AtBeginDocument{\addtocontents{toc}{\StopSpecialIndexModule}}
+\pdfstringdefDisableCommands{%
+  \let\path\meta
+  \let\opt\@firstofone}
+\preto\@thehead{\cslet{MakeUppercase\space}{\@iden}}
+\def\orbar{\textup{\textbar}}
+\def\defaultval#1{\textbf{\textup{#1}}}
+\def\defaultvalaux#1){\defaultval{#1}}
+\def\TF{true\orbar false}
+\def\TTF{\defaultval{true}\orbar false}
+\def\TFF{true\orbar\defaultval{false}}
+\protected\def\opt{\texttt}
+\def\TeX{\hologo{TeX}}
+\def\pdfTeX{\hologo{pdfTeX}}
+\def\XeTeX{\hologo{XeTeX}}
+\def\XeLaTeX{\hologo{XeLaTeX}}
+\def\LuaLaTeX{\hologo{LuaLaTeX}}
+\def\pdfLaTeX{\hologo{pdfLaTeX}}
+\def\LaTeX{\hologo{LaTeX}}
+\def\LaTeXe{\hologo{LaTeX2e}}
+\def\LaTeXiii{\hologo{LaTeX3}}
+\def\dvipdfmx{\hologo{DVIPDFMx}}
+\def\TeXLive{\hologo{TeXLive}}
+\def\MiKTeX{\hologo{MiKTeX}}
+\def\pTeX{\hologo{pTeX}}
+\def\ApTeX{\hologo{ApTeX}}
+\def\upTeX{\hologo{upTeX}}
+\def\ApLaTeX{\hologo{ApLaTeX}}
+\def\upLaTeX{\hologo{upLaTeX}}
+\def\HoLogo at pTeX#1{p\kern -.15em \hologo{TeX}}
+\def\HoLogo at pLaTeX#1{p\kern -.05em \hologo{LaTeX}}
+\def\HoLogo at ApTeX#1{A\kern -.05em \hologo{pTeX}}
+\def\HoLogo at upTeX#1{u\kern -.05em \hologo{pTeX}}
+\def\HoLogo at ApLaTeX#1{A\kern -.05em \hologo{pLaTeX}}
+\def\HoLogo at upLaTeX#1{u\kern -.05em \hologo{pLaTeX}}
+\def\HoLogoBkm at pTeX#1{p\hologo{TeX}}
+\def\HoLogoBkm at pLaTeX#1{p\hologo{LaTeX}}
+\def\HoLogoBkm at ApTeX#1{A\hologo{pTeX}}
+\def\HoLogoBkm at upTeX#1{u\hologo{pTeX}}
+\def\HoLogoBkm at ApLaTeX#1{A\hologo{pLaTeX}}
+\def\HoLogoBkm at upLaTeX#1{u\hologo{pLaTeX}}
+\def\HoLogo at TeXLive#1{\TeX\ Live}
+\def\HoLogo at DVIPDFMx#1{DVIPDFM\ensuremath{x}}
+\def\bashcmd{\texttt}
+\def\BSTACK{\begin{tabular}[t]{@{}l@{}}}
+\def\ESTACK{\end{tabular}}
+\newenvironment{defaultcapconfig}{%
+  \MakePercentComment
+  \input{ctex-name-utf8.cfg}%
+  \ExplSyntaxOff
+  \MakePercentIgnore}{}
+\def\ctexkit{\href{https://github.com/CTeX-org/ctex-kit/}{\texttt{ctex-kit}}}
+\def\ctexkitrev#1{%
+  \href{https://github.com/CTeX-org/ctex-kit/commit/#1}{\texttt{ctex-kit} rev. #1}}
+\appto\GlossaryParms{%
+  \raggedcolumns
+  \let\Hy at writebookmark\HDorg at writebookmark
+  \def\@idxitem{\par\hangindent 2em }%
+  \def\subitem{\@idxitem\hspace*{1em}}%
+  \def\subsubitem{\@idxitem\hspace*{2em}}}
+\def\glossaryname{版本历史}
+\GlossaryPrologue{\section{\glossaryname}}
+\IndexPrologue{%
+  \section{\indexname}
+  \textit{意大利体的数字表示描述对应索引项的页码;
+  带下划线的数字表示定义对应索引项的代码行号;
+  罗马字体的数字表示使用对应索引项的代码行号。}}
+\def\IndexLayout{%
+  \newgeometry{hmargin=15mm,vmargin={25mm,15mm},footskip=7mm}%
+  \setlength\IndexMin{.5\textheight}%
+  \ctexset{section/numbering=false}%
+  \StopSpecialIndexModule}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+%%
+%%
+%% End of file ctxdoc.cls.


Property changes on: trunk/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf	2021-12-26 21:19:51 UTC (rev 61413)
+++ trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf	2021-12-26 21:21:18 UTC (rev 61414)

Property changes on: trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex	2021-12-26 21:21:18 UTC (rev 61414)
@@ -0,0 +1,563 @@
+\documentclass{ctxdoc}
+\usepackage{minted}
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{xcolor-material}
+\usepackage{termsim}
+
+\NewDocumentCommand{\init}{+v}{\hspace{\fill}Init~=~\textcolor{blue}{\bfseries#1}}
+\DeclareDocumentCommand\opt{m}{\texttt{#1}}
+\DeclareDocumentCommand\kvopt{mm}
+  {\texttt{#1\breakablethinspace=\breakablethinspace#2}}
+\def\breakablethinspace{\hskip 0.16667em\relax}
+
+ \title{\bfseries\pkg{termsim}: terminal simulation pachage}
+ \author{nangeng\\ \url{nangeng at nwafu.edu.cn}}
+ \date{2021/12/26\qquad v1.1.1\thanks{\url{https://github.com/registor/termsim}}\thanks{\url{https://gitee.com/nwafu_nan/termsim}}}
+
+\begin{document}
+
+ \maketitle
+
+ \begin{abstract}
+
+ The \pkg{termsim} is a \pkg{tcolorbox}-based package developed with \LaTeX3,
+ which provides a \env{terminal} environment and a \tn{termfile} macro for simulationg
+ terminal in Win10, Mac or Ubuntu with dark, light or white color theme.
+ The \env{terminal} environment creates terminal with it's body and
+ the \tn{termfile} macro is used to read in the specified file and output it in the simulated terminal.
+ The starred \env{terminal*} environment and \tn{termfile*} macro are also provided
+ to simulate a terminal with comments at the bottom of terminal.
+ All style and color theme can be setted by \tn{termset} macro
+ or environment's and macro's key-value options.
+
+ \end{abstract}
+
+ \tableofcontents
+
+ \section{Introduction}
+
+ \pkg{termsim} is an \LaTeX package for simulating Win10, Mac or Ubuntu
+ terminal with dark, light or white color theme.
+
+ \section{Interface}
+
+ \subsection{\env{terminal} and \env{terminal*} environment}
+
+ \begin{function}[added=2021-12-17,updated=2021-12-17]{terminal,terminal*}
+   \begin{syntax}
+     \tn{begin}\{terminal\} \oarg{options} \Arg{terminal title}
+     .....
+     \tn{end}\{terminal\}
+
+     \tn{begin}\{terminal*\} \oarg{options} \oarg{comments} \Arg{terminal title}
+     .....
+     \tn{end}\{terminal*\}
+   \end{syntax}
+
+   Typesetting terminal with environment body.
+   You can set the title for the terminal by using \Arg{terminal title}.
+
+   The appearance of the terminal is set by key-value in \oarg{options}.
+
+   The starred environment \texttt{terminal*} is used to add comments at the bottom of terminal,
+   note that this needs to be done with \oarg{comments} after \oarg{options}.
+
+   Of course the key-value \oarg{options} can alse be set 
+   via the comma-separated key-value list of the \tn{termset} macro.
+
+ \end{function}
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termset{os=win10,theme=dark,shstretch=1.0}
+     \bgin{terminal}{terminal title}
+       Volume in drive C is SSD_files
+       Volume Serial Number is 0001-C78B
+
+       Directory of C:\Users\Administrator
+
+       2018/07/21  15:39    <DIR>          .
+       2018/07/21  15:39    <DIR>          ..
+       2018/07/13  08:35    <DIR>          3D Objects
+       2018/07/13  08:35    <DIR>          Contacts
+       2018/08/06  07:46    <DIR>          Desktop
+                       2 File(s)      6,029,312 bytes
+                  18 Dir(s) 14,035,107,840 bytes free
+     \end{terminal}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=win10,theme=dark,shstretch=1.0}
+\begin{terminal}{terminal title}
+    Volume in drive C is SSD_files
+    Volume Serial Number is 0001-C78B
+    Directory of C:\Users\Administrator
+  2018/07/21  15:39    <DIR>          .
+  2018/07/21  15:39    <DIR>          ..
+  2018/07/13  08:35    <DIR>          3D Objects
+  2018/07/13  08:35    <DIR>          Contacts
+  2018/08/06  07:46    <DIR>          Desktop
+                  2 File(s)      6,029,312 bytes
+             18 Dir(s) 14,035,107,840 bytes free
+\end{terminal}
+\end{minipage}
+\end{center}
+
+ \subsection{\tn{termfile} and \tn{termfile*} macro}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{\termfile,\termfile*}
+   \begin{syntax}
+     \tn{termfile}  \oarg{options} \Arg{terminal title} \Arg{contents file}
+     \tn{termfile*} \oarg{options} \oarg{comments} \Arg{terminal title} \Arg{contentes file}
+   \end{syntax}
+
+   Typesetting terminal from a file.
+   You can set the title for the terminal by using \Arg{terminal title}.
+
+   The appearance of the terminal is set by key-value in \oarg{options}.
+
+   The starred macro \texttt{termfile*} is used to add comments at the bottom of terminal,
+   note that this needs to be done with \oarg{comments} after \oarg{options}.
+
+   Of course the key-value \oarg{options} can alse be set
+   via the comma-separated key-value list of the \tn{termset} macro.
+ \end{function}
+
+ \newpage
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termfile{terminal title}{test.bat}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termfile{terminal title}{test.bat}
+\end{minipage}
+\end{center}
+
+\subsection{\tn{termset} macro}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{\termset}
+   \begin{syntax}
+     \tn{termset} \marg{key-values}
+   \end{syntax}
+   The arguments to \tn{termset} are a set of options separated by commas
+   in the form \kvopt{\meta{key}}{\meta{value}}.
+   The \meta{value} of some options can be omitted.
+   For the same option, subsequent settings will override previous settings.
+
+   Most options was initialized with default values.
+
+   \tn{termset}  uses \LaTeX3 style key settings,
+   supporting different types and multiple levels of option settings.
+   In the \kvopt{\meta{key}}{\meta{value}} list, the spaces around "|=|"
+   do not affect anything; However, it should be noted that \textbf{no blank lines}
+   are allowed in the list.
+   The "|= true|" in the parameter \kvopt{\meta{option}}{true} for the Boolean type can be omitted.
+
+ \end{function}
+
+ \section{Options}
+
+ The \pkg{termsim} package provides a number of options to set the style of the terminal.
+ The following options can be set with \tn{termset} macro.
+ Also, these options can be set with the \env{terminal}(\env{terminal*}) environment's
+ or the \tn{termfile}(\tn{termfile*}) command's \oarg{options}.
+
+ \subsection{shell code engine}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{minted}
+   \begin{syntax}
+     minted = <\TTF> \init{true}
+   \end{syntax}
+   \opt{minted} is used to set shell code engine, if it is \textbf{true} then
+   the \pkg{minted} package is used, if it is \textbf{false} then
+   the \pkg{listings} package is used. The default value is \textbf{true}.
+ \end{function}
+
+ \subsection{os type}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{os}
+   \begin{syntax}
+     os =  <win10|mac|ubuntu> \init{win10}
+   \end{syntax}
+   \opt{os} is used to set Operating System type. The default value is \textbf{win10}.
+ \end{function}
+
+ \subsection{color theme}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{theme}
+   \begin{syntax}
+     theme =  <dark|light|white> \init{dark}
+   \end{syntax}
+   \opt{theme} is used to set terminal color theme. The default value is \textbf{dark}.
+ \end{function}
+
+ \subsection{shell code style}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{shstyle}
+   \begin{syntax}
+     shstyle = \Arg{style} \init{bw}
+   \end{syntax}
+   \opt{shstyle} is used to set shell code style, valid only for the \pkg{minted} engine.
+   The default value is \textbf{bw}.
+ \end{function}
+
+ \subsection{shell code fontsize}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{shsize}
+   \begin{syntax}
+     shsize = \Arg{fontsize} \init{\small}
+   \end{syntax}
+   \opt{shsize} is used to set shell code fontsize, valid only for \pkg{minted} engine.
+   The default value is\textbf{\tn{small}}.
+ \end{function}
+
+ \subsection{comment format}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{commentf}
+   \begin{syntax}
+     commentf = \Arg{format group} \init{\small\sffamily}
+   \end{syntax}
+   \opt{commentf} is used to set comment format at terminal bottom.
+   The default value is \textbf{\tn{small}\tn{sffamily}}.
+ \end{function}
+
+ \subsection{shell code baseline stretch}
+
+ \begin{function}[added=2021-12-18,updated=2021-12-18]{shstretch}
+   \begin{syntax}
+     shstretch = \Arg{float number} \init{1.0}
+   \end{syntax}
+   \opt{shstretch} is used to set shell code baseline stretch, valid only for \pkg{minted} engine.
+   The default value is\textbf{1.0}.
+ \end{function}
+
+ \newpage
+
+ \section{Examples}
+
+ The \pkg{termsim} package can be used in situations
+ where the operating system terminal window needs to be typeset
+ to avoid the use of screenshots.
+ Terminal windows can be with or without underline comments
+ and can be dark, light or white color themes.
+
+ \subsection{Win10 terminal}
+
+ \subsubsection{\env{terminal} or \env{terminal*} environment}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termset{os=win10,theme=dark,shstretch=1.0}
+     \begin{terminal}{terminal title}
+       Volume in drive C is SSD_files
+       Volume Serial Number is 0001-C78B
+       Directory of C:\Users\Administrator
+       2018/07/21  15:39    <DIR>          .
+       2018/07/21  15:39    <DIR>          ..
+       2018/07/13  08:35    <DIR>          3D Objects
+       2018/07/13  08:35    <DIR>          Contacts
+       2018/08/06  07:46    <DIR>          Desktop
+                       2 File(s)      6,029,312 bytes
+                  18 Dir(s) 14,035,107,840 bytes free
+     \end{terminal}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=win10,theme=dark,shstretch=1.0}
+\begin{terminal}{terminal title}
+  Volume in drive C is SSD_files
+  Volume Serial Number is 0001-C78B
+  Directory of C:\Users\Administrator
+2018/07/21  15:39    <DIR>          .
+2018/07/21  15:39    <DIR>          ..
+2018/07/13  08:35    <DIR>          3D Objects
+2018/07/13  08:35    <DIR>          Contacts
+2018/08/06  07:46    <DIR>          Desktop
+                2 File(s)      6,029,312 bytes
+           18 Dir(s) 14,035,107,840 bytes free
+\end{terminal}
+\end{minipage}
+\end{center}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \begin{terminal*}[os=win10,theme=light][comment text]{terminal title}
+       Volume in drive C is SSD_files
+       Volume Serial Number is 0001-C78B
+       Directory of C:\Users\Administrator
+       2018/07/21  15:39    <DIR>          .
+       2018/07/21  15:39    <DIR>          ..
+       2018/07/13  08:35    <DIR>          3D Objects
+       2018/07/13  08:35    <DIR>          Contacts
+       2018/08/06  07:46    <DIR>          Desktop
+                       2 File(s)      6,029,312 bytes
+                  18 Dir(s) 14,035,107,840 bytes free
+     \end{terminal*}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\begin{terminal*}[os=win10,theme=light][comment text]{terminal title}
+  Volume in drive C is SSD_files
+  Volume Serial Number is 0001-C78B
+  Directory of C:\Users\Administrator
+2018/07/21  15:39    <DIR>          .
+2018/07/21  15:39    <DIR>          ..
+2018/07/13  08:35    <DIR>          3D Objects
+2018/07/13  08:35    <DIR>          Contacts
+2018/08/06  07:46    <DIR>          Desktop
+                2 File(s)      6,029,312 bytes
+           18 Dir(s) 14,035,107,840 bytes free
+\end{terminal*}
+\end{minipage}
+\end{center}
+
+ \subsubsection{\tn{termfile} or \tn{termfile*} macro}
+
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termset{os=win10,theme=dark}
+     \termfile{terminal title}{test.bat}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=win10,theme=dark}
+\termfile{terminal title}{test.bat}
+\end{minipage}
+\end{center}
+
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termfile*[os=win10,theme=light][comment text]{terminal title}{test.bat}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termfile*[os=win10,theme=light][comment text]{terminal title}{test.bat}
+\end{minipage}
+\end{center}
+
+ \newpage
+ \subsection{Mac terminal}
+
+ \subsubsection{\env{terminal} or \env{terminal*} environment}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termset{os=mac,theme=dark}
+     \begin{terminal}{terminal title}
+       xxxxxx at xxxxxx-lap:~$ ls
+       Desktop     Downloads   p2         Public   Templates   Videos
+       Documents   Music       Pictures   snap    '#test#'     workspace
+       xxxxxx at xxxxxx-lap:~$
+     \end{terminal}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=mac,theme=dark}
+\begin{terminal}{terminal title}
+  xxxxxx at xxxxxx-lap:~$ ls
+  Desktop     Downloads   p2         Public   Templates   Videos
+  Documents   Music       Pictures   snap    '#test#'     workspace
+  xxxxxx at xxxxxx-lap:~$
+\end{terminal}
+\end{minipage}
+\end{center}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \begin{terminal*}[os=mac,theme=light][comment text]{terminal title}
+       xxxxxx at xxxxxx-lap:~$ ls
+       Desktop     Downloads   p2         Public   Templates   Videos
+       Documents   Music       Pictures   snap    '#test#'     workspace
+       xxxxxx at xxxxxx-lap:~$
+     \end{terminal*}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\begin{terminal*}[os=mac,theme=light][comment text]{terminal title}
+  xxxxxx at xxxxxx-lap:~$ ls
+  Desktop     Downloads   p2         Public   Templates   Videos
+  Documents   Music       Pictures   snap    '#test#'     workspace
+  xxxxxx at xxxxxx-lap:~$
+\end{terminal*}
+\end{minipage}
+\end{center}
+
+ \subsubsection{\tn{termfile} or \tn{termfile*} macro}
+
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termset{os=mac,theme=dark}
+     \termfile{terminal title}{testls}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=mac,theme=dark}
+\termfile{terminal title}{testls}
+\end{minipage}
+\end{center}
+ \newpage
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termfile*[os=mac,theme=light][comment text]{terminal title}{testls}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termfile*[os=mac,theme=light][comment text]{terminal title}{testls}
+\end{minipage}
+\end{center}
+
+ \subsection{Ubuntu terminal}
+
+ \subsubsection{\env{terminal} or \env{terminal*} environment}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termset{os=ubuntu,theme=dark}
+     \begin{terminal}{terminal title}
+       xxxxxx at xxxxxx-lap:~/Desktop $
+       git clone git at gitee.com:xxxxxx/xxxxxx
+       Cloning into 'xxxxxx'...
+       remote: Enumerating objects: 106, done.
+       remote: Counting objects: 100% (106/106), done.
+       remote: Compressing objects: 100% (105/105), done.
+       remote: Total 106 (delta 9), reused 0 (delta 0)
+       Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+       Resolving delta: 100% (9/9), done.
+       Unpacking: 100% (75/75), done.
+       xxxxxx at xxxxxx-lap:~/Desktop $
+     \end{terminal}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=ubuntu,theme=dark}
+\begin{terminal}{terminal title}
+  xxxxxx at xxxxxx-lap:~/Desktop $
+  git clone git at gitee.com:xxxxxx/xxxxxx
+  Cloning into 'xxxxxx'...
+  remote: Enumerating objects: 106, done.
+  remote: Counting objects: 100% (106/106), done.
+  remote: Compressing objects: 100% (105/105), done.
+  remote: Total 106 (delta 9), reused 0 (delta 0)
+  Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+  Resolving delta: 100% (9/9), done.
+  Unpacking: 100% (75/75), done.
+  xxxxxx at xxxxxx-lap:~/Desktop $
+\end{terminal}
+\end{minipage}
+\end{center}
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \begin{terminal*}[os=ubuntu,theme=light][comment text]{terminal title}
+       xxxxxx at xxxxxx-lap:~/Desktop $
+       git clone git at gitee.com:xxxxxx/xxxxxx
+       Cloning into 'xxxxxx'...
+       remote: Enumerating objects: 106, done.
+       remote: Counting objects: 100% (106/106), done.
+       remote: Compressing objects: 100% (105/105), done.
+       remote: Total 106 (delta 9), reused 0 (delta 0)
+       Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+       Resolving delta: 100% (9/9), done.
+       Unpacking: 100% (75/75), done.
+       xxxxxx at xxxxxx-lap:~/Desktop $
+     \end{terminal*}
+   \end{Verbatim}
+\newpage
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\begin{terminal*}[os=ubuntu,theme=light][comment text]{terminal title}
+  xxxxxx at xxxxxx-lap:~/Desktop $
+  git clone git at gitee.com:xxxxxx/xxxxxx
+  Cloning into 'xxxxxx'...
+  remote: Enumerating objects: 106, done.
+  remote: Counting objects: 100% (106/106), done.
+  remote: Compressing objects: 100% (105/105), done.
+  remote: Total 106 (delta 9), reused 0 (delta 0)
+  Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+  Resolving delta: 100% (9/9), done.
+  Unpacking: 100% (75/75), done.
+  xxxxxx at xxxxxx-lap:~/Desktop $
+\end{terminal*}
+\end{minipage}
+\end{center}
+
+ \subsubsection{\tn{termfile} or \tn{termfile*} macro}
+
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termset{os=ubuntu,theme=dark}
+     \termfile{terminal title}{testsh}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=ubuntu,theme=dark}
+\termfile{terminal title}{testsh}
+\end{minipage}
+\end{center}
+
+   \begin{Verbatim}[frame=none,numbers=left]
+     \centering
+     \termfile*[os=ubuntu,theme=light][comment text]{terminal title}{testsh}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termfile*[os=ubuntu,theme=light][comment text]{terminal title}{testsh}
+\end{minipage}
+\end{center}
+
+ You can also use the white color theme and
+ use black text on a white background for print on paper.
+
+   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
+     \centering
+     \termset{os=ubuntu,theme=white}
+     \begin{terminal}{terminal title}
+       xxxxxx at xxxxxx-lap:~/Desktop $
+       git clone git at gitee.com:xxxxxx/xxxxxx
+       Cloning into 'xxxxxx'...
+       remote: Enumerating objects: 106, done.
+       remote: Counting objects: 100% (106/106), done.
+       remote: Compressing objects: 100% (105/105), done.
+       remote: Total 106 (delta 9), reused 0 (delta 0)
+       Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+       Resolving delta: 100% (9/9), done.
+       Unpacking: 100% (75/75), done.
+       xxxxxx at xxxxxx-lap:~/Desktop $
+     \end{terminal}
+   \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=ubuntu,theme=white}
+\begin{terminal}{terminal title}
+  xxxxxx at xxxxxx-lap:~/Desktop $
+  git clone git at gitee.com:xxxxxx/xxxxxx
+  Cloning into 'xxxxxx'...
+  remote: Enumerating objects: 106, done.
+  remote: Counting objects: 100% (106/106), done.
+  remote: Compressing objects: 100% (105/105), done.
+  remote: Total 106 (delta 9), reused 0 (delta 0)
+  Receiving objects: 100% (106/106), 237.88 MiB | 730.00 KiB/s, done.
+  Resolving delta: 100% (9/9), done.
+  Unpacking: 100% (75/75), done.
+  xxxxxx at xxxxxx-lap:~/Desktop $
+\end{terminal}
+\end{minipage}
+\end{center}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/termsim/termsim-en.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf	2021-12-26 21:19:51 UTC (rev 61413)
+++ trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf	2021-12-26 21:21:18 UTC (rev 61414)

Property changes on: trunk/Master/texmf-dist/doc/latex/termsim/termsim.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/termsim/termsim.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/termsim/termsim.dtx	2021-12-26 21:19:51 UTC (rev 61413)
+++ trunk/Master/texmf-dist/source/latex/termsim/termsim.dtx	2021-12-26 21:21:18 UTC (rev 61414)
@@ -157,7 +157,7 @@
 %</internal>
 %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 %<package>\RequirePackage{expl3}
-%<+package>\GetIdInfo$Id: termsim.dtx 1.1.0 2021-12-24 08:00:00 +0800 Nan Geng <nangeng at nwafu.edu.cn> $
+%<+package>\GetIdInfo$Id: termsim.dtx 1.1.1 2021-12-26 08:00:00 +0800 Nan Geng <nangeng at nwafu.edu.cn> $
 %<package>  {Terminal simulation with tcolorbox and minted/listings.}
 %<package>\ProvidesExplPackage{\ExplFileName}
 %<package>  {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -186,7 +186,7 @@
 %
 % \changes{v1.0.0}{2021/12/14}{开始编写模板}
 %
-% \CheckSum{376}
+% \CheckSum{318}
 % \GetFileId{termsim.sty}
 %
 % \CharacterTable
@@ -206,7 +206,7 @@
 %   Right brace   \}     Tilde         \~}
 %
 %
-% \title{\bfseries\pkg{termsim}:终端窗口模拟宏包\\\bfseries\pkg{termsim}:terminal simulation pachage}
+% \title{\bfseries\pkg{termsim}:终端窗口模拟宏包\\\bfseries\pkg{termsim}:terminal simulation package}
 % \author{耿楠\\ \path{nangeng at nwafu.edu.cn}}
 % \date{\filedate\qquad\fileversion\thanks{\url{https://github.com/registor/termsim}}\thanks{\url{https://gitee.com/nwafu_nan/termsim}}}
 % \maketitle
@@ -817,43 +817,6 @@
 \ExplSyntaxOn
 %    \end{macrocode}
 %
-% 解决minted的autogobble选项与Python3的兼容性问题
-% 和fancyvrb宏包命令变更的问题
-%
-% \url{https://github.com/gpoore/minted/issues/316}
-%
-%    \begin{macrocode}
-\ExplSyntaxOff
-\RequirePackage {regexpatch} % for starred \xpatchcmd which can replace all
-\makeatletter
-% trick, in order to get the integer value from either a macro or register
-% in an expandable way
-\def\minted at use@FancyVerbStartNum{\the\numexpr\FancyVerbStartNum}
-\def\minted at use@FancyVerbStopNum{\the\numexpr\FancyVerbStopNum}
-
-% patch for fivesum computation
-\xpatchcmd*\minted at pygmentize
-  {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi}
-  {\minted at use@FancyVerbStartNum}
-  {}{\PatchFailed}
-\xpatchcmd*\minted at pygmentize
-  {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi}
-  {\minted at use@FancyVerbStopNum}
-  {}{\PatchFailed}
-
-% patch for option "autogobble"
-\xpatchcmd\minted at autogobble
-  {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi}
-  {\minted at use@FancyVerbStartNum}
-  {}{\PatchFailed}
-\xpatchcmd\minted at autogobble
-  {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi}
-  {\minted at use@FancyVerbStopNum}
-  {}{\PatchFailed}
-\makeatother
-\ExplSyntaxOn
-%    \end{macrocode}
-%
 % 载入\pkg{tcolorbox}和\pkg{tikz}附加库
 %
 %    \begin{macrocode}
@@ -1117,8 +1080,7 @@
 % \l_@@_code_style_tl,
 % \l_@@_code_fontsize_tl,
 % \l_@@_comment_format_tl,
-% \l_@@_baseline_stretch_tl,
-% \l_@@_linenumber_sep_tl
+% \l_@@_shell_baseline_stretch_fp
 %  }
 % 定义变量。
 %
@@ -1131,8 +1093,7 @@
 \tl_new:N     \l_@@_shell_style_tl
 \tl_new:N     \l_@@_shell_fontsize_tl
 \tl_new:N     \l_@@_comment_format_tl
-\tl_new:N     \l_@@_shell_baseline_stretch_tl
-\tl_new:N     \l_@@_linenumber_sep_tl
+\fp_new:N     \l_@@_shell_baseline_stretch_fp
 %    \end{macrocode}
 % \end{variable}
 %
@@ -1204,7 +1165,7 @@
 % \begin{macro}{shstrech}
 % 基线伸展系数
 %    \begin{macrocode}
-    shstretch .tl_set:N  = \l_@@_shell_baseline_strech_tl,
+    shstretch .fp_set:N  = \l_@@_shell_baseline_strech_fp,
     shstretch .initial:n = 1.0,
 %    \end{macrocode}
 % \end{macro}
@@ -1249,12 +1210,12 @@
   {
     \tcbset{
       listing~engine=minted,%
-      minted~style=\tl_use:N \l_@@_shell_style_tl,%
+      minted~style=#1,%
       minted~options={%
         autogobble,
         breaklines,%
         fontsize=\tl_use:N \l_@@_shell_fontsize_tl,%
-        baselinestretch=#1,%
+        baselinestretch=\fp_eval:n { \l_@@_shell_baseline_stretch_fp },%
         breaksymbolleft={},%
         linenos=false,%
       },%
@@ -1385,7 +1346,7 @@
         \IfNoValueF{#1}{ \keys_set:nn { termsim } { #1 } }
         \@@_comment_tcbset:n { #2 }
         \@@_terminal_theme_select:
-        \@@_minted_tcbset:V \l_@@_shell_baseline_stretch_tl
+        \@@_minted_tcbset:V \l_@@_shell_style_tl
         \tcbset{ title={#3} }%
         \tcblisting{}
       }{
@@ -1404,7 +1365,7 @@
         \IfNoValueF{#1}{ \keys_set:nn { termsim } { #1 } }
         \@@_comment_tcbset:n { #2 }
         \@@_terminal_theme_select:
-        \@@_minted_tcbset:V \l_@@_shell_baseline_stretch_tl
+        \@@_minted_tcbset:V \l_@@_shell_style_tl
         \tcbset{ title={#3} }%
         \tcblisting{}
       }{
@@ -1429,7 +1390,7 @@
         \IfNoValueF{#2}{ \keys_set:nn { termsim } { #2 } }
         \@@_comment_tcbset:n { #3 }
         \@@_terminal_theme_select:
-        \@@_minted_tcbset:V \l_@@_shell_baseline_stretch_tl
+        \@@_minted_tcbset:V \l_@@_shell_style_tl
         \tcbset{
           title={#4},
           listing~file={#5},

Modified: trunk/Master/texmf-dist/tex/latex/termsim/termsim.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/termsim/termsim.sty	2021-12-26 21:19:51 UTC (rev 61413)
+++ trunk/Master/texmf-dist/tex/latex/termsim/termsim.sty	2021-12-26 21:21:18 UTC (rev 61414)
@@ -27,7 +27,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{expl3}
-\GetIdInfo$Id: termsim.dtx 1.1.0 2021-12-24 08:00:00 +0800 Nan Geng <nangeng at nwafu.edu.cn> $
+\GetIdInfo$Id: termsim.dtx 1.1.1 2021-12-26 08:00:00 +0800 Nan Geng <nangeng at nwafu.edu.cn> $
   {Terminal simulation with tcolorbox and minted/listings.}
 \ProvidesExplPackage{\ExplFileName}
   {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -57,31 +57,6 @@
   }
   {}{}
 \ExplSyntaxOn
-\ExplSyntaxOff
-\RequirePackage {regexpatch} % for starred \xpatchcmd which can replace all
-\makeatletter
-\def\minted at use@FancyVerbStartNum{\the\numexpr\FancyVerbStartNum}
-\def\minted at use@FancyVerbStopNum{\the\numexpr\FancyVerbStopNum}
-
-\xpatchcmd*\minted at pygmentize
-  {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi}
-  {\minted at use@FancyVerbStartNum}
-  {}{\PatchFailed}
-\xpatchcmd*\minted at pygmentize
-  {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi}
-  {\minted at use@FancyVerbStopNum}
-  {}{\PatchFailed}
-
-\xpatchcmd\minted at autogobble
-  {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi}
-  {\minted at use@FancyVerbStartNum}
-  {}{\PatchFailed}
-\xpatchcmd\minted at autogobble
-  {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi}
-  {\minted at use@FancyVerbStopNum}
-  {}{\PatchFailed}
-\makeatother
-\ExplSyntaxOn
 \tcbuselibrary{skins, xparse, breakable}
 \usetikzlibrary{shapes.geometric}
 \definecolor{mpurple}{RGB}{48,10,36}
@@ -302,8 +277,7 @@
 \tl_new:N     \l__termsim_shell_style_tl
 \tl_new:N     \l__termsim_shell_fontsize_tl
 \tl_new:N     \l__termsim_comment_format_tl
-\tl_new:N     \l__termsim_shell_baseline_stretch_tl
-\tl_new:N     \l__termsim_linenumber_sep_tl
+\fp_new:N     \l__termsim_shell_baseline_stretch_fp
 \keys_define:nn { termsim }
   {
     minted .bool_set:N = \l__termsim_minted_bool,
@@ -327,7 +301,7 @@
     shsize .initial:n = \small,
     commentf .tl_set:N = \l__termsim_comment_format_tl,
     commentf .initial:n = \small\sffamily,
-    shstretch .tl_set:N  = \l__termsim_shell_baseline_strech_tl,
+    shstretch .fp_set:N  = \l__termsim_shell_baseline_strech_fp,
     shstretch .initial:n = 1.0,
     unknown .code:n = { \__termsim_error:n { unknown-option } }
   }
@@ -345,12 +319,12 @@
   {
     \tcbset{
       listing~engine=minted,%
-      minted~style=\tl_use:N \l__termsim_shell_style_tl,%
+      minted~style=#1,%
       minted~options={%
         autogobble,
         breaklines,%
         fontsize=\tl_use:N \l__termsim_shell_fontsize_tl,%
-        baselinestretch=#1,%
+        baselinestretch=\fp_eval:n { \l__termsim_shell_baseline_stretch_fp },%
         breaksymbolleft={},%
         linenos=false,%
       },%
@@ -444,7 +418,7 @@
         \IfNoValueF{#1}{ \keys_set:nn { termsim } { #1 } }
         \__termsim_comment_tcbset:n { #2 }
         \__termsim_terminal_theme_select:
-        \__termsim_minted_tcbset:V \l__termsim_shell_baseline_stretch_tl
+        \__termsim_minted_tcbset:V \l__termsim_shell_style_tl
         \tcbset{ title={#3} }%
         \tcblisting{}
       }{
@@ -458,7 +432,7 @@
         \IfNoValueF{#1}{ \keys_set:nn { termsim } { #1 } }
         \__termsim_comment_tcbset:n { #2 }
         \__termsim_terminal_theme_select:
-        \__termsim_minted_tcbset:V \l__termsim_shell_baseline_stretch_tl
+        \__termsim_minted_tcbset:V \l__termsim_shell_style_tl
         \tcbset{ title={#3} }%
         \tcblisting{}
       }{
@@ -478,7 +452,7 @@
         \IfNoValueF{#2}{ \keys_set:nn { termsim } { #2 } }
         \__termsim_comment_tcbset:n { #3 }
         \__termsim_terminal_theme_select:
-        \__termsim_minted_tcbset:V \l__termsim_shell_baseline_stretch_tl
+        \__termsim_minted_tcbset:V \l__termsim_shell_style_tl
         \tcbset{
           title={#4},
           listing~file={#5},

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2021-12-26 21:19:51 UTC (rev 61413)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2021-12-26 21:21:18 UTC (rev 61414)
@@ -2271,6 +2271,7 @@
  'tap',         ,'tap.tex',
  'taylor',      'diagrams.tex',
  'termmenu',    '\.tex',
+ 'termsim',	'\.sty',		# not ctxdoc-en.cls
  'testidx',	'testidx-glossaries.*\.(bib|tex)$|' . $standardtex,
  'tex-ewd',     'dotnot.tex',
  'tex-ini-files','\.(dat|ini|tex)$',



More information about the tex-live-commits mailing list.