6

I want to define acronyms and terms in Bulgarian. Unfortunately, when I do so, LaTeX gives a whole lot of errors and do not compile. Anything to help?

\documentclass[a4paper,10pt]{article}
\usepackage{ucs}
\usepackage[cp1251]{inputenc}
\usepackage[english,bulgarian]{babel}
\inputencoding{cp1251}
\usepackage[makeindex,acronym]{glossaries}
\usepackage[dvipdfm,unicode]{hyperref}
\hypersetup{colorlinks=true, linkcolor=black}
\makeglossaries
\newacronym{SVN}{SVN}{Apache Subversion Control}
%\newacronym{БДЖ}{БДЖ}{Българска държавна железница}
\begin{document}
\gls{SVN}
%\gls{БДЖ}
\pagenumbering{arabic}
\glossarystyle{altlistgroup}
\glsaddall
\printglossaries
\end{document}

When you remove the ''%'' from the comments you will see what am I talking about (I have commented the entry and citation of the Bulgarian acronym)

  • 1
    Welcome to TeX.SX. Please provide a minimal example which shows us the error. Beginning with \documentclass{ and ending with \end{document}. We will especially need information about your use of the glossary packages and stuff like inputenc, fontencetc. – LaRiFaRi Aug 26 '13 at 13:56
2

There are three issues here:

  1. Glossary labels can't contain active characters (non-Latin characters, including accented letters such as é, are all active). This is because the label is used to define various control sequences used to store the glossary information.
  2. Older versions of glossaries had a problem with fragile commands in fields such as text. This can be overcome by upgrading to the latest version of glossaries (v4.01 at time of writing).
  3. makeindex isn't designed to work with non-Latin characters. You can use xindy instead, but you need to use the xindy={glsnumbers=false} package option for non-Latin languages.

Minimal example (requires glossaries v4.01 and xindy):

\documentclass[a4paper,10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[english,bulgarian]{babel}

\usepackage[xindy={glsnumbers=false},acronym]{glossaries}
\usepackage[unicode]{hyperref}

\hypersetup{colorlinks=true, linkcolor=black}
\makeglossaries

\newacronym{SVN}{БДЖ}{Българска държавна железница}

\begin{document}
\gls{SVN}
\pagenumbering{arabic}
\setglossarystyle{altlistgroup}

\glsaddall
\printglossaries
\end{document}

This produces:

Image of resulting document

(You'll need to redefine \acronymname to the appropriate translation, see the section "Changing the fixed names" in the glossaries user manual.)

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.