I having trouble inserting a gif file into my overleaf latex document. Here is the code I used:  \documentclass[conference,10pt]{IEEEtran}  \usepackage{graphicx}  \usepackage[utf8]{inputenc}  \usepackage{epstopdf}    \usepackage{psfrag}      \usepackage{subfigure}   \usepackage{url}         \usepackage{stfloats}    \usepackage{amsmath}      \interdisplaylinepenalty=2500                      \usepackage{balance}   \DeclareGraphicsRule{.gif}{png}{.png}{%       \noexpand\epstopdfcall{convert #1 \noexpand\OutputFile}%  }  \AppendGraphicsExtensions{.gif}   \begin{figure}[h!]     \includegraphics[width=\linewidth, angle = 0] {images/Climate_Simulation_of_Surface_Air_Temperature.gif}     \caption{NASA's Map of Antarctic Ice Flow}     \label{fig:SSBlock}  \end{figure}  This did not work so I replaced the    \begin section with this line of code:       \includegraphics[width=\linewidth, angle = 0 {images/Climate_Simulation_of_Surface_Air_Temperature.gif}  Still nothing worked. Please let me know how I can insert my .gif file.
48439
Is there any way to include an animated GIF directly in either PDFLaTeX or XeLaTeX? I realize the animate package can include animations in a PDF, but it doesn't support animated GIFs and you have to split them up manually into EPS or PNG files as far as I can tell.
94506
I have this folder structure in my project:   main.tex mystyle.sty tex  mytex.tex  img  myimg.tex  dat  mydat.dat     And the following files:  main.tex:  \documentclass{scrartcl} \usepackage{mystyle}  \begin{document}   \input{tex/mytex} \end{document}   mytex.tex:  \begin{figure}[ht]   \centering   \input{img/myimg.tex} \end{figure}   myimg.tex:  \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \IfStandalone{   \newcommand{\fromRoot}[1]{../dat/#1} }{   \newcommand{\fromRoot}[1]{./dat/#1} } \pgfplotstableread{\fromRoot{mydat.dat}}\datatable \begin{document}   \begin{tikzpicture}     \begin{axis}[width=10cm, height=6cm]       \addplot table[x=0,y=1]{\datatable};     \end{axis}   \end{tikzpicture} \end{document}   mydat.dat:  1 0.4032 2 0.40241 3 0.38704   mystyle.sty:  \ProvidesPackage{mystyle}  \usepackage{graphicx} \usepackage{amsmath} \usepackage{amssymb} \usepackage{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable}   In my understanding should the path to the mydat.dat file be ./dat when I'm compiling the main file main.tex. But I always get the error message:  (./img/myimg.tex ! Undefined control sequence. \pgfplotstableread@filename ^^@-\datatable
41221
Everything works perfectly except until the error below. I'm slightly new at LaTeX and perhaps I'm missing a package, but I already have the graphicx package. Any help will be greatly appreciated!  ! LaTeX Error: Unknown graphics extension: .eps.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.24 \includegraphics[width=2.6in]{02_1.eps}  ?
121216
I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}}
69789
I am sorry if my question is too silly, I am totally new to LaTeX.   I have just downloaded TeXstudio 2 days ago and am trying to include some figures/images in the document. I found out about the \includegraphics command but cannot understand how it works at all. Every guide I have found jump to something like   \usepackage{graphicx} \includegraphics[width=0.5\textwidth]{bird1}   and I don't have a clue how I am supposed to use the command except that I need to use the package graphicx.  Where do I have to put my images so that TeXstudio can find it? Let's say I have an image called cat.png located at C:\Users\ASUS\Desktop\PICS, do I just type \includegraphics{cat} and TeXstudio is going to magically find it?
43206
Firstly and fore-mostly I am a complete new comer to the world of LaTeX and so please do bear with me. I will try to be as accurate as I can but if you need any more info please let me know.  All I want is to figure out how to import a graphic into LaTeX (MacTeX).  I am using the following in my code:  \documentclass[10pt,a4paper,draft]{report} \usepackage{graphicx}   Then in my document section I'm using   \begin{figure} \includegraphics[width = 50mm]{Name.jpg} \caption{Label} \end{figure}   Once I compile the document, the area for the picture has been allocated but there is no image, I have tried .png and .pdf files also.  I know that this is a very simple question and I hope there is a simple solution but I cannot find anything on the net about this (which may mean I'm being dim).  Also I'm using Latexian but I have tried 4 different editors and it doesn't work in any.
19308
I need to convert my LaTeX documents into PNG. The problem is, I also need the resulting image to be as short as possible (height-wise). I've tried latex followed by dvipng, but the result is always the size of a page. For instance, take a .tex file containing:  \documentclass{article}   \begin{document}   Hello. This is a test. \begin{equation}   L = 2                                                                      \end{equation}   \end{document}   If I compile it with latex, and then run dvipng, I get a PNG file that's the size of a full page. What I need is for the PNG file to be only as tall as needed for everything to fit. So the image would end immediately after the equation. The image still needs to have full width (because of the equation numbering).  Is there a way to achieve that?
464
I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).
85377
I'm trying to include an image, and keep it centered, and prevent from wrapping from the next page.  The following code works for that:  \begin{minipage}{\textwidth}     \begin{center}         Caption for image          \includegraphics[scale=0.5]{myimage.png}      \end{center} \end{minipage}   I'd like this image to be in a figure, with a caption.  The following doesn't compile:  \begin{minipage}{\textwidth}     \begin{figure}         \includegraphics[scale=0.5]{myimage.png}         \caption{Caption for image}         \label{fig:sample_figure}     \end{figure} \end{minipage}   I get the errors:  ! LaTeX Error: Not in outer par mode. ! Undefined control sequence.   How can I fix this?
15052
There several types of graphics files. In no particular order .jpeg .eps .pdf .png .tif .jif (and no doubt others). Some work with latex, dvips and some work with pdflatex. How am I supposed to know which?  Just to confuse matters, metapost produces .eps but I can use these with pdflatex as long as I put in a four line incantation.  Can anyone explain this?
45362
I'm writing a report in LaTeX and I'm using excel to calculate, make graphs and tables. What would you recommend me to do to import it to latex?  I have tried taking print-screen and import as figures, but if the image scale isn't 100% it gets blurry and ugly.  I've been trying to export, print and save selected area as pdf. But no matter what I try, it exports with selected paper size. So it has a huge margin and I think it would take to much time to make a custom paper size for each figure.  Any thoughts?
62650
When I pdflatex the text below it doesn't insert the picture, but writes the name of the file instead (pic).  And the geometry line gives the error  ! LaTeX Error: Missing \begin{document}.   The picture I am using is at  and the floatrow package .  Question  Can anyone see what is wrong?  Text  \documentclass[a4paper]{article} \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight \usepackage{aeguill} \pdfcompresslevel=9 \usepackage[pdftex,colorlinks]{hyperref}  \usepackage{a4} \usepackage{fixltx2e} \usepackage[danish]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc}  \usepackage[draft]{graphicx} \usepackage{floatrow}  \usepackage{geometry}  \geometry{margin=10pt,paperwidth=\textwidth+20pt,paperheight=\textheight+20pt}  \begin{document}  The first paragraph.  \begin{figure}   \includegraphics{pic} \end{figure}  And the second.  \end{document}
63350
I need to submit the final version of my paper to a conference but they request a .zip file that including .ps and .dvi file of my .tex document. Since my whole project is on Overleaf, I want to know how can I accomplish it?   Here, what I have done so far:   First I learned that I have to change compiler from pdflatex to latex... Done! Then when I compile, it returned errors that request natural size of figures. And I used the answer given here:     Now it doesn't yell out me, compiles with no error, however still can't see the figures in the output. I don't even know if it is normal or not. Also, can't download a .div file, still gives .pdf file to me.  About .ps file, I haven't there yet, didn't try. But if you know what to do, please inform me. Thanks in advance.
36649
I'm trying to plot an image file in a pdfplots axis. This is a minimal example (the files fig2a.eps and fig2a.png both contain the image that should be plotted):   \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot graphics[xmin=-0.15, xmax=0.15, ymin=0.0, ymax=0.2] {fig2a}; \end{axis} \end{tikzpicture} \end{document}   When compiling with pdflatex, I get exactly what I want. With latex (producing a dvi file), the tick labels are all on top of each other inside the image, so something goes wrong with the positioning.  I suppose version information is useful in this case -- from the output to the screen I have this when running both latex and pdflatex:  This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)   What am I doing wrong?
47489
Possible Duplicate:          When I add a piece of code of figure insertion to the context I'm faced with a problem: a number of irrelevant words appear.    Code:  \begin{figure}     \centering         \includegraphics[width=0.9\textwidth]{C:/Thesis/Latex/thesis_1(1)/Pictures/study area.jpg}         \rule{35em}{0.3pt}     \caption{The Grand St. Bernard wireless sensor network deployment (a) the coordinates of nodes according to the Swiss coordinate system (b) the distribution of the nodes in the study site \citep{r33}}     \label{fig:study area} \end{figure}   Problem:
36997
I am using a finite element program that outputs data in .txt files. And I want to input these data in my LaTeX code. Is there a way to input the data files so that they appear as the program output format? Program output data file:  LaTeX code: \documentclass[a4paper,oneside,openany,article]{memoir} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[danish]{babel} \usepackage{graphicx}     \graphicspath{{Figures/}} \usepackage{fullpage} \usepackage{mathtools}  \begin{document} \input{Data/shearwall_only_bc_A.txt} \end{document}  LaTeX output:
85135
I have the following LaTeX code which works fine:  \documentclass[12pt,a4paper]{article} \usepackage[a5paper]{geometry}% just for the example \usepackage[utf8x]{inputenc} \usepackage{listings} \usepackage[labelfont=bf, font=small]{caption} \usepackage[framemethod=tikz]{mdframed}   \lstset{ breaklines=true, breakatwhitespace=false, xleftmargin=1em, frame=single, numbers=left, numbersep=5pt, }  \newcommand\mylstcaption{}  \surroundwithmdframed[ hidealllines=true, middleextra={   \node[anchor=west] at (O|-P)     {\lstlistingname~\thelstlisting\  (Cont.):~\mylstcaption};}, secondextra={   \node[anchor=west] at (O|-P)     {\lstlistingname~\thelstlisting\  (Cont.):~\mylstcaption};}, splittopskip=2\baselineskip ]{lstlisting}  \begin{document}  \renewcommand\mylstcaption{Example listing of code} \begin{lstlisting}[language=C, caption=\mylstcaption, label=lst:c1]  struct safe_buffer { struct list_head node;  /* original request */ void    *ptr; size_t  size; int direction;  /* safe buffer info */ struct dmabounce_pool *pool; void    *safe; dma_addr_t  safe_dma_addr; };  struct dmabounce_pool { unsigned long   size; struct dma_pool *pool; #ifdef STATS unsigned long   allocs; #endif };  struct dmabounce_device_info { struct device *dev; struct list_head safe_buffers; #ifdef STATS unsigned long total_allocs; unsigned long map_op_count; unsigned long bounce_count; int attr_res; #endif struct dmabounce_pool   small; struct dmabounce_pool   large;  rwlock_t lock;  int (*needs_bounce)(struct device *, dma_addr_t, size_t); };  #ifdef STATS static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dmabounce_device_info *device_info = dev-&gt;archdata.dmabounce; return sprintf(buf, "%lu %lu %lu %lu %lu %lu\n", device_info-&gt;small.allocs, device_info-&gt;large.allocs, device_info-&gt;total_allocs - device_info-&gt;small.allocs - device_info-&gt;large.allocs, device_info-&gt;total_allocs, device_info-&gt;map_op_count, device_info-&gt;bounce_count); }  static DEVICE_ATTR(dmabounce_stats, 0400, dmabounce_show, NULL); #endif  \end{lstlisting}  \end{document}   Part of the result looks like:  page 1    page 2    Now I would like to have similar looking captions (same font size etc.) which is currently not the case.