diff options
author | Norbert Preining <norbert@preining.info> | 2020-03-18 03:01:18 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-03-18 03:01:18 +0000 |
commit | 701be49cc7a592cc192c0f28e45a763a4c745282 (patch) | |
tree | 4e86cf1011b55faeddf0e8da471c2e55324b37fa /macros/latex/contrib/xsim/doc/xsim-manual.cls | |
parent | 35730d4ce115914408c09833060f86cc84fc0d14 (diff) |
CTAN sync 202003180301
Diffstat (limited to 'macros/latex/contrib/xsim/doc/xsim-manual.cls')
-rw-r--r-- | macros/latex/contrib/xsim/doc/xsim-manual.cls | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/macros/latex/contrib/xsim/doc/xsim-manual.cls b/macros/latex/contrib/xsim/doc/xsim-manual.cls index 1171fe9dd2..e40029df10 100644 --- a/macros/latex/contrib/xsim/doc/xsim-manual.cls +++ b/macros/latex/contrib/xsim/doc/xsim-manual.cls @@ -492,7 +492,7 @@ \tcbset{enhanced,enhanced jigsaw} \newtcolorbox{bewareofthedog}{ - colback = white , + colback = red!2!white!98 , colframe = red , underlay={% \path[draw=none] @@ -597,6 +597,76 @@ \endcnltxcode } +\RenewDocumentEnvironment{sourcecode}{} + {% + \xsimman@readoptions{% + \setlength\cnltx@sidebysidewidth + {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% + \XSIMexpandcode{% + \noexpand\lstset{ + style=cnltx, + \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } + {linewidth=\cnltx@sidebysidewidth,}{}% + \expandonce\cnltx@local@listings@options + }% + }% + \XSIMgobblechars{2}% + }% + } + {% + \XSIMfilewritestop + \cnltxcode[breakable]% + \lstinputlisting[style=cnltx]{\jobname.tmp}% + \endcnltxcode + } + +\RenewDocumentEnvironment{example}{} + {% + \xsimman@readoptions{% + \setlength\cnltx@sidebysidewidth + {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% + \XSIMexpandcode{% + \noexpand\lstset{ + style=cnltx, + \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } + {linewidth=\cnltx@sidebysidewidth,}{}% + \expandonce\cnltx@local@listings@options + }% + }% + \XSIMgobblechars{2}% + }% + } + {% + \XSIMfilewritestop + \catcode`\^^M=5 + \ifbool{cnltx@sidebyside} + {% + \cnltxcode + \noindent + \minipage[c]{\cnltx@sidebysidewidth}% + \cnltx@pre@source@hook + \lstinputlisting[style=cnltx] {\jobname.tmp}% + \cnltx@after@source@hook + \endminipage\hfill + \minipage[c]{\cnltx@sidebysidewidth}% + \cnltx@pre@example@hook + \input {\jobname.tmp}% + \cnltx@after@example@hook + \endminipage + } + {% + \cnltxcode[breakable]% + \cnltx@pre@source@hook + \lstinputlisting{\jobname.tmp}% + \cnltx@after@source@hook + \tcblower + \cnltx@pre@example@hook + \input {\jobname.tmp}% + \cnltx@after@example@hook + }% + \endcnltxcode + } + \renewrobustcmd*\inputsourcecode[2][]{% \begingroup \pgfqkeys{/cnltx}{#1}% @@ -899,6 +969,7 @@ \xsim@add@version{0.16a} {2020-01-16} \xsim@add@version{0.17} {2020-02-21} \xsim@add@version{0.18} {2020-02-23} +\xsim@add@version{0.19} {2020-03-16} % ---------------------------------------------------------------------------- \newrobustcmd*\xsimauxfileinfo{% |