This can be obtained with this MWE
\documentclass[12pt,french]{report}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\usepackage{minitoc}
\geometry{verbose,tmargin=1.8cm,bmargin=7cm,lmargin=2cm,rmargin=2cm}
%\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in,headheight=12pt,headsep=25pt,footskip=30pt}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
\usepackage{enumitem}
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\onehalfspacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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}
\usepackage{xcolor}
\usepackage{arabtex} % for writing arabic
\floatstyle{boxed}
\novocalize % command arabtex
\setlength{\headheight}{3.2cm}
\setlength{\footskip}{1.5cm}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1pt}
%\renewcommand{\footrulewidth}{1pt}
% page header ==================================================
\chead{\begin{minipage}{0.27\textwidth}
\begin{center}
\includegraphics[width=0.7\linewidth]{example-image}\\
Ecole Normale Supérieure \\
d'Ingenieur de Tunis
\end{center}
\end{minipage}
\hfill
\begin{minipage}{0.2\textwidth}
\includegraphics[width=\linewidth,height=3.5cm]{example-image}
\end{minipage}
\hfill
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth,height=3.5cm]{example-image}
\end{minipage}\smallskip}
% page footer ========================================================
\cfoot{\textbf{Année universitaire 2014-2015}\\
\vspace{-3mm}
\hrulefill\\
\begin{minipage}{0.32\textwidth}
5,Avenue Taha Hessein-Tunisie\\
B.P 56, Bab Menara 1008
\end{minipage}
\hfill
\begin{minipage}{0.25\textwidth}
Tel: 71.496.066 :\RL{al-hAtf}\\
Fax: 71.391.166:\RL{fAks}
\end{minipage}
\hfill
\begin{minipage}{0.27\textwidth}
\begin{arabtex}
$5$ ^sAr` .th .hsyn, twns .s b $56$ bAb mnArT $1008$
\end{arabtex}
\end{minipage}}
%======================================================================
%\author{Amina GHABRI}
%\large \textsc{Ecole Nationale Supérieure d’Ingénieurs de Tunis}}\\
\begin{document}
\hfill Réf:PFE-2014-??
\begin{center}
\Large\textbf {Rapport de \\Projet
de Fin d’Etudes}
\end{center}
\end{document}
for the length of header you can change it with \setlength{\headerheight}{length}
Do not patch an internal KOMA-Script command. If your chapters should behave like sections, redeclare the chapter level using
\RedeclareSectionCommand[
style=section,
indent=0pt
]{chapter}
Code:
\documentclass[titlepage=false,listof=totoc,bibliography=totoc,parskip=half-,11pt]{scrreprt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---------------------------
% Packages
% ---------------------------
\usepackage{anyfontsize}
\usepackage[english]{babel}
\usepackage{blindtext}
%\usepackage{etoolbox}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage[autooneside]{scrlayer-scrpage}% autooneside is default
% Page geometry
\geometry{
left=25mm,
right=20mm,
top=25mm,
bottom=12mm,
includefoot=false,
headsep = \dimexpr2\baselineskip\relax,
footskip = \dimexpr1\baselineskip+1.5mm\relax,
}
% ---------------------------
% Template adjustments
% ---------------------------
% Title
\makeatletter
\def\@maketitle{%
\newpage
% Zweck
\begingroup%
\normalsize%
\bfseries%
Test
\par
\endgroup%
% Abstand
\vskip 2\baselineskip
% Authors
\begingroup%
\normalsize%
\bfseries%
\begin{tabularx}{\linewidth}{@{}X}%
\@author
\end{tabularx}
\par
\endgroup%
% Abstand
\vskip 1\baselineskip
% Title
\begingroup%
\normalsize
\bfseries
\@title%
\par%
\endgroup%
% Abstand
\vskip 1\baselineskip
\rule{\textwidth}{0.4pt}%
%\vskip 1.5em%
\vskip 1\baselineskip
% Beschreibung des Vorhabens
\begingroup%
\normalsize
\bfseries
Schalala
\par%
\endgroup%
\vskip 2\baselineskip
}
\makeatother
% ---------------------------
% Header/Footer commands
% ---------------------------
% Clear old headers/footers
\clearpairofpagestyles
% Fonts for headers/footers
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
%\setkomafont{pagehead}{\sffamily}% not needed
%\setkomafont{pagination}{}% there is no \pagemark in your pagestyles??
% Trennlinien fuer Kopf und Fuss
%\KOMAoptions{
%headsepline = false,% false is default
%footsepline = false,% false is default
%plainfootsepline = false,% false is default
%}
% Create new header for title page
\newpairofpagestyles{firstpage}{%
\ihead{Inner head}
\ohead{Outer head}
\ifoot{%
%\hspace{-1em}
\raisebox{1cm}[0pt][0pt]{%
\begin{tabular}[t]{@{}l}
\textbf{An organization}\\
With an address\\
and communication channels
\end{tabular}
}
}
\cfoot{%
\raisebox{1cm}[0pt][0pt]{%
Footer on 1\textsuperscript{st} page only
}
}
\ofoot{%
\raisebox{0.25cm}[0pt][0pt]{%
{\fontsize{37}{44}\selectfont XYZ}
%\normalsize
}
}
}
% Page Layout for normal pages
\newpairofpagestyles{normalpage}{%
\ihead{Inner head}
\ohead{Outer head}
}
% \chapter should behave like a section
\RedeclareSectionCommand[
style=section,
indent=0pt
]{chapter}
% Abstaende
\RedeclareSectionCommands[
beforeskip=1\baselineskip,
afterskip=1\baselineskip,
font=\normalsize
]{chapter,section,subsection,subsubsection,paragraph,subparagraph}
%\setlength{\parskip}{0cm}% <- remove this
\setlength{\parindent}{0pt}% instead option parskip=half- and \setlength{\parskip}{0cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title and author %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Title}
\author{Author}
\date{\today}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Stuff at begin of document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{
\maketitle
\enlargethispage{-1cm}
\thispagestyle{firstpage}
\pagestyle{normalpage}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\chapter{First chapter}
\section{Section 1}
\Blindtext[2]
\section{Section 2}
\Blindtext[6]
\chapter{Second chapter}
\Blindtext[9]
\end{document}
Additional remarks:
If all section levels should use the same font
, beforeskip
and afterskip
the code can be shortened:
\RedeclareSectionCommands[
beforeskip=1\baselineskip,
afterskip=1\baselineskip,
font=\normalsize
]{chapter,section,subsection,subsubsection,paragraph,subparagraph}
Options autooneside
, headsepline=false
, footsepline=false
, plainfootsepline=false
are default.
I do not understand why you firstly set option parskip=half-
and then \setlength{\parskip}{0cm}
. Do not change \parskip
manually! It seems to me that you want neither a parskip nor a parindent. Then you have to set \parindent
to 0pt
. Note that then the start of new paragraph is not really visible.
Instead of defining the new page style normalstyle
you could use the default style scrheadings
.
Best Answer
\titlepagestyle
is only supported on a so-called in-page title (.ie. not in atitlepage
). This is indicated by the optiontitlepage=false
. See pages 58, 59 of the koma-script documentation (English). The classscrartcl
uses in-page by default.The combination that works is:
Here is a complete example