According to this answer we have:

 \documentclass[a4paper,10pt,demo]{article} %
    \usepackage{pifont} %bouni  
    %-----accent                        
    \usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
    \usepackage[T1]{fontenc}
      %-----
    \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
     \usepackage{graphicx}                    % Enable pdflatex
      \usepackage{wrapfig}
      \usepackage{amsmath,amsfonts,amsthm}     % Math packages
      %%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
      \usepackage{geometry}
      \geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
      %%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
     \frenchspacing              % Better looking spacings after periods
      \usepackage{sectsty}
      \sectionfont{%                        % Change font of \section command
    \usefont{OT1}{phv}{b}{n}%       % bch-b-n: CharterBT-Bold font
     \sectionrule{0pt}{0pt}{-5pt}{1pt}}
     %%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
      \newcommand{\sepspace}{\vspace*{1em}}     % Vertical space macro
      \newcommand{\MyName}[1]{ % Name
        \Huge \usefont{OT1}{phv}{b}{n} \hfill #1
        \par \normalsize \normalfont}
      \newcommand{\MySlogan}[1]{ % Slogan}{optional)
    \large \usefont{OT1}{phv}{m}{n}\hfill \textit{#1}
    \par \normalsize \normalfont}
      %%% ------------------------------------------------------------
      \pagestyle{empty}           % No pagenumbers/headers/footers
     %%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
     \begin{document}
     %%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
    %---------------------------
   \begin{wrapfigure}{l}{16cm}
   \vspace*{-16em}
   \begin{center}
   \includegraphics[width=0.15\textwidth]{picture}
   \end{center}
    \end{wrapfigure}
   %---------------------------
   \begin{flushright}
   \MyName{Name Name}
    \MySlogan{Curriculum Vitae\\ (\today)}
    %\MySlogan{Curriculum Vitae (October 2016)}
    %---------------------------
    \sepspace  % Si on ajoute encore \sepspace on aura plus d'espace
    \end{flushright}
    $$$$
     %%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section*{Informations personelles}

    \end{document}

enter image description here

However, I think it will be better if we get like this

enter image description here

  • Have you heard about the moderncv package? Of course, I don't want to hold you back from writing your own cv from scratch, but you could also just look at what has been invented so far and see if one of the design options pleases you. – thymaro Dec 7 at 10:52
  • Unfortunately no. – Schüler Dec 7 at 11:28
up vote 5 down vote accepted

wrapfigure is the wrong tool.

Here are the two ways you mention.

\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}

\usepackage{geometry}
\geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}

\usepackage{pifont}
\usepackage{sectsty}

\usepackage{graphicx}
\usepackage{amsmath,amsfonts,amsthm}

\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}

\frenchspacing
\sectionfont{%
  \fontfamily{phv}\bfseries
  \sectionrule{0pt}{0pt}{-5pt}{1pt}%
}
\pagestyle{empty}

\begin{document}

%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%

\begin{flushleft}

\hspace*{\fill}%
\begin{tabular}{@{}c@{}}
  \includegraphics[width=0.15\textwidth]{example-image-9x16}
\end{tabular}
\hspace*{\fill}%
\makebox[0pt][r]{%
  \fontfamily{phv}\large
  \begin{tabular}{@{}r@{}}
  \Huge\bfseries Name Name \\[1ex]
  Curriculum Vitae\\ (\today)
  \end{tabular}%
}

\end{flushleft}

\section*{Informations personelles}

\bigskip

\begin{flushleft}

\makebox[0pt][l]{%
  \fontfamily{phv}\large
  \begin{tabular}{@{}l@{}}
  \Huge\bfseries Name Name \\[1ex]
  Curriculum Vitae\\ (\today)
  \end{tabular}%
}
\hspace*{\fill}%
\begin{tabular}{@{}c@{}}
  \includegraphics[width=0.15\textwidth]{example-image-9x16}
\end{tabular}

\end{flushleft}

\section*{Informations personelles}

\end{document}

enter image description here

Another variation:

\begin{flushleft}

\hspace*{\fill}%
\fontfamily{phv}\large
\begin{tabular}{@{}l@{}}
\Huge\bfseries Name Name \\[1ex]
Curriculum Vitae\\ (\today)
\end{tabular}%
\hspace*{\fill}%
\makebox[0pt][r]{%
  \begin{tabular}{@{}c@{}}
  \includegraphics[width=0.15\textwidth]{example-image-9x16}
  \end{tabular}
}

\end{flushleft}

enter image description here

  • Dear Professor if I want \makebox[0pt][r]{% \fontfamily{phv}\large \begin{tabular}{@{}r@{}} \Huge\bfseries Name Name \\[1ex] Curriculum Vitae\\ (\today) \end{tabular}% } will be in the center. How can I modify the above codes? Thank you. – Schüler Dec 8 at 5:33
  • @Schüler I added the variation – egreg Dec 8 at 9:13

If I were you, I would absolutely use tikz.

    \documentclass[a4paper,10pt,demo]{article} %
    \usepackage{pifont} %bouni  
    %-----accent                        
    \usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
    \usepackage[T1]{fontenc}
      %-----
    \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
     \usepackage{graphicx}                    % Enable pdflatex
      \usepackage{amsmath,amsfonts,amsthm}     % Math packages
      \usepackage{tikz}
      %%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
      \usepackage{geometry}
      \geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
      %%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
     \frenchspacing              % Better looking spacings after periods
      \usepackage{sectsty}
      \sectionfont{%                        % Change font of \section command
    \usefont{OT1}{phv}{b}{n}%       % bch-b-n: CharterBT-Bold font
     \sectionrule{0pt}{0pt}{-5pt}{1pt}}
     %%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
\newcommand\mytitle[3]{%
    \noindent\begin{tikzpicture}
        \node [align=left] (name) at (0,0) 
        {\Huge\usefont{OT1}{phv}{b}{n}#1\\
        \large\usefont{OT1}{phv}{m}{n}\textit{#2}\\(#3)};
        \node [anchor=east, xshift=-.15\textwidth] at (\textwidth, 0) {\includegraphics[width=0.15\textwidth]{picture}};
    \end{tikzpicture}%
    }
      %%% ------------------------------------------------------------
      \pagestyle{empty}           % No pagenumbers/headers/footers
     %%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
     \begin{document}
\mytitle{Name Name}{Curriculum Vitae}{\today}
 %%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Informations personelles}

\end{document}

enter image description here

P.S. You can also modify your code to achieve above picture without using tikz.

  • Thank you. however your codes does not compilate even if I add \end{document} – Schüler Dec 7 at 10:14
  • sorry, the end was forgotten to be put!, check it now. It must work like a charm :D. – javadr Dec 7 at 10:29
  • Yes it works. Thank you. – Schüler Dec 7 at 10:33
\documentclass[a4paper,10pt,demo]{article} %
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
\usepackage[hmargin=2cm, lmargin=1.5cm]{geometry}
%   \geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%-----accent
%\usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
%\usepackage[T1]{fontenc}
\usepackage{pifont} %bouni
  %-----
\usepackage[demo,
            export]{adjustbox}          % also load graphicx,
                                        % enable insert and positioning images
%\usepackage{wrapfig}
\usepackage{amsmath,amsfonts,amsthm}    % Math packages
\usepackage{makecell}                   % Table package
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
\frenchspacing                         % Better looking spacings after periods
\usepackage{sectsty}
\sectionfont{%                         % Change font of \section command
\usefont{OT1}{phv}{b}{n}               % bch-b-n: CharterBT-Bold font
\sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
\newcommand{\sepspace}{\vspace*{1em}}     % Vertical space macro
\newcommand{\MyName}[1]{ % Name
            \fontfamily{phv}\Huge\sffamily\textbf{#1}}
\newcommand{\MySlogan}[1]{ % Slogan}{optional)
            \fontfamily{phv}\large\sffamily\slshape #1}
%%% ------------------------------------------------------------
\usepackage[colorlinks=true,
            linkcolor=blue,
            urlcolor=blue]{hyperref}    % had to be the last in preamble

%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}           % No pagenumbers/headers/footers
\begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
\noindent\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l r}
\makecell[r]{
\MyName{Name Name}
\MySlogan{Curriculum Vitae\\ (\today)}
             }
    &   \includegraphics[width=0.15\textwidth, valign=c]{picture}
\end{tabular*}
%---------------------------
\sepspace  % Si on ajoute encore \sepspace on aura plus d'espace
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Informations personelles}

\end{document}

using table for your name and image placement gives you freedom to put where you like to have. just insert it to according column: (text in the first, image in the last or vice versa). i also slightly simplified and reorganized your preamble.

edit: the definition of \MyName, \MySlogan and table organization are changed (improved).

enter image description here

  • Thank you. However, I want to get the picture not in the center but in the extreme right. – Schüler Dec 7 at 10:11
  • @Schüler, sorry, i was interrupted at loading answer. now i finish it and move image on the right. the last is with suggested code straightforward ;-) – Zarko Dec 7 at 10:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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