How to change page supplement in bibliography?

I use bibliography with "gost-r-705-2008-numeric" style. The only problem is that every citation uses “P.” symbol for pages instead of russian “с.”. How to change it?

#bibliography(
  "biblio.bib",
  title: "Источники литературы",
  full: true,
  style: "gost-r-705-2008-numeric"
)

Citation:

@book{sevastyanov,
  title = "Курс теории вероятностей и математической статистики",
  author = "Б.А. Севастьянов",
  pages = "272",
  publisher = "Институт компьютерных исследований",
  year = "2019"
}

Result:

Севастьянов Б. Курс теории вероятностей и математической
статистики. Институт компьютерных исследований, 2019. P. 272.

Wanted (at least):

Севастьянов Б. Курс теории вероятностей и математической
статистики. Институт компьютерных исследований, 2019. с. 272.

In general, "gost-r-705-2008-numeric" poorly represents the real gost style and I want it to be like:

Курс теории вероятностей и математической статистики / Севастьянов Б. // Институт компьютерных исследований – 2019. – с. 272.

The bibliography styles work through something called CSL (Citation Style Language) and they can adapt to your document language. However, you do have to set your text language first in Typst with #set text(lang: "ru"). This also enables correct hyphenation and, if possible, spell check. As for customizing the citation style, maybe @Andrew knows more.

#set text(lang: "ru")

#bibliography(
  bytes(
    ```
    @book{sevastyanov,
      title = "Курс теории вероятностей и математической статистики",
      author = "Б.А. Севастьянов",
      pages = "272",
      publisher = "Институт компьютерных исследований",
      year = "2019"
    }
    ```.text
  ),
  title: "Источники литературы",
  full: true,
  style: "gost-r-705-2008-numeric"
)

2 Likes

To change the supplement to the Russian variant, you do have to change the document language to Russian. If you want to change it in some other way, then you have to create your own CSL style.

In general, GOST is poorly documented, and not just GOST R 7.0.5—2008. So poorly that it’s just impossible to make a perfect CSL style (most likely). It just lists a bunch of examples and describes a few general things here and there, but doesn’t actually go over the exact syntax for each use case. I saw so many “GOST” bibliographies and even in themselves there are discrepancies. It’s all just said and unbearable to work with. Which is why I gave up on total correctness, and some/many people (who check this stuff) don’t care about perfect formatting either, so maybe you don’t have to worry about this as much.

So in my case, I hand-roll CSL style when I see that the output doesn’t match what it should be. Here is an example from the standard:

As you can see, yours and its formatting for the same parts do not match. Also, there is a slightly up-to-date version in the official CSL repo: GitHub - citation-style-language/styles: Official repository for Citation Style Language (CSL) citation styles..

One thing I know is that journal name starts with //:

But there are still too many variables that play a role in how text should be formatted.

This is why people just format stuff manually (that is probably because no one knows how to format automatically in the first place, or the tool doesn’t support it).

So, good luck making your own style. You can open an issue in that repository about formatting for this standard, if you want.