×
Pro použití ShareLaTeXu v Angličtina klikněte zde

[edit] ShareLaTeX guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files

When editing documents in ShareLaTeX to include images is quite easy, this article explains how.

Contents

[edit] Simple image upload

To upload an image, in the editor go to the upper left corner and click the upload icon Uploadicon.png

UploadingImagesEx1.png

a dialogue box will pop up for you to upload your files

UploadingImagesEx2.png

there you can either drag and drop your files or click Select files(s) to open a file browser

UploadingImagesEx3.png

navigate to the right folder and select the images to upload. You can upload several files at once. After the upload process is complete you will see the files in the left panel.

UploadingImagesEx4.png

Now you can use your images within your LaTeX file, see the example below

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
 
\title{UploadingImages}
\author{team+learn }
\date{\today}
 
\begin{document}
 
\maketitle
 
\section{First section}
In this document we show how to include images. Some examples 
will be displayed.
 
\begin{figure}[htp]
\centering
\includegraphics[width=4cm]{lion-logo}
\caption{ShareLaTeX logo}
\label{fig:lion}
\end{figure}
 
\end{document}

UploadingImagesEx5.png

notice that only the file name of the image is passed as parameter in \includegraphics[width=4cm]{lion-logo}

For more information about picture manipulation in LaTeX see the further reading for links to other documentation pages.

[edit] Uploading images to a folder

If your project includes several images you might need to put them in a separate folder to keep everything organized.

You can create folders in ShareLaTeX, go to the upper left corner of your editor and click the folder icon Foldericon.png

UploadingImagesEx6.png

an input box will appear, set a name for your folder and click Create

UploadingImagesEx7.png

Now you can see the folder in your left panel. You can drag and drop already uploaded files, even between folders in your left panel.

UploadingImagesEx8.png

To upload files directly into a folder, click that folder then click on New and follow the instructions in the previous section.

Once you have some files in your folder you can use them within your document, see the example below.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
 
\title{UploadingImages}
\author{team+learn }
\date{\today}
 
\graphicspath{{Images/}}
 
\begin{document}
 
\maketitle
 
\section{First section}
In this document we show how to include images. Some examples 
will be displayed.
 
\begin{figure}[htp]
\centering
\includegraphics[width=4cm]{lion-logo}
\caption{ShareLaTeX logo}
\label{fig:lion}
\end{figure}
 
\end{document}

UploadingImagesEx5.png

The command \graphicspath{ { Images/} } tells LaTeX that the images are stored in Images, now you only have to use the file name instead of the full path in \includegraphics

For more information on image management in LaTeX look in further reading for links.

[edit] Quick guide

  • Quick guide to upload one or more images into your ShareLaTeX project:

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.

  • Quick guide to upload images into a folder:

To create a new folder in the editor click the folder icon, set a name for your folder and click create. Now click your newly created folder and follow the process described in the previous paragraph to upload images, or drag and drop already uploaded images into your folder.


[edit] Further reading

To learn more about image manipulation in LaTeX see.