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?
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?
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:
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
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}
\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\section. I expand the answer to that. See above. It works.
– Bobyandbob
Feb 16 '17 at 21:04
I can't reproduce the issue:
\documentclass[a4paper,11pt]{article}
\usepackage[francais]{babel}
\begin{document}
\title{Titre}
\author{A. Uteur}
\maketitle
\today
\end{document}
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.
\usepackage[T1]{fontenc}and\usepackage{lmodern}if unless you want a non-default font. – Bernard Feb 16 '17 at 19:46