2

I use the following command:

\documentclass[a4paper,11pt]{article}
\usepackage[francais]{babel}

but the date is just shown as "16 fvrier 2017" missing a "é", I wonder how should I deal with this problem?

What's more, the title of content misses also a "è": enter image description here

2

Adding \usepackage[T1]{fontenc} and \usepackage{lmodern} solved the problem.

@Bernhard: Add \usepackage[T1]{fontenc} and \usepackage{lmodern}if unless you want a non-default font.

Output:

enter image description here

Code:

\documentclass[a4paper,11pt]{article}
\usepackage[francais]{babel}
%\usepackage[french]{babel}
\usepackage{datetime}  

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}

\today 
\end{document}

You can also customize your date format with \newdateformat{mydateformat}{\monthname~\THEYEAR}. Command \mydateformat\today.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Your second Question: Answer for table of content

enter image description here

You only need a section. Formatting pagecounter is optional.

\documentclass[a4paper,11pt]{article}
\usepackage[francais]{babel}
%\usepackage[french]{babel}
\usepackage{datetime}  
 \title{Sur l'Extension Galoisienne de Degr\'e Infini}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}

\maketitle \tableofcontents 
\pagestyle{empty}
\cleardoublepage
\setcounter{page}{1}   
\pagestyle{plain}

\section{Date}
Today: \today 
\end{document}
  • What's more, I just noticed that the title of content is shown as "Table des matires" missing a "è", how should I deal with this? – Victor Chen Feb 16 '17 at 20:41
  • Can you add your code as MWE? meta.tex.stackexchange.com/questions/228/… – Bobyandbob Feb 16 '17 at 20:45
  • \documentclass[a4paper,11pt]{article} \usepackage[francais]{babel} \usepackage{datetime} \title{Sur l'Extension Galoisienne de Degr\'e Infini} \begin{document} \maketitle \tableofcontents \end{document} Here is my code, it doesn't work – Victor Chen Feb 16 '17 at 20:55
  • @Victor Chen . You need at least one \section. I expand the answer to that. See above. It works. – Bobyandbob Feb 16 '17 at 21:04
  • I've tried, but just as the picture shows, I doesn't work. I don't know why :( – Victor Chen Feb 16 '17 at 21:17
1

I can't reproduce the issue:

\documentclass[a4paper,11pt]{article}
\usepackage[francais]{babel}

\begin{document}
\title{Titre}
\author{A. Uteur}
\maketitle

\today
\end{document}

enter image description here

On the other hand, you get a warning on the console telling you

Package frenchb.ldf Warning: OT1 encoding should not be used for French.
(frenchb.ldf)                Add \usepackage[T1]{fontenc} to the preamble
(frenchb.ldf)                of your document; reported on input line 4.

which tells you how to, at least, avoid the warning. It not only avoids the warning, but makes TeX hyphenate properly words with accented letters.

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.