GeneralTeXnicCenter: problem with French accents

General information and discussion about TeXnicCenter
Post Reply
petital
Posts: 6
Joined: Mon Mar 01, 2010 5:54 am

TeXnicCenter: problem with French accents

Post by petital »

Hi guys,

I'm writing a French document but the accents (é, à, ê...) don't appear on my pdf file after compilation. Do you know how to solve this issue?

Cheers!

Alexis

Recommended reading 2024:

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

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

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

TeXnicCenter: problem with French accents

Post by localghost »

Ask yourself how anybody is going to answer this question without any useful information [1]. Furthermore you should tell us which version of TeXnicCenter (TXC) you are using. TXC1 RC1 can't handle unicode, but TXC2 alpha 2 (build 1071) does. Note that you need to specify the right input encoding by means of the inputenc package.

[1] View topic: Avoidable mistakes


Best regards
Thorsten
petital
Posts: 6
Joined: Mon Mar 01, 2010 5:54 am

TeXnicCenter: problem with French accents

Post by petital »

I have tried both TXC1 RC1 and TXC2 alpha 2 but it doesn't work.

I first wrote my text in TexWorks and it worked well, but I decided to work on TeXnicCenter because it's more user friendly. However, I get � instead of "è" for example. If I replace those � by the right letters "è", "é"... it doesn't appear on my final pdf (i.e I get "prfrence" instead of "préférence"). So here am I!

Here's below the first part of my main page, I hope it will help:

Code: Select all

\documentclass[a4paper, french, 11pt]{memoir} 
\usepackage[utf8]{inputenc} 
\usepackage[french]{babel} 
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{tabularx}
\usepackage{fullpage}
\usepackage{listings}
\usepackage{makeidx}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
The compilation was okay on TexWorks so this is not about the code but just the accents.

Thanks for your help!

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

TeXnicCenter: problem with French accents

Post by localghost »

TeXworks saves files in Unicode (UTF-8). So TXC2 alpha 2 should manage to handle it whereas TXC1 RC1 will fail. The code below works fine for me.

Code: Select all

\documentclass[11pt,a4paper,french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\begin{document}
 à â è é
\end{document}
I used Kile on Linux with a file saved in UTF-8. Check the file encoding with TXC2 alpha 2 by choosing »Save As« from the »File« menu as seen in the attachment.
Attachments
The »Save As« dialogue window in TXC2 alpha 2.
The »Save As« dialogue window in TXC2 alpha 2.
TXC2alpha2-SaveAs-Encoding.png (31.35 KiB) Viewed 11935 times
petital
Posts: 6
Joined: Mon Mar 01, 2010 5:54 am

Re: TeXnicCenter: problem with French accents

Post by petital »

Thanks localghost.

However, now in the Build section I get 3 errors:

Do you guys have any idea of what that means?

Thanks again!

Alexis
Attachments
Build errors
Build errors
Capture.PNG (21.41 KiB) Viewed 11934 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TeXnicCenter: problem with French accents

Post by localghost »

Piecewise information is annoying. And screenshots of error messages are useless. Provide useful information in form of a minimal working example (MWE) along with the produced log file (see the topic I linked in my first reply).

From the screenshot I can only guess that you try to read an external file which is not present in the current working directory.
petital
Posts: 6
Joined: Mon Mar 01, 2010 5:54 am

Re: TeXnicCenter: problem with French accents

Post by petital »

Actually I tried the code you provided above and I got these errors. Where's the log file? I don't find it...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TeXnicCenter: problem with French accents

Post by localghost »

petital wrote:[...] Where's the log file? [...]
In the same directory as the source file.
petital
Posts: 6
Joined: Mon Mar 01, 2010 5:54 am

TeXnicCenter: problem with French accents

Post by petital »

It should be this one that follows:

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2010.5.4)  4 MAY 2010 16:58
entering extended mode
**Files (x86)\MiKTeX 2.8\miktex\bin\pdflatex.exe C:\Users\Alexis\Desktop\ALEX.tex

! Emergency stop.
<*> Files 
          (x86)\MiKTeX 2.8\miktex\bin\pdflatex.exe C:\Users\Alexis\Desktop\A...
*** (job aborted, file error in nonstop mode)

 
Here is how much of TeX's memory you used:
 2 strings out of 495285
 15 string characters out of 3179876
 45037 words of memory out of 3000000
 3306 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 0i,0n,0p,1b,6s stack positions out of 5000i,500n,10000p,200000b,50000s
!  ==> Fatal error occurred, no output PDF file produced!
Post Reply