Giter VIP home page Giter VIP logo

Comments (6)

ronaldtse avatar ronaldtse commented on September 5, 2024 1

@oliviercailloux thank you for letting us know!

@paolobrasolin could you help check -- thanks!

from asciidoctor-bibliography.

paolobrasolin avatar paolobrasolin commented on September 5, 2024

Thanks for the accurate report, @oliviercailloux!

The behaviour you are seeing is expected.

You can achieve the output you desire by using cite instead of citep.

The cite macro renders citations using the style set by the bibliography-style option.
The citep macro and its siblings are meant for rendering citations in the traditional LaTeX fashion using the style set by bibliography-tex-style (allowed values are authoryear and numeric).

Does that solve your issue?
If you found the manual hazy I'll try to clarify that.

from asciidoctor-bibliography.

oliviercailloux avatar oliviercailloux commented on September 5, 2024

I am quite sure that \citep in LaTeX would produce the thing I expect: A test (Editor, 2010), rather than the thing I got: A test (2010). (I didn’t check to be honest, but I use LaTeX with zotero since a long time so I would have noticed such an odd behavior.)

from asciidoctor-bibliography.

ronaldtse avatar ronaldtse commented on September 5, 2024

@paolobrasolin perhaps @oliviercailloux is correct here?

Natbib: http://merkel.texture.rocks/Latex/natbib.php

  • \citet{jon90} => Jones et al. (1990)
  • \citep{jon90} => (Jones et al., 1990)

In any case, @paolobrasolin could you help update the README so we show the output of the \cite commands for clarity? Thanks.

from asciidoctor-bibliography.

paolobrasolin avatar paolobrasolin commented on September 5, 2024

I think I get what @oliviercailloux means, now. He is right.

There are many ways to format APA citations in LaTeX: Alan Munn wrote an excellent writeup about that. The essence is that the family of macros including \citep are defined by natbib and depend on its bst styles.

Usually in LaTeX one is used to staying away from \cite because of its inconsistent behaviour no naturally he's trying to use citep.

In asciidoctor-bibliography we have two separated formatting mechanisms:

  • one is exposed by cite and uses CSL styles. This offers a large choice of styles;
  • the other is exposed by the cite... family and uses a custom reimplementation of natbib's authoryear (i.e. plainnat) and numeric. However, the choice is limited to those two styles at the moment.

While the output he expects can be obtained by simply using cite, the reason must be made clearer in the manual.


He also raises a fair point: one might desire a larger choice of styles for the TeX-like macros.
I can think of some ways to go about that @ronaldtse:

  • offer some configuration capabilities like \bibpunct for natbib (easy but pretty limited)
  • implement them one by one (error prone and time consuming)
  • write a bst parser/renderer (complex)

from asciidoctor-bibliography.

oliviercailloux avatar oliviercailloux commented on September 5, 2024

But, when I change the :bibliography-style: in my document (where I use exclusively citep and citet), the style changes.

See this source and the resulting pdf. Look at for example the ref to Lipton (last page), you can see the note (“Presented at”, etc.). This is thanks to my custom style apa-note.csl. Whereas if you change the bibliography-style to simply apa, the note disappears. (This is with asciidoctor-pdf but the same thing happens when converting adoc to html.)

Furthermore, I believe that with LaTeX, nat and plainnat, the behavior I am talking about here (the missing editor name) would not happen. (Again, I didn’t check so I might be wrong.)

Thanks for the suggestion: replacing with cite: works around the problem.

from asciidoctor-bibliography.

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.