diff --git a/doc/robust-externalize.pdf b/doc/robust-externalize.pdf index a4f24f0..4eca1da 100644 Binary files a/doc/robust-externalize.pdf and b/doc/robust-externalize.pdf differ diff --git a/doc/robust-externalize.tex b/doc/robust-externalize.tex index 475a909..d62f50d 100644 --- a/doc/robust-externalize.tex +++ b/doc/robust-externalize.tex @@ -105,7 +105,7 @@ {\Large\bfseries Cache anything (\tikzname, tikz-cd, python…),\\in a robust, efficient and pure way.} \vspace{1em} - {Léo Colisson \quad Version 2.5+unstable}\\[3mm] + {Léo Colisson \quad Version 2.6}\\[3mm] {\href{https://github.com/leo-colisson/robust-externalize}{\texttt{github.com/leo-colisson/robust-externalize}}} \end{center} @@ -2074,10 +2074,12 @@ \subsubsection{Setting a value to a placeholder} do not remove leading spaces, python \end{verbatim} Since |remove leading spaces if not disabled| is enabled by default on python, it is therefore fine to indent your python code like in: +\begin{codeAndResult} \begin{CacheMeCode}{python print code and result} for i in range(3): print(f"Hello {i}") \end{CacheMeCode} +\end{codeAndResult} \end{pgfmanualentry} \begin{pgfmanualentry} @@ -3944,7 +3946,7 @@ \subsubsection{Python} \end{CacheMeCode} \end{codeAndResult} -\textbf{Importantly: you do not want to indent the whole content of CacheMeCode, or the spaces will also appear in the final code.} +Note that if you use a version before 2.6, you cannot indent further the python code (i.e.\ the first line must not start with any space). This is fixed in 2.6 with the addition of |remove leading spaces if not disabled| in the python preset by default, that will remove automatically any unnecessary indentation. If you use automatic indentation in your text editor, you might also like to use |remove spaces until| so that automatically indenting your whole document does not ruin the indentation of the python code. You can also generate some images. This code will produce the image in \cref{fig:pythonGeneratedImage2}: \begin{codeexample}[code only] @@ -4909,7 +4911,7 @@ \section{TODO and known bugs:} \section{Changelog} \begin{itemize} -\item v2.6 (current master branch, not yet released): +\item v2.6: \begin{itemize} \item Added |\lenToCmNoUnit| \item Added |\placeholderPrependAllLines| and alike diff --git a/robust-externalize.sty b/robust-externalize.sty index b4c4630..488cbb7 100644 --- a/robust-externalize.sty +++ b/robust-externalize.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{robust-externalize}[2.5+unstable Cache anything (tikz, latex, python) in a robust, efficient and pure way.] +\ProvidesPackage{robust-externalize}[2.6 Cache anything (tikz, latex, python) in a robust, efficient and pure way.] % todo: % change order argument replace from list, it is hard to read this way