GeneralMultiple Languages In Titles, Paragraphs, Bookmarks

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ld_pvl
Posts: 4
Joined: Mon Nov 15, 2010 5:05 pm

Multiple Languages In Titles, Paragraphs, Bookmarks

Post by ld_pvl »

Hello,

Is it possible to type two or more different languages in titles and paragraphs? I have tried using the babel package but it's useful only to define parts of individual languages and not multiple languages:

Code: Select all

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,vietnam,russian]{babel}

\begin{document}
%\selectlanguage{english}
%\selectlanguage{russian}

\section{This is a Документ}
%\selectlanguage{vietnam}
Hôm qua em đi chơi ở Hotel Plaza.
\end{document}
I also have a problem with having bookmarks appear correctly for utf-8 char sets. I use the hyperref package to create hyperlinks as shown below, however, though the unicode option is already set to false (to have non-unicode bookmarks), chapter\section titles in say Russian wouldn't even appear.

Code: Select all

\usepackage[
   pdftex,
   pdftitle={A Title},
   pdfauthor={Me},
   pdfsubject={Testing},
   pdfkeywords={test},
   pdfpagemode=UseOutlines,
   bookmarks=false,
   bookmarksopen,
   pdfstartview=FitH,
   colorlinks,
   linkcolor=blue,
   citecolor=blue,
   urlcolor=red,
]
{hyperref}
Many thanks for your help,
LD

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

ld_pvl
Posts: 4
Joined: Mon Nov 15, 2010 5:05 pm

Multiple Languages In Titles, Paragraphs, Bookmarks

Post by ld_pvl »

Hi again,

I found a solution to the bookmarking problem. For some unsupported languages one might have to download the puenc.def file for the hyperref packages for that specific language and replace the existing one. However, if the unicode option is set to true, that should work for most popular languages. The babel package also allows having different parts of languages in a paragraph using the following:

Code: Select all

\selectlanguage{language}
\begin{otherlanguage}{language} text \end{otherlanguage}
\begin{otherlanguage*}{language} text \end{otherlanguage*}
\foreignlanguage{language}{text}
\iflanguage{language}{yes text}{no text}
It's still a mystery how I can include words from different languages in one section/chapter title though. Doing some research at the moment, hopefully will come back with an answer.
ld_pvl
Posts: 4
Joined: Mon Nov 15, 2010 5:05 pm

Re: Multiple Languages In Titles, Paragraphs, Bookmarks

Post by ld_pvl »

Using XeTeX should solve the problem apparently.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Multiple Languages In Titles, Paragraphs, Bookmarks

Post by localghost »

Now that the problem seems to be solved, please be so kind and mark the topic accordingly as written in the Board Rules (to be read before posting). Otherwise please tell us what is missing. Please keep that in mind for the future so that further reminders will not be necessary.


Thorsten
Post Reply