quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.74k stars 305 forks source link

Bibliography: Title all lowercase #8072

Closed roland-KA closed 8 months ago

roland-KA commented 8 months ago

Bug description & Actual behavior

When generating a bibliography specifying a csl-file in _quarto.yml as e.g.

bibliography: SoftwareEngineering.bib
cite-method: citeproc
csl: ieee

The resulting bibliography in my documents generated using

::: {#refs}
:::

print the titles (as well as other parts of the citation) of the literature referenced always completely in lowercase letters as e.g.

H. Balzert and P. Liggesmeyer, Lehrbuch der softwaretechnik. 2: Entwurf, implementierung, installation und betrieb / helmut balzert. Unter mitw. Von peter liggesmeyer, 3. Auflage. in Lehrbücher der informatik. Heidelberg: Spektrum, Akademischer Verlag, 2011.

Expected behavior

Actually it should print the title "Lehrbuch der Softwaretechnik. 2: Entwurf, Implementierung, Installation und Betrieb / Helmut Balzert. Unter mitw. von Peter Liggesmeyer ..."

I've tried several csl-files, but this problems occurs in every case I've tried. The title gets printed correctly when I omit the csl-file specification thus using Quartos defaults.

How can I get correct titles using csl-files?

Your environment

IDE: VS Code 1.85, Quarto-Plugin v1.109.0 OS: MacOS Sonoma 14.2.1 (23C71)

Quarto check output

quarto check

[✓] Checking Quarto installation......OK
      Version: 1.2.335
      Path: /Users/roland/Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.8 (Conda)
      Path: /Users/roland/.julia/conda/3/bin/python3
      Jupyter: 5.2.0
      Kernels: julia-1.8, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
mcanouil commented 8 months ago

This is unrelated to Quarto. CSL are not defined by Quarto (or Pandoc).

If you need to modify CSL, then you'll have to look for online resources such as https://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step. Alternatively, there are plenty of CSL files and derivatives in Zotero and GitHub (links in the documentation: https://quarto.org/docs/authoring/footnotes-and-citations.html#sec-citations-style).

I am going ahead and closing as it is a third party issue.

Also note that your example is not complete, nor reproducible.

roland-KA commented 8 months ago

Sorry, but I think that is a misunderstanding. My issue is not about specific CSL definitions.

ALL CSL-files I've tried show this behaviour in Quarto! So the problem is caused either by Quarto or by Pandoc when handling these files.

Where does the processing of the bibliography (and the CSL-files) take place?

mcanouil commented 8 months ago

Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. Also could you at least try with the current stable release of d possibly with the 1.4 pre-release?

You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````).

````qmd
---
title: "Reproducible Quarto Document"
format: html
---

This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.

```{r}
plot(cars)

A placeholder image

The end.

roland-KA commented 8 months ago

Thank you for your feedback! I've upgraded Quarto now to the current release 1.3.450.

Minimal setting to reproduce the error

The minimal setting to reproduce the problem consists of four files:

BibTest.qmd contains:

## A new slide

see [@balzert_lehrbuch_2011]

---

## References 

::: {#refs}
:::

_quarto.yml looks as follows:

bibliography: SoftwareEngineering.bib
cite-method: citeproc
csl: ieee

format:
  revealjs:
    theme: [default]

This is the Bibtex-file SoftwareEngineering.bib containing one reference:

@book{balzert_lehrbuch_2011,
    location = {Heidelberg},
    edition = {3. Auflage},
    title = {Lehrbuch der Softwaretechnik. 2: Entwurf, Implementierung, Installation und Betrieb / Helmut Balzert. Unter Mitw. von Peter Liggesmeyer},
    isbn = {978-3-8274-1706-0},
    series = {Lehrbücher der Informatik},
    shorttitle = {Lehrbuch der Softwaretechnik. 2},
    pagetotal = {596},
    publisher = {Spektrum, Akademischer Verlag},
    author = {Balzert, Helmut and Liggesmeyer, Peter},
    date = {2011},
    file = {Table of Contents PDF:/Users/roland/Zotero/storage/IVY9MMS2/Balzert und Liggesmeyer - 2011 - Lehrbuch der Softwaretechnik. 2 Entwurf, Implemen.pdf:application/pdf},
}

How to reproduce the error

Using quarto render --to revealjs generates a HTML-file BibTest.html

The resulting Bibliography looks as follows:

image

(Almost) Expected behaviour

Deleting the line csl: ieee in _quarto.yml uses the Quarto default mechanism to generate a bibliography. This results in:

image

Here we see a spelling with capitals ... but it is also not completely correct as it capitalizes now all words from the BibTex-reference. The correct behaviour would be to leave the text unchanged as it is in the BibTex file.

mcanouil commented 8 months ago

The issue has nothing to do with CSL, Pandoc, or Quarto. Most CSL uses first letter in uppercase only. To go against that you need additional brackets. This is described in many places, for example and amongst other places: https://pandoc.org/MANUAL.html#capitalization-in-titles

roland-KA commented 8 months ago

Thank you very much for your help! With a tool like Quarto, that integrates several other tools, it is often difficult to know, which part of the technology stack is the root for some behaviour.

njbart commented 6 months ago

What has been overlooked here is quite simply that non-English titles require a langid tag in the biblatex file for proper capitalisation. Try langid={de-DE}, langid={german}, or langid={ngerman}. This is not only necessary when processing with CSL/citeproc, but also when using biblatex (the program) itself.

roland-KA commented 6 months ago

That's the point.

I'm using Zotero for bibilographies (and generate Bibtex-files from there). Titles which are added from central catalogs by using an ISBN or similar identifiers often don't have a value this field. So it has to be added manually.