Okay. So using this example as a template, I'd like to do the following:
- define a general-purpose \loc macro that can be invoked in the main text (i.e., outside of citations) in the usual way; this one would correspond to \WhateverB above and would not remove punctuation preceding the macro.
- separately define a \loctextloc macro that accepts the same input as \loc, but conditionally removes preceding punctuation based on variables set outside of this macro during the citation process (e.g., \btxsblshorthandbeforetextloc); this would correspond to \WhateverA above.
- in the macro for typesetting the loctext btx parameter, redefine \loc to do what \loctextloc does, and then invoke \currentbtxloctext so that the \loc invocations it contains will be expanded like \loctextloc, as follows:
\begingroup
\def\loc\loctextloc
\currentbtxloctext
\btxcomma
\endgroup
Is this a ConTeXt-friendly way to do this? I'm attempted this now, but I have some errors to debug, and I'd like to know if this is even a feasible direction before I continue.
Joey