1

I am using biblatex-gost package, gost-numeric style.

\documentclass[12pt,a4paper]{article}
\begin{filecontents}{\jobname.bib}
@book{samoylenko,
    title = {Диференціальні рівняння. Підручник},
    author = {А. М. Самойленко and М. О. Перестюк and І. О. Парасюк},
    location = {К.},
    publisher = {Либідь},
    year = {1994},
    pagetotal = {360},
}
@article{perestyuk,
    author = {Ю. М. Перестюк},
    title = {Розривні коливання в одній імпульсній системі},
    journal = {Нелінійні коливання},
    year = {2012},
    volume = {15},
    number = {4},
    pages = {494--503},
}
@book{hartman,
    langid = {english},
    title = {Ordinary Differential Equations},
    author = {P. Hartman},
    location = {Philadelphia},
    publisher = {Society for Industrial and Applied Mathematics},
    year = {2002},
    pagetotal = {612},
}
\end{filecontents}       
\usepackage[T2A]{fontenc}       
\usepackage[utf8]{inputenc}         
\usepackage[english,ukrainian]{babel} 
\usepackage[backend=biber,bibencoding=utf8,maxbibnames=999,style=gost-numeric,language=auto,autolang=other]{biblatex}
\addbibresource{\jobname.bib}

\DefineBibliographyStrings{ukrainian}{
and = {та},
number = {№},
page = {С\adddot},
pages = {С\adddot},
volume = {Т\addot},
%jourvol = {Т\addot},
}

\toggletrue{bbx:gostbibliography}
\usepackage[autostyle]{csquotes}

\begin{document}

\cite{samoylenko} \cite{perestyuk} \cite{hartman}

\printbibliography

\end{document}

Since there is no Ukrainian biblatex localization, based on this answer, I added the \DefineBibliographyStrings{ukrainian} command.

But even after that I have two problems:

  1. Year field is missing in bibliography (only in Ukrainian books, English are fine).
  2. jourvol instead of the desired Т. (only in Ukrainian articles).

I tried adding jourvol = {Т\addot}, but it produced the following error:

Undefined control sequence. \abx@sstr@jourvol

UPDATED TWICE: Here is a MWE displaying only the problem 1 (missing year field). When language is set to English everything works fine:

\documentclass[12pt,a4paper]{article}
\begin{filecontents}{\jobname.bib}
@book{samoylenko,
    title = {Диференціальні рівняння. Підручник},
    author = {А. М. Самойленко and М. О. Перестюк and І. О. Парасюк},
    location = {К.},
    publisher = {Либідь},
    year = {1994},
    pagetotal = {360},
}
\end{filecontents}       
\usepackage[T2A]{fontenc}       
\usepackage[utf8]{inputenc}         
\usepackage[english]{babel} 
\usepackage[backend=biber,bibencoding=utf8,maxbibnames=999,style=gost-numeric]{biblatex}
\addbibresource{\jobname.bib}

\toggletrue{bbx:gostbibliography}
\usepackage[autostyle]{csquotes}

\begin{document}

This was studied in \cite{samoylenko}.

\printbibliography

\end{document}

enter image description here

But I need 360 с. instead of 360 pp.. So I add Ukrainian language \usepackage[english,ukrainian]{babel}. Since my pdflatex is a little outdated, in does not contain a ukrainian.lbx file. So I create it manually with an empty content. Now I get

enter image description here

pages word can be translated using \DefineBibliographyStrings{ukrainian} command. But the year 1994 is gone.

  • Since version 3.8a biblatex has had a Ukrainian localisation: github.com/plk/biblatex/commits/dev/tex/latex/biblatex/lbx/…. I can run your example without problems and obtain the desired output. The years are present and everything seems to work fine. In the definition of jourvol you are missing a d, it must be \adddot, so you have to have jourvol = {Т\adddot}, – moewe Jul 21 '18 at 7:10
  • You are right. Fixing \adddot helped, thank you. Is it possible to fix the year without updating the whole system? – user2513149 Jul 21 '18 at 7:50
  • Not sure. It depends on why the year is not displayed. It should be. Please do the following: Simplify your example even further to only deal with the year issue. (Do you need the translation to reproduce it? Do you need three references? ...) Then add \listfiles to the beginning of your .tex file. Delete all auxiliary files (.aux, .bbl, .bcf, ...). Run LaTeX, Biber, LaTeX, LaTeX and upload the .log, .blg and .bbl file either to your question or to a text sharing website (like pastebing, GitHub Gist, GitLab snippets, do not use a file sharing website). – moewe Jul 21 '18 at 9:34
  • I updated the question with a MWE containing only 1 bibitem with a missing year field. – user2513149 Jul 24 '18 at 4:58
  • 1
    What output are you expecting? I get Самойленко А. М. Диференціальні рівняння. Підручник / А. М. Самойленко, М. О. Перестюк, І. О. Парасюк. — К. : Либідь, 1994. — 360 с. which seems to include the year 1994. – David Purton Jul 24 '18 at 5:04
2

As you mention your system is outdated and does not ship with ukrainian.lbx (that file has been available in biblatex since version 3.8a).

If you simply create an empty ukrainian.lbx you don't get bibliography strings (pages is one example - it is bold indicating the definition is missing), but you also don't get so-called bibliography extras. Amongst other things the bibliography extras define the date format. If the file does not contain definitions for the date, in some situation the date might be swallowed silently and will not be printed.

Ideally you would update your outdated TeX system to TeX live 2018. In that case Ukrainian works out of the box and everything should be fine. If you can't do that or you don't want to do that because your are close to a deadline, you have to find a work-around.

You could try and get ukrainian.lbx from https://github.com/plk/biblatex/commits/dev/tex/latex/biblatex/lbx/ukrainian.lbx and try if one of the older versions works for you. That is quite unlikely given that your system is so old now, the date handling changed a while ago, so the files are probably not compatible with your outdated system.

So your last resort is to write your own ukrainin.lbx for your outdated system. Take english.lbx, german.lbx or russian.lbx (you need the exact versions on your machine so we can be sure the file is compatible, usually you can find them with kpsewhich russian.lbx) as a basis and modify it as needed.

|improve this answer|||||
  • 1
    I took the russian.lbx file on my system (located it using kpsewhich command) and based on its content created a ukrainian.lbx. It finally worked! Earlier I tried downloading ukrainian.lbx from github's master branch and it didn't help. I didn't realize that the date format has changed in the new version. Thank you, moewe, you saved my couple of days! – user2513149 Jul 24 '18 at 7:07
  • FWIW I have submitted a pull request that will at least give sane date output and warnings in those situations in the future: github.com/plk/biblatex/pull/775 – moewe Jul 24 '18 at 9:50
  • OK, that might be helpful! – user2513149 Jul 24 '18 at 10:54
  • It is certainly helpful for those who read the warnings and act accordingly. For people who only look at the output it brings improvement (they get some output that might look right) and at the same time could be dangerous (it is only right on the first glance, people really should provide a proper definition for these macros in the .lbx file). – moewe Jul 24 '18 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.