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 have MikTex 2.9 on XP. Is there anybody to give me instruction how to set up program so that I can use serbian cyrillic hyphenation in it. I am not good in LaTex and I spent a lot of time trying to do it, but without succes.

If I can use any other instalation in wich it works, please give me advice.

share|improve this question

2 Answers 2

The following should work on any up-to-date system:

\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[serbianc]{babel}

\begin{document}

% A sample text (source sr.wikipedia.org)
Београд је главни и највећи град Србије. Један је од 
најстаријих градова у Европи. Прва насеља на територији 
Београда датирају из праисторијске Винче, 4.800 година 
пре нове ере.

\bigskip

% the same text to show all possible hyphenation points
\noindent
\parbox[t]{0pt}{
\hspace{0pt}%
Београд је главни и највећи град Србије.
}\qquad\qquad\qquad
\parbox[t]{0pt}{
\hspace{0pt}%
Један је од најстаријих градова у Европи.
}\qquad\qquad\qquad
\parbox[t]{0pt}{
\hspace{0pt}%
Прва насеља на територији Београда датирају из 
}\qquad\qquad\qquad
\parbox[t]{0pt}{
\hspace{0pt}%
праисторијске Винче, 4.800 година пре нове ере.
}

\end{document}

enter image description here

share|improve this answer
    
Anthon, thank you very much for your very quickly answer, but it does not work. Simply, doesn't work. :-(( Best regards Dragoljub –  Dragoljub Jun 24 '13 at 10:09
    
@Dragoljub Try looking at the MiKTeX wizard and its panel for enabling languages; maybe serbianc is not enabled. –  egreg Jun 24 '13 at 10:22

You can use Serbian Cyrillic hyphenation with babel package or polyglossia package.

1. Babel example (and solution to a possible error)

\documentclass{article}

\usepackage[T2A]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[serbianc]{babel}

\begin{document}

% A sample text (source sr.wikipedia.org)
Београд је главни и највећи град Србије.\\

\parbox[t]{0pt}{
\hspace{0pt}%
Београд је главни и највећи град Србије.
}
\end{document}

image1

If you get an error saying no hyphenation pattern was loaded there is a 'manual' workaround:

-find language.dat file (file location, in my case: C:\Users\MyName\AppData\Roaming\MiKTeX\2.9\tex\generic\config) and add the following line to it:

serbianc loadhyph-sr-cyrl.tex

-run "initexmf --dump" without quotation marks in Command Prompt (run cmd.exe)

2. Polyglossia example (use XeLaTeX instead of PDFLaTeX engine)

\documentclass{article}

\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage[Script=Cyrillic]{serbian}
\setmainfont{Times New Roman}

\begin{document}

% A sample text (source sr.wikipedia.org)
Београд је главни и највећи град Србије.\\

\parbox[t]{0pt}{
\hspace{0pt}%
Београд је главни и највећи град Србије.
}
\end{document}

image2

Don't know why the two examples give different results, but both work, in terms of hyphenation.

share|improve this answer
1  
Even if you don't have enough reputation, please still upload the image and paste the link. Someone with edit privileges will re-embed the image. –  Werner Jul 2 '13 at 4:27

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.