
Im folgenden Code möchte ich nur die ZeileText kommt hier hin...in der Ausgabe zu bleiben, wenn ich die Zeile kommentiere \articlehistory{Physics}{07/06/2022}{28/06/2022}
. Wie mache ich das?
\documentclass{article}
\newcommand{\articlehistory}[3]{%
\def\type{#1}%
\def\recieved{#2}%
\def\accepted{#3}%
}
\makeatletter
\let\type=\@empty
\let\recieved=\@empty
\let\accepted=\@empty
\def\@setarticlehistory{%
Article type: \type;
Recieved: \recieved;
Accepted: \accepted.
}
\makeatother
\articlehistory{Physics}{07/06/2022}{28/06/2022}
\begin{document}
Text goes here...
\makeatletter
\ifx\@empty\articlehistory\else\@setarticlehistory\fi
\makeatother
\end{document}
Antwort1
Sie wollen
\ifx\@empty\accepted
da es sich bei den drei inneren Befehlen um bedingte Definitionen handelt,
\ifx\@empty\articlehistory
ist immer falsch, da \articlehistory
es eine feste, nicht leere Definition hat