I want to put a refererence next to image, for example: I want to put the word enclosed in red:

Asked
Active
Viewed 522 times
4
Alan Munn
- 218,180
1 Answers
6
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}
John Kormylo
- 79,712
- 3
- 50
- 120

copyrightboxpackage. Please see my answer to a similar post. – Bernard Nov 14 '16 at 10:19