Code where having 6 subfigure environment causes the error but not less because I run out of labels of subfigures: a), b), ..., n), but I need more  \documentclass{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \usepackage{pgffor}  \begin{document}  \begin{figure} \foreach \ii in {1,...,5}{ \centering% not \center! \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.bland.male.5}.pdf}   \caption{\#\ii, ite. 1.} \end{subfigure} \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.blandmale.6}.pdf}   \caption{\#\ii, ite. 2.} \end{subfigure} \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.bland.male.7}.pdf}   \caption{\#\ii, ite. 3.} \end{subfigure} \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.bland.8}.pdf}   \caption{\#\ii, ite. 4.} \end{subfigure} \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.bland.9}.pdf}   \caption{\#\ii, ite. 5.} \end{subfigure} \begin{subfigure}{0.19\textwidth}   \centering   \includegraphics[scale=0.11, page=\ii]{{Rplots.bland.10}.pdf}   \caption{\#\ii, ite. 6.} \end{subfigure} } \end{figure} \end{document}   Error  ! LaTeX Error: Counter too large.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.1492 }  ?    TeXLive: 2016 OS: Debian 8.5
9874
I would like to have \alph{counter} for values larger than 26. The following MnWE gives me the error ! LaTeX Error: Counter too large.  \documentclass{article} \begin{document}  \begin{enumerate} \def\theenumi{\alph{enumi}} \setcounter{enumi}{24} \item twenty-five \item twenty-six \item twenty-seven \end{enumerate}  \end{document}   I would like it to behave like one of these:  ..., x, y, z, aa, bb, cc, ..., xx, yy, zz, aaa, bbb, ccc, ... (preferred) ..., x, y, z, aa, ab, ac, ..., ax, ay, az, ba,  bb,  bc,  ... (can be if nothing else works)   A solution without LaTeX3 extensions would be awesome as I cannot run LaTeX3 extensions.
8295
I have a PNG plot with a couple of black patches in it, and I'd like to refer to it in the \caption of the figure. According to the TikZ manual, I'd have to  \tikz \fill[black] (1ex,1ex) circle (1ex);   which works perfectly outside a \caption. Using this inside a \caption, though, leaves me with the compile error  ! Use of \use@pgflibrary doesn't match its definition. \pgfutil@ifnextchar ...1\def \pgfutil@reserved@a {                                               #2}\def \pgfutil@reserved@... l.375 ...blah blah.}  ?   The following produces the compile error  \documentclass{article} \usepackage{tikz}  \begin{document} \tikz \fill[orange] (1ex,1ex) circle (1ex); \begin{figure} \caption{\tikz \fill[orange] (1ex,1ex) circle (1ex);} \end{figure} \end{document}   Any hints here?
22558
I'm trying to use the svg package for inserting svg images in my latex file, as suggested in other questions. But now I ran into a problem:  For example I have a image figure1.svg, if I write  \includesvg{figure1}   it will give an error says  ERROR: LaTeX Error: File `figure1.pdf_tex' not found.   But if I write  \includesvg{figure1.svg}   it will give another error says  ERROR: LaTeX Error: Unknown graphics extension: .svg.   How can I fix this problem? I'll prefer not having to convert all my svg files to pdf_tex files with some external program.    Update  My LaTeX environment is latest the TeXLive 2013 on Windows 7. A MWE code would be  \documentclass{article} \usepackage{svg}  \begin{document}  \begin{figure}[htbp]   \centering   \includesvg{figure1.svg}   \caption{svg image} \end{figure}  \end{document}
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?
9123
I am writing my master thesis using Memoir. I want all subfigures to have their labels in the top left corner. I have so far done this with tikz, but I would like to find a more elegant solution as my current solution has flaws.  I would like to be able to automatically reference figures in the text, without having to manually specify the subfigure. This means each figure needs to have a label. Yet if I label the subfigure, said label invariably appears underneath the figure, and I am not sure how to move it, change its color and so on.  Anyway, an mwe and images of current and desired solution:  \documentclass{memoir}  \usepackage{tikz,siunitx,mwe} \newsubfloat{figure}  \newcommand{\scalebarimg}[6]{   \begin{tikzpicture}     \draw node[name=micrograph] {\includegraphics[width=#2\textwidth]{#1}}; %I fetch the image     \draw[ultra thick,#6] (micrograph.south west)++(0.03*0#2\textwidth,0.035*0#2\textwidth)--++(#2*#3\textwidth,0)node[above,midway]{#4 \si{\micro\meter}}; %I draw the scalebar     \draw  (micrograph.north west)  node[anchor=north west,yshift=-1,#6]{\textbf{\small{(#5)}}}; %I draw the image label   \end{tikzpicture} }  \begin{document} \begin{figure} \centering \subbottom[\label{fig:one}]{     \scalebarimg{example-image}{.45}{0.33933}{50}{a}{black} }\subbottom[\label{fig:two}]{     \scalebarimg{example-image}{.45}{0.33933}{50}{b}{white} } \caption{Figures (a) and (b) should not be doubly labeled.} \end{figure}    See Figure~\ref{fig:one} and \subcaptionref{fig:two}.  \end{document}   which yields  but I want   Is there a way of letting LaTeX position the label where I want it to relative the top left corner of the image? Or at least hide the caption for each individual subfigure while still labelling it?
22340
I mess up with things when I try to use the figure-thing: the picture is not appearing with the correct alignment (apparently because I forget the float package). Now I want to use only the graphicx package with \includegraphics. How can I center the \includegraphics without figure?  Not working or doing centering to the document afterwards.  \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}{\centering} \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}\centering
118393
I'm trying to insert a figure into my LaTeX file using the following syntax:  \begin{figure}   \centering   \includegraphics [width=3in]{fig1.png}   \caption{Calculation of shortest path betweenness}   \label{Fig.3:Shortest path betweenness} \end{figure}   It worked for me before but this time I'm getting the following error:   LaTeX Error: \begin{figure} on input line xxx ended by \end{document}   Also, hovering over the red cross symbol indicating error in Eclipse, I see this message    paragraph ended before Gin@iii was completed.   It's obvious that I have the \end{figure} to end my \begin{figure} so I don't understand how I still get that error.  Can someone please tell me what the problem is?  Edit: Add more details for debugging. The problem went away if I remove '[width=3in]'. Here is the detail error:  pdflatex&gt; Runaway argument? pdflatex&gt; width=3in]{fig1.png} \caption {Caption} \label {Fig.1}  pdflatex&gt; ! Paragraph ended before \Gin@iii was complete. pdflatex&gt; &lt;to be read again&gt;  pdflatex&gt;                    \par  pdflatex&gt; l.40  pdflatex&gt;        pdflatex&gt;  pdflatex&gt; Underfull \vbox (badness 10000) has occurred while \output is active pdflatex&gt; (./document.bbl pdflatex&gt;  pdflatex&gt; Package natbib Warning: Empty `thebibliography' environment on input line 3.   Added sample code:  \documentclass[10pt,psfig,letterpaper,twocolumn]{article} \usepackage{geometry} \usepackage{graphics} \usepackage{setspace} \usepackage{natbib} \usepackage{verbatim} \usepackage[scaled=0.9]{helvet} \singlespacing \paperwidth 8.5in \paperheight 11in \oddsidemargin 0in \headsep 1.3cm  \geometry{left=0.75in,top=0.75in,right=0.75in,bottom=1in} \textwidth 7in  \textheight 9.25in \columnsep 0.4in \footskip 0in  \renewcommand{\bibname}{REFERENCE} \pagestyle{empty}  \begin{document} \bibliographystyle{acm}   \title{\fontfamily{phv}\selectfont{\huge{\bfseries{Title here}}}} \author{ {\fontfamily{ptm}\selectfont{\large{\bfseries{author name}}}}\thanks{contact info }}  \maketitle \thispagestyle{empty}  \section*{\fontfamily{phv}\selectfont{\normalsize{\bfseries{Section name}}}}  \begin{figure} \centering \includegraphics[width=3in]{fig1.png} \caption{Caption} \label{Fig.1} \end{figure}  \pagebreak[4] \vspace*{5.52in} \bibliography{ref} \end{document}
123833
I have tried several approaches to solve my problem but unfortunately none successful yet. I can not find documentation mentioning how to solve this particular case. My problem is that I am using a subfigure in beamer and I am trying to create multiple \ref points before the \label appear in the same figure. When compiling the .tex document only one reference point appears and the rest are appearing as ??. Is there any possible solution to my problem?  EDIT: The code I'm using  \documentclass[xcolor=pdftex,dvipsnames,table]{beamer} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{cleveref} \usepackage{caption} \usepackage{subcaption}  \mode&lt;presentation&gt; \setbeamertemplate{caption}[numbered]  \begin{document} \begin{frame}  \begin{columns}[t]  \begin{column}[T]{5cm}  \begin{itemize}  \item&lt;+-| alert@+&gt; 1~\autoref{1}  \item&lt;+-| alert@+&gt; 2~\autoref{2} etc  \end{itemize}  \end{column}  \begin{column}[T]{5cm}  \begin{figure}  \only&lt;1&gt;{\begin{subfigure}[b]{1.0\linewidth}           \caption{sub caption 1}           \label{1}           \includegraphics[width=7.0cm,height=5cm]{fig 1}           \end{subfigure} }  \only&lt;2&gt;{\begin{subfigure}[b]{1.0\linewidth}           \caption{sub caption 2}           \label{2}           \includegraphics[width=5.5cm,height=5cm]{fig 2}           \end{subfigure} } \caption{main}  \protect\label{3}  \end{figure}  \end{column}  \end{columns}  \end{frame} \end{document}
86135
In some figures I create for my thesis I want to replace the labels and such using the same font and size as in the rest of the thesis. A couple of month ago I already used psfrag and pstool (with pdflatex). But now I cannot get it working. I did not changed any files (using a version control system, so I'm pretty sure).  The following mini example produces the same error as in my thesis:  \documentclass{article}  \usepackage{pstool}  \begin{document}    \begin{figure}      \centering   \psfragfig*{Inverses_Pendel}  \end{figure} \end{document}   In the same directory are the files Inverses_Pendel.eps and Inverses_Pendel.tex. Inverses_Pendel.tex contains the following content:  \psfrag{T}[cc][cc]{$Test$}   And here is the error:     Package pstool Warning: Execution failed during process:   ps2pdf   "-dAutoFilterColorImages=false" "-dAutoFilterGrayImages=false" "-dColo   rImageFilter=/FlateEncode" "-dGrayImageFilter=/FlateEncode"   "-dPDFSETTINGS=/pre press" "Inverses_Pendel-pstool.ps"   "Inverses_Pendel.pdf" This warning occurred on input line 7.      ! Missing $ inserted.                     $ l.7 \end           {figure} ?  ! Emergency stop.                     $ l.7 \end           {figure} End of file on the terminal!   It's such a generic error, I don't even know where to start searching.  I'm using MikTeX 2.9. I'm passing the -shell-escape option.
40187
Firstly I apologize if this had been answered before. I have tried looking for it anywhere but I couldn't find any solution.  Anyway, I have a trouble with the caption of my table when I included the subcaption package.  This is the excerpt of the code:      \documentclass{ifacconf}     \usepackage{natbib}     \usepackage{graphicx}     \usepackage{subcaption}      \begin{document}      \begin{table}[hb]         \centering         \caption{Test eheh blah}         \begin{tabular}{|c|c|c|c|} \hline             \multicolumn{4}{|c|}{Margin settings} \\             \hline             Page &amp; Top &amp; Bottom &amp; Left/Right \\ \hline             First &amp; 3.5 &amp; 2.5 &amp; 1.5 \\ \hline             Rest &amp; 2.5 &amp; 2.5 &amp; 1.5 \\ \hline          \end{tabular}     \end{table}      \end{document}   And the output is    However, if I removed the subcaption package, the output is as expected    So, I would really appreciate any help. Thanks.  Cheers.  EDITED:  Following Harish Kumar answer, although it does solve the caption issue in my table, it causes problem in the captions of my other subfigure. Here is the code of the subfigure.      \usepackage{epstopdf}     \begin{figure}[htb!]         \centering         \begin{subfigure}{0.38\textwidth}             \centering             \includegraphics[width=\textwidth]{pic1.eps}             \caption{test caption}             \label{fig:pic1}         \end{subfigure}         \\         \begin{subfigure}{0.38\textwidth}             \centering             \includegraphics[width=\textwidth]{pic2.eps}             \caption{test caption}             \label{fig:pic2}         \end{subfigure}         \caption{Long caption Long caption.}         \label{fig:pictures}     \end{figure}   And the output
113986
I'm trying to put a figure with subfigures, using the acmsmall class. When compiling I get the following error:  Package caption Warning: Unsupported document class (or package) detected, (caption) usage of the caption package is not recommended. See the caption package documentation for explanation.  ) (/usr/local/texlive/2012/texmf-dist/tex/latex/caption/subcaption.sty  ! LaTeX Error: Command \subcaption already defined.                Or name \end... illegal, see p.192 of the manual.  See the LaTeX manual or LaTeX Companion for explanation.  Type  H &lt;return&gt;  for immediate help.  ...                                      l.57      \caption@gobble}}                            %  ?   When I just skip it, another error appears.  Package caption Warning: \caption will not be redefined since it's already (caption)                redefined by a document class or package which is (caption)                unknown to the caption package. See the caption package documentation for explanation.   ! Package caption Error: The `subcaption' package does not work correctly (caption)                in compatibility mode.  See the caption package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.7 \begin{document}  ?    If I continue, I get the figure fine, but I would like to know what is happening. I never had problems inserting subfigures with other document classes (e.g. IEEEtran).  Here's a MWE:  \documentclass[prodmode,acmtecs]{acmsmall}  \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure}  \begin{subfigure}[b]{0.5\textwidth}                 \includegraphics{acmsmall-mouse.pdf}                 \caption{A subfigure}         \end{subfigure}%   \begin{subfigure}[b]{0.5\textwidth}                 \includegraphics{acmsmall-mouse.pdf}                 \caption{Another subfigure}         \end{subfigure}% \caption{Several figures} \end{figure}  \end{document}   Is there a preferred way to create subfigures with acmsmall?
109629
There are already several threads that deal with this: they suggest having one figure and putting putting minipages inside, or using the subcaption package and having subfigure environments. However, I've tried both of these approaches and I'm still going wrong:  \begin{figure}[h]  \begin{minipage}[b]{0.2\linewidth}  \begin{tikzpicture}[sibling distance=0pt] \Tree [.TP         [.DP \edge[roof]; {a 'we'} ]         [.T$'$             [.T \node(li){li 'eat$_i$'}; ]             [.VP                 [.Spec t ]                 [.V$'$                      [.DP \edge[roof]; {saka 'rice'} ]                     [.V \node(t){t$_i$}; ] ] ] ] ] \draw [-&gt;] (t) .. controls +(south:3) and +(south:3) .. (li); \end{tikzpicture}  \end{minipage}\hfill  \begin{minipage}[b]{0.2\linewidth}  \begin{tikzpicture}[sibling distance=0pt] \Tree [.TP         [.DP \edge[roof]; {a 'we'} ]         [.T$'$             [.T \node(li){la 'have'}; ]             [.VP                 [.Spec t ]                 [.V$'$                      [.DP \edge[roof]; {saka 'rice'} ]                     [.V \node(t){li 'eaten'}; ] ] ] ] ] \draw [red,-&gt;] (t) .. controls +(south:3) and +(south:3) .. (li); \end{tikzpicture}  \end{minipage}  \end{figure}
20634
Is it possible to make a 3 by three grid of plots in a latex figure and then label only the columns and rows, rather than needing captions for each? So for example, I'd like columns to be labelled A, B and C and the rows 1, 2, and 3. I'd then be able to reference square (2, B) as the middle square.   I'm using a figure environment with 9 subfigure environments  \begin{figure*}[t]     \begin{subfigure}{0.3\textwidth}         \includegraphics[width=\linewidth]{/path/to/img1}     \end{subfigure}%     \begin{subfigure}{0.3\textwidth}         \includegraphics[width=\linewidth]{/path/to/img2}     \end{subfigure}%     \begin{subfigure}{0.3\textwidth}         \includegraphics[width=\linewidth]{/path/to/img3}     \end{subfigure}      \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img4} \end{subfigure}% \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img5} \end{subfigure}% \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img6} \end{subfigure}      \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img7}     \caption{Smad7 reproduced} \end{subfigure}% \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img8} \end{subfigure}% \begin{subfigure}{0.3\textwidth}     \includegraphics[width=\linewidth]{/path/to/img9} \end{subfigure}       \caption{} \end{figure*}
94562
\documentclass{beamer}  \usepackage{subfig}  \begin{document}  test  \end{document}   returns undefined control sequence \@@magyar@captionfix  (It was not so in January; I am on fully updated pretest)
55104
So its a fairly simple question to a problem people normally experience. I have a rough idea of what to do, but I am looking for the correct way of doing things. So in the solution I will include what would be the bare minimum requirements I think would get this problem solved. I am looking for feedback and corrections though.  So please tell me, how does one go about creating subfigures within a figure. After that, caption it. Then label it for reference and then refer to it in the text?
95748
Consider the following macro:  \newcommand{\sxfigure}[4]{ \includegraphics[width=#1*#3 cm, height=#2*#3 cm]{#4} }   #1 and #2 is some value to determine the width and height of the figure, #3 is to control the zoom ratio. However, the above code doesn't work. Could someone provide a solution? I have tried the following, still not work. Could some point out the mistake?  \usepackage{pgf} \newcommand{\sxmultiply}[2]{\pgfmathparse{#1*#2}\pgfmathresult} \newcommand{\sxfigure}[5]{ \begin{figure} \begin{center} \includegraphics[width=$\sxmultiply{#3}{#5}$ cm, height=$\sxmultiply{#4}{#5}$ cm]{#1} \end{center} \caption{#2} \end{figure} }
40956
I am new to LaTeX. I am not sure how to frame my question. But I will frame it so that it is understandable.  I would like to make a subfigure, but the caption must be   caption of subfigure a-1                caption of subfigure a-2      caption of subfigure b-1      caption of subfigure b-2                    `caption  of entire figure`   I  tried using subfigure, but I am getting continuously a,b,c,d, but i need to name them as as mentioned above (a-1, a-2, b-1, b-2).  In my situation, there are chances that the sub figures might be in different pages.