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 using a currvita CV for something, but am unable to get Croatian/Serbian (I don't know how this will come out, but they are šŠđĐčČćĆžŽ).

Haven't used LaTeX in a while but remember that in the past I used to get these letters, substitutions like this Đ = \DJ{}. For some reason it doesn't work.

Would really appreciate your advice on this one...

share|improve this question
add comment

3 Answers 3

up vote 12 down vote accepted

Don't forget to load fontenc with the T1 option; \DJ and \dj are not available in the default OT1 encoding. Add in your preamble:

\usepackage[T1]{fontenc}

Here's a little example, producing your letters:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{currvita}

\begin{document}

\v{s}\v{S}\DJ\dj\v{c}\v{C}\'c\'C\v{z}\v{Z}

\end{document}

Loading inputenc with the option utf8 (if your editor supports unicode), you'll be able to write some (and possibly all) of those letters, directly from the keyboard:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{currvita}

\begin{document}

ćĆ

\end{document}

I don't know if this is possible for the remaining letters since I am not familiar with a "Croatian keyboard".

share|improve this answer
1  
It figures ... had to be something simple (those things that waste most of the afternoon usually are). Thanks man! Saved the day ;) –  Rook Apr 4 '11 at 1:52
    
Your second example is even better; unfortunatelly it seems my editor doesn't support unicode (tecxnicenter). Do you perchance know of some that does? –  Rook Apr 4 '11 at 1:59
    
@Rook: TeXworks tug.org/texworks (comes with recent versions of MiKTeX) supports unicode; if your TeXnicCenter version doesn't support unicode (I believe there is a beta version which does), then you can try loading inputenc with the latin1 option: \usepackage[latin1]{inputenc}. –  Gonzalo Medina Apr 4 '11 at 2:10
    
(texniccenter) It doesn't seem it works all that good in practice. I can't seem to make him accept the aforementioned characters. Will try some of the others. –  Rook Apr 4 '11 at 3:27
add comment

I do not speak nor write Croatian but here is how you type Serbian using TeX.

\documentclass{article}
\usepackage[OT2,T1]{fontenc}
\input{cyracc.def}
\newcommand\textcyr[1]{{\fontencoding{OT2}\fontfamily{wncyr}\selectfont #1}}
\begin{document}
Serbian alphabet again \dots \textcyr{\cyracc
A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T \'C U F Kh C Ch \Dzh\ Sh
} 
\end{document}

And the output is...

enter image description here

If you want to use Serbian keyboard (which I do not since I have been living in U.S. for the past 16 years) you will need inputenc package. If I recall correctly Babel assumes that you are using Serbian Cyrillic keyboard so it was not useful to me.

share|improve this answer
add comment

If you use XeTeX or LuaTeX, you can also use the fontspec package.

\documentclass[utf8]{article}
\usepackage{fontspec} 
\title{Mačak u vreći}
\author{Pero Perić}

\begin{document}
\maketitle

\section{Probni znakovi}
šđžčć ŠĐŽČĆ

\end{document}

I seem to be having less problems that way than trying to change inputenc and fontenc.

share|improve this answer
add comment

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.