1

I am trying to align 3 images and text such that text is left aligned and images are all right aligned but can't figure out how to do it. Following is the code snipped I have written for the same.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx,wrapfig,lipsum}
\begin{document}

\begin{flushleft}
\noindent
\begin{tabular*}{2.6in}{l@{\extracolsep{\fill}}r}
    \textbf{\Large Shreyas Mangalgi} \\
\end{tabular*}

\end{flushleft}

\begin{flushright}
    \includegraphics[width=.10\textwidth]{IIMC.png}
    \includegraphics[width=.10\textwidth]{ISI.png}
    \includegraphics[width=.10\textwidth]{IITKGP.png}
\end{flushright}

\end{document}

This code produces the following output :

enter image description here

While I want the output to be something like this :

enter image description here

I am unable to figure out how to accomplish this.

  • 1
    Why don't put the images in the second column of the tabular? – Bernard Jul 23 '18 at 10:26
2
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\noindent
\textbf{\Large Shreyas Mangalgi}
\hfill
\includegraphics[width=.10\textwidth]{IIMC.png}
\includegraphics[width=.10\textwidth]{ISI.png}
\includegraphics[width=.10\textwidth]{IITKGP.png}
\end{document}

enter image description here

The text is flush left, the images are flush right. The white space to the left and right is the normal white border of the page.

The same effect can be obtained with a tabular. Note the use of @{} to remove extra space to the left and right of the table.

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\noindent
\begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}}
  \textbf{\Large Shreyas Mangalgi}
&
  \includegraphics[width=.10\textwidth]{IIMC.png}
  \includegraphics[width=.10\textwidth]{ISI.png}
  \includegraphics[width=.10\textwidth]{IITKGP.png}
\end{tabular*}
\end{document}

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.