<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
% !TEX program  = XeLaTeX
%&lt;*internal&gt;
\iffalse
%&lt;/internal&gt;
%&lt;*readme&gt;
Create code box and viewer based on tcolorbox and minted/listings
=======

`codebox` is a LaTeX3 package developed based on tcolorbox and minted/listings, which provides environments `codebox` and `codeview` to typset with environment body, and macros `\codefile` and `\cvfile` to typeset programming source code from a file in a fancy box.

The starred version of all environments and macros are provided at the same time, such as `codebox*`, `codeview*`, `\codefile*` and `\cvfile*` which adds comment at bottom of the fancy box.

You can read the manual (in Chinese/English) for more details and examples.

Contributing
------------

1. github repository:
    1. repository: [codebox](https://github.com/registor/codebox)
    2. Issues and pull requests are welcome. [issue](https://github.com/registor/codebox/issues) or [pull request](https://github.com/registor/codebox/pulls).

2. gitee repository:
    1. repository: [codebox](https://gitee.com/nwafu_nan/codebox)
    2. Issues and pull requests are welcome. [issue](https://gitee.com/nwafu_nan/codebox/issues) or [pull request](https://gitee.com/nwafu_nan/codebox/pulls).

蝓ｺ莠師colorbox逧�ｻ育ｫｯ讓｡諡溷ｮ丞桁
=======

`codebox`譏ｯ荳荳ｪ蝓ｺ莠師colorbox逧�畑LaTeX3蠑蜿醍噪扈育ｫｯ讓｡諡櫚aTeX螳丞桁�悟ｮ�署萓帑ｺ�畑莠取賜迚育ｨ句ｺ乗ｺ蝉ｻ｣遐∫將蟄千噪邇ｯ蠅�柱蜻ｽ莉､縲�

蜈ｶ荳ｭ`codebox`蜥形codeview`邇ｯ蠅�畑莠取�ｹ謐ｮ邇ｯ蠅��螳ｹ謗堤沿莉｣遐�ｼ形\codefile`蜥形\cvfile`蜻ｽ莉､逕ｨ莠取�ｹ謐ｮ譁�ｻｶ蜀�ｮｹ謗堤沿莉｣遐√�

`codebox`蜷梧慮謠蝉ｾ帑ｺ�推邇ｯ蠅�柱蜻ｽ莉､逧�弌蜿ｷ迚域悽�悟ｦＡcodebox*`蜥形codeview*`�形\codefile*`蜥形\cvfile*`�檎畑莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥翫�

蜿ｯ莉･騾夊ｿ��隸ｻ螳丞桁謇句�(荳ｭ譁�/闍ｱ譁�)莉･荵溯ｧ｣隸･螳丞桁譖ｴ螟夂噪菴ｿ逕ｨ扈�鰍蜥御ｽｿ逕ｨ譬ｷ萓九�

###  蜿ゆｸ手ｴ｡迪ｮ
---------------------

1. github莉灘ｺ�:
    (1). 莉灘ｺ灘慍蝮: [codebox](https://github.com/registor/codebox)
    (2). Issues蜥訓R: [issue](https://github.com/registor/codebox/issues) or [pull request](https://github.com/registor/codebox/pulls).

2. gitee莉灘ｺ�:
    (1). 莉灘ｺ灘慍蝮: [codebox](https://gitee.com/nwafu_nan/codebox)
    (2). Issues and PR: [issue](https://gitee.com/nwafu_nan/codebox/issues) or [pull request](https://gitee.com/nwafu_nan/codebox/pulls).

Copyright and Licence
---------------------

    Copyright (C) 2020-2022 by Nan Geng &lt;nangeng@nwafu.edu.cn&gt;
    ----------------------------------------------------------------------

    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".

    The Current Maintainer of this work is Nan Geng.

    This package consists of the file  codebox.dtx,
                 and the derived files codebox.sty,
                                       codebox.pdf,
                                       codebox.ins,
                                       README.md (this file).

%&lt;/readme&gt;
%&lt;*internal&gt;
\fi
\begingroup
  \def\temp{LaTeX2e}
\expandafter\endgroup\ifx\temp\fmtname\else
\csname fi\endcsname
%&lt;/internal&gt;
%&lt;*install&gt;

\input ctxdocstrip %

\let\MetaPrefix\relax

\preamble

    Copyright (C) 2020-2022 by Nan Geng &lt;nangeng@nwafu.edu.cn&gt;
--------------------------------------------------------------------------

    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".

    The Current Maintainer of this work is Nan Geng.

--------------------------------------------------------------------------

\endpreamble

\postamble

    This package consists of the file  codebox.dtx,
                 and the derived files codebox.sty,
                                       codebox.pdf,
                                       codebox.ins,
                                       README.md.
\endpostamble

\declarepostamble\emptypostamble
\endpostamble

\def\MetaPrefix{-- }


\let\MetaPrefix\DoubleperCent

\generate
  {
%&lt;/install&gt;
%&lt;*internal&gt;
    \usedir{source/xelatex/codebox}
    \file{codebox.ins} {\from{\jobname.dtx}{install}}
%&lt;/internal&gt;
%&lt;*install&gt;
    \usedir{xetex/xelatex/codebox}
    \file{codebox.sty} {\from{\jobname.dtx}{package}}
    \nopreamble\nopostamble
    \usedir{doc/xelatex/codebox}
    \file{README.md}   {\from{\jobname.dtx}{readme}}
  }

\endbatchfile
%&lt;/install&gt;
%&lt;*internal&gt;
\fi
%&lt;/internal&gt;
%&lt;package&gt;\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%&lt;package&gt;\RequirePackage{expl3}
%&lt;+package&gt;\GetIdInfo$Id: codebox.dtx 1.0.4 2022-01-28 08:00:00 +0800 Nan Geng &lt;nangeng@nwafu.edu.cn&gt; $
%&lt;package&gt;  {Code Box with tcolorbox and minted/listings.}
%&lt;package&gt;\ProvidesExplPackage{\ExplFileName}
%&lt;package&gt;  {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%&lt;*driver&gt;
\documentclass{ctxdoc}
\usepackage{minted}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{xcolor-material}
\usepackage{codebox}
\renewcommand*\marg[1]{\{\meta{#1}\}}
\renewcommand*\oarg[1]{[\meta{#1}]}
\renewcommand*\parg[1]{(\meta{#1})}
\NewDocumentCommand{\init}{+v}{\hspace{\fill}蛻晏ｧ句ｼ~=~\textcolor{blue}{\bfseries#1}}
\DeclareDocumentCommand\opt{m}{\texttt{#1}}
\DeclareDocumentCommand\kvopt{mm}
  {\texttt{#1\breakablethinspace=\breakablethinspace#2}}
\def\breakablethinspace{\hskip 0.16667em\relax}
\begin{document}
%&lt;!--CODEDOC--&gt;  \DisableImplementation
  \EnableImplementation
  \DocInput{\jobname.dtx}
  \IndexLayout
  \PrintChanges
  \PrintIndex
\end{document}
%&lt;/driver&gt;
% \fi
%
% \changes{v1.0.0}{2021/12/25}{蠑蟋狗ｼ門�讓｡譚ｿ}
%
% \CheckSum{313}
% \GetFileId{codebox.sty}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&amp;
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \&lt;
%   Equals        \=     Greater than  \&gt;     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \title{\bfseries\pkg{codebox}�壻ｻ｣遐∫將蟄先賜迚亥ｮ丞桁\\ \bfseries\pkg{codebox}�嗔rogrmming source code box}
% \author{閠ｿ讌�\\ \path{nangeng@nwafu.edu.cn}}
% \date{\filedate\qquad\fileversion\thanks{\url{https://github.com/registor/codebox}}\thanks{\url{https://gitee.com/nwafu_nan/codebox}}}
% \maketitle
%
% \begin{documentation}
%
% \begin{abstract}
%
% \pkg{codebox} 譏ｯ荳荳ｪ蝓ｺ莠蚕pkg{tcolorbox}逕ｨ\LaTeX3 蠑蜿醍噪 \LaTeX 螳丞桁�悟ｮ�署萓帷畑莠�
% 謗堤沿貅蝉ｻ｣遐∫將蟄千噪邇ｯ蠅�柱蜻ｽ莉､縲�
% 蜈ｶ荳ｭ�圭env{codebox}蜥圭env{codeview}邇ｯ蠅�畑莠取�ｹ謐ｮ邇ｯ蠅��螳ｹ謗堤沿莉｣遐�ｼ�
% \tn{codefile}蜥圭tn{cvfile}蜻ｽ莉､逕ｨ莠取�ｹ謐ｮ譁�ｻｶ蜀�ｮｹ謗堤沿莉｣遐√�
% 蜷梧慮�圭pkg{codebox}霑俶署萓帑ｺ�推邇ｯ蠅�柱蜻ｽ莉､逧�弌蜿ｷ迚域悽��
% 螯�\env{codebox*}蜥圭env{codeview*}�圭tn{codefile*}蜥圭tn{cvfile*}��
% 逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥翫�
%
% \end{abstract}
%
% \tableofcontents
%
% \section{邂莉急
%
% \pkg{codebox} 譏ｯ荳荳ｪ蝓ｺ莠蚕pkg{tcolorbox}逕ｨ\LaTeX3 蠑蜿醍噪 \LaTeX 螳丞桁��
% 螳�庄莉･譬ｹ謐ｮ逕ｨ謌ｷ隶ｾ鄂ｮ菴ｿ逕ｨ\pkg{minted}謌暴pkg{listings}螳丞桁螳樒鴫莉｣遐∫將蟄先賜迚医�
%
% 隸･螳丞桁謠蝉ｾ帑ｺ�\env{codebox}蜥圭env{codeview}荳､荳ｪ邇ｯ蠅�柱
% \tn{codefile}蜥圭tn{cvfile}荳､荳ｪ蜻ｽ莉､莉･謗堤沿莉｣遐∫將蟄舌�
%
% 蜷梧慮�圭pkg{codebox}螳丞桁霑俶署萓帷識蠅�柱蜻ｽ莉､逧�弌蜿ｷ迚域悽��
% 逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥翫�
%
% \section{逕ｨ謌ｷ謗･蜿｣}
%
% \subsection{\env{codebox}蜥圭env{codebox*}邇ｯ蠅マ
%
% \begin{function}[added=2021-12-25,updated=2021-12-25]{codebox,codebox*}
%   \begin{syntax}
%     \tn{begin}\{codebox\}\oarg{螟冶ｧる蛾｡ｹ}\Arg{逶貞ｭ先��｢�}
%     .....
%     \tn{end}\{codebox\}
%     \tn{begin}\{codebox*\}\oarg{螟冶ｧる蛾｡ｹ}\Arg{逶貞ｭ先��｢�}
%     .....
%     \tn{end}\{codebox*\}
%   \end{syntax}
%   菴ｿ逕ｨ邇ｯ蠅��螳ｹ謗堤沿莉｣遐∫將蟄舌�
%   蜿ｯ莉･騾夊ｿⅨArg{逶貞ｭ先��｢�}荳ｺ莉｣遐∫將蟄占ｮｾ鄂ｮ譬�｢倥�
%
%   \oarg{螟冶ｧる蛾｡ｹ}荳ｭ騾夊ｿ㌣ey-value譁ｹ蠑剰ｮｾ鄂ｮ莉｣遐∫將蟄仙､冶ｧゅ�
%
%   譏溷捷邇ｯ蠅ソtexttt{codebox*}逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥奇ｼ�
%   豁､譌ｶ�碁怙隕∝惠\oarg{螟冶ｧる蛾｡ｹ}荳ｭ逕ｨ
%   \kvopt{\meta{comments}}{\meta{蠎慕ｺｿ豕ｨ驥笠}騾蛾｡ｹ謠蝉ｾ媾textbf{蠎慕ｺｿ豕ｨ驥笠蜀�ｮｹ縲�
%
%   莉｣遐∫將蟄千噪螟冶ｧゆｹ溷庄莉･騾夊ｿⅨtn{codeset}蜻ｽ莉､逧�怜捷蛻�囈
%   key-value蛻苓｡ｨ霑幄｡瑚ｮｾ鄂ｮ縲�
%
% \end{function}
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \begin{codebox}{莉｣遐∵��｢�}
%       #include &lt;stdio.h&gt;
%       #include &lt;stdlib.h&gt;
%
%       int main(void)
%       {
%           printf("Hello World!\n");
%
%           return 0;
%       }
%     \end{codebox}
%   \end{Verbatim}
%
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \codefile{莉｣遐∫將蟄先��｢�}{test.c}
%     \end{minipage}
%   \end{center}
%
% \subsection{\tn{codefile}蜥圭tn{codefile*}蜻ｽ莉､}
%
% \begin{function}[added=2021-12-25,updated=2021-12-25]{\codefile,\codefile*}
%   \begin{syntax}
%     \tn{codefile}  \oarg{螟冶ｧる蛾｡ｹ} \Arg{逶貞ｭ先��｢�} \Arg{莉｣遐∵枚莉ｶ}
%     \tn{codefile*} \oarg{螟冶ｧる蛾｡ｹ} \Arg{逶貞ｭ先��｢�} \Arg{莉｣遐∵枚莉ｶ}
%   \end{syntax}
%
%   逕ｨ莠取賜迚井ｻ｣遐∫將蟄撰ｼ梧ｺ蝉ｻ｣遐∵擂閾ｪ莠蚕Arg{莉｣遐∵枚莉ｶ}��
%   蜿ｯ莉･騾夊ｿⅨArg{逶貞ｭ先��｢�}荳ｺ莉｣遐∫將蟄占ｮｾ鄂ｮ譬�｢倥�
%
%   \oarg{螟冶ｧる蛾｡ｹ}荳ｭ騾夊ｿ㌣ey-value譁ｹ蠑剰ｮｾ鄂ｮ莉｣遐∫將蟄仙､冶ｧゅ�
%
%   譏溷捷蜻ｽ莉､\texttt{codefile*}逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥奇ｼ�
%   豁､譌ｶ�碁怙隕∝惠\oarg{螟冶ｧる蛾｡ｹ}荳ｭ逕ｨ
%   \kvopt{\meta{comments}}{\meta{蠎慕ｺｿ豕ｨ驥笠}騾蛾｡ｹ謠蝉ｾ媾textbf{蠎慕ｺｿ豕ｨ驥笠蜀�ｮｹ縲�
%
%   莉｣遐∫將蟄千噪螟冶ｧゆｹ溷庄莉･騾夊ｿⅨtn{codeset}蜻ｽ莉､逧�怜捷蛻�囈
%   key-value蛻苓｡ｨ霑幄｡瑚ｮｾ鄂ｮ縲�
% \end{function}
%
% \newpage
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \codefile{莉｣遐∫將蟄先��｢�}{test.c}
%   \end{Verbatim}
%
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \codefile{莉｣遐∫將蟄先��｢�}{test.c}
%     \end{minipage}
%   \end{center}
%
% \subsection{\env{codeview}蜥圭env{codeview*}邇ｯ蠅マ
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{codeview,codeview*}
%   \begin{syntax}
%     \tn{begin}\{codeview\}\oarg{螟冶ｧる蛾｡ｹ}\Arg{逶貞ｭ先��｢�}
%     .....
%     \tn{end}\{codeview\}
%     \tn{begin}\{codeview*\}\oarg{螟冶ｧる蛾｡ｹ}\Arg{逶貞ｭ先��｢�}
%     .....
%     \tn{end}\{codeview*\}
%   \end{syntax}
%   菴ｿ逕ｨ邇ｯ蠅��螳ｹ謗堤沿蟶ｦ郛門捷莉｣遐∫將蟄舌�
%   蜿ｯ莉･騾夊ｿⅨArg{逶貞ｭ先��｢�}荳ｺ莉｣遐∫將蟄占ｮｾ鄂ｮ譬�｢倥�
%
%   \oarg{螟冶ｧる蛾｡ｹ}荳ｭ騾夊ｿ㌣ey-value譁ｹ蠑剰ｮｾ鄂ｮ莉｣遐∫將蟄仙､冶ｧゅ�
%
%   譏溷捷邇ｯ蠅ソtexttt{codeview*}逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥奇ｼ�
%   豁､譌ｶ�碁怙隕∝惠\oarg{螟冶ｧる蛾｡ｹ}荳ｭ逕ｨ
%   \kvopt{\meta{comments}}{\meta{蠎慕ｺｿ豕ｨ驥笠}騾蛾｡ｹ謠蝉ｾ媾textbf{蠎慕ｺｿ豕ｨ驥笠蜀�ｮｹ縲�
%
%   莉｣遐∫將蟄千噪螟冶ｧゆｹ溷庄莉･騾夊ｿⅨtn{codeset}蜻ｽ莉､逧�怜捷蛻�囈
%   key-value蛻苓｡ｨ霑幄｡瑚ｮｾ鄂ｮ縲�
% \end{function}
%
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \begin{codeview}{莉｣遐∵��｢�}
%       #include &lt;stdio.h&gt;
%       #include &lt;stdlib.h&gt;
%
%       int main(void)
%       {
%           printf("Hello World!\n");
%
%           return 0;
%       }
%     \end{codeview}
%   \end{Verbatim}
%
%   \codeset{pretitle=莉｣遐±
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \cvfile{莉｣遐∵��｢�}{test.c}
%     \end{minipage}
%   \end{center}
%
% \subsection{\tn{cvfile}蜥圭tn{cvfile*}蜻ｽ莉､}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{\cvfile,\cvfile*}
%   \begin{syntax}
%     \tn{cvfile}  \oarg{螟冶ｧる蛾｡ｹ} \Arg{逶貞ｭ先��｢�} \Arg{莉｣遐∵枚莉ｶ}
%     \tn{cvfile*} \oarg{螟冶ｧる蛾｡ｹ} \Arg{逶貞ｭ先��｢�} \Arg{莉｣遐∵枚莉ｶ}
%   \end{syntax}
%
%   逕ｨ莠取賜迚亥ｸｦ郛門捷莉｣遐∫將蟄撰ｼ梧ｺ蝉ｻ｣遐∵擂閾ｪ莠蚕Arg{莉｣遐∵枚莉ｶ}��
%   蜿ｯ莉･騾夊ｿⅨArg{逶貞ｭ先��｢�}荳ｺ莉｣遐∫將蟄占ｮｾ鄂ｮ譬�｢倥�
%
%   \oarg{螟冶ｧる蛾｡ｹ}荳ｭ騾夊ｿ㌣ey-value譁ｹ蠑剰ｮｾ鄂ｮ莉｣遐∫將蟄仙､冶ｧゅ�
%
%   譏溷捷蜻ｽ莉､\texttt{cvfile*}逕ｨ莠惹ｸｺ莉｣遐∫將蟄先ｷｻ蜉�蠎慕ｺｿ豕ｨ驥奇ｼ�
%   豁､譌ｶ�碁怙隕∝惠\oarg{螟冶ｧる蛾｡ｹ}荳ｭ逕ｨ
%   \kvopt{\meta{comments}}{\meta{蠎慕ｺｿ豕ｨ驥笠}騾蛾｡ｹ謠蝉ｾ媾textbf{蠎慕ｺｿ豕ｨ驥笠蜀�ｮｹ縲�
%
%   莉｣遐∫將蟄千噪螟冶ｧゆｹ溷庄莉･騾夊ｿⅨtn{codeset}蜻ｽ莉､逧�怜捷蛻�囈
%   key-value蛻苓｡ｨ霑幄｡瑚ｮｾ鄂ｮ縲�
% \end{function}
%
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \cvfile*[comments=霑呎弍荳荳ｪ邂蜊慕噪C隸ｭ險莉｣遐‐{莉｣遐∵��｢�}{test.c}
%   \end{Verbatim}
%
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \cvfile*[comments=霑呎弍荳荳ｪ邂蜊慕噪C隸ｭ險莉｣遐‐{莉｣遐∵��｢�}{test.c}
%     \end{minipage}
%   \end{center}
%
% \section{騾蛾｡ｹ隸ｴ譏枝
%
%   \pkg{codebox}螳丞桁謠蝉ｾ帑ｺ�ｸ邉ｻ蛻鈴蛾｡ｹ�御ｻ･隶ｾ鄂ｮ莉｣遐∫將蟄千噪螟冶ｧよ�ｷ蠑上�
%   霓ｽ蜈･\pkg{codebox}螳丞桁蜷趣ｼ御ｻ･荳矩蛾｡ｹ蝮�庄騾夊ｿ�畑謌ｷ謗･蜿｣蜻ｽ莉､\tn{codeset}霑幄｡瑚ｮｾ鄂ｮ縲�
%   蠖鍋┯�瑚ｿ吩ｺ幃蛾｡ｹ荵溷庄莉･騾夊ｿ�推荳ｪ邇ｯ蠅��蜻ｽ莉､逧Ыoarg{螟冶ｧる蛾｡ｹ}霑幄｡瑚ｮｾ鄂ｮ縲�
%
% \subsection{莉｣遐∝ｼ墓梼}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{minted}
%   \begin{syntax}
%     minted = &lt;\TTF&gt; \init{true}
%   \end{syntax}
%   \opt{minted} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∵賜迚亥ｼ墓梼�悟ｦゆｸｺ\textbf{true}蛻吩ｽｿ逕ｨ\pkg{minted}螳丞桁
%   謗堤沿莉｣遐∫將蟄蝉ｸｭ逧��螳ｹ�悟ｦゆｸｺ\textbf{false}蛻吩ｽｿ逕ｨ\pkg{listings}螳丞桁謗堤沿
%   莉｣遐∫將蟄蝉ｸｭ逧��螳ｹ縲るｻ倩ｮ､蛟ｼ荳ｺ\textbf{true}縲�
% \end{function}
%
% \subsection{莉｣遐∬ｯｭ險}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{lang}
%   \begin{syntax}
%     lang = \Arg{莉｣遐∬ｯｭ險} \init{c}
%   \end{syntax}
%   \opt{lang} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∬ｯｭ險�碁ｻ倩ｮ､蛟ｼ荳ｺ\textbf{c隸ｭ險}縲�
% \end{function}
%
% \subsection{莉｣遐∝錐遘ｰ}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{pretitle}
%   \begin{syntax}
%     pretitle = \Arg{莉｣遐∝錐遘ｰ} \init{Code}
%   \end{syntax}
%   \opt{pretitle} 逕ｨ莠惹ｻ｣遐∫ｼ門捷蜑咲噪莉｣遐∝錐遘ｰ蜑咲ｼ�碁ｻ倩ｮ､蛟ｼ荳ｺ\textbf{Code}縲�
% \end{function}
%
% \subsection{莉｣遐∵�ｷ蠑殉
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{codestyle}
%   \begin{syntax}
%     codestyle = \Arg{莉｣遐∵�ｷ蠑殉 \init{codeblocks}
%   \end{syntax}
%   \opt{codestyle} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄蝉ｸｭ莉｣遐∫噪譬ｷ蠑擾ｼ御ｻ�ｯｹ\textbf{minted}
%   蠑墓梼譛画譜�碁ｻ倩ｮ､蛟ｼ荳ｺ\textbf{codeblocks}縲�
% \end{function}
%
% \subsection{莉｣遐∝ｭ怜捷}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{codesize}
%   \begin{syntax}
%     codesize = \Arg{蟄怜捷蜻ｽ莉､} \init{\small}
%   \end{syntax}
%   \opt{codesize} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄蝉ｸｭ莉｣遐∫噪蟄怜捷�御ｻ�ｯｹ\textbf{minted}
%   蠑墓梼譛画譜�碁ｻ倩ｮ､蛟ｼ荳ｺ\textbf{\tn{small}}縲�
% \end{function}
%
% \subsection{蠎慕ｺｿ豕ｨ驥雁�螳ｹ}
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{comments}
%   \begin{syntax}
%     comments = \Arg{豕ｨ驥雁�螳ｹ} \init{譌�}
%   \end{syntax}
%   \opt{commentf} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄仙ｺ慕ｺｿ豕ｨ驥顔噪蜀�ｮｹ��
%   鮟倩ｮ､蛟ｼ荳ｺ\textbf{譌�}縲�
% \end{function}
%
% \subsection{蠎慕ｺｿ豕ｨ驥頑�ｼ蠑殉
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{commentf}
%   \begin{syntax}
%     commentf = \Arg{譬ｼ蠑丞多莉､扈м \init{\small\sffamily}
%   \end{syntax}
%   \opt{commentf} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄仙ｺ慕ｺｿ豕ｨ驥顔噪譬ｼ蠑擾ｼ�
%   鮟倩ｮ､蛟ｼ荳ｺ\textbf{\tn{small}\tn{sffamily}}縲�
% \end{function}
%
% \subsection{莉｣遐∬｡瑚ｷ掵
%
% \begin{function}[added=2021-12-26,updated=2021-12-26]{codestretch}
%   \begin{syntax}
%     codestretch = \Arg{豬ｮ轤ｹ謨ｰ} \init{1.0}
%   \end{syntax}
%   \opt{codestretch} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄仙�螳ｹ(莉｣遐�)逧�｡瑚ｷ晢ｼ御ｻ�ｯｹ\textbf{minted}
%   蠑墓梼譛画譜�悟叙豬ｮ轤ｹ謨ｰ縲るｻ倩ｮ､蛟ｼ荳ｺ\textbf{1.0}縲�
% \end{function}
%
% \subsection{陦悟捷髣ｴ霍掵
%
% \begin{function}[added=2021-12-26,updated=2022-1-28]{linenumsep}
%   \begin{syntax}
%     linenumsep = \Arg{豬ｮ轤ｹ謨ｰ} \init{1.80}
%   \end{syntax}
%   \opt{linenumsep} 逕ｨ莠手ｮｾ鄂ｮ莉｣遐∫將蟄占｡悟捷荳惹ｻ｣遐∫噪髣ｴ霍晢ｼ御ｻ�ｯｹ\textbf{minted}
%   蠑墓梼譛画譜�悟叙豬ｮ轤ｹ謨ｰ�悟黒菴肴弍mm縲るｻ倩ｮ､蛟ｼ荳ｺ\textbf{3.0}縲�
% \end{function}
%
% \changes{v1.0.3}{2022/1/4}{豺ｻ蜉�label蠑慕畑譬�ｭｾ騾蛾｡ｹ逧�ｽｿ逕ｨ隸ｴ譏枝
%
% \subsection{蠑慕畑譬�ｭｾ}
%
% \begin{function}[added=2022-1-4,updated=2022-1-4]{label}
%   \begin{syntax}
%     label = \Arg{蠑慕畑譬�ｭｾ蜷咲ｧｰ} \init{遨ｺ}
%   \end{syntax}
%   \opt{label} 逕ｨ莠手ｮｾ鄂ｮ蟶ｦ郛門捷莉｣遐∫將蟄千噪蠑慕畑譬�ｭｾ��
%   隸･騾蛾｡ｹ莉�ｯｹ\env{codeview}/\env{codeview*}邇ｯ蠅�
%   謌暴tn{cvfile}/\tn{cvfile*}蜻ｽ莉､譛画譜縲�
%   鮟倩ｮ､蛟ｼ荳ｺ\textbf{遨ｺ}縲�
% \end{function}
%
% \changes{v1.0.2}{2021/12/28}{豺ｻ蜉�cvcounter菴ｿ逕ｨ隸ｴ譏枝
%
% \section{隶｡謨ｰ蝎ｨ}
%
% \begin{function}[added=2021-12-28,updated=2021-12-28]{cvcounter}
%   \pkg{codebox}螳丞桁謠蝉ｾ帑ｺ�ｸ荳ｪ隶｡謨ｰ蝎ｨ\texttt{cvcounter}��
%   蠖謎ｽｿ逕ｨ蟶ｦ郛門捷邇ｯ蠅ソenv{codeview}/\env{codeview*}蜥�
%   蜻ｽ莉､\tn{cvfile}/\tn{cvfile*}謗堤沿莉｣遐∵慮�悟庄莉･逕ｨ莠主ｯｹ莉｣遐∫將蟄占ｿ幄｡瑚ｮ｡謨ｰ縲�
%   鮟倩ｮ､諠��荳具ｼ悟ｦよ棡蟄伜惠\texttt{thechapter}隶｡謨ｰ蝎ｨ�悟�蜈ｶ辷ｶ隶｡謨ｰ蝎ｨ隶ｾ鄂ｮ荳ｺ\texttt{chapter}
%   蜷ｦ蛻吝ｰ�潔蜈ｨ譁�ｻ滉ｸ隶｡謨ｰ縲�
%
%   蜿ｯ莉･菴ｿ逕ｨ邀ｻ莨ｼ\tn{renewcommand\{\tn{thecvcounter}\}\{\tn{thechapter.\tn{arabic\{cvcounter\}}}\}}
%   逧�ｽ｢蠑乗峩謾ｹ郛門捷霎灘�蜀�ｮｹ縲�
% \end{function}
%
% \newpage
% \section{謗堤沿譬ｷ萓急
%
% \pkg{codebox}螳丞桁蜿ｯ逕ｨ莠朱怙隕∬ｯｭ豕暮ｫ倅ｺｮ莉｣遐∵賜迚亥惻蜷茨ｼ�
% 莉･驕ｿ蜈堺ｽｿ逕ｨ莉｣遐∵穐蝗ｾ縲ゆｻ｣遐∫將蟄仙庄莉･蟶ｦ/荳榊ｸｦ蠎慕ｺｿ豕ｨ驥翫�
%
% \subsection{Java莉｣遐±
% 蜿ｯ莉･菴ｿ逕ｨ\tn{codeset}蜻ｽ莉､隶ｾ鄂ｮ莉｣遐∬ｯｭ險縲�
%
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \codeset{lang=java}
%     \codefile{Java莉｣遐∫將蟄図{hellojava.java}
%   \end{Verbatim}
%
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \codeset{lang=java}
%       \codefile{Java莉｣遐∫將蟄図{hellojava.java}
%     \end{minipage}
%   \end{center}
%
% \subsection{Python莉｣遐±
% 霑伜庄莉･菴ｿ逕ｨ邇ｯ蠅��蜻ｽ莉､逧Ыoarg{螟冶ｧる蛾｡ｹ}隶ｾ鄂ｮ莉｣遐∬ｯｭ險縲�
% 蠖鍋┯�御ｹ溷庄莉･騾夊ｿ�ｽｿ逕ｨ\opt{label}騾蛾｡ｹ荳ｺ郛門捷莉｣遐∵ｷｻ蜉�蠑慕畑譬�ｭｾ��
% 蟷ｶ騾夊ｿⅨtn{ref}蜻ｽ莉､蠑慕畑隸･譬�ｭｾ�悟ｦゆｻ｣遐―ref{code-test}謇遉ｺ縲�
%
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \cvfile[lang=python,label=code-test]{Python莉｣遐∫､ｺ萓急{hellopy.py}
%   \end{Verbatim}
%
%   \begin{center}
% %     \begin{minipage}{0.85\textwidth}
%       \cvfile[lang=python,label=code-test]{Python莉｣遐∫､ｺ萓急{hellopy.py}
%     \end{minipage}
%   \end{center}
%
% \subsection{listings蠑墓梼}
% 蝨ｨ騾蛾｡ｹ荳ｭ菴ｿ逕ｨ\kvopt{\meta{minted}}{\meta{false}}
% 莉･菴ｿ逕ｨ\pkg{listings}螳丞桁謗堤沿莉｣遐√�
%
%   \begin{Verbatim}[frame=none,numbers=left,gobble=5]
%     \centering
%     \cvfile[minted=false,lang=c]{C隸ｭ險莉｣遐∫､ｺ萓急{test.c}
%   \end{Verbatim}
%
%   \begin{center}
%     \begin{minipage}{0.85\textwidth}
%       \cvfile[minted=false,lang=c]{C隸ｭ險莉｣遐∫､ｺ萓急{test.c}
%     \end{minipage}
%   \end{center}
%
%
% \end{documentation}
%
% \StopEventually{}
%
% \begin{implementation}
%
% \section{莉｣遐∝ｮ樒鴫}
%
% 隸･螳丞桁菴ｿ逕ｨ \LaTeX3 隸ｭ豕慕ｼ門��御ｾ晁ｵ� \pkg{expl3} 邇ｯ蠅�ｼ�
% 蟷ｶ髴隹�畑 \pkg{l3packages}縲―pkg{tcolorbox}縲―pkg{minted}
% \pkg{listings}縲―pkg{fontawesome5}遲牙ｮ丞桁縲�
%
% 謖臥� \LaTeX3 隸ｭ豕包ｼ御ｻ｣遐∽ｸｭ逧�ｩｺ譬ｼ縲∵困陦後∝屓霓ｦ荳主宛陦ｨ隨ｦ莨壼ｮ悟�陲ｫ蠢ｽ逡･��
% 閠御ｸ句�郤ｿ窶忿_|窶晏柱蜀貞捷窶忿:|窶晏�蜿ｯ菴應ｸｺ荳闊ｬ蟄玲ｯ堺ｽｿ逕ｨ縲�
% 豁｣蟶ｸ逧�ｩｺ譬ｼ蜿ｯ莉･菴ｿ逕ｨ窶忿~|窶昜ｻ｣譖ｿ�幄�莠� |~| 蜴滓擂謇陦ｨ遉ｺ逧�懷ｸｦ蟄絶晢ｼ�
% 蛻呵ｦ∫畑 \LaTeXe{} 逧�次蟋句多莉､ \tn{nobreakspace} 莉｣譖ｿ縲�
%
% 莉･荳倶ｻ｣遐∽ｸｭ譛我ｸ莠帛ｽ｢螯� \textcolor[HTML]{2E3191}{\textsf{&lt;*package&gt;}}
% 逧���ｮｰ�瑚ｿ呎弍 \pkg{DocStrip} 荳ｭ逧�徃uard窶晢ｼ檎畑譚･騾画叫諤ｧ蝨ｰ謠仙叙譁�ｻｶ縲�
% 窶彌textsf{*}窶晏柱窶彌textsf{/}窶晏�蛻ｫ陦ｨ遉ｺ隸･驛ｨ蛻�噪蠑蟋句柱扈捺據縲ゆｸ榊性
% 窶彌textsf{*}窶晏柱窶彌textsf{/}窶晉噪 guard 蜃ｺ邇ｰ蝨ｨ陦悟捷蜿ｳ萓ｧ�悟ｮ�ｻｬ逕ｨ譚･遑ｮ螳�
% 蜊慕峡荳陦御ｻ｣遐∫噪蠖貞ｱ槭りｿ吩ｺ� guard 逧�｢懆牡豺ｱ豬�ｸ堺ｸ�檎畑莉･譏守｡ｮ蠏悟･怜�邉ｻ縲�
%
% 蜿ｦ譛芽凶蟷ｲ蠖｢螯� \textcolor[HTML]{AD1457}{\textsf{&lt;@@=codebox&gt;}} 逧� guard��
% 螳�ｻｬ逕ｱ \pkg{l3docstrip} 螳壻ｹ会ｼ檎畑譚･譬�ｯ�錐蟄礼ｩｺ髣ｴ�域ｨ｡蝮暦ｼ峨�
%
% \subsection{邇ｯ蠅�｣豬倶ｸ主㊥螟�}
%
%    \begin{macrocode}
%&lt;*package&gt;
%&lt;@@=codebox&gt;
%    \end{macrocode}
%
% 霓ｽ蜈･蠢�ｦ∫噪\LaTeX3 螳丞桁
%
%    \begin{macrocode}
\RequirePackage { xtemplate, l3keys2e, xparse }
%    \end{macrocode}
%
% \changes{v1.0.1}{2021/12/26}{蛻�髯､蜴歃LaTeX3 迚域悽譽豬倶ｻ｣遐±
%
% \subsection{霓ｽ蜈･蜈ｶ螳�ｮ丞桁}
%
% 霓ｽ蜈･\pkg{fontawesome5}縲―pkg{tcolorbox}縲―pkg{amssymb}縲�
% \pkg{xcolor}螳丞桁
%
%    \begin{macrocode}
\RequirePackage {fontawesome5, tcolorbox, varwidth, xcolor, etoolbox}
%    \end{macrocode}
%
% 隗｣蜀ｳExpl3荳ｭ\pkg{tcolorbox}蜥圭pkg{tikz}髯�刈蠎捺裏豕募刈霓ｽ逧�
% 逧�｡･荳�(髴隕―pkg{etoolbox}螳丞桁謾ｯ謖�)
%
% \url{https://tex.stackexchange.com/questions/57424/using-of-usetikzlibrary-in-an-expl3-package-fails}
%
%    \begin{macrocode}
\ExplSyntaxOff
\patchcmd
{\tcb@input@library@in}
  {%
   \input\tcbpkgprefix#1\relax%
  }
  {%
    \@pushfilename
    \input\tcbpkgprefix#1\relax%
    \@popfilename
  }
  {}{}

\patchcmd
{\pgfutil@InputIfFileExists}
  {\input #1}
  {%
    \@pushfilename
    \xdef\@currname{#1}%
    \input #1 %
    \@popfilename
  }
  {}{}
\ExplSyntaxOn
%    \end{macrocode}
%
% \changes{v1.0.1}{2021/12/26}{minted2.6蜿大ｸ�ｼ悟唖髯､蜴溯｡･荳∽ｻ｣遐±
%
% 霓ｽ蜈･\pkg{tcolorbox}蜥圭pkg{tikz}髯�刈蠎�
%
%    \begin{macrocode}
\tcbuselibrary{skins, xparse, breakable}
\tcbuselibrary{minted,listings}
\usetikzlibrary{shapes.geometric}
%    \end{macrocode}
%
% \subsection{螳壻ｹ蛾｢懆牡}
%
%    \begin{macrocode}
\definecolor{cvgrayc}{RGB}{247,247,247}
\definecolor{cvgray}{RGB}{220,220,220}
\definecolor{cvgrayb}{RGB}{153,153,153}
\definecolor{cvblue}{RGB}{223,238,255}
\definecolor{chengse}{RGB}{250,140,53}
%    \end{macrocode}
%
% \subsection{莉｣遐∫將蟄先�ｷ蠑剰ｮｾ隶｡}
%
% 莉｣遐∫將蟄人ang譬ｷ蠑�
%
%    \begin{macrocode}
\tcbset{%
  skin=enhanced,
  lang/.style={%
    breakable,%
    drop~shadow,%
    colframe=gray!75!black,%
    left=4.5mm,
    enhanced,%
    colframe=tcbcolback!60!black,%
    colback=white,%
    colbacktitle=tcbcolback!5!gray!10!white,%
    fonttitle=\bfseries,%
    coltitle=black,%
    attach~boxed~title~to~top~center={%
      yshift=-0.25mm-\tcboxedtitleheight/2,%
      yshifttext=2mm-\tcboxedtitleheight/2%
    },%
    attach~boxed~title~to~top~left={%
      xshift=1cm,%
      yshift*=1mm-\tcboxedtitleheight%
    },%
    varwidth~boxed~title*=-3cm,%
    boxed~title~style={%
      frame~code={%
        \path[fill=tcbcolback!30!black]([yshift=-1mm,xshift=-1mm]frame.north~west)%
          arc[start~angle=0,end~angle=180,radius=1mm]([yshift=-1mm,xshift=1mm]frame.north~east)%
          arc[start~angle=180,end~angle=0,radius=1mm];%
        \path[left~color=tcbcolback!60!black,right~color=tcbcolback!60!black,
          middle~color=tcbcolback!80!black]([xshift=-2mm]frame.north~west)%
          --([xshift=2mm]frame.north~east)[rounded~corners=1mm]%
          --([xshift=1mm,yshift=-1mm]frame.north~east)%
          --(frame.south~east)%
          --(frame.south~west)%
          --([xshift=-1mm,yshift=-1mm]frame.north~west)[sharp~corners]%
          --cycle;%
      },%
      interior~engine=empty%
    },%
    overlay={%
      \begin{tcbclipinterior}
        \fill[tcbcolback!80!black] (frame.south~west) rectangle
         ([xshift=5mm]frame.north~west);
      \end{tcbclipinterior}%
    },
  }%
}%
%    \end{macrocode}
%
% \changes{v1.0.4}{2022/1/28}{菫ｮ隶｢蛻�｡ｵ莉｣遐∫將蟄先裏陦悟捷蠎戊牡髣ｮ鬚�}
%
% 莉｣遐∫將蟄芯v譬ｷ蠑�
%
%    \begin{macrocode}
\tcbset{%
  skin=enhanced,
  cv/.style={
    boxrule=0.4mm,
    breakable,
    top=0mm,
    boxsep=1mm,
    drop~shadow,
    attach~boxed~title~to~top,
    colframe=blue!75!black,
    left=4.5mm,
    right=0mm,
    enhanced,
    colframe=tcbcolback!60!black,
    colback=white,
    colbacktitle=cvgray,
    fonttitle=\ttfamily,
    coltitle=black,
    underlay~boxed~title = {
      \begin{tcbclipinterior}
        \fill[cvblue] (frame.south~west) rectangle ([xshift=5.0mm,yshift=0mm]frame.north~west);
      \end{tcbclipinterior}
    },
    underlay~middle = {
      \begin{tcbclipinterior}
        \fill[cvblue] (frame.south~west) rectangle
          ([xshift=5.0mm,yshift=0mm]frame.north~west);
      \end{tcbclipinterior}
    },
    underlay~last = {
      \begin{tcbclipinterior}
        \fill[cvblue] (frame.south~west) rectangle
          ([xshift=5.0mm,yshift=0mm]frame.north~west);
      \end{tcbclipinterior}
    },
  }
}%
%    \end{macrocode}
%
% \subsection{蜀�Κ蜿倬㍼螢ｰ譏枝
%
% \begin{variable}{\l_@@_minted_bool,
% \l_@@_comment_bool,
% \l_@@_language_tl,
% \l_@@_code_style_tl,
% \l_@@_code_fontsize_tl,
% \l_@@_code_name_tl,
% \l_@@_comment_contents_tl,
% \l_@@_comment_format_tl,
% \l_@@_label_name_tl,
% \l_@@_baseline_stretch_fp,
% \l_@@_linenumber_sep_fp
%  }
% 螳壻ｹ牙序驥上�
%
% \changes{v1.0.3}{2022/1/4}{蠅槫刈\tn{\_@@_label_name_tl}蜿倬㍼}
%
%    \begin{macrocode}
\bool_new:N   \l_@@_minted_bool
\bool_new:N   \l_@@_comment_bool

\tl_new:N     \l_@@_language_tl
\tl_new:N     \l_@@_code_style_tl
\tl_new:N     \l_@@_code_fontsize_tl
\tl_new:N     \l_@@_code_name_tl
\tl_new:N     \l_@@_comment_contents_tl
\tl_new:N     \l_@@_comment_format_tl
\tl_new:N     \l_@@_label_name_tl
\fp_new:N     \l_@@_baseline_stretch_fp
\fp_new:N     \l_@@_linenumber_sep_fp
%    \end{macrocode}
% \end{variable}
%
% \changes{v1.0.4}{2022/1/28}{菫ｮ豁｣linenumsep荳ｺ鮟倩ｮ､蛟ｼ1.80莉･驕ｿ蜈�3菴崎｡悟捷貅｢蜃ｺ霎ｹ逡迎
%
% \subsection{騾蛾｡ｹ螟�炊}
%
% 螳壻ｹ� |codebox| 髞ｮ蛟ｼ邀ｻ縲�
%    \begin{macrocode}
\keys_define:nn { codebox }
  {
%    \end{macrocode}
%
% \begin{macro}{minted}
% 譏ｯ蜷ｦ菴ｿ逕ｨminted螳丞桁謗堤沿莉｣遐�ｼ碁ｻ倩ｮ､荳ｺtrue縲�
%    \begin{macrocode}
    minted .bool_set:N = \l_@@_minted_bool,
    minted .default:n = true,
    minted .initial:n = true,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{lang}
% 隶ｾ鄂ｮ謗堤沿莉｣遐∬ｯｭ險�碁ｻ倩ｮ､荳ｺc縲�
%    \begin{macrocode}
    lang .tl_set:N = \l_@@_language_tl,
    lang .initial:n = c,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{pretitle}
% 莉｣遐∝錐遘ｰ蜑咲ｼ
%    \begin{macrocode}
    pretitle .tl_set:N = \l_@@_code_name_tl,
    pretitle .initial:n = Code,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{codestyle}
% 莉｣遐∵�ｷ蠑�
%    \begin{macrocode}
    codestyle .tl_set:N = \l_@@_code_style_tl,
    codestyle .initial:n = default,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{codesize}
% 莉｣遐∝ｭ怜捷
%    \begin{macrocode}
    codesize .tl_set:N = \l_@@_code_fontsize_tl,
    codesize .initial:n = \small,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{comments}
% 豕ｨ驥頑�ｼ蠑�
%    \begin{macrocode}
    comments .tl_set:N = \l_@@_comment_contents_tl,
    comments .initial:n = {},
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{commentf}
% 豕ｨ驥頑�ｼ蠑�
%    \begin{macrocode}
    commentf .tl_set:N = \l_@@_comment_format_tl,
    commentf .initial:n = \small\sffamily,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{codestretch}
% 蝓ｺ郤ｿ莨ｸ螻慕ｳｻ謨ｰ
%    \begin{macrocode}
    codestretch .code:n = { \fp_set:Nn \l_@@_baseline_stretch_fp { #1 }
                         },
    codestretch .initial:n = 1.0,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{linenumsep}
% 陦悟捷荳取枚譛ｬ荵矩龍逧�ｷ晉ｦｻ(蜊穂ｽ搾ｼ嗄m)
%    \begin{macrocode}
    linenumsep .fp_set:N  = \l_@@_linenumber_sep_fp,
    linenumsep .initial:n = 1.80,
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.0.3}{2022/1/4}{蠅槫刈蠑慕畑譬�ｭｾlabel騾蛾｡ｹ}
%
% \begin{macro}{label}
% 豕ｨ驥頑�ｼ蠑�
%    \begin{macrocode}
    label .tl_set:N = \l_@@_label_name_tl,
    label .initial:n = {},
%    \end{macrocode}
% \end{macro}
%
% 螟�炊譛ｪ遏･騾蛾｡ｹ縲�
%    \begin{macrocode}
    unknown .code:n = { \@@_error:n { unknown-option } }
  }
\msg_new:nnn { codebox } { unknown-option }
  { package~ option~ "\l_keys_key_tl"~ is~ unknown. }
%    \end{macrocode}
%
% \subsection{騾蛾｡ｹ隶ｾ鄂ｮ逕ｨ謌ｷ謗･蜿｣}
%
% \begin{macro}{\codeset}
%
% 騾蛾｡ｹ隶ｾ鄂ｮ逕ｨ謌ｷ謗･蜿｣縲�
%
%    \begin{macrocode}
\NewDocumentCommand \codeset { m }
  { \keys_set:nn { codebox } {#1} }
%    \end{macrocode}
% \end{macro}
%
% \subsection{蜀�Κ蜃ｽ謨ｰ}
%
% \changes{v1.0.2}{2022/1/2}{菫ｮ謾ｹ謖臥ｫ�郛門捷譌ｶcvcounter逧�ｼ門捷譁ｹ蠑殉
%
% \begin{macro}{\@@_set_counter_parent:}
%
% 隶ｾ鄂ｮ莉｣遐∫ｼ門捷隶｡謨ｰ蝎ｨ逧�宛隶｡謨ｰ蝎ｨ縲�
%
%    \begin{macrocode}
\cs_new:Npn \@@_set_counter_parent:
  {
    \ifdef{\thechapter}
      {
        \newcounter{cvcounter}[chapter]%
        \renewcommand{\thecvcounter}{\thechapter.\arabic{cvcounter}}
      }{
        \newcounter{cvcounter}%[section]%
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.0.1}{2021/12/26}{隹�紛minted style騾蛾｡ｹ荳ｺ蜿よ焚螳樒鴫}
% \changes{v1.0.2}{2021/12/28}{蟆�minted/listings逧�盾謨ｰ隶ｾ鄂ｮ迢ｬ遶倶ｸｺ蜃ｽ謨ｰ}
%
% \begin{macro}{\@@_minted_engine_tcbset:n #1}
% 隶ｾ鄂ｮ莉｣遐∫將蟄仁inted螳丞桁蜿よ焚縲�
%
%    \begin{macrocode}
\cs_new:Npn \@@_minted_engine_tcbset:n #1
  {
    \tcbset{
      listing~engine=minted,%
      minted~style=#1,
      minted~options={%
        autogobble,
        breaklines,%
        fontsize=\tl_use:N \l_@@_code_fontsize_tl,%
        baselinestretch=\fp_eval:n { \l_@@_baseline_stretch_fp },
        breaksymbolleft={},%
        linenos,%
        numbersep=\fp_eval:n { \l_@@_linenumber_sep_fp }~mm,
      },%
      minted~language=\tl_use:N \l_@@_language_tl%
    }
  }
\cs_generate_variant:Nn \@@_minted_engine_tcbset:n {V}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_listings_engine_tcbset:}
% 隶ｾ鄂ｮ莉｣遐∫將蟄人istings螳丞桁蜿よ焚縲�
%
%    \begin{macrocode}
\cs_new:Npn \@@_listings_engine_tcbset:
  {
    \lstset{% general command to set parameter(s)
      basicstyle=\ttfamily\tl_use:N \l_@@_code_fontsize_tl, % print whole listing small
      keywordstyle=\color{chengse}\bfseries,%
      identifierstyle=, % nothing happens
      breaklines=true,
      commentstyle=\itshape\color{gray},
      stringstyle=\ttfamily, % typewriter type for strings
      numbers=left,%
      numberstyle=\tl_use:N \l_@@_code_fontsize_tl\sffamily\color[rgb]{0.5,0.5,1.0},%
    }%
    \tcbset{
      overlay={%
        \begin{tcbclipinterior}
          \fill[tcbcolback!80!black] (frame.south~west) rectangle
                                     ([xshift=5mm]frame.north~west);
        \end{tcbclipinterior}%
      },%
      listing~options={
        language=\tl_use:N \l_@@_language_tl,
        numbersep=\fp_eval:n { \l_@@_linenumber_sep_fp }~mm,
        %linebackgroundcolor={\ifodd\value{lstnumber}\color{cvgray}\fi}
      }
    }%
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_code_engine_tcbset:}
% 隶ｾ鄂ｮ莉｣遐∫將蟄仙ｼ墓梼螳丞桁蜿よ焚縲�
%
%    \begin{macrocode}
\cs_new:Npn \@@_code_engine_tcbset:
  {
    \bool_if:NTF \l_@@_minted_bool
      {
        \@@_minted_engine_tcbset:V \l_@@_code_style_tl
      }{
        \@@_listings_engine_tcbset:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_comment_tcbset:}
% 隶ｾ鄂ｮ莉｣遐∫將蟄仙ｺ慕ｺｿ豕ｨ驥翫�
%
%    \begin{macrocode}
\cs_new:Npn \@@_comment_tcbset:
  {
    \bool_if:NTF { \l_@@_comment_bool }
    {
      \tcbset{%
        listing~and~comment,%
        colbacklower=tcbcolback!5!yellow!10!white,%
        collower=tcbcolback!60!black,%
        comment={\tl_use:N \l_@@_comment_format_tl~
                 \tl_use:N \l_@@_comment_contents_tl},%
      }
    }{
      \tcbset{ listing~only,}
    }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.0.1}{2021/12/27}{菫ｮ隶｢莉｣遐∫將蟄仙燕螟壻ｸ荳ｪ騾怜捷逧�琉鬚�}
% \changes{v1.0.4}{2022/1/28}{菫ｮ謾ｹ逕ｨ謌ｷ謗･蜿｣逧кgroup_begin}蛻ｰ蠑蟋倶ｽ咲ｽｮ}
%
% \subsection{荳崎ｮ｡謨ｰ莉｣遐∫將蟄千畑謌ｷ謗･蜿｣}
%
%  螳壻ｹ我ｸ榊ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉｣遐∫將蟄千識蠅ソenv{codebox}
%
%    \begin{macrocode}
\NewDocumentEnvironment{ codebox }{O{} m }
  {
    \group_begin:
    \bool_set_false:N  \l_@@_comment_bool
    \keys_set:nn { codebox } { #1 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tcbset{lang, title={#2} }%
    \tcblisting{}
  }{
    \endtcblisting
    \group_end:
  }
%    \end{macrocode}
%
%  螳壻ｹ牙ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉｣遐∫將蟄千識蠅ソenv{codebox*}
%
%    \begin{macrocode}
\NewDocumentEnvironment{ codebox* }{O{} m }
  {
    \group_begin:
    \bool_set_false:N  \l_@@_comment_bool
    \keys_set:nn { codebox } { #1 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tcbset{lang, title={#2} }%
    \tcblisting{}
  }{
    \endtcblisting
    \group_end:
  }
%    \end{macrocode}
%
%  螳壻ｹ牙ｸｦ/荳榊ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉取枚莉ｶ隸ｻ蜿門�螳ｹ逧�多莉､\tn{codefile}/\tn{codefile*}
%
%    \begin{macrocode}
\NewDocumentCommand \codefile { s O{} m m }
  {
    \group_begin:
    \IfBooleanTF{#1}
      {
        \bool_set_true:N  \l_@@_comment_bool
      }{
        \bool_set_false:N \l_@@_comment_bool
      }
    \keys_set:nn { codebox } { #2 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tcbset{
      lang,
      title={#3},
      listing~file={#4},
    }%
    \tcbinputlisting{  }
    \group_end:
  }
%    \end{macrocode}
%
% \subsection{隶｡謨ｰ莉｣遐∫將蟄千畑謌ｷ謗･蜿｣}
%
%  隶ｾ鄂ｮ莉｣遐∫將蟄占ｮ｡邂怜勣
%
%    \begin{macrocode}
\@@_set_counter_parent:
%    \end{macrocode}
%
% \changes{v1.0.2}{2021/12/28}{荳ｺ隶｡謨ｰ蝎ｨ荳､遶ｯ豺ｻ蜉�\tn{nobreakspace}}
% \changes{v1.0.3}{2022/1/4}{荳ｺ蟶ｦ郛門捷莉｣遐∫將蟄先ｷｻ蜉�蠑慕畑譬�ｭｾ騾蛾｡ｹ}
%
%  螳壻ｹ我ｸ榊ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉｣遐∫將蟄千識蠅ソenv{codeview}
%
%    \begin{macrocode}
\DeclareTCBListing[use~counter=cvcounter]{codeviewaux}{m}
  {
    title={\tl_use:N \l_@@_code_name_tl\nobreakspace\thecvcounter\nobreakspace~#1},
  }
\NewDocumentEnvironment{ codeview }{O{} m }
  {
    \group_begin:
    \bool_set_false:N  \l_@@_comment_bool
    \keys_set:nn { codebox } { #1 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tl_if_empty:NF \l_@@_label_name_tl
    {
      \tcbset{
        label=\tl_use:N \l_@@_label_name_tl,
      }
    }
    \tcbset{
      cv,
      overlay~unbroken~and~first ={
        \begin{tcbclipinterior}
          \node[inner~sep=0pt,anchor=north~east,yshift=-3pt,xshift=-5pt,text=cvgrayb]
            at (frame.north~east){
              \ttfamily\faFile*\ \faCode\ \faCodeBranch\ \faCopy\ \faExternalLink*\
              \MakeUppercase{\tl_use:N \l_@@_language_tl}
            };
        \end{tcbclipinterior}
      }
    }%
    \codeviewaux{#2}
  }{
    \endcodeviewaux
    \group_end:
  }
%    \end{macrocode}
%
%
%  螳壻ｹ牙ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉｣遐∫將蟄千識蠅ソenv{codeview*}
%
%    \begin{macrocode}
\NewDocumentEnvironment{ codeview* }{O{} m }
  {
    \group_begin:
    \bool_set_true:N  \l_@@_comment_bool
    \keys_set:nn { codebox } { #1 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tl_if_empty:NF \l_@@_label_name_tl
    {
      \tcbset{
        label=\tl_use:N \l_@@_label_name_tl,
      }
    }
    \tcbset{
      cv,
      overlay~unbroken~and~first ={
        \begin{tcbclipinterior}
          \node[inner~sep=0pt,anchor=north~east,yshift=-3pt,xshift=-5pt,text=cvgrayb]
            at (frame.north~east){
              \ttfamily\faFile*\ \faCode\ \faCodeBranch\ \faCopy\ \faExternalLink*\ 
              \MakeUppercase{\tl_use:N \l_@@_language_tl}
            };
        \end{tcbclipinterior}
      }
    }%
    \codeviewaux{#2}
  }{
    \endcodeviewaux
    \group_end:
  }
%    \end{macrocode}
%
%  螳壻ｹ牙ｸｦ/荳榊ｸｦ蠎慕ｺｿ豕ｨ驥顔噪莉取枚莉ｶ隸ｻ蜿門�螳ｹ逧�多莉､\tn{cvfile}/\tn{cvfile*}
%
%    \begin{macrocode}
\DeclareTCBInputListing[use~counter=cvcounter]{\langfileaux}{m}
  {
    title={\tl_use:N \l_@@_code_name_tl\nobreakspace\thecvcounter\nobreakspace~#1},
  }
\NewDocumentCommand \cvfile { s O{} m m }
  {
    \group_begin:
    \IfBooleanTF{#1}
      {
        \bool_set_true:N  \l_@@_comment_bool
      }{
        \bool_set_false:N \l_@@_comment_bool
      }
    \keys_set:nn { codebox } { #2 }
    \@@_code_engine_tcbset:
    \@@_comment_tcbset:
    \tl_if_empty:NF \l_@@_label_name_tl
    {
      \tcbset{
        label=\tl_use:N \l_@@_label_name_tl,
      }
    }
    \tcbset{
      cv,
      listing~file={#4},
      overlay~unbroken~and~first ={
        \begin{tcbclipinterior}
          \node[inner~sep=0pt,anchor=north~east,yshift=-3pt,xshift=-5pt,text=cvgrayb]
            at (frame.north~east){
              \ttfamily\faFile*\ \faCode\ \faCodeBranch\ \faCopy\ \faExternalLink*\ 
              \MakeUppercase{\tl_use:N \l_@@_language_tl}
            };
        \end{tcbclipinterior}
      }
    }%
    \langfileaux{#3}
    \group_end:
  }
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/package&gt;
%    \end{macrocode}
%
% \end{implementation}
%
% \Finale
%
\endinput
</pre></body></html>