Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a bibliography for an article in Russian. Using \bibliographystyle{plain} is not an option, since it uses e.g. conjunction "and" when listing authors. So I'm sticking to \bibliographystyle{ugost2008}, but it keeps complaining that \bbljan is undefined. I assume that \bbljan should expand to "January" for English and to "Январь" for Russian. My babel apparently doesn't know anything about \bbljan though. I'm currently using

\def\bbljan{Январь}

but isn't it lame? What should I do?

share|improve this question
2  
I tried finding whether \bbljan is defined somewhere, but I didn't find any place. Can you work out a complete, but minimal, example? –  egreg Dec 23 '12 at 19:55
    
Is there \bbljan in your bibfile? –  Igor Kotelnikov Dec 29 '12 at 5:47

2 Answers 2

The \bbljan macro is set up in merlin.mbs, the master file for creating BibTeX styles with the custom-bib system. Thus you find \bbljan mainly in .bst files created this way. Presumably, the author of ugost2008 used custom-bib but then removed the part that sets up \bbljan (etc.) for some reason. The work-around is to define these yourself, as you've done, but ideally the .bst file should be fixed either to define the macros correctly or not to use them at all.

share|improve this answer

My preamble holds next definitions

\usepackage{hyperref}
\usepackage{polyglossia}
\bibliographystyle{ugost2008ns}
\usepackage[numbers,square]{natbib}
\newfontfamily\russianfont{Times New Roman}
\setmainfont{Times New Roman}

and i have same problem with \bbljan, \bblfeb, ... functions.

First, i done some rewrite ugost2008ns which located in /usr/share/texlive/texmf-dist/bibtex/bst/gost/ugost2008ns.bst

I replace all \bbl* functions to another which executes right in ugost2008ns

MACRO {jan} {"jan"}
MACRO {feb} {"feb"}
MACRO {mar} {"mar"}
MACRO {apr} {"apr"}
MACRO {may} {"may"}
MACRO {jun} {"jun"}
MACRO {jul} {"jul"}
MACRO {aug} {"aug"}
MACRO {sep} {"sep"}
MACRO {oct} {"oct"}
MACRO {nov} {"nov"}
MACRO {dec} {"dec"}

Here is my new format.date function which implements those \bbl*

FUNCTION {format.date}
{ year empty$
    { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
          month
        }
      if$}
    { curlanguage "russian" =
         { month empty$
            { year }
            { month "jan" =
                { year \cyrya\cyrn\cyrv. }
            { month "feb" =
                { year \cyrf\cyre\cyrv\cyrr. }
            { month "mar" =
                { year \cyrm\cyra\cyrr\cyrt }
            { month "apr" =
                { year \cyra\cyrp\cyrr. }
            { month "may" =
                { year \cyrm\cyra\cyry }
            { month "jun" =
                { year \cyri\cyryu\cyrn\cyrsftsn }
            { month "jul" =
                { year \cyri\cyryu\cyrl\cyrsftsn }
            { month "aug" =
                { year \cyra\cyrv\cyrg\. }
            { month "sep" =
                { year \cyrs\cyre\cyn\cyrt. }
            { month "oct" =
                { year \cyro\cyrk\cyrt. }
            { month "nov" =
                { year \cyrn\cyro\cyrya\cyrb. }
            { month "dec" =
                { year \cyrd\cyre\cyrk. }
            { year "Nomember" }
            if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}
         { month empty$
            { year }
            { month "jan" =
               { year "Jan." }
            { month "feb" =
               { year "Feb." }
            { month "mar" =
               { year "Mar." }
            { month "apr" =
               { year "Apr." }
            { month "may" =
               { year "May" }
            { month "jun" =
               { year "June" }
            { month "jul" =
               { year "July" }
            { month "aug" =
               { year "Aug." }
            { month "sep" =
               { year "Sept." }
            { month "oct" =
               { year "Oct" }
            { month "nov" =
               { year "Nov." }
            { month "dec" =
               { year "Dec." }
            { year "Nomember" }
            if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}
         if$}
    if$}
  extra.label * % new in v.1.2
}

Abbreviations of months done according to GOST 7.12-93 and GOST 7.11-2004 (ISO 832:1994).

After this i received new error - "command \cyra, \cyrb, ... unavailable in encoding EU1". This problem caused by hyperref package. To resolve, I put next code just right before \begin{document}.

\newcommand{\cyr}[0]{}
\renewcommand{\cyra}[0]{а}
\renewcommand{\cyrb}[0]{б}
\renewcommand{\cyrv}[0]{в}
\renewcommand{\cyrg}[0]{г}
\renewcommand{\cyrd}[0]{д}
\renewcommand{\cyre}[0]{е}
\renewcommand{\cyryo}[0]{ё}
\renewcommand{\cyrzh}[0]{ж}
\renewcommand{\cyrz}[0]{з}
\renewcommand{\cyri}[0]{и}
\renewcommand{\cyry}[0]{й}
\renewcommand{\cyrk}[0]{к}
\renewcommand{\cyrl}[0]{л}
\renewcommand{\cyrm}[0]{м}
\renewcommand{\cyrn}[0]{н}
\renewcommand{\cyro}[0]{о}
\renewcommand{\cyrp}[0]{п}
\renewcommand{\cyrr}[0]{р}
\renewcommand{\cyrs}[0]{с}
\renewcommand{\cyrt}[0]{т}
\renewcommand{\cyru}[0]{у}
\renewcommand{\cyrf}[0]{ф}
\renewcommand{\cyrh}[0]{х}
\renewcommand{\cyrc}[0]{ц}
\renewcommand{\cyrch}[0]{ч}
\renewcommand{\cyrsh}[0]{ш}
\renewcommand{\cyrshch}[0]{щ}
\renewcommand{\cyrsftsn}[0]{ь}
\renewcommand{\cyrery}[0]{ы}
\renewcommand{\cyrhrdsn}[0]{ъ}
\renewcommand{\cyrerev}[0]{э}
\renewcommand{\cyryu}[0]{ю}
\renewcommand{\cyrya}[0]{я}

\renewcommand{\CYRA}[0]{А}
\renewcommand{\CYRB}[0]{Б}
\renewcommand{\CYRV}[0]{В}
\renewcommand{\CYRG}[0]{Г}
\renewcommand{\CYRD}[0]{Д}
\renewcommand{\CYRE}[0]{Е}
\renewcommand{\CYRYO}[0]{Ё}
\renewcommand{\CYRZH}[0]{Ж}
\renewcommand{\CYRZ}[0]{З}
\renewcommand{\CYRI}[0]{И}
\renewcommand{\CYRY}[0]{Й}
\renewcommand{\CYRK}[0]{К}
\renewcommand{\CYRL}[0]{Л}
\renewcommand{\CYRM}[0]{М}
\renewcommand{\CYRN}[0]{Н}
\renewcommand{\CYRO}[0]{О}
\renewcommand{\CYRP}[0]{П}
\renewcommand{\CYRR}[0]{Р}
\renewcommand{\CYRS}[0]{С}
\renewcommand{\CYRT}[0]{Т}
\renewcommand{\CYRU}[0]{У}
\renewcommand{\CYRF}[0]{Ф}
\renewcommand{\CYRH}[0]{Х}
\renewcommand{\CYRC}[0]{Ц}
\renewcommand{\CYRCH}[0]{Ч}
\renewcommand{\CYRSH}[0]{Ш}
\renewcommand{\CYRSHCH}[0]{Щ}
\renewcommand{\CYRSFTSN}[0]{Ь}
\renewcommand{\CYRERY}[0]{Ы}
\renewcommand{\CYRHRDSN}[0]{Ъ}
\renewcommand{\CYREREV}[0]{Э}
\renewcommand{\CYRYU}[0]{Ю}
\renewcommand{\CYRYA}[0]{Я}

I use: linux, kile, XeLaTeX to compile and Zotero to import BiBtex (also hacked by me because it doesn't provide native russian support).

Maybe this may be optimized or done much easier but I use all this stuff less then a month.

Hope this help.

share|improve this answer
    
Welcome to TeX.sx! –  texenthusiast Mar 4 '13 at 4:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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