Based on the questions:
- How to show Not cited and Cited i times on pages ..., in the bibliography when using biblatex?,
- How to detect whether \PassOptionsToPackage was already called?
- How to detect whether the option citecounter was enabled on biblatex?
I build the following example:
But I would like for it to use a dot to separate my new cited entry, instead of using a comma. For example, instead of:
Visited on: 17 Feb. 2018, cited one time on page 1.
I would like to see: ......\/.....
(dot here, not comma)
Visited on: 17 Feb. 2018. Cited one time on page 1.
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@mvbook{assis08,
author = {Machado de Assis},
title = {Obra completa em quatro volumes},
year = {2008},
editor = {Aluizio Leite and Ana Lima Cecilio and Heloisa Jahn},
editortype = {organizer},
edition = {2},
volumes = {4},
publisher = {Nova Fronteira},
location = {Rio de Janeiro},
series = {Biblioteca luso-brasileira. Série brasileira brasileira brasiled},
urlaccessdate = {2018-02-17},
}
@book{koma-scrguien,
author = {Markus Kohm},
edition = {2017-04-13},
howpublished = {\url{http://mirrors.ibiblio.org/CTAN/.../scrguien.pdf}},
publisher = {Online Material; \url{https://www.ctan.org/pkg/koma-script}},
title = {The Guide KOMA -Script},
urlaccessdate = {2017-08-28},
year = {2017},
}
\end{filecontents*}
\PassOptionsToPackage{brazil,main=english,spanish,french}{babel}
\documentclass[12pt,a4paper,english]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\selectlanguage{english}
\usepackage[
style=abnt,repeatfields=true,backend=biber,backref=true,citecounter=true]{biblatex}
\pdfstringdefDisableCommands{\let\uppercase\relax}
\addbibresource{\jobname.bib}
\makeatletter
\newcommand{\biblatexcitedntimes}{\autocap{c}ited \arabic{citecounter} times}
\newcommand{\biblatexcitedonetime}{\autocap{c}ited one time}
\newcommand{\biblatexcitednotimes}{\autocap{n}o citation in the text}
\@ifpackageloaded{babel}{\@ifpackagewith{babel}{brazil}{\addto\captionsbrazil{%
\renewcommand{\biblatexcitedntimes}{\autocap{c}itado \arabic{citecounter} vezes}
\renewcommand{\biblatexcitedonetime}{\autocap{c}itado uma vez}
\renewcommand{\biblatexcitednotimes}{\autocap{n}enhuma citação no texto}
}}{}}{}
\makeatother
\ifx\blx@citecounter\relax
\message{Is citecounter defined? NO!^^J}
\else
\message{Is citecounter defined? YES!^^J}
\ifbacktracker
\message{Is backtracker defined? YES!^^J}
\renewbibmacro*{pageref}
{
\iflistundef{pageref}
{\printtext{\biblatexcitednotimes}}
{%
\printtext
{%
\ifnumgreater{\value{citecounter}}{1}
{\biblatexcitedntimes}
{\biblatexcitedonetime}
}%
\setunit{\addspace}%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}%
}%
}
\DefineBibliographyStrings{brazil}
{
backrefpage = {na página},
backrefpages = {nas páginas},
}
\DefineBibliographyStrings{english}
{
backrefpage = {on page},
backrefpages = {on pages},
}
\else
\message{Is backtracker defined? NO!^^J}
\fi
\fi
\begin{document}
Citing \cite{assis08}.
Citing \cite{koma-scrguien}.
\printbibliography
\end{document}
Related questions: