I want to insert a .jpg image(that is in my current folder, where the .tex file is) after a paragraph. How can I do it in Latex? What should I include / what commands should I use?
In the top left corner of the editor click on the upload icon, then you can either drag and drop the files or click Select files(s) to browse in your local directories. After the uploading process is complete, you can use these images in your document.
Latex can not manage images by itself, so we need to use the graphicx package. To use it, we include the following line in the preamble: \usepackage{graphicx} . The command \graphicspath{ {./images/} } tells LaTeX that the images are kept in a folder named images under the directory of the main document.
To insert a picture in your document, just use the "\includegraphics" command in the "LaTeX" menu. Then, click on the "browser" button in the dialog to select the graphic file. Note : if you click on the "+" button, a "figure" LaTeX environment will be added automatically.
You need to use a graphics library. Put this in your preamble:
\usepackage{graphicx}
You can then add images like this:
\begin{figure}[ht!] \centering \includegraphics[width=90mm]{fixed_dome1.jpg} \caption{A simple caption \label{overflow}} \end{figure}
This is the basic template I use in my documents. The position and size should be tweaked for your needs. Refer to the guide below for more information on what parameters to use in \figure
and \includegraphics
. You can then refer to the image in your text using the label you gave in the figure:
And here we see figure \ref{overflow}.
Read this guide here for a more detailed instruction: http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
if you add a jpg,png,pdf picture, you should use pdflatex to compile it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With