Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm new to LaTeX and trying to write my rapport with TeXnicCenter. I want to use the times new roman font, but i don't know why it does not works with me.

This the beginning of my code :

\documentclass[12pt,french]{report}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}
\usepackage[a4paper]{geometry}
\usepackage{minitoc}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=3cm,rmargin=3cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\onehalfspacing

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{t1enc}% un second package
\usepackage[francais]{babel}
% un troisième package
\usepackage{layout}
\usepackage[Lenny]{fncychap}
\usepackage{fancyhdr}
\usepackage[section]{placeins}
\usepackage{lettrine} 

\floatstyle{boxed}
\title{Rapport de Projet De Fin D'Études}
\author{Amina GHABRI}
\usepackage{palatino}%police
\renewcommand{\baselinestretch}{1.5}

\AtBeginDocument{
  \def\labelitemi{\normalfont\bfseries{--}}
}



\usepackage{babel}


\addto\extrasfrench{%
   \providecommand{\og}{\leavevmode\flqq~}%
   \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\leftmark}
\fancyhead[RE,LO]{\ }
\fancyfoot[CE,CO]{\thepage}
\fancyfoot[RE,LO]{\ }

\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}




\usepackage{babel}

\addto\extrasfrench{%
   \providecommand{\og}{\leavevmode\flqq~}%
   \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}




\makeatother

\usepackage{babel}
\makeatletter
\addto\extrasfrench{%
   \providecommand{\og}{\leavevmode\flqq~}%
   \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\rmfamily
\makeatother

\begin{document}
\maketitle 
\dominitoc\tableofcontents{}\listoffigures

\listoftables

\chapter{Présenation du projet}
\label{sec:PrésenationDuProjet}

And this is what i'm getting :

enter image description here

share|improve this question
1  
Are you running lualatex? –  Herbert Jun 9 at 11:01
1  
Your example isn't complete which doesn't really help anyone to gelp you but you appear to be using lualatex given you have \usepackage[utf8]{luainputenc} in which case you probably shouldn't be using luainputenc at all but just using luatex's native utf-8 support and accessing your system times roman font using fontspec package. –  David Carlisle Jun 9 at 11:02
    
Sorry i'm new. well i'm using latex ,miktex and textniccenter. –  Amina Jun 9 at 11:03
1  
@DavidCarlisle i edited the code ,please take a look . –  Amina Jun 9 at 11:06
1  
You have specified \usepackage{times} but then later you over-write the font definitions and specify Palatino: \usepackage{palatino}%police presumably you want to remove that line if you want Times –  David Carlisle Jun 9 at 11:50

2 Answers 2

up vote 4 down vote accepted

You have specified

\usepackage{times} 

but then later you over-write the font definitions and specify Palatino:

\usepackage{palatino}%police

presumably you want to remove that line if you want Times

As you are using pdflatex also change

\usepackage[utf8]{luainputenc}

to

\usepackage[utf8]{inputenc}
share|improve this answer

If you are running pdflatex use

\documentclass[12pt,french]{report}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
...

If you are running lualatex use

\documentclass[12pt,french]{report}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[a4paper]{geometry}
...

and do not load package t1enc. The Font name "Times New Roman" may be different depending to your operating system.

However, your preamble looks a bit weird. A package can only be loaded once, babel, for example, appears three times in your preamble.

share|improve this answer
1  
Thank you for your response. I think i'm using pdflatex, because when i tryed the second code ,i got errors. But when i used the firs code ,i didn't remark any deiference . –  Amina Jun 9 at 11:14
1  
In the first example the font "NimbusRoman" is used which is the same as Times Roman. –  Herbert Jun 9 at 11:17
    
@Amina if you are using pdflatex then you must get error messages on your example document from \usepackage[utf8]{luainputenc} –  David Carlisle Jun 9 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.