1

Consider this example:

\documentclass{report}
\usepackage[backend=bibtex]{biblatex}
\usepackage[latvian]{babel}
\addbibresource{testbibfont.bib}
\begin{document}
See \cite{article}
\printbibliography
\end{document}

The contents of testbibfont.bib are:

@Article{article,
  author =       "Authors",
  title =        "{Discovery}",
  journal =      "Phys. Journal",
  volume =       "B750",
  year =         2015,
  pages =        "475-493"
}

The bibliography is rendered as:

enter image description here

However, the grammar of the Latvian language stipulates that the range of pages should be given as

"475.-493. lpp."

instead of

lpp. 475-493.

The dash there should be en dash.

How to fix?

moewe
  • 175,683
Viesturs
  • 7,895
  • Does https://tex.stackexchange.com/q/135003/35864 help? – moewe Apr 10 '19 at 18:05
  • 1
    If "lpp. 475-493." is incorrect, please open an issue at the biblatex bugtracker to get this fixed: https://github.com/plk/biblatex/issues – moewe Apr 10 '19 at 18:06
  • @moewe, is there any hope of adding a dot after the first page number, e.g. replacing -- with .--? – Viesturs Apr 10 '19 at 18:11
  • The linked answer links to a bit in the Hungarian localisation file that should do this https://github.com/plk/biblatex/blob/476a0dad3146012955b1f1441ffbc8f1d015ef35/tex/latex/biblatex/lbx/magyar.lbx#L106-L137 – moewe Apr 10 '19 at 18:13
  • @moewe, applying that example I was successful at moving "lpp." to end but how to add the dot? – Viesturs Apr 10 '19 at 18:24
  • As I said https://github.com/plk/biblatex/blob/476a0dad3146012955b1f1441ffbc8f1d015ef35/tex/latex/biblatex/lbx/magyar.lbx#L106-L137 should also let you get dots, the relevant bit is the \lbx@hu@mkdottednormrange. I don't have time tonight to look at this, but if you can't get it to work I might be able to have a look tomorrow. But please let me repeat if the current behaviour of the Latvian localisation module is incorrect according to Latvian grammar/orthography, please open an issue at https://github.com/plk/biblatex/issues – moewe Apr 10 '19 at 18:41
  • @moewe I raised the issue. I don't know how to fiddle with the \lbx@hu@mkdottednormrange bit – Viesturs Apr 10 '19 at 18:50
  • Tracked at https://github.com/plk/biblatex/issues/882 – moewe Apr 11 '19 at 05:00
  • I commented in https://github.com/plk/biblatex/issues/882 with the output of a suggested fix for the language module (https://github.com/plk/biblatex/pull/883). It would be appreciated if you could have a look at the output posted there and say if it looks alright. If you feel adventurous you could also test the pull request branch at https://github.com/plk/biblatex/issues/882, but you will need Biber 2.13 dev for that (https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/development/binaries/) – moewe Apr 27 '19 at 14:08

1 Answers1

3

Following discussions in https://github.com/plk/biblatex/issues/882 latvian.lbx was changed for biblatex 3.13 to produce the expected order of page number and page suffix.

\documentclass[latvian]{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\addbibresource{biblatex-examples.bib}


\begin{document}
\cite[380-381]{sigfridsson}
\printbibliography
\end{document}

[1, 380.—381. lpp.]//Emma Sigfridsson un Ulf Ryde. ”Comparison of methods for deriving atomic charges from the electrostatic potential and moments”. Journal of Computational Chemistry 19.4 (1998), 377.—395. lpp. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.


The "p."/"pp." strings were moved from prefix into suffix position by redefining the internal macro \blx@mkpageprefix in the .lbx file only for Latvian. Two additional helper macros for the <postpro> arguments of \mknormrange and \mkpageprefix were necessary to get the ordinal ranges right.

moewe
  • 175,683