I would like to edit a custom cite command to check whether or not a prenote is specified.
At the moment, it looks like this:
\DeclareCiteCommand{\MyCommand}
{
\usebibmacro{prenote} %
}
{
some stuff %
}
{}
{
\usebibmacro{postnote} %
\adddot %
}
Is it possible to check the presence of an argument and change the precode accordingly? Like print A if there is no argument and B if an argument is specified.
I have a second problem related to this: when I use \MyCommand[argument]{resource}, the argument gets printed at the end of the command just before the dot, as a postnote. Is there a way to force LaTeX to consider that a single argument should be considered as a prenote and thus printed at the beginning?

setunit? Is there a way to consider a single argument as prenote? – Dunno Jul 12 '23 at 10:34\setunitwe make use ofbiblatex's punctuation tracker, which means that undesirable double punctuation and punctuation clashes are avoided. See for example https://tex.stackexchange.com/q/409148/35864. – moewe Jul 12 '23 at 21:04biblatextreat a single argument asprenote(without messing with the internal implementation of the cite commands, at least). A single argument is considered apostnote. But you can test if there is a postnote and no prenote and just pretend it is a prenote in that case. If you need help with that open a new question (preferably with a usable example document and a precise description of what you want to achieve). – moewe Jul 12 '23 at 21:07