I was making a new document and I have the problem that I still don't know the style of bibliography that will be needed when I have to present it. It could be Vancouver style or APA style. I'm using biblatex because it seems me the most comfortable to use. However, if I use Vancouver style, I have citations like
According to person1 et al. (1) ...text...
Or, maybe, which is a bit more difficult
According to person1 et al. ^1 ...text...
which I could get just doing
According to \citeauthor{person1} \cite{person1} ...text...
According to \citeauthor{person1} \supercite{person1} ...text...
But if I change in biblatex style=apa with the same code above, I would get
According to person1 et al. (person1 et al. 2024) ...text...
Which is redundant and would be:
According to person1 et al. (2024) ...text...
I'd like to make a command that detects if style=vancouver or style=apa in biblatex options and executes a command if the first is true and another if the second is true
My idea was the following
\documentclass{article}
\usepackage[style=vancouver, backend=biber]{biblatex}
\usepackage{etoolbox}
\newif\ifvancouverstyle
\newif\ifapastyle
\ifcsstrequal{blx@bibstyle}{\string vancouver}{
\vancouverstyletrue
}{
\vancouverstylefalse
}
\ifcsstrequal{blx@bibstyle}{\string apa}{
\apastyletrue
}{
\apastylefalse
}
\newcommand{\detectstyle}{%
\ifvancouverstyle
% The action if the style is "vancouver"
This is the Vancouver style.
\fi
\ifapastyle
% The action if style is "apa"
This is APA style.
\fi
}
\begin{document}
\title{Hello}
\author{me}
\maketitle
\detectstyle
\end{document}
For now I don't have idea about how configure this new command or even it's possible get it. However, when I write \detectstyle, nothing is printed.
The arguments are missing for now. I would be very grateful if someone could help me with this.

![Then Sigfridsson and Ryde [1] showed](../../images/3a8c670740efeee4bbca251773c28a08.webp)

\supercite{}command instead\cite{}for Vancouver style so if you know any other way to get it, I would very much appreciate your support. I'll modify my question to include this issue. – Michael Rosales Vilca Mar 09 '24 at 17:10\autocite, which can be set up to generate output like\superciteor\parencitedepending on a simple global switch. – moewe Mar 09 '24 at 17:16\textcitea little as shown in https://tex.stackexchange.com/q/114833/35864. – moewe Mar 09 '24 at 17:21\detectstyleis not working? That still worries me – Michael Rosales Vilca Mar 09 '24 at 18:30\ifcsstrequaldoes and thus your usage of\ifcsstrequalis wrong. Look at section "3.6.1 Macro Tests" of the documentation, "The etoolbox Package", to see what\ifcsstrequaldoes and which command to use instead. – Ulrich Diez Mar 10 '24 at 02:36\ifcsstrequalcompares to the expansion of two cs names ("macro names"), but you want to compare one command to a string, which can be done with\ifdefstringas shown here or with\ifcsstring(where you give the cs name instead). – moewe Mar 10 '24 at 06:35