17

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...

0

4 Answers 4

20

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".

4
  • 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, 2011 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, 2011 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}. Apr 4, 2011 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, 2011 at 3:27
3

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.

3

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.

3

All what you need to do is add the following two lines in preamble of your document:

\usepackage[croatian]{babel}
\usepackage[utf8]{inputenc}

and than normally use keyboard (assumed that it is prepared for Croatia language).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .