Fonts & Character SetsTo use more than a language

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

To use more than a language

Post by tdcpina »

Hi guys,

I'm Writting my text in English but I have some considerations in French and in Portuguese. I'm using the package:"\usepackage[english]{babel}".

How can I put the three languages at the same time without problems?

Thanks a lot in advance,
Tiago

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Re: To use more than a language

Post by tdcpina »

Sorry I'll explain better my problem because I think that I wasn't clear in the last post.

I'm using package \usepackage[english]{babel}. However I've some references in my text in French and in Portuguese but pontuation don't appears. For example "mobilité" appeaes as "mobilit". I've experimented use the \usepackage[latin1]{inputenc} but no success. It appears lots of errors. I don't know the cause of this.

Someone can explain me?

Thanks,
Tiago
fatra2
Posts: 126
Joined: Fri May 01, 2009 1:43 pm

Re: To use more than a language

Post by fatra2 »

Hi there,

Firstly, "latin1" is not an option to use in babel. You can choose between different languages, and babel will find within the package whether to use latin1 or another.

Secondly, your problem might not be from the compiler's point of view. It might happen that the editor you are using does not code properly the different accents. Therefore, you would to say which editor you are using??? I know that with emacs, you have to define which language is used, so that emacs can code the éàè properly.

Cheers
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Re: To use more than a language

Post by tdcpina »

I'm using TeXnicCenter as editor.

Cheers
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

To use more than a language

Post by localghost »

tdcpina wrote:[...] I'm Writting my text in English but I have some considerations in French and in Portuguese. I'm using the package:"\usepackage[english]{babel}".

How can I put the three languages at the same time without problems? [...]
You can specify all three languages in the babel options, where the last one is the default language for the document.

Code: Select all

\usepackage[portuges,french,english]{babel}
Wherever you need, you can switch to a certain language and write your text in this language.

Code: Select all

\selectlanguage{portuges}
This is supposed to be for longer text passages. For short text you can use another command.

Code: Select all

\foreignlanguage{portuges}{Short text in Portuguese}
For more information refer to the babel manual and study it thoroughly.
tdcpina wrote:I'm using package \usepackage[english]{babel}. However I've some references in my text in French and in Portuguese but pontuation don't appears. For example "mobilité" appeaes as "mobilit". I've experimented use the \usepackage[latin1]{inputenc} but no success. It appears lots of errors. I don't know the cause of this.
It would be better to specify these errors. Just saying that there are some doesn't really help. Getting the right output is an interaction of font encoding and input encoding. The latter one depends a little bit on the used editor. Since you are using TeXnicCenter (TXC), you should keep the inputenc package with the latin1 option. TXC doesn't support Unicode at the moment. Add the right font encoding to your document source.

Code: Select all

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[portuges,french,english]{babel}
If that doesn't help, provide a minimal working example (MWE) that shows the difficulties. You should get used to this procedure for future requests.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Re: To use more than a language

Post by tdcpina »

It works like with the following packages actives:

\usepackage[T1]{fontenc}
%\usepackage[latin1]{inputenc}
\usepackage[portuges,french,english]{babel}

But the text loose quality. The capitular letters are black but others appear something similar to grey. Why the text loose quality? Can you explain me?
With the inputenc active the errors don't permit me visualize the output.

I've tried to introduce the other code just for localised situations in my bibliography. For instance this case:

@book{Benoit95,
author = "Jean-Marc Benoit",
title = "La France qui bouge",
year = "1995",
publisher = "\foreignlanguage{french}{Éditions Romillat}",
adress = "Paris"
}

The letters with pontuation don't appear.

Best regards,
Tiago
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

To use more than a language

Post by localghost »

tdcpina wrote:[...] But the text loose quality. The capitular letters are black but others appear something similar to grey. Why the text loose quality? Can you explain me? [...]
Shouldn't occur. Check the printed output.
tdcpina wrote:[...] With the inputenc active the errors don't permit me visualize the output.

I've tried to introduce the other code just for localised situations in my bibliography. For instance this case: [...] The letters with pontuation don't appear.
Something seems to keep you from providing a MWE with all necessary information as requested earlier.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Re: To use more than a language

Post by tdcpina »

Hi,

I've no possibility to print before Wednesday. But I'm producing the output in PDF. It normal the print output appears similar to the output on computer screen. Am I wrong?

Concerning the last sentence, sorry but I can understand what you mean. "Something seems to keep you from providing a MWE with all necessary information as requested earlier."
May you explain what means MWE?

Thank you,
Tiago
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

To use more than a language

Post by localghost »

tdcpina wrote:[...] Concerning the last sentence, sorry but I can understand what you mean. "Something seems to keep you from providing a MWE with all necessary information as requested earlier."
May you explain what means MWE? [...]
Please read the last sentences of my first reply with the link to a guide how to build a MWE. Follow the advice on that page carefully.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

To use more than a language

Post by tdcpina »

Hi localghost,

Really really sorry. I haven't payed attention to your previous post.
I provide you the MWE, I hope it helps.

Code: Select all

\documentclass[a4paper,11pt]{report}

%\usepackage[T1]{fontenc}
%\usepackage[latin1]{inputenc}
\usepackage[portuges,french,english]{babel}

\begin{document}
I'll introduce some words in French and in Portuguese just to show the effect.\\
"`Élargisssement des aires de mobilité. Não sei como resolver este problema."'\\
Letters with accents doesn't appears in the output.\\
\end {document}
Experiment to withdraw the first % sign and regard the effect.

I'm using TeXnicCenter.

Best regards,
Tiago
Post Reply