diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/runcode/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/runcode/runcode.pdf | bin | 54171 -> 55816 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/runcode/runcode.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/runcode/runcode.sty | 24 |
4 files changed, 19 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/runcode/README b/Master/texmf-dist/doc/latex/runcode/README index 15a32aa794c..8df8d236f26 100644 --- a/Master/texmf-dist/doc/latex/runcode/README +++ b/Master/texmf-dist/doc/latex/runcode/README @@ -1,4 +1,4 @@ -LaTeX Package: runcode 2022/05/03 v1.2 +LaTeX Package: runcode 2022/07/13 v1.4 ---------------------------------------- The runcode package enables the execution of source code (e.g., R, Julia, Matlab, shell, Python, etc.) and embed the results in the pdf file diff --git a/Master/texmf-dist/doc/latex/runcode/runcode.pdf b/Master/texmf-dist/doc/latex/runcode/runcode.pdf Binary files differindex 4380e8bf598..a13ff9b018f 100644 --- a/Master/texmf-dist/doc/latex/runcode/runcode.pdf +++ b/Master/texmf-dist/doc/latex/runcode/runcode.pdf diff --git a/Master/texmf-dist/doc/latex/runcode/runcode.tex b/Master/texmf-dist/doc/latex/runcode/runcode.tex index eadfc13c152..cb9edfea0f0 100644 --- a/Master/texmf-dist/doc/latex/runcode/runcode.tex +++ b/Master/texmf-dist/doc/latex/runcode/runcode.tex @@ -15,9 +15,9 @@ \documentclass{ltxdoc} \usepackage[hyphens]{url} %\usepackage{runcode} -\ProvidesPackage{runcode}[2022/05/14 runcode v1.3] +\ProvidesPackage{runcode}[2022/07/18 runcode v1.4] \begin{document} - \title{The \textsf{runcode} package\thanks{This document corresponds to \textsf{runcode}~v1.3, dated~2022/05/14.}} + \title{The \textsf{runcode} package\thanks{This document corresponds to \textsf{runcode}~v1.4, dated~2022/07/18.}} \author{Haim Bar and HaiYing Wang \\ \texttt{haim.bar@uconn.edu}, \texttt{haiying.wang@uconn.edu}} \maketitle @@ -166,6 +166,7 @@ Available options are: \section{Revisions} \begin{itemize} +\item v1.4, July 18, 2022: Fixed a bug in the cache mode. \item v1.3, May 14, 2022: Removed the hard-coded minted options. \item v1.2, May 3, 2022: Added python options (server and batch). \item v1.1, April 17, 2021: Added a nohup option; improved error handling (missing code files, zero bytes in output files.) diff --git a/Master/texmf-dist/tex/latex/runcode/runcode.sty b/Master/texmf-dist/tex/latex/runcode/runcode.sty index 79da32c5790..626dc05aaa5 100644 --- a/Master/texmf-dist/tex/latex/runcode/runcode.sty +++ b/Master/texmf-dist/tex/latex/runcode/runcode.sty @@ -171,12 +171,16 @@ \ifthenelse{\isempty{#3}}{ \ifminted \inputminted{#1}{#2} + \vspace{-\medskipamount} + \vspace{-\baselineskip} \else \VerbatimInput[fontsize=\footnotesize,linenos=true,frame=single,breaklines]{#2} \fi }{ \ifminted \inputminted[firstline=#3, lastline=#4, firstnumber=1]{#1}{#2} + \vspace{-\medskipamount} + \vspace{-\baselineskip} \else \VerbatimInput[fontsize=\footnotesize,linenos=true,frame=single,breaklines, firstline=#3, lastline=#4, firstnumber=1]{#2} \fi @@ -232,7 +236,7 @@ \IfFileExists{\tmpname} { \ifstrequal{#2}{vbox} - {\begin{tcolorbox} + {\begin{tcolorbox}[colframe=blue!25,colback=blue!10] \ifminted\unskip \inputminted[fontsize=\footnotesize,breaklines=true]{text}{\tmpname}\unskip \else\unskip @@ -264,18 +268,20 @@ \NewDocumentCommand{\inln}{m m O{inline}}{\- \stepcounter{codeOutput}\unskip \unskip\setvalue{\tmpname}{tmp/\jobname_inln\thecodeOutput}\unskip\unskip\unskip - \IfBeginWith{#2}{```}{\ifruncode\immediate\write18{#1 > \tmpname.tex}\unskip\fi} - {\newwrite\tempfile - \immediate\openout\tempfile=\tmpname.txt - \immediate\write\tempfile{#2} - \immediate\closeout\tempfile - \ifruncode - \immediate\write18{#1 \tmpname.txt > \tmpname.tex}\unskip + \ifruncode % cache mode - don't try to run the code, just get the previous results + \IfBeginWith{#2}{```}{\ifruncode\immediate\write18{#1 > \tmpname.tex}\unskip\fi} + {\newwrite\tempfile + \immediate\openout\tempfile=\tmpname.txt + \immediate\write\tempfile{#2} + \immediate\closeout\tempfile + \ifruncode + \immediate\write18{#1 \tmpname.txt > \tmpname.tex}\unskip \fi} + \fi % end cache mode \IfFileExists{\tmpname.tex} {\checkZeroBytes{\tmpname.tex}\unskip \ifstrequal{#3}{vbox} - {\begin{tcolorbox} + {\begin{tcolorbox}[colframe=blue!25,colback=blue!10] \ifminted\unskip \inputminted[fontsize=\footnotesize,breaklines=true]{text}{\tmpname.tex}\unskip \else\unskip |