summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-26 21:21:18 +0000
committerKarl Berry <karl@freefriends.org>2021-12-26 21:21:18 +0000
commitb21cfe3d39f2f88863c9cb3e0f4c64bb44dc13f1 (patch)
tree217eba2ec623f32d7e85c2988ab16c41a698111e /Master/texmf-dist/doc
parentbf68f1da406f4d5aec0f69d490fa7231041b68b5 (diff)
termsim (26dec21)
git-svn-id: svn://tug.org/texlive/trunk@61414 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls883
-rw-r--r--Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdfbin0 -> 77433 bytes
-rw-r--r--Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex563
-rw-r--r--Master/texmf-dist/doc/latex/termsim/termsim-en.pdfbin71132 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdfbin317576 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/termsim/termsim.pdfbin0 -> 313173 bytes
6 files changed, 1446 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls b/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls
new file mode 100644
index 00000000000..68fab5f9676
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/termsim/ctxdoc-en.cls
@@ -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@first@penalty{\the\lastpenalty}\unpenalty
+ \ifnum \lastpenalty = \@M % hopefully the OR penalty
+ \unpenalty
+ \else
+ \penalty \save@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@font@select{\ifinner\ctexdisableecglue\fi}
+\else
+ \let\ctexdocverbaddon\relax
+ \let\ctexplainps\relax
+ \def\ctexdisableecglue{\ltjsetparameter{autoxspacing=false}}
+ \appto\meta@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@item,align=right,listparindent=\parindent,
+ labelindent=\tabcolsep,leftmargin=*,rightmargin=\tabcolsep,
+ after=\@noparlisttrue}
+\AtBeginEnvironment{tablenotes}{%
+ \setlength\parindent{2\ccwd}%
+ \normalfont\footnotesize}
+\AtBeginEnvironment{threeparttable}{%
+ \stepcounter{tpt@id}%
+ \edef\curr@tpt@id{tpt@\arabic{tpt@id}}}
+\newcounter{tpt@id}
+\def\tnote@item#1{%
+ \Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}#1}
+\def\TPTtagStyle#1{\hyperlink{\curr@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@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@EndList{\nointerlineskip}}
+\define@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@expstar}{}}%
+ \Hy@raisedlink{\hypertarget{expstar}{}}}
+\newrobustcmd\rexptarget{%
+ \AddLineBeginMainAux{\csgdef{Codedoc@rexpstar}{}}%
+ \Hy@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@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@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@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@theglossary
+ { \let \item \@idxitem }
+ { \let \item \CTEX@versionitem }
+\ctex_patch_cmd:Nnn \l@section { 2.5em } { 1.5em }
+\ctex_patch_cmd:Nnn \l@subsection { 2.5em } { 1.5em }
+\ctex_patch_cmd:Nnn \@wrglossary
+ { hdpindex }
+ {
+ \ifnum \c@HD@hypercount = \z@
+ hdpindex
+ \else
+ hdclindex { \the \c@HD@hypercount }
+ \fi
+ }
+%% 重定义 macrocode 环境的实现,逐行处理
+\cs_set_protected_nopar:Npn \xmacro@code
+ { \__ctxdoc_marco_code:w }
+\cs_set_protected_nopar:Npn \sxmacro@code
+ {
+ \fontspec_print_visible_spaces:
+ \xmacro@code
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_marco_code:w
+ {
+ \ifcodeline@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@inlabel
+ \global \@inlabelfalse
+ \@noparlistfalse
+ \llap { \box \@labels \hskip \leftskip }
+ \fi
+ #1
+ }
+ }
+\ctex_patch_cmd:Nnn \macro@code
+ { \if@inlabel \leavevmode \fi }
+ { \partopsep \z@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@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@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@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@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@gray }
+ \__ctxdoc_swap_cr:
+ \str_if_eq:eeTF { \f@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@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@extractdefault { HD.#1 } { guard@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@labelbylist { HD.#1 } { ctxdoc }
+ \hypersetup { hidelinks }
+ \hdclindex {#1} { }
+ }
+\seq_new:N \g__ctxdoc_module_dest_seq
+\zref@newlist { ctxdoc }
+\zref@newprop { guard@end } [ 1 ]
+ { \int_eval:n { \c@HD@hypercount - 1 } }
+\zref@addprop { ctxdoc } { guard@end }
+\cs_new_protected_nopar:Npn \__ctxdoc_star_format:
+ {
+ \seq_gpush:No \g__ctxdoc_slash_format_seq { \macro@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@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@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@font \l__ctxdoc_format_tl
+ {
+ \cs_gset_eq:NN \macro@font \l__ctxdoc_format_tl
+ \macro@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@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@color
+ { \set@color }
+ { \__ctxdoc_select_color: }
+ \seq_gpush:No \g__ctxdoc_slash_color_seq { \current@color }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_slash_color:
+ {
+ \seq_gpop:NNTF \g__ctxdoc_slash_color_seq \current@color
+ {
+ \set@color
+ \seq_gpush:No \g__ctxdoc_star_color_seq { \current@color }
+ }
+ { \BOOM }
+ }
+\cs_new_protected_nopar:Npn \__ctxdoc_pm_color:
+ {
+ \seq_get:NNTF \g__ctxdoc_star_color_seq \current@color
+ { \set@color }
+ {
+ \__ctxdoc_select_color:
+ \seq_gpush:No \g__ctxdoc_star_color_seq { \current@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@series!!+ } }
+\definecolorseries { guard@series }
+ { cmyk } { last } { blue } { purple }
+\resetcolorseries [ 3 ] { guard@series }
+\definecolor { verb@guard } { rgb } { 0.5 , 0.5 , 0 }
+\definecolor { at@guard } { rgb } { 0.5 , 0 , 0.5 }
+\definecolor { code@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@CodelineNo
+ \hbox_overlap_left:n
+ {
+ \hbox_to_wd:nn
+ { \MacroIndent }
+ {
+ \HD@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@gray } \normalfont \sffamily \tiny }
+\cs_set_protected:Npn \HD@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@pTeX#1{p\kern -.15em \hologo{TeX}}
+\def\HoLogo@pLaTeX#1{p\kern -.05em \hologo{LaTeX}}
+\def\HoLogo@ApTeX#1{A\kern -.05em \hologo{pTeX}}
+\def\HoLogo@upTeX#1{u\kern -.05em \hologo{pTeX}}
+\def\HoLogo@ApLaTeX#1{A\kern -.05em \hologo{pLaTeX}}
+\def\HoLogo@upLaTeX#1{u\kern -.05em \hologo{pLaTeX}}
+\def\HoLogoBkm@pTeX#1{p\hologo{TeX}}
+\def\HoLogoBkm@pLaTeX#1{p\hologo{LaTeX}}
+\def\HoLogoBkm@ApTeX#1{A\hologo{pTeX}}
+\def\HoLogoBkm@upTeX#1{u\hologo{pTeX}}
+\def\HoLogoBkm@ApLaTeX#1{A\hologo{pLaTeX}}
+\def\HoLogoBkm@upLaTeX#1{u\hologo{pLaTeX}}
+\def\HoLogo@TeXLive#1{\TeX\ Live}
+\def\HoLogo@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@writebookmark\HDorg@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.
diff --git a/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf b/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
new file mode 100644
index 00000000000..9e38bc69c2c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex b/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex
new file mode 100644
index 00000000000..7616e696f4d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/termsim/termsim-doc-en.tex
@@ -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@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@xxxxxx-lap:~$ ls
+ Desktop Downloads p2 Public Templates Videos
+ Documents Music Pictures snap '#test#' workspace
+ xxxxxx@xxxxxx-lap:~$
+ \end{terminal}
+ \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=mac,theme=dark}
+\begin{terminal}{terminal title}
+ xxxxxx@xxxxxx-lap:~$ ls
+ Desktop Downloads p2 Public Templates Videos
+ Documents Music Pictures snap '#test#' workspace
+ xxxxxx@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@xxxxxx-lap:~$ ls
+ Desktop Downloads p2 Public Templates Videos
+ Documents Music Pictures snap '#test#' workspace
+ xxxxxx@xxxxxx-lap:~$
+ \end{terminal*}
+ \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\begin{terminal*}[os=mac,theme=light][comment text]{terminal title}
+ xxxxxx@xxxxxx-lap:~$ ls
+ Desktop Downloads p2 Public Templates Videos
+ Documents Music Pictures snap '#test#' workspace
+ xxxxxx@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@xxxxxx-lap:~/Desktop $
+ git clone git@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@xxxxxx-lap:~/Desktop $
+ \end{terminal}
+ \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=ubuntu,theme=dark}
+\begin{terminal}{terminal title}
+ xxxxxx@xxxxxx-lap:~/Desktop $
+ git clone git@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@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@xxxxxx-lap:~/Desktop $
+ git clone git@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@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@xxxxxx-lap:~/Desktop $
+ git clone git@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@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@xxxxxx-lap:~/Desktop $
+ git clone git@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@xxxxxx-lap:~/Desktop $
+ \end{terminal}
+ \end{Verbatim}
+
+\begin{center}
+\begin{minipage}{0.85\textwidth}
+\termset{os=ubuntu,theme=white}
+\begin{terminal}{terminal title}
+ xxxxxx@xxxxxx-lap:~/Desktop $
+ git clone git@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@xxxxxx-lap:~/Desktop $
+\end{terminal}
+\end{minipage}
+\end{center}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/termsim/termsim-en.pdf b/Master/texmf-dist/doc/latex/termsim/termsim-en.pdf
deleted file mode 100644
index cd46ee19ee9..00000000000
--- a/Master/texmf-dist/doc/latex/termsim/termsim-en.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdf b/Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdf
deleted file mode 100644
index 4d472c1d585..00000000000
--- a/Master/texmf-dist/doc/latex/termsim/termsim-zh-cn.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/termsim/termsim.pdf b/Master/texmf-dist/doc/latex/termsim/termsim.pdf
new file mode 100644
index 00000000000..40acf25e7e5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/termsim/termsim.pdf
Binary files differ