0

I have a portion of a latex document that is similar to:

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}
\includegraphics[width=0.5\linewidth]{figure/plot} \hfill{}
some text...
\end{knitrout}

(it has been generated from R using knitr). It puts the picture I want, and below some text.... I want to put some text... at the right of the picture. How could I do it?

EDIT: adding the R code to generate the latex code for the picture:

<<plot,echo=FALSE,fig.align="left",out.width="0.5\\linewidth">>=
generatePicture()
@
S4M
  • 131

1 Answers1

1

I managed to find it using \minipage. I'm posting what I did if someone has the same problem, or if someone else knows a better way.

\minipage[t]{\dimexpr0.48\linewidth-2\fboxsep-2\fboxrule\relax}
\begin{knitrout}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}

\includegraphics[width=1\linewidth]{figure/plot} \hfill{}



\end{knitrout}

\endminipage%}
\hfill
\minipage[t]{\dimexpr0.48\linewidth-2\fboxsep-2\fboxrule\relax}
\vspace{10 mm}
Some text...
\endminipage
S4M
  • 131