Open jjmccollum opened 3 years ago
As we might expect, this works fine if we make \btx_sbl_previousinlinetag
a global variable via
\setxvariables[btx:sbl][previousinlinetag=\empty]
initially, and
\setxvariables[btx:sbl][previousinlinetag=\currentbtxtag]
at the end of each inline
or short
citation. Then we just have to retrive the variable via the getvariable{btx:sbl}{previousinlinetag}
command.
So I should be able to close this issue. But is it a bad idea to use global variables here? And why does the local variable \btx_sbl_previousinlinetag
(whose scope should be the scope of the entire specification) get reset each time \cite
is invoked?
As said on the mailing list: you might want to make sure that references in the notes and in the body text don't interfere with each other.
And, while you're at it: Commands like biblatex's \mancite
might be a good idea. (But, of course, all of this can come later...)
Oh, and one thing to think about: some of this should maybe be standardized. As I've said before, users should be able to switch styles without to much hassle...
We should avoid any interference between list and in-text entries, as the ibid. and idem checks are only done in the btx:sbl:inline
and btx:sbl:short
setups, while list entries are always printed using the btx:sbl:list
setups.
If I understand correctly, \mancite
should just reset the previousinlinetag
variable to be empty and then call \cite
, correct?
My hope is that Hans (or others on the ConTeXt development team) will implement a general macro (probably in publ-ini.lua
and publ-ini.mkiv
) for retrieving the last entry referenced. (That was my hope when I sent the e-mail to the mailing list, anyway.) That way, I can switch to using that macro in publ-imp-sbl.mkvi
, and other specifications that allow for ibid. and idem substitutions can implement them using the same rule. My main concern is the SBL specification, so I intend to leave those implementations to others.
We should avoid any interference between list and in-text entries, as the ibid. and idem checks are only done in the
btx:sbl:inline
andbtx:sbl:short
setups, while list entries are always printed using thebtx:sbl:list
setups.
As per my message on the list, this isn't about list vs notes. Consider just this :
\cite[alternative=inline][doe]
\footnote{\cite[alternative=inline][foo]}
\cite[alternative=inline][doe]
The citation in the footnote should not interupt the ibid-tracking in this case. The second doe-citation should trigger the ibid-mechanism. But:
\cite[alternative=inline][doe]
\footnote{\cite[alternative=inline][foo]}
\cite[alternative=inline][foo]
In this case, you wouldn’t want an ibid. for the foo-citation outside of the footnote.
As it turns out, ConTeXt has a mode for checking whether you're in a footnote or not: \doifmodeelse{*footnote}
If I understand correctly,
\mancite
should just reset thepreviousinlinetag
variable to be empty and then call\cite
, correct?
\mancite
won't call \cite
; it just resets the "last citation" variable. It's intended for cases where you mix automatic citations with manual citations. Say, you have this:
A sentence with a citation \cite[doe]. A sentence with a manual citation, e.g. to the Bible (Gen 1:1). Another sentence with a citation \cite[doe].
The second doe citation will result in an incorrect "ibid.", but a \mancite could suppress it.
A sentence with a citation \cite[doe]. A sentence with a manual citation, e.g. to the Bible \mancite(Gen 1:1). Another sentence with a citation \cite[doe].
To make things more complex: Have a look at the options for biblatex's ibidtracker (manual p. 64):
ibidtracker=true, false, context, strict, constrict default: false
This option controls the ‘ibidem’ tracker which is required by the \ifciteibid test from § 4.6.2. The possible choices are:
true Enable the tracker in global mode.
false Disable the tracker.
context Enable the tracker in context-sensitive mode. In this mode, citations in footnotes and in the body text are tracked separately.
strict Enable the tracker in strict mode. In this mode, potentially ambiguous references are suppressed. A reference is considered ambiguous if either the current citation (the one including the ‘ibidem’) or the previous citation (the one the ‘ibidem’ refers to) consists of a list of references.
constrict This mode combines the features of context and strict . It also keeps track of footnote numbers and detects potentially ambiguous references in footnotes in a stricter way than the strict option. In addition to the conditions imposed by the strict option, areference in a footnote will only be considered as unambiguous if the current citation and the previous citation are given in the same footnote or in immediately consecutive footnotes.
In my experience, one will mostly want to use "constrict".
Anyway, these are probably things that should be provided by publ-ini.mkiv
.
Ah, I see. So \mancite
just resets the previously cited tag field (in the text/footnote environment in which it is invoked) and then prints its input as-is.
I agree that all of this tracking should be implemented in publ-ini.mkiv
. Between this and the various options available for ibid tracking, I think you may want to add this to the "Ibid. and idem support for bibliographies (and variable scope more generally)" e-mail thread on the ConTeXt mailing list, since somebody other than me may end up implementing it.
Ah, I see. So
\mancite
just resets the previously cited tag field (in the text/footnote environment in which it is invoked) and then prints its input as-is.
Actually, in biblatex it doesn't print anything. All it does is really just resetting the "previously cited tag field".
Oh, right! I read your example \mancite(Gen 1:1)
too quickly and thought that Gen 1:1
was in braces, not parentheses. So \mancite
doesn't expect an argument at all.
Another useful addition: useidem and useibid should have a parameters like perpage, persection etc. Or a way to reset ibid after certain boundaries (paragraphs, pages, sections).
Agreed. My hope is that Hans or Alan could implement this through common helper functions in publ-ini.lua
or publ-ini.mkiv
.
Ibid. (shorthand for a subsequent in-text citation of the last source cited in the text) and idem (shorthand for an author identical to the last author cited in the text) should be supported as optional citation style parameters. I suggest using the argument names
useibid
anduseidem
, followingbiblatex-sbl
. These should be added tomult-def.lua
as language-dependent parameter names as follows:(I have only added their English names at this time). They should default to
no
inpubl-imp-sbl.mkvi
:They can be set by the user using the
\setupbtx
command:Ideally, we would then use a similar setup to the one used by Chicago (and inherited by SBL) to handle the same author in subsequent list entries, using the
\btxdoifsameaspreviouselse
macro. Unfortunately, the\btxdoifsameaspreviouselse
macro only works in the bibliographic list, as it uses existing indices in the list to determine what the "previous" entry is. For inline citations, we do not have such a structure that we can query. I have attempted to accomplish the desired functionality using a variable that is updated each time aninline
orshort
citation is invoked, as follows:But this doesn't work. The
\btx_sbl_previousinlinetag
macro appears to revert to\empty
each time I make a new citation.