1

I want to prepare my exams with the logos of both university and faculty. I'm trying as follows

\documentclass[12pt,a4paper]{article}
\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm}
\usepackage{tikz,tkz-tab,moreverb} % tableau de signe moreverb not needed
\usetikzlibrary{arrows}
\usepackage[francais]{babel}
\usepackage{pifont} %bouni
\usepackage{fancybox} %pour faire l'encadrement
\usepackage[usestackEOL]{stackengine}
\usepackage[latin1]{inputenc}
\usepackage{verbatim}
\usepackage{color}
\usepackage[final]{pdfpages} %pour inserer une page pdf
\usepackage{fancyhdr} % pagestyle
%---- Dimensions des marges ---
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.0cm,bottom=1.5cm}
%\usepackage{setspace}
%\onehalfspacing
%----New Structure Exercice -----
\newtheoremstyle{sboxexc}% name of the style to be used
  {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
  {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
  {\itshape}% name of font to use in the body of the theorem
  {0pt}%  of space to indent
  {\bfseries}% name of head font
  {}% punctuation between head and body
  { }% space after theorem head; " " = normal interword space
  {\thmname{#1}}% Manually specify head
\newcounter{counter}
\setcounter{counter}{1}
\theoremstyle{sboxexc}
\newcommand{\optionaltext}{}
%\newtheorem*{Exc}{\shadowbox{Exercice \arabic{counter}\optionaltext}}
\newtheorem*{Exc}{\shadowbox{Exercice \arabic{counter}\optionaltext}\\}
\newcommand{\exo}[2][]{\renewcommand{\optionaltext}{#2}\begin{Exc}\normalfont}
%\newcommand{\exo}[2][]{\renewcommand{\optionaltext}{#2}\begin{Exc}\normalfont $\:$} %Return to line with itemize
\newcommand{\finexo}{\renewcommand{\optionaltext}{}\end{Exc}\addtocounter{counter}{1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{sfaxlogo}{RGB}{127,176,206}
\colorlet{sfaxblue}{sfaxlogo!70!black!60!blue}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin entete%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Faculté des Sciences Economiques et Gestion de Mahdia
%-------                   DEBUT DE L'ENTETE----------------------
\begin{center}
\begin{minipage}[c]{3cm}
  \includegraphics[width=3cm,height=3cm]{example-image}
\end{minipage}
\begin{minipage}[c]{11.5cm}
\begin{center}
 {\large Ministère de l'Enseignement Supérieur
et de la Recherche Scientifique
}
  \\[3mm]
{\large Université de .....}
  \\[3mm]
{\large {\Large{F}}aculté  des {\Large{S}}ciences {\Large{\'{E}}}conomiques et de {\Large{G}}estion de .....}
\end{center}
\end{minipage}
\begin{minipage}[c]{3cm}
  \includegraphics[width=3cm,height=3cm]{example-image}
\end{minipage}
\end{center}
     \stackunder[1pt]{\rule{\linewidth}{1.2pt}}
                {\rule{\linewidth}{1.2pt}}
%---------------------------------------------
\vspace{-0.2cm}

\noindent
\begin{tabular}[t]{@{}c@{}}
\makebox[\textwidth][s]{%
\small
  \begin{tabular}{@{}l@{}}
\textbf{\ding{43} Session :} Principale \\
\textbf{Chargé du cours :} Mr. .... {\bf\&} Mr. ......
  \end{tabular}
  \hfill
%\begin{tabular}{@{}c@{}}
  %\includegraphics[height=3\normalbaselineskip]{fsegma}
%\end{tabular}
%\hfill
\begin{tabular}{@{}r@{}}
\textbf{Date :} 13/01/2021  \\
\textbf{Durée :} $1$h $30$
\end{tabular}%
}
\end{tabular}
%--------------------------------------------------------------------------------------------
 \begin{center}
 \shadowbox{
\begin{tabular}{|c|}
 \hline \\  $\qquad$\textbf{\textsf{\large{~~~~~~~~ {\huge{E}}xamen  d'Algèbre N°{\huge{1}}}}}~~~~~~~~~~~~~~~~\\
 ~~~~ \textbf{12 Janvier 2021} ( 8h.30 \ding{217} 10h.30 ) \\
\hline
\end{tabular}}
\end{center}
%-------attention----- Une présentation générale soignée sera appréciée.
\vspace{0mm}
\hrule
\vspace{2mm}
\noindent \ding{45} \textit{Aucun document n'est autorisé. Seules les calculatrices non-programmables et non graphiques sont autorisées. Il sera tenu compte de la rigueur et de la clarté de la rédaction. Cet énoncé comporte $3$ exercices indépendants.}
\vspace{2mm}
\hrule
%-------------- FIN DE L'ENTETE----------------------
\vspace{0.0cm}
%%%%%%%%%%%%%%%%debut exercice%%%%%%%%%%%%%%%%%%%
%-------                   FIN DE L'ENTETE----------------------
%%%%%%%%%%%%%%%%debut exercice%%%%%%%%%%%%%%%%%%%
\exo{: ($6$ points)}

\finexo
%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%

\begin{flushright}
\vskip 2 cm  {\large\ding{95}} {\large\ding{95}}
\emph{\textbf{\underline{Bon travail}}} {\large\ding{95}}
{\large\ding{95}}
\end{flushright}

\end{document} 

enter image description here

I want to add stars as the picture shows and minimise some distance. Also if there is some suggestions to improve it I have no problem. Thank you in advance.

1 Answer 1

3

For the first header, using TikZ

%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin entete%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Faculté des Sciences Economiques et Gestion de Mahdia
    %-------                   DEBUT DE L'ENTETE----------------------
    \begin{center}
        \begin{minipage}[c]{3cm}
            \includegraphics[width=3cm,height=3cm]{example-image}
        \end{minipage}
        \begin{minipage}[c]{11.5cm}
            \begin{center}
                {\large Ministère de l'Enseignement Supérieur
                    et de la Recherche Scientifique
                }\\
            \begin{tikzpicture}
                \draw (0, 0) -- (3, 0) (4, 0) -- (7, 0);
                \node at (3.5, 0) {$\star\star\star$};
            \end{tikzpicture}\\
                {\large Université de .....}
                \\
                \begin{tikzpicture}
                \draw (0, 0) -- (3, 0) (4, 0) -- (7, 0);
                \node at (3.5, 0) {$\star\star\star$};
                \end{tikzpicture}\\
                {\large {\Large{F}}aculté  des {\Large{S}}ciences {\Large{\'{E}}}conomiques et de {\Large{G}}estion de .....}
            \end{center}
        \end{minipage}
        \begin{minipage}[c]{3cm}
            \includegraphics[width=3cm,height=3cm]{example-image}
        \end{minipage}
    \end{center}

For the second block:

%--------------------------------------------------------------------------------------------
    \vspace{-1em}
    \begin{center}
        \shadowbox{
            \fbox{\parbox{.45\linewidth}{\centering\textbf{\textsf{\large{{\huge{E}}xamen  d'Algèbre N°{\huge{1}}}}}\par
            \textbf{12 Janvier 2021} ( 8h.30 \ding{217} 10h.30 )}}}
    \end{center}
    %-------attention----- Une présentation générale soignée sera appréciée.

enter image description here

Edit

To have the title and the date in the same line, remove both the \par and the parbox.

\begin{center}
    \shadowbox{
        \fbox{\centering\bfseries{\sffamily\large{\huge{E}}xamen  d'Algèbre N°{\huge{1}}}
            12 Janvier 2021 {\normalfont( 8h.30 \ding{217} 10h.30 )}}}
    \end{center}

If you want to play with the space, just remove the \par and increase the width of the parbox

\begin{center}
        \shadowbox{
            \fbox{\parbox{.8\linewidth}{\centering\bfseries{\sffamily\large{\huge{E}}xamen  d'Algèbre N°{\huge{1}}}
                    12 Janvier 2021 {\normalfont( 8h.30 \ding{217} 10h.30 )}}}}
    \end{center}
6
  • Thank you for your help. Is there a method to simplify \centering\textbf{\textsf{\large{{\huge{E}}xamen d'Algèbre N°{\huge{1}}}}}?. There is many brackets and if I want a add new text it return to the line. Thanks a lot
    – Schüler
    Commented Jan 11, 2021 at 20:33
  • Try {\bfseries\sffamily\large{\huge{E}}xamen d'Algèbre N°{\huge{1}}}
    – NBur
    Commented Jan 12, 2021 at 8:08
  • The line break is certainly due to the \parbox.
    – NBur
    Commented Jan 12, 2021 at 8:09
  • I try as follows \begin{center} \shadowbox{ \fbox{ {\bfseries\sffamily\large{\huge{E}}xamen d'Algèbre N°{\huge{1}}} \par \textbf{13 Janvier 2021} ( 12h.00 \ding{217} 13h.30 ) }} \end{center} but it does not return to the new line all the text in a line
    – Schüler
    Commented Jan 12, 2021 at 9:32
  • I don't understand? Do you mean the title and the date in one line?
    – NBur
    Commented Jan 12, 2021 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .