Giter Club home page Giter Club logo

biblatex-source-division's People

Contributors

maieul avatar

Watchers

 avatar  avatar

Forkers

dcpurton

biblatex-source-division's Issues

source-division isn't removed from volcitepages field

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.

MWE

\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}

tex210

I need in the second mention obtain the number of book and paragraf

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:
captura de pantalla 2015-07-07 a las 16 56 02In 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?

Spurious unit punctuation with empty sourcedivison

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

\newbibmacro{getsourcedivision}{%
\iffieldundef{postnote}{}{%
\global\undef\volpostnote%
\usefield{\getsourcedivision@}{postnote}%
\ifboolexpr{test {\iffieldundef{maintitle}} or test{\ifdefstring{\biblatexsourcedivision@after}{title}}}%
{\restorefield{titleaddon}{\titleaddon}}
{\restorefield{maintitleaddon}{\titleaddon}}%
\ifdefempty{\postnote}%
{\clearfield{postnote}}%
{\restorefield{postnote}{\postnote}}%
}%
}

The problem only occurs if no source division is given in the postnote argument. This causes \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.
You can see the difference between an empty field and an undefined field if you add

\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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.