I am currently working on numbering my tables and figures according to the subsections which looks something like this: \documentclass[twoside, 12pt]{article}  \usepackage[english]{babel}   \usepackage{chngcntr} \counterwithin{figure}{subsection} \counterwithin{table}{subsection}   \begin{document}  \section{foo} \begin{figure} % I would like this figure to be numbered 1.1 as opposed to 1.0.1     \centering     \includegraphics[width=5cm]{pictures/Logo.jpg}     \caption{Caption}     \label{fig:my_label} \end{figure}  \subsection{xyz} \begin{figure} % I would like this figure to be numbered 1.1.1      \centering     \includegraphics[width=5cm]{pictures/Logo.jpg}     \caption{Caption}     \label{fig:my_label} \end{figure}  \section{bar}   \end{document}  Basically, whenever I include a table or figure before entering a subsection, the numbering comes out to x.0.y. Is there any way to change the numbering of the tables/figures to \counterwithin{figure}{section}, so it counts only the sections when subsection=0 and to nubering by \counterwithin{figure}{subsection} if subsection&gt;0? Any advice is appreciated.
121039
I use the chngcntr Package to Name my figures accordingly. \counterwithin{figure}{section} \counterwithin{figure}{subsection} \counterwithin{figure}{subsubsection} \counterwithin{figure}{paragraph}  My Problem is when a Figure is, for example, only in a subsection and not in a subsubsection and paragraph the Figure name looks like this: Figure 1.1.0.0.1. But i want to look like this: Figure 1.1.1 If anybody can help that would be much appreciated :)
62810
I'm fairly new to LaTeX and I want to know how to change the way sections are numbered by default. I use LyX, and there it is relatively simple to change the way an enumeration is numbered, i.e.  1 foo  a bar    i baz   But I want to know if there is a way to do this by default for sections and subsections.
74560
I want the figures and tables to be numbered 1, 2, 3, ... until the end of the document instead of 1.1, 1.2, ... in chapter I, 2.1, 2.2, ... in chapter II and so on.  I know how to convert the "chapter" part of figure/table numbers from Roman to arabic:  \renewcommand \thefigure     {\ifnum \c@chapter&gt;\z@ \@arabic\c@chapter.\fi \@arabic\c@figure} \renewcommand \thetable     {\ifnum \c@chapter&gt;\z@ \@arabic\c@chapter.\fi \@arabic\c@table}   One could modify the above code in order to remove the "chapter" part, but the figure/table counters would still be reset to 0 at the start of new chapters.
3341
I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that?  \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document}
32651
I need to have different caption format for figures and for tables. Captions for figures have to be centered and captions for tables - left aligned. How to define this?
121561
Possible Duplicates:           How can I force an image in a LaTeX documents to appear in the section in which I declared it?  I don't want that an image about "Section A" to appear in "Section F". :(  I actually include an image with  \begin{figure}[ht] \begin{center} \includegraphics[scale=0.7]{./img/RobotManipulator3D_WorkSpace.png} \end{center} \caption{3D View of the robotic workspace (in red).} \label{Img:3DRobotWorkspace} \end{figure}
28877
I have a figure with subfigures defined using the subcaption package (*not the deprecated subfig or subfigure). I need the parent figure to span two pages with two subfigs on each page. I have achieved this using the \ContinuedFloat command, however my subfigure numberings are resetting between pages instead of resuming.  Below is a minimal example:  \usepackage{graphicx,subcaption}  \begin{figure}[H]   \caption{My Figure}     \begin{subfigure}{\textwidth}         \caption{Fig 1}         \includegraphics[...]{something.jpg}     \end{subfigure}     \begin{subfigure}{\textwidth}         \caption{Fig 2}         \includegraphics[...]{something.jpg}     \end{subfigure} \end{figure} % allow break \begin{figure}[H]     \ContinuedFloat % continue from previous page     \begin{subfigure}{\textwidth}         \caption{Fig 3}         \includegraphics[...]{something.jpg}     \end{subfigure}     \begin{subfigure}{\textwidth}         \caption{Fig 4}         \includegraphics[...]{something.jpg}     \end{subfigure} \end{figure}   In this example 'Fig 3' and 'Fig 4' are incorrectly labelled (a) and (b) instead of (c) and (d).  How can I resume the subfig numbering correctly?
119334
I have an article with the following figure (there are 2 small charts near each other, horizontally):  \begin{figure}[h]   \centering   \includegraphics{left-graph}   \includegraphics{right-graph}   \caption{My caption}\label{mylabel} \end{figure}   I reference the figure with:  Figure~\ref{fig:result} shows bla-bla-bla.   The rendered PDF shows ?? instead of the figure number. I tried with the reference occurring both before and after the figure (in the LaTeX source), but it didn't make a difference.  The relevant packages I'm using are below (those removed are for titling).  \usepackage[english]{babel} \usepackage{graphicx} \usepackage[letterpaper]{geometry} \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in} \usepackage{flafter} % make sure figures do not appear before their text \usepackage{sidecap} % use side captions for floats \usepackage{subfig} % subfloats   I'm not sure what's wrong here, advice is appreciated. I'm using MiKTeX 2.8.  Thank you!
106974
Why does the caption start with number 2 and how to fix it?  \documentclass{article}  \usepackage{mwe} \usepackage{subcaption}  \begin{document}  \begin{center} \captionsetup{type=figure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-a.pdf} \end{subfigure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-b.pdf} \end{subfigure} \captionof{figure}{Description} \end{center} \end{document}   Output:   Maybe also see
18945
I am just starting to use Latex to write a university report. It does feel like a steep learning curve, and is at times frustrating, but I guess it is because I'm very new to it.  I got a question regarding TOC/figures/tables.  Basically, my document structure currently gets displayed in TOC as follows:    Contributions *section*   Summary *section*   List of Figures *section*   List of Tables *section* 1 Introduction *chapter*   1.1 Background *section*   1.2 Other Section *section* 2 Other Chapter *chapter*   However, I'd like it to be displayed like this:  Contributions Summary List of Figures List of Tables 1 Introduction   1.1 Background   1.2 Other Section 2 Other Chapter   Notice, that the first four unnumbered sections are not indented, but keep the indentation of numbered sections. Also, related to this question. I'd like my Lists of Tables/Figures to be NOT indented.   For example, instead of this:  List of Figures    1. Caption ------------------------------------------ 4   Have this:  List of Figures 1. Caption --------------------------------------------- 4   Thanks for you help!  ** EDIT (added more info)  Here is the minimal working example:  \documentclass[11pt]{report}  \usepackage{graphicx}  % Remove "Chapter" from title. No break between # and name. \makeatletter \renewcommand{\@makechapterhead}[1]{% {\setlength{\parindent}{0pt} \raggedright \normalfont \bfseries\Large\thechapter.\quad\ #1 }} \makeatother  \begin{document}  \pagenumbering{roman}  \section*{Contributions} \addcontentsline{toc}{section}{Contributions}  This is a contributions sections.   \section*{Summary} \addcontentsline{toc}{section}{Summary}  This is a summary section.  \cleardoublepage \tableofcontents %TOC  \cleardoublepage \listoffigures \addcontentsline{toc}{section}{List of Figures} %List of Figures  \pagenumbering{arabic} \chapter{Introduction}  Welcome to introduction chapter.  \section{Background}  This is a background section.\ref{capt} \begin{figure} \caption{Sample Figure.} \label{capt}  %must be after caption \end{figure}   \end{document}
12364
Looking to put a table and a figure side by side so that the table and figure have their own captions. A crude sketch    ------------              -----------------     TABLE    | a |  b |                     FIGURE   | c |  d |  ------------              Table 2: Caption           -----------------                            Figure 7: Caption   The closest I've gotten is:  \begin{table}% \centering \parbox{0.4\textwidth}{ \begin{footnotesize} \begin{tabular}{| l | r |} \hline some &amp; table\\ \end{tabular} \end{footnotesize} \caption{Table} \label{tab:table} } \qquad \begin{minipage}[c]{0.53\textwidth}% \centering     \includegraphics[width=1\textwidth]{awesome} \caption{Figure} \label{fig:figure} \end{minipage} \end{table}   But that gives two Table X: Caption captions. I didn't find anything in subfig.  Help?
75798
I write homework assignments in LaTex and the assignments are always divided into subparts (i.e. Problem 1 is divided into 1.1, 1.2, 1.3, ...). Currently what I do is I have nested enumerations, but the numbering isn't exactly what I'd like. To number the subparts, I am currently using:  \renewcommand{\labelenumii}{\arabic{enumii}.}   However, this produces  1. 2. ...    and what I'd like it to be is   1.1 1.2 ...    Is there anyway to do this?
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.
2967
I want to have numbered listing in each row, I've tried with \rownumber, but it doesn't work. I wrote a number at the beginning, but Could it be automatically?  Can you help me? This is my code:  \documentclass[10pt, a4paper]{article}  \usepackage{fontspec} \setmainfont{Arial}  \usepackage{color, colortbl} \definecolor{Gray}{gray}{0.9}  \begin{document}  \begin{table}[h!] \tiny \begin{tabular}{|&gt;{\raggedright\arraybackslash}m{30mm}|&gt; {\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|&gt;{\raggedright\arraybackslash}m{5mm}|} \hline \multicolumn{1}{|&gt;{\centering\arraybackslash}m{30mm}|}{\rowcolor{Gray}\textbf{Text}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 1}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 2}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 3}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 4}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 5}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 6}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 7}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 8}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 9}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 10}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 11}} &amp; \multicolumn{1}{|&gt;{\centering\arraybackslash}m{5mm}|}{\textbf{Sem 12}}\\ \hline 1. Text text text text text text text text text text text text text &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\\hline 2. Text text text text text text text text text text text text text &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\\hline 3. Text text text text text text text text text text text text text  &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\\hline 4. Text text text text text text text text text text text text text &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\\hline  \hline \end{tabular} \end{table}  \end{document}
3143
I would like to change the numbering scheme for my theorems per chapter. That's because I have smaller and bigger chapters. Bigger chapters need subsections for proper structuring, and so my theorems are numbered within subsections. For smaller chapters there won't be any subsections so I would like to have my theorems numbered within sections. (That means one less number).  What I'm trying to accomplish is:  Chapter 1.  Section 1.1.  Subsection 1.1.1.  Theorem 1.1.1.1. Theorem 1.1.1.2.  Chapter 2.  Section 2.1.  Theorem 2.1.1. Theorem 2.1.2.  How can I do that?  MWE: (randomize section titles and theorem body text as you please)  \documentclass{book} \usepackage{amsthm} \newtheorem{theorem}{Theorem}[subsection] \begin{document} \chapter{} \section{} \subsection{} \begin{theorem}\end{theorem} \chapter{} \section{} \begin{theorem}\end{theorem} \begin{theorem}\end{theorem} \end{document}   Note: egreg's answer includes a version incorporating the hack he gave me .
43541
I would like to place the figures as illustrated in the figure below.  The below code can place three figures side by side, but the third one on the right hand side becomes 1c (instead of 2). Any suggestions? Thank you in advance.  \begin{figure*}[tp!]   \centering   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 1a. \label{fig:1a} }     {\includegraphics[width=\textwidth]{figures/1a.pdf}}   \end{minipage}\quad   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 1b. \label{fig:1b}}     {\includegraphics[width=\textwidth]{figures/1b.pdf}}   \end{minipage}\quad   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 2. \label{fig:2}}     {\includegraphics[width=\textwidth]{figures/2.pdf}}   \end{minipage}   \caption{\footnotesize Main caption here. }   \label{fig:main} \end{figure*}
109520
Is there an equivalent command to \nonumber when one doesn't want to include certain slides in the numbering? I would like to leave outline and title slides out of my numbering, and instead just number slides with actual content. Other workarounds would be nice to know about as well.  Edit: Since a MWE example was requested, here is one. Suppose I have a title page and two other slides. The code below gives a slide counter that goes up to 3, and the title slide is slide 1. I would prefer to have the title slide not be numbered, the counter go up to 2, and the the numbering start at the slide after the title. Here is some code.  \documentclass{beamer}  \mode&lt;presentation&gt;  {    \usetheme{Dresden}  }   \setbeamertemplate  {footline}{\quad\hfill\insertframenumber/\inserttotalframenumber\strut\quad}    \begin{document}  \begin{frame}  \titlepage \end{frame}  \begin{frame} Some actual content here \end{frame}  \begin{frame} Some more actual content here \end{frame}  \end{document}