2

I'm new in latex, and I don't know how to make text between the two images I try, but it doesn't work

enter image description here

I want the text to be between the A and B images

here what I want to make enter image description here

here my try :

\begin{table}[h]
    \centering
    
    \begin{tabular}{m{10cm} m{1cm} m{3cm}}
    
        \vspace{0.2cm}
        
        \includegraphics[width=45mm]{images/style/jakai.PNG} & & \vspace{1.52mm}
        \centering \large{Universite de Kairouan ´Institut Superieur ´ d’informatique et de Gestion }
        \includegraphics[width=45mm]{images/style/isiglogo.PNG}  \\
        
        
    \end{tabular}
\end{table}
5
  • I think you may have put the ampersand in the wrong place. If it's a tabular then you should have "Graphic & text & Graphic \\" but you have "Graphic & & text Graphic \\". – Plergux Apr 17 at 9:54
  • how can I solve this problem ?? I try to edit a template – youssef115 Apr 17 at 9:56
  • 1
    Like that? i.stack.imgur.com/fvn64.png Probably a sketch of the expected output would help in order to clarify your question. Could you add such a sketch? – leandriis Apr 17 at 9:58
  • Yes just like that friend :D – youssef115 Apr 17 at 9:59
  • I add image what I want to make exactly – youssef115 Apr 17 at 10:04
3

You want that the textual part is centered notwithstanding that the two images have different widths. In the image below the effect might seem wrong, but in your case the image on the right has no border and this “unbalanced effect” will not appear.

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\noindent
\makebox[0pt][l]{%
  \begin{tabular}{@{}c@{}}
  \includegraphics[width=2.5cm,height=2cm]{example-image}
  \end{tabular}%
}\hfill
\textbf{\begin{tabular}{@{}c@{}}
  Université de Karouan \\
  Institut Supérieur \\
  d'Informatique et de \\
  Gestion
  \end{tabular}%
}\hfill
\makebox[0pt][r]{%
  \begin{tabular}{@{}c@{}}
  \includegraphics[width=3cm,height=2cm]{example-image}
  \end{tabular}%
}

\end{document}

enter image description here

For the picture I added \usepackage{showframe} to see the line in context with the page frame.

0
3

one possible way could be

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}  
\begin{figure}%
    \centering
    \begin{subfigure}{.3\textwidth}
    \centering
        \includegraphics[width=\linewidth]{example-image-a}
    \end{subfigure}
    \begin{minipage}{.3\textwidth}\raggedright
              some very long text in between
              my two images.
    \end{minipage}
    \begin{subfigure}{.3\textwidth}
    \centering
        \includegraphics[width=\linewidth]{example-image-a}
    \end{subfigure}
\end{figure}
\end{document}

enter image description here

Adjust as needed

0
3

enter image description here

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}
\begin{document}

\noindent
\includegraphics[width=0.3\linewidth,valign=c]{images/style/jakai.PNG}
\hfill
\begin{minipage}{0.3\textwidth}
\centering Universite de Kairouan 

 Institut Superieur d’informatique et de Gestion 
\end{minipage}\hfill
\includegraphics[width=0.3\linewidth,valign=c]{images/style/isiglogo.PNG}

\end{document}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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