diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/termsim/termsim.sty | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/termsim/termsim.sty b/Master/texmf-dist/tex/latex/termsim/termsim.sty index 0b8ef7eb2d0..066248556f8 100644 --- a/Master/texmf-dist/tex/latex/termsim/termsim.sty +++ b/Master/texmf-dist/tex/latex/termsim/termsim.sty @@ -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@nwafu.edu.cn> $ +\GetIdInfo$Id: termsim.dtx 1.1.1 2021-12-26 08:00:00 +0800 Nan Geng <nangeng@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@use@FancyVerbStartNum{\the\numexpr\FancyVerbStartNum} -\def\minted@use@FancyVerbStopNum{\the\numexpr\FancyVerbStopNum} - -\xpatchcmd*\minted@pygmentize - {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi} - {\minted@use@FancyVerbStartNum} - {}{\PatchFailed} -\xpatchcmd*\minted@pygmentize - {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi} - {\minted@use@FancyVerbStopNum} - {}{\PatchFailed} - -\xpatchcmd\minted@autogobble - {\ifx\FancyVerbStartNum\z@ 0\else\FancyVerbStartNum\fi} - {\minted@use@FancyVerbStartNum} - {}{\PatchFailed} -\xpatchcmd\minted@autogobble - {\ifx\FancyVerbStopNum\z@ 0\else\FancyVerbStopNum\fi} - {\minted@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}, |