diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-17 21:32:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-17 21:32:40 +0000 |
commit | d3055981f6f2eef5eaf0ed6e1407c5c46ba77172 (patch) | |
tree | 5024a0fad0ef81a7be8f224c6f523337e69823d6 /Master/texmf-dist/tex/latex/xsim/xsim-manual.cls | |
parent | 636cbf03f6dcdc84f121e242abcf036015800524 (diff) |
xsim (17mar20)
git-svn-id: svn://tug.org/texlive/trunk@54380 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xsim/xsim-manual.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/xsim/xsim-manual.cls | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls index 1171fe9dd24..e40029df10b 100644 --- a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls +++ b/Master/texmf-dist/tex/latex/xsim/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{% |