Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt short verb usages #1269

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/generic/pgf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

- Typo fixes in the manual
- Simplify short verb `|...|` or add required preamble for it

### Contributors

Expand Down
2 changes: 1 addition & 1 deletion doc/generic/pgf/pgfmanual-en-base-shadings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ \subsubsection{General (Functional) Shadings}
defined, which store the individual components of \meta{color name}.
These can also be used in the \meta{type 4 function} argument.
%
\begin{codeexample}[]
\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}]
\pgfshadecolortorgb{orange}{\mycol}
|\mycol|=\mycol |\mycolred|=\mycolred |\mycolgreen|=\mycolgreen |\mycolblue|=\mycolblue
\end{codeexample}
Expand Down
10 changes: 5 additions & 5 deletions doc/generic/pgf/pgfmanual-en-pgfkeys.tex
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,12 @@ \subsubsection{Keys That Execute Commands}
``\meta{text}|+|\meta{more text}'' and wishes to store \meta{text} and
\meta{more text} in two different macros. This can be achieved as follows:
%
\begin{codeexample}[]
\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}]
\def\mystore#1+#2\pgfeov{\def\a{#1}\def\b{#2}}
\pgfkeyslet{/my key/.@cmd}{\mystore}
\pgfkeys{/my key=hello+world}

|\a| is \a, |\b| is \b.
|\a| is `\a', |\b| is `\b'.
\end{codeexample}

Naturally, defining the code to be stored in a key in the above manner is too
Expand Down Expand Up @@ -604,7 +604,7 @@ \subsubsection{Keys That Execute Commands}
This command works like |\pgfkeysdef|, but it allows you to provide an
arbitrary \meta{argument count} between $0$ and $9$ (inclusive).
%
\begin{codeexample}[]
\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}]
\pgfkeysdefnargs{/my key}{2}{\def\a{#1}\def\b{#2}}
\pgfkeys{/my key=
{hello}
Expand All @@ -624,11 +624,11 @@ \subsubsection{Keys That Execute Commands}
This command works like |\pgfkeysdefnargs|, but it allows you to provide an
arbitrary \meta{argument pattern} rather than just a number of arguments.
%
\begin{codeexample}[]
\begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}]
\pgfkeysdefargs{/my key}{#1+#2}{\def\a{#1}\def\b{#2}}
\pgfkeys{/my key=hello+world}

|\a| is \a, |\b| is \b.
|\a| is `\a', |\b| is `\b'.
\end{codeexample}
%
Note that |\pgfkeysdefnargs| is \emph{better} when it comes to simple
Expand Down
10 changes: 5 additions & 5 deletions doc/generic/pgf/pgfmanual-en-tikz-coordinates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ \subsubsection{Node Coordinate System}
Specifies an anchor of the node. Here is an example:
%
\begin{codeexample}[preamble={\usetikzlibrary{arrows.meta}}]
\begin{tikzpicture}
\node (shape) at (0,2) [draw] {|class Shape|};
\node (rect) at (-2,0) [draw] {|class Rectangle|};
\node (circle) at (2,0) [draw] {|class Circle|};
\node (ellipse) at (6,0) [draw] {|class Ellipse|};
\begin{tikzpicture}[node font=\ttfamily]
\node (shape) at (0,2) [draw] {class Shape};
\node (rect) at (-2,0) [draw] {class Rectangle};
\node (circle) at (2,0) [draw] {class Circle};
\node (ellipse) at (6,0) [draw] {class Ellipse};

\draw (node cs:name=circle,anchor=north) |- (0,1);
\draw (node cs:name=ellipse,anchor=north) |- (0,1);
Expand Down