alt text

Kann man für \pgfmathdeclarefunction{<name>}{<Anzahl Argumente>}{<Inhalt>} ein optionales Argument einstellen?

Ich möchte im Beispiel, dass #1 den Standardwert \Zahl hat und dann ggf. \Plus[3](4).

Öffne in Overleaf
Code, hier editierbar zum Übersetzen:
\documentclass[margin=5mm, varwidth]{standalone}
\usepackage{tikz}
\pgfmathtruncatemacro{\Zahl}{1}
\pgfmathdeclarefunction{Plus}{2}{\pgfmathparse{#1+#2}}
\begin{document}
Test: \pgfmathparse{Plus(1,2)}\pgfmathresult
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gefragt 01 Nov '18, 23:57

cis's gravatar image

cis
9.6k103460491
Akzeptiert-Rate: 29%

bearbeitet 02 Nov '18, 01:42


Öffne in Overleaf
Code, hier editierbar zum Übersetzen:
\documentclass[margin=5mm, varwidth]{standalone}
\usepackage{tikz}
\tikzset{declare function={Plus(\x,\y)=\x+\y;}}
\begin{document}
Test: \pgfmathparse{Plus(1,2)}\pgfmathresult
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Permanenter link

beantwortet 02 Nov '18, 01:19

Community's gravatar image

Community
21
Akzeptiert-Rate: 56%

Deine Antwort
[Vorschau ausblenden]

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Frage-Themen:

×13

gestellte Frage: 01 Nov '18, 23:57

Frage wurde gesehen: 4,126 Mal

zuletzt geändert: 02 Nov '18, 01:42