I want to put a refererence next to image, for example: I want to put the word enclosed in red:
1 Answer
There are many ways to do this.
Note: \llap
does not automatically start a new paragraph, hence the \leavevmode
. It may not be obvious, but the minipage is indented (by \parindent
).
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{minipage}{\dimexpr\textwidth-\parindent}
\leavevmode\llap{\rotatebox{90}{\strut Bogus Name}}%
\includegraphics[width=\textwidth]{example-image}\par
\textsf{\Large\strut Example Image}\par
(from MWE package)
\end{minipage}
\end{document}
This is easier to set up:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\noindent\begin{tabular}{r@{\hspace{2pt}}l}
\rotatebox{90}{Bogus Name} & \includegraphics[width=2in]{example-image}\\
& \textsf{\Large Example Image}\\
& (from MWE package)
\end{tabular}
\end{document}
copyrightbox
package. Please see my answer to a similar post.