
В коде ниже мне нужна только строкаТекст здесь...чтобы он оставался в выводе, когда я комментирую строку \articlehistory{Physics}{07/06/2022}{28/06/2022}
. Как это сделать?
\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}
решение1
Вы хотите
\ifx\@empty\accepted
так как это три внутренние команды, которые имеют условное определение,
\ifx\@empty\articlehistory
всегда ложно, так как \articlehistory
имеет фиксированное непустое определение