8

I use pdflatex for my thesis which is written mostly in English. For that purpose I use \usepackage[english]{babel} in the preamble. However, I must provide also Czech version of the abstract. Even though the local characters are displayed well (such as "ěščř"), they can't be copied properly (after paste the result is "ˇeˇsˇcˇr").

Initially I tried \usepackage[czech]{babel} which lead to the following error:

! Package babel Error: Unknown option `czech'. Either you misspelled it
(babel)                or the language definition file czech.ldf was not found.

What I intend to do is having the whole thesis in English style, i.e. using \usepackage[english]{babel} and mark my abstract as Czech like this:

\foreignlanguage{czech}{My long abstract...}

According to the first mentioned error, I assume that I haven't installed czech package yet (for pdflatex). I use Ubuntu.

$ apt-cache search latex czech
texlive-lang-czechslovak - TeX Live: Czech/Slovak

However, the czechslovak language option doesn't work either. So the questions: How to achieve previously described behavior? What to install? How to enable it?

  • As far as I know, the required package is named babel-czech. – Bernard May 14 '15 at 9:48
  • czech works for me using TL on Linux. Usually, when you change the language a warning appears when you compile. Did you compile twice in a row? – Sigur May 14 '15 at 9:50
  • babel-czech doesn't seem to exists (at least in standard ubuntu repository)... @Sigur I compile twice, however it isn't a warning but an error – petrbel May 14 '15 at 9:52
  • @petrbel, are you using TL from the repository or did you install it from the iso image? – Sigur May 14 '15 at 9:53
  • After you install texlive-lang-czechslovak you should still do \usepackage[czech]{babel}, what else? – egreg May 14 '15 at 9:53
11

First make sure you installed Tex Live properly, the command is

sudo apt-get install texlive-full 

Then you can try setting your document as utf-8 with inputenc (compiled with pdflatex).

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[main=english,czech]{babel}

\begin{document}

This is some text in english.

\foreignlanguage{czech}{Český jazyk neboli čeština je západoslovanský jazyk, nejbližší slovenštině, poté polštině a lužické srbštině.}

\end{document}

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.