Is it possible to access a value which is given as a bibliography option. For example if I have
\usepackage[somekey=foobar]{biblatex}
can I get the value (foobar
) of somekey
as a macro like \KV@<family>@somekey
. I tried to find it out and had a look at biblatex.sty
there i found the \define@key
macro which is from keyval.sty
as I know now. My search ended with the macro \KV@blx@opt@pre@autocite{#1}
with which I could change the value but not get it.
As you can guess I’d like to get the value of the autocite
option.
Update
Maybe Joseph is right, so here is want I want: I want to be able to change the behavior of a macro according to the autocite
option. The macro is \quodecite
(see biblatex: Handling secondary ("quoted in") citations) an since this is defined via \DeclareMultiCiteCommand
I can’t use \DeclareAutoCiteCommand
I guess. I could have asked Audrex this in the other question but I thought that I can solve it myself which leads to the question if I can access a key value …
Update 2
At biblatex: Handling secondary ("quoted in") citations Audrey suggested to build a extra command for the other autocite
options, but I’d like to have an automatic solution.
This is the a part code to create the \quotecite
command:
\DeclareMultiCiteCommand{\quotecite}[\cbx@qcwrapper]{\cbx@quotecite}{\cbx@qcdelim}
\newrobustcmd{\cbx@qcwrapper}[1]{%
\global\toggletrue{cbx@isquote}%
\mkbibfootnote{#1}%
\global\togglefalse{cbx@isquote}%
\global\togglefalse{cbx@iflastibid}%
\global\togglefalse{cbx@ifquoteepost}%
\global\togglefalse{cbx@ifquoterpost}}
As on can imagine—and my tests proofed that—the output format (plain, footnote, …) of \quotecite
could easily be change by replacing \mkbibfootnote{#1}
by \mkbibparens{#1}
for example. So my idea is to implement a conditional that takes care about the value of autocite
and for that I need the value of the option.
Something like the following but in real LaTeX certainly would solve the problem I guess.
\newrobustcmd{\cbx@qcwrapper}[1]{%
\global\toggletrue{cbx@isquote}%
if (autocite=footnote)
\mkbibfootnote{#1}%
else if (autocite=parens)
\mkbibparens{#1}
else if (autocite=plain)
#1
else
#1
warning: unkown option of autocite for \quotecite
end if
end if
end if
\global\togglefalse{cbx@isquote}%
\global\togglefalse{cbx@iflastibid}%
\global\togglefalse{cbx@ifquoteepost}%
\global\togglefalse{cbx@ifquoterpost}}
\quotecite
is tailored forverbose-ibid
.verbose-ibid
, like all the verbose styles, is intended for footnote citations. So I'm not sure why anyone would use anything other thanautocite=footnote
. Inline versions of\quotecite
(regardless ofautocite
) might come in handy. My quibbling aside, I think the general question is still useful.