You can switch on and off the cite tracker feature with \citetrackertrue
and \citetrackerfalse
commands. A second option is to use \mancite
(to be used in the same context where the manual citation appears); \mancite
also execute the hook defined with \OnManualCitation
. The third option is to use \citereset
(it reset all subsequent citations), and there is a global option with the same name taking a document subdivision (e.g., part
, chapter
,...) as its argument.
\documentclass[10pt]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{first,
title = {First Title},
author = {Author, Author},
journal = {Journal title},
pages = {10-11},
year = 2015,
}
@book{second,
title = {Second Title},
author = {Duthor, Duthor},
year = 2015,
}
\end{filecontents}
\usepackage[style=authoryear-icomp]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\autocite{first}
\autocite{second}
\smallskip
\verb|\citetrackerfalse/\citertrackertrue|
\citetrackerfalse
\autocite{second}
\citetrackertrue
\autocite{second}
\smallskip
\verb|\mancite|
\begingroup\mancite
\autocite{second}
\endgroup
\smallskip
\verb|\citereset|
\citereset
\autocite{second}
\printbibliography
\end{document}
![enter image description here](https://i.stack.imgur.com/e3EQx.png)
biblatex
also provides a pagetracker
option whose possible values are true
, false
, page
and spread
for the case of a repeated citation in a new page.
I don't think that currently there is a good solution. But I will try to explain some background. In your example the wanted output looks obvious as your two bibliographies don't overlap. But this doesn't need to be the case. In different refcontexts entries can be repeated. So lets look what happens if you remove the filters:
\documentclass{article}
\usepackage[style=numeric, sorting=none, backend=biber]{biblatex}
\addbibresource{ref.bib}
\pagestyle{empty}
\begin{document}
This is my first publication : \cite{Pub1}
These are not my publications: \cite{Nopub1,Nopub2}
This is my second publication: \cite{Pub2}
\printbibliography[title=Not my papers]
\newrefcontext[sorting=nty]
This is my first publication: \cite{Pub1}
These are not my publications: \cite{Nopub1,Nopub2}
This is my second publication: \cite{Pub2}
\printbibliography[prefixnumbers=R,title=My papers]
\end{document}
![enter image description here](https://i.stack.imgur.com/gc5G4.png)
As you can see every bibentry has two labels and biblatex has to choose which one to use. Sensibly it uses for the first block of cites the labels from the first (default) refcontext, and for the second block the labels from the second block.
This explains why you get zeros: In the first block the cites don't have a label and biblatex has no chance to guess that you want a label from another refcontext as fallback -- after all there could be more than one suitable label.
The label biblatex will use for a cite depends on the current value of \blx@refcontext@sorting
. So you can locally force biblatex to use labels from another refcontext by doing
{
\makeatletter\def\blx@refcontext@sorting{nty}
These are not my publications: \cite{Nopub1,Nopub2}
}
Then you can get something like this:
![enter image description here](https://i.stack.imgur.com/U85C3.png)
But this solution wouldn't work for mixed cites like \cite{Nopub1,pub1}
. And the "logical" solution
\AtEveryCitekey{\ifkeyword{puplication}{}{\def\blx@refcontext@sorting{nty}}}
doesn't work either as the code for refcontext is executed before \AtEveryCitekey can kick in. So probably you will have to make a feature request ...
Edit
You could try this. But be warned: It is a hack, and it is quite possible that it confuse biblatex. So test and check carefully with more data.
\documentclass{article}
\usepackage[style=numeric, sorting=none, defernumbers, backend=biber]{biblatex}
\addbibresource{ref.bib}
\pagestyle{empty}
\makeatletter
\AtEveryCitekey{\ifkeyword{publication}{}{\def\blx@refcontext@sorting{nty}%
\csname blx@data@\the \c@refsection @\blx@refcontext@sorting @\abx@field@entrykey\endcsname}}
\makeatother
\begin{document}
This is my first publication : \cite{Pub1}
These are not my publications: \cite{Nopub1,Nopub2}
This is my second publication: \cite{Pub2}
\printbibliography[keyword=publication, prefixnumbers=R, title=My papers]
\begin{refcontext}[sorting=nty]
\printbibliography[notkeyword=publication, prefixnumbers=, title=Not my papers]
\end{refcontext}
\end{document}
Best Answer
Looking at
biblatex-examples.bib
, I see that the field is used aswhereas other 'language' fields also show items such as
I'd therefore suggest that you use either
lang<key>
or<literal>
, so in your case eitherlanglatin
orLatin
would be correct.(The idea is that
langlatin
is picked up automatically to be replaced by whatever has been defined as the 'localised' string here. On the other hand 'Latin' is treated as a literal and is typeset as-is.)