Coder Social home page Coder Social logo

Comments (7)

plk avatar plk commented on July 19, 2024

@moewew - we already have the mechanism for this with the citecounter option. I wonder if we should change the verbose styles to use this mechanism to implement this as I can't see anyone wanting this to appear where there is only one citation?

from biblatex.

moewew avatar moewew commented on July 19, 2024

Exactly, on TeX.SX there are https://tex.stackexchange.com/q/12679/35864, https://tex.stackexchange.com/q/325159/35864, https://tex.stackexchange.com/q/73753/35864, https://tex.stackexchange.com/q/517306/35864 all using citecounter.

I can see that it would make sense to default to not printing the citedas if there are no further mentions of the work. But then we would have to buy into the overhead of activating citecounter by default. And we may or may not run into trouble with people printing lists of shorthands (because that would have to be filtered as well).

from biblatex.

plk avatar plk commented on July 19, 2024

For the overhead, I think that's alright in a verbose style. But I'm not sure what you mean with the filter?

from biblatex.

moewew avatar moewew commented on July 19, 2024

I meant that the following MWE will not use the shorthand "KU" for kant:ku anywhere in citations, yet will still list it in the list of shorthands

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=verbose, citecounter]{biblatex}

\renewbibmacro*{shorthandintro}{%
  \ifnumgreater{\value{citecounter}}{1}
    {\iffieldundef{shorthandintro}
       {\iffieldundef{shorthand}
          {}
          {\setunit{\addspace}%
           \printtext[parens]{%
             \bibstring{citedas}\space
             \printfield{shorthand}}}}
       {\setunit{\addspace}%
        \printtext[parens]{\printfield{shorthandintro}}}}
    {}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{kant:kpv}
ipsum \autocite{kant:ku}
dolor \autocite{kant:kpv}

\printbibliography

\printshorthands
\end{document}

from biblatex.

matteofg avatar matteofg commented on July 19, 2024

And what should be done for the shorthand list? Would it be possible to intervene there too?

from biblatex.

plk avatar plk commented on July 19, 2024

We would have to alter \printbiblist and \printbibliography so that a bibcheck called, say "default" was used for the check argument, even if not specified, to allow verbose styles to define a default check which would ignore shorthands with less than two citations.

from biblatex.

plk avatar plk commented on July 19, 2024

You can try the verbose .cbx and .bbx you want from the citecounter branch. This should do everything automatically without any extra commands:

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=verbose]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{kant:kpv}
ipsum \autocite{kant:ku}
dolor \autocite{kant:kpv}

\printbibliography

\printshorthands
\end{document}

However, without the extra biber and latex runs, the shorthand list will always be empty and so we'd have to make a breaking change to those using shorthand lists with verbose styles and mention that this is necessary.

from biblatex.

Related Issues (20)

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.