添加以下图片

添加以下图片
\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[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.5cm,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
{
{\noindent
      \small{\textbf{Université de xxxxxxxxx} }             % Université
      \hfill A.U. : 2020-2021 \\                 % année
}{\noindent
    \small{ {\large{F}}aculté des {\large{S}}ciences {\large{\'E}}conomiques et de {\large{G}}estion de {\large{M}}xxxxx   }            % institut
      \hfill \textbf{Module : xxxxxxxx} \\    % section et module
}
{\noindent
      \small{\textbf{Département des xxxxxxxxxxx}   }           % Université
      \hfill \ding{43} Section : xxxxx}              % année
%------------------------------------------------------
\vspace{-0.4cm}
\begin{center}
\section*{{\shadowbox{\ding{45} Série N°{\huge1}: xxxxxxxxxxxxxxxxxxxxxxxxx}}}
\end{center}
%--------------------------end entete----------------------------------------------------
\end{document}

我想插入图片

在此处输入图片描述

答案1

我将使用一个大的顶部对齐的两行表格来包含整个标题。

第一行有三个嵌套的中心对齐表格,分别用于左侧部分、图像和右侧部分。

第二行有“Série”框。

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{graphicx}
\usepackage{pifont}
\usepackage{fancybox} %pour faire l'encadrement
%---- Dimensions des marges ---
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm,showframe}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin entete%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%Faculté des Sciences Economiques et Gestion de Mahdia

\noindent
\begin{tabular}[t]{@{}c@{}}
\makebox[\textwidth][s]{%
  \small
  \begin{tabular}{@{}l@{}}
  \textbf{Université de xxxxxxxxx} \\
  {\large F}aculté des {\large S}ciences {\large \'E}conomiques 
  et de {\large G}estion de {\large M}xxxxx \\
  \textbf{Département des xxxxxxxxxxx}
  \end{tabular}\hfill
  \begin{tabular}{@{}c@{}}
  \includegraphics[height=3\normalbaselineskip]{example-image}
  \end{tabular}\hfill
  \begin{tabular}{@{}r@{}}
  A.U. : 2020-2021 \\
  \vphantom{\large \'E}\textbf{Module : xxxxxxxx} \\
  \ding{43} Section : xxxxx
  \end{tabular}%
}% end of top row
\\[4ex]
\shadowbox{\Large\ding{45} \bfseries S\'erie N°{\huge1}: xxxxxxxxxxxxxxxxxxxxxxxxx}
\end{tabular}
%--------------------------end entete----------------------------------------------------

\end{document}

showframe选项仅用于显示页边距,请将其从生产版本中删除。

在此处输入图片描述

答案2

我会在tabular*{\linewidth}}{@{\extracolsep{\fill}}lcr@{}}环境中进行此操作,并手动调整徽标的位置。

无关babel-french 的 'francais' 选项已过时。请使用。另外,如果您使用的是较新版本的 latex,则french无需加载:现在是默认设置,您可以直接输入, 而不是。另外,不要忘记加载字体编码以获得正确的连字符。inputenctf8É\'ET1

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,graphicx,amsthm}
\usepackage{tikz,tkz-tab} % tableau de signe moreverb not needed,moreverb
\usetikzlibrary{arrows}
\usepackage[french]{babel}
\usepackage{pifont} %bouni
\usepackage{fancybox} %pour faire l'encadrement
\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.5cm,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
{\centering\small \begin{tabular*}{\linewidth} {@{\extracolsep{\fill}}lcr@{}}
\textbf{Université de xxxxxxxxx} & & A.U. : 2020-2021 \\ % année
{\large F}aculté des {\large S}ciences {\large É}conomiques et de {\large G}estion de {\large M}xxxxx & \raisebox{-0.4\height}[0pt][0pt]{\includegraphics[scale=0.3]{zwinkern}}& \textbf{Module : xxxxxxxx}\\
\textbf{Département des xxxxxxxxxxx} & & \ding{43} Section : xxxxx
\end{tabular*}}
%--------------------------end entete----------------------------------------------------

\begin{center}
\section*{{\shadowbox{\ding{45} Série N°{\huge1}: xxxxxxxxxxxxxxxxxxxxxxxxx}}}
\end{center}

\end{document} 

在此处输入图片描述

答案3

如果您使用该包,这并不难xcoffin

https://ctan.org/pkg/xcoffins?lang=en

尝试此代码。要了解其工作原理,请参阅

水平和垂直对齐文本

徽标的高度为 3 条基线,以匹配两个文本。可以通过添加偏移量(现在设置为 5pt)水平(或垂直)滚动徽标。请注意,文本行的正确对齐方式不会因徽标的位置或大小而改变,因为它们都是独立的框。

\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[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.5cm,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}

\usepackage{xcoffins}  % added

\NewCoffin\Framex   
\NewCoffin\LeftUniv
\NewCoffin\Logox
\NewCoffin\RightMod

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin entete%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Faculté des Sciences Economiques et Gestion de Mahdia
%   \SetVerticalCoffin\Framex{\textwidth}{\phantom{x}} % an empty box \textwidth wide
\SetHorizontalCoffin\Framex{} % an empty box \

\SetVerticalCoffin\LeftUniv{0.6\textwidth}{%
    \noindent 
    \small{\textbf{Université de xxxxxxxxx} } \newline   % Université
    \small{ {\large{F}}aculté des {\large{S}}ciences {\large{\'E}}conomiques et de {\large{G}}estion de {\large{M}}xxxxx }   % institut 
    \small{\textbf{Département des xxxxxxxxxxx}   } % Université
}

\SetVerticalCoffin\Logox{0.15\textwidth}{\includegraphics[height=3\baselineskip, keepaspectratio]{example-grid-100x100pt}}

\SetVerticalCoffin\RightMod{0.25\textwidth}{%
    \raggedleft
    A.U. : 2020-2021 
        \textbf{Module : xxxxxxxx}    % section et module 
    \ding{43} Section : xxxxx            % année
}
    
\JoinCoffins*\Framex[l,vc]\LeftUniv[l,vc]
\JoinCoffins*\Framex[\LeftUniv-r,\LeftUniv-vc]\Logox[l,vc](5pt,0pt)  % X Y offsets. Use to displace the logo <--->
\JoinCoffins\Framex[r,vc]\RightMod[r,vc](\textwidth,0pt)

\noindent\TypesetCoffin\Framex

%{\noindent
%      \small{\textbf{Université de xxxxxxxxx} }             % Université
%      \hfill A.U. : 2020-2021 \\                 % année
%}{\noindent
%    \small{ {\large{F}}aculté des {\large{S}}ciences {\large{\'E}}conomiques et de {\large{G}}estion de {\large{M}}xxxxx   }            % institut
%      \hfill \textbf{Module : xxxxxxxx} \\    % section et module
%}
%{\noindent
%      \small{\textbf{Département des xxxxxxxxxxx}   }           % Université
%      \hfill \ding{43} Section : xxxxx}              % année
%------------------------------------------------------
%\vspace{-0.4cm}
\begin{center}
\section*{{\shadowbox{\ding{45} Série N°{\huge1}: xxxxxxxxxxxxxxxxxxxxxxxxx}}}
\end{center}
%--------------------------end entete----------------------------------------------------
\end{document}

g2

相关内容