0

Image next to text problem

Dear all,

As you can see on the above figure, I would like the text to be higher (like it should start at the top of the image).

My code is :

\begin{figure}[ht] 
\centering 
\includegraphics[scale=1]{Images/GIS_mapping_Software.jpg} 
\caption{test} 
\label{GIS_Mapping_Software} 
\end{minipage}%
\begin{minipage}[t]{10cm} 
As shown on figure ~\ref{GIS_Mapping_Software}, the purpose of the GIS is to display multiple maps on one single map.\\ 
For example, a single map could regroup sites that produces pollution and sensitive sites to pollution. \\
\end{minipage} 
\end{figure} 

Is there anyway I can change my code so that the text begins at the top of the image ?

  • 2
    (1) welcome, (2) please never post images of code, then others will have to retype it, when you could just have pasted the code into your question for others to easily copy. (3) Please post a full minimal example instead of just a sniplet where others have to guess the rest. (4) Have a look at the adjustbox package, it has several alignment features. – daleif Mar 5 '18 at 12:49
  • Ok here is my code : \begin{figure}[ht] \centering \includegraphics[scale=1]{Images/GIS_mapping_Software.jpg} \caption{test} \label{GIS_Mapping_Software} \end{minipage} \begin{minipage}[t]{10cm} As shown on figure ~\ref{GIS_Mapping_Software}, the purpose of the GIS is to display multiple maps on one single map.\\ For example, a single map could regroup sites that produces pollution and sensitive sites to pollution.\\ \end{minipage} \end{figure} – Avator Mar 5 '18 at 12:56
  • I don't get why it continously puts everything next to each other why it isn't the case ... – Avator Mar 5 '18 at 13:01
  • It is an article, I have already the usepackages graphicx, subcaption. What other information do you need (I am not going to put all the packages because there are a lot of them... – Avator Mar 5 '18 at 13:03
  • Please update your question with the code, plus that is still a sniplet, others often will not help if the have to guess the rest of the document. You need to make a minimal example, including necessary preamble and document class. In stead of your image you can use either \rule{5cm}{5cm} or one of the images that comes with the mwe package. We need something we can copy and test. Did you take a look at what the adjustbox package offers – daleif Mar 5 '18 at 13:14
2

enter image description here

after correcting your code snippet and adding missed part of your document (that your code fragment become complete small document: observe preamble, where is added package which enable above solution).

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

\begin{document}
\begin{figure}[ht]
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[%scale=1
                 width=0.9\linewidth, valign=t]{Images/GIS_mapping_Software.jpg}
\caption{test}
\label{GIS_Mapping_Software}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
As shown on figure ~\ref{GIS_Mapping_Software}, the purpose of the GIS is to display multiple maps on one single map.\\
For example, a single map could regroup sites that produces pollution and sensitive sites to pollution. \\
\end{minipage}
\end{figure}
\end{document}
|improve this answer|||||

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