From f4463f9dda742c736a454b7e8121cd933a9ce3a3 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Tue, 18 Aug 2026 07:59:10 +0200 Subject: [PATCH] fix(manual): use render instead for the colormixin example Signed-off-by: Henri Menke --- doc/generic/pgf/CHANGELOG.md | 1 + doc/generic/pgf/pgfmanual-en-xxcolor.tex | 37 +++++++++++++++++++----- doc/generic/pgf/pgfmanual-test.tex | 2 +- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index 8e5d07127..99adee042 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - `sloped` should consider the current transformation #1058 +- Use `render instead` for the `colormixin` example #1134 ### Changed diff --git a/doc/generic/pgf/pgfmanual-en-xxcolor.tex b/doc/generic/pgf/pgfmanual-en-xxcolor.tex index 46983c9d8..1bc24d1ba 100644 --- a/doc/generic/pgf/pgfmanual-en-xxcolor.tex +++ b/doc/generic/pgf/pgfmanual-en-xxcolor.tex @@ -33,18 +33,41 @@ \section{Extended Color Support} |90!blue| will mix in 10\% of blue into everything, whereas |25!white| will make everything nearly white. % -\begin{codeexample}[width=4cm,preamble={\usepackage{xxcolor}}] +\begin{codeexample}[% + width=4cm, + preamble={\usepackage{xxcolor}}, + % We use render instead with the exact same content here, because the normal + % codeexample is rendered in hmode with \catcode`\^^M=9 which ignores all line + % endings instead of converting them to spaces. Using \catcode`\^^M=10 in + % contrast would correctly convert line endings to spaces, but that leads to + % spurious spaces because of how the example is absorbed token-by-token by the + % renderer. Sigh... + render instead={% + \begin{minipage}{3.5cm}\raggedright + \color{red}Red text, + \begin{colormixin}{25!white} + washed-out red text, + \color{blue}washed-out blue text, + \begin{colormixin}{25!black} + dark washed-out blue text, + \color{green}dark washed-out green text, + \end{colormixin}% + back to washed-out blue text, + \end{colormixin}% + and back to red. + \end{minipage}% + }] \begin{minipage}{3.5cm}\raggedright -\color{red}Red text,% +\color{red}Red text, \begin{colormixin}{25!white} washed-out red text, - \color{blue} washed-out blue text, + \color{blue}washed-out blue text, \begin{colormixin}{25!black} dark washed-out blue text, - \color{green} dark washed-out green text,% - \end{colormixin} - back to washed-out blue text,% -\end{colormixin} + \color{green}dark washed-out green text, + \end{colormixin}% + back to washed-out blue text, +\end{colormixin}% and back to red. \end{minipage}% \end{codeexample} diff --git a/doc/generic/pgf/pgfmanual-test.tex b/doc/generic/pgf/pgfmanual-test.tex index 0a40e2048..65979cc3a 100644 --- a/doc/generic/pgf/pgfmanual-test.tex +++ b/doc/generic/pgf/pgfmanual-test.tex @@ -17,6 +17,6 @@ \begin{document} -\include{pgfmanual-en-pgfkeys} +\include{pgfmanual-en-xxcolor} \end{document}