maieul / biblatex-source-division Goto Github PK
View Code? Open in Web Editor NEWManage source-division with biblatex
Manage source-division with biblatex
When using \volcite
, the volcitepages
field still contains the source division.
It would be more consistent to remove the source-division as you do with the postnote
when using \cite
.
\documentclass{article}
\begin{filecontents}[overwrite]{\jobname.bib}
@misc{test,
author = {Author},
title = {Title},
date = {2020}
}
\end{filecontents}
\usepackage{xcolor}
\usepackage{parskip}
\usepackage[style=verbose]{biblatex}
\usepackage{biblatex-source-division}
\addbibresource{\jobname.bib}
\DeclareFieldFormat{titleaddon}{\textcolor{blue}{#1}}
\DeclareFieldFormat{volcitevolume}{#1}
\DeclareFieldFormat{volcitepages}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareBibliographyDriver{misc}{%
\usebibmacro{author}%
\newunit
\usebibmacro{title}%
\newunit
\usebibmacro{date}%
\setunit{\newunitpunct\newline}%
\printtext{\color{red}{\printfield{postnote}}}%
\setunit{\newunitpunct\newline}%
\printtext{\color{brown}{\printfield{volcitevolume}}}%
\setunit{\newunitpunct\newline}%
\printtext{\color{purple}{\printfield{volcitepages}}}%
}
\renewbibmacro*{postnote}{}
\pagestyle{empty}
\begin{document}
\cite[postnote]{test}
\citereset
\cite[(source-division)postnote]{test}
\citereset
\volcite{volcitevolume}[volcitepages]{test}
\citereset
\volcite{volcitevolume}[(source-division)volcitepages]{test}
\end{document}
This came up in https://tex.stackexchange.com/q/390366/35864
Consider
\documentclass{article}
\usepackage[style=verbose-trad1, backend=biber, ibidpage]{biblatex}
\usepackage{biblatex-source-division}
\renewcommand*\newunitpunct{\addcomma\space}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite[3]{sigfridsson}
\cite[3]{sigfridsson}
\end{document}
The second citation comes out with a spurious comma for me:
ibid.,
I think I have narrowed this down to
biblatex-source-division/biblatex-source-division.sty
Lines 42 to 53 in 0b7d7c6
\titleaddon
to be empty. Then \restorefield{titleaddon}{\titleaddon}
makes titleaddon
an empty field. Note that while the field is empty, it is not undefined (\iffieldundef{titleaddon}
is false). Now biblatex
has little guards against empty fields (it checks for undefined fields and empty field formats, but not if the field itself is empty, presumably because Biber does not pass empty fields on). \printfield{titleaddon}
in this case will print nothing, but it will trigger the punctuation tracker to act as though something was printed. This is why we get to see the comma.\DeclareFieldFormat{titleaddon}{\mkbibparens{#1}}
\AtEveryCitekey{\printfield[parens]{foo}}
to the MWE the first line will cause an empty pair of parentheses to occur, while the second does nothing.
I could fix this temporarily by adding \ifdefempty{\titleaddon}
checks, but that might not be the best solution.
BTW: Maybe you could give the macros \titleaddon
and \postnote
a more private name like \blxsd@titleaddon
and \blxsd@postnote
where blxsd
stands for biblatex-source-division
. That avoids name clashes
Hello, I have seen your package and it seems to me to be very useful, but I can`t that in an appointment of the same author, the same book but different paragraph it appears in the footnote.
For example:
In number 4 i need do mention at book 1, 20. But how you can see is not possible, you know any form of do it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.