texlive[59885] Master: texsurgery (9jul21)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 9 21:59:58 CEST 2021


Revision: 59885
          http://tug.org/svn/texlive?view=revision&revision=59885
Author:   karl
Date:     2021-07-09 21:59:58 +0200 (Fri, 09 Jul 2021)
Log Message:
-----------
texsurgery (9jul21)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/texsurgery/
    trunk/Master/texmf-dist/doc/latex/texsurgery/README.md
    trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf
    trunk/Master/texmf-dist/tex/latex/texsurgery/
    trunk/Master/texmf-dist/tex/latex/texsurgery/texsurgery.sty
    trunk/Master/tlpkg/tlpsrc/texsurgery.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/texsurgery/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texsurgery/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/texsurgery/README.md	2021-07-09 19:59:58 UTC (rev 59885)
@@ -0,0 +1,27 @@
+# TexSurgery
+
+This tex package is a companion to the `texsurgery` `python` project:
+
+[https://framagit.org/pang/texsurgery](https://framagit.org/pang/texsurgery)
+
+This `LaTeX` library will make sure that
+
+`pdflatex document.tex`
+
+will work, with reasonable defaults, for a document that is intended to work with `texsurgery`, and also has other uses, always in tandem with the `texsurgery` `pypi` package.
+
+However, remember that `texsurgery` is a `python` project whose main focus is on __evaluating code inside a `jupyter` kernel__, and this is _only_ achieved by installing the `python` package and calling the `texsurgery` command
+
+`texsurgery -pdf document.tex`
+
+## License
+
+The `texsurgery` `CTAN` package follows a [BSD license])(https://opensource.org/licenses/BSD-3-Clause), the same license as the `texsurgery` `python` project:
+
+[https://framagit.org/pang/texsurgery/-/blob/master/LICENSE](https://framagit.org/pang/texsurgery/-/blob/master/LICENSE)
+
+## texsurgery.pdf
+
+The file `texsurgery.pdf` in the texsurgery CTAN LaTeX package was generated with the command
+
+`pandoc README.md -o texsurgery.pdf`


Property changes on: trunk/Master/texmf-dist/doc/latex/texsurgery/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf	2021-07-09 19:59:07 UTC (rev 59884)
+++ trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf	2021-07-09 19:59:58 UTC (rev 59885)

Property changes on: trunk/Master/texmf-dist/doc/latex/texsurgery/texsurgery.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/texsurgery/texsurgery.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texsurgery/texsurgery.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/texsurgery/texsurgery.sty	2021-07-09 19:59:58 UTC (rev 59885)
@@ -0,0 +1,166 @@
+% TeXsurgery v 0.6.0
+%
+% This tex package is a companion to the `texsurgery` `python` project:
+%
+% https://framagit.org/pang/texsurgery
+%
+% This `LaTeX` library will make sure that
+%
+% `pdflatex document.tex`
+%
+% will work, with reasonable defaults, for a document that is intended to work with `texsurgery`, and also has other uses, always in tandem with the `texsurgery` `pypi` package.
+%
+% However, remember that `texsurgery` is a `python` project whose main focus is on __evaluating code inside a `jupyter` kernel__, and this is _only_ achieved by installing the `python` package and calling the `texsurgery` command
+%
+% `texsurgery -pdf document.tex`
+%
+% Both the texsurgery python package and the TexSurgery CTAN package are distributed under a BSD license.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{texsurgery}[2021/07/09 TeXsurgery package v0.6.0]
+
+\RequirePackage{verbatim}
+\RequirePackage{listings}
+\RequirePackage{xcolor}
+\RequirePackage{environ}
+\RequirePackage{hyperref}
+
+% \RequirePackage{imakeidx}
+% \RequirePackage{xstring}
+% \RequirePackage{xcolor}
+% \definecolor{greycolour}{HTML}{525252}
+% \definecolor{sharelatexcolour}{HTML}{882B21}
+% \definecolor{mybluecolour}{HTML}{394773}
+% \newcommand{\wordcolour}{greycolour}
+
+% \DeclareOption{red}{\renewcommand{\wordcolour}{sharelatexcolour}}
+% \DeclareOption{blue}{\renewcommand{\wordcolour}{mybluecolour}}
+
+
+\definecolor{codegreen}{rgb}{0,0.6,0}
+\definecolor{codegray}{rgb}{0.5,0.5,0.5}
+\definecolor{codepurple}{rgb}{0.58,0,0.82}
+\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
+
+\lstdefinestyle{TSstyle}{
+    backgroundcolor=\color{backcolour},
+    commentstyle=\color{codegreen},
+    keywordstyle=\color{magenta},
+    numberstyle=\tiny\color{codegray},
+    stringstyle=\color{codepurple},
+    basicstyle=\ttfamily,
+    breakatwhitespace=false,
+    breaklines=true,
+    captionpos=b,
+    keepspaces=true,
+    numbers=left,
+    numbersep=5pt,
+    showspaces=false,
+    showstringspaces=false,
+    showtabs=false,
+    tabsize=2
+}
+\lstalias{python}{Python}
+\lstalias{sage}{Python}
+% \lstset{style=TSstyle}
+
+
+% Counters
+\newcounter{TSeval}
+\newcounter{TSrun}
+\newcounter{TSrunsilent}
+
+% Boolean Options
+\newif\if at showcode
+\@showcodefalse
+\newif\if at noinstructions
+\@noinstructionsfalse
+
+
+\DeclareOption*{%
+    \lstalias{\CurrentOption}{Python} %sets Python highlight code as highlight by default for unrecognized kernels.
+    \PackageWarningNoLine{texsurgery}{‘\CurrentOption’ declared as a jupyter kernel}%
+    }
+\DeclareOption{showcode} {%
+    \@showcodetrue
+}%
+\DeclareOption{noinstructions} {%
+    \@noinstructionstrue
+}
+\ProcessOptions\relax
+
+
+
+%% Instructions warning
+\if at noinstructions
+   %
+\else
+    \AtBeginDocument{
+    \fbox{
+    \begin{minipage}{0.9\linewidth}
+        WARNING: TexSurgery is NOT intended to be a LaTeX package to show your code, but instead a Python module who replaces some commands and environments within a TeX document by evaluating code inside a jupyter kernel.
+\\    %
+        In order to achieve this goal, it is not enough to install the texsurgery LaTeX package and run \texttt{pdflatex document.tex}.
+        You must %
+    \begin{center}
+      \texttt{pip install texsurgery}
+    \end{center}
+        and the jupyter kernel for the language that you intend to use, and use the command \texttt{texsurgery document.tex}.
+    \\%
+        More info: \url{https://framagit.org/pang/texsurgery}.
+      \end{minipage}
+    }
+    \vspace{1cm}%
+    \\
+    }
+   \PackageWarningNoLine{texsurgery}{%
+##########
+    WARNING: TexSurgery is NOT intended to be a LaTeX package to show your code, but instead a Python module who replaces some commands and environments within a TeX document by evaluating code inside a jupyter kernel.
+%
+    In order to achieve this goal, it is not enough to install the texsurgery LaTeX package.
+    You must `pip install texsurgery` and the jupyter kernel for the language that you intend to use.
+%
+    More info: https://framagit.org/pang/texsurgery.
+##########
+    }%
+\fi
+
+%% SHOWCODE
+\if at showcode
+   \lstnewenvironment{run}[1][python]{%
+        \refstepcounter{TSrun}%
+        \lstset{language=#1, style=TSstyle, frame=single, title={\tt runblock\theTSrun.#1}}%
+        \medskip%
+    }{}
+    \lstnewenvironment{runsilent}[1][python]{%
+        \refstepcounter{TSrunsilent}%
+        \lstset{language=#1, style=TSstyle, frame=single, title={\tt runsilentblock\theTSrunsilent.#1}}%
+        \medskip%
+    }{}
+    \newcommand{\lstinlinesafe}{\lstinline[style=TSstyle]}
+    \newcommand{\eval}[2][]{{\hbox{\lstinlinesafe{#2}}}}
+%     \newcommand{\eval}[2][python]{%
+%         \refstepcounter{TSeval}%
+%         {\hbox{\lstinlinesafe[language=#1]{#2}}}
+%     }%
+    \newcommand{\sage}[1]{%
+        \eval{#1}%
+    }%
+\else
+   \NewEnviron{run}[1][python]{%
+   \refstepcounter{TSrun}%
+   \begin{center}\fbox{\ttfamily runblock\theTSrun.#1}\end{center}%
+   }%
+   \NewEnviron{runsilent}[1][python]{%
+   \refstepcounter{TSrunsilent}%
+   \begin{center}\fbox{\ttfamily runsilentblock\theTSrunsilent.#1}\end{center}%
+   }%
+   \newcommand{\eval}[2][python]{%
+    \refstepcounter{TSeval}%
+    \hbox{\fbox{\ttfamily evalcode\theTSeval.#1}}%
+   }%
+   \newcommand{\sage}[1]{%
+    \refstepcounter{TSeval}%
+    \eval[sagemath]{#1}%
+    }%
+\fi


Property changes on: trunk/Master/texmf-dist/tex/latex/texsurgery/texsurgery.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-09 19:59:07 UTC (rev 59884)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-09 19:59:58 UTC (rev 59885)
@@ -749,7 +749,7 @@
     texdate texdef texdiff texdimens texdirflatten texdoc texdraw
     texfot texilikechaps texilikecover
     texliveonfly texloganalyser texlogos texmate texments texnegar
-    texonly texosquery texplate texpower texproposal texshade
+    texonly texosquery texplate texpower texproposal texshade texsurgery
     textualicomma texvc
     textcase textfit textglos textgreek textmerg textopo textpath textpos
     tfrupee thaienum thaispec thalie

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2021-07-09 19:59:07 UTC (rev 59884)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2021-07-09 19:59:58 UTC (rev 59885)
@@ -1226,6 +1226,7 @@
 depend texments
 depend texpower
 depend texshade
+depend texsurgery
 depend textfit
 depend textmerg
 depend textpos

Added: trunk/Master/tlpkg/tlpsrc/texsurgery.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.