The publisher requires that I have captions and references of resp. to figures that include the chapter number. So in chapter 27 it has to be figure 27.1, 27.2, ... in the captions. \refhas to be adapted as well. How can this be done?
270
Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?
94095
I'm using a \chapterstyle{tandh} because I want my chapters numbered. In order to get a References chapter numbered as well I used the following code:  \renewcommand{\bibsection}{% \chapter{\bibname}}   That worked fine, I got my References chapter numbered!!   But now, in order to get my references in a author-year style I'm using the natbib package. Seems like the package ignores my code and the References chapter is not numbered anymore.  Can someone help me?
58516
By default, the headings with scrrept, scrlayer-scrpage, and scrheadings are of the form "«number» «title»" in the headings for numbered chapters. I am wishing to change it to "Chapter «number». «title»" (i.e., add "Chapter" and the period). Moreover, the unnumbered chapters should have just "«title»" in the headings.  I read through several tex.se Q&amp;A-pages and finally arrived at a bulky solution which goes great lengths to achieve that:  \documentclass[twoside=false]{scrreprt} \usepackage[automark,headsepline,footsepline,plainheadsepline,plainfootsepline]{scrlayer-scrpage} \usepackage{lipsum} \pagestyle{scrheadings} \lehead{}  \lohead{} \cehead{} \cohead{} \rehead{\normalfont\headmark} \rohead{\normalfont\headmark} \begin{document}  \addchap{Introduction} \lipsum[1-20]  \clearpage \let\oldchaptermark\chaptermark \let\oldaddchapmark\addchapmark \renewcommand{\chaptermark}[1]{\markboth{\chapapp\ \thechapter\autodot}{#1}} \renewcommand{\addchapmark}[1]{\markboth{#1}{#1}} \rehead{\normalfont\leftmark. \rightmark} \rohead{\normalfont\leftmark. \rightmark}  \chapter{The rise of the house of Usher} \lipsum[1-20]  \chapter{The fall of the house of Usher} \lipsum[1-20]  \clearpage \renewcommand{\chaptermark}{\oldchaptermark} \renewcommand{\addchapmark}{\oldaddchapmark} \rehead{\normalfont\leftmark} \rohead{\normalfont\leftmark}  \appendix \addchap{Bibliography} \lipsum[1-20] \end{document}   Is there some more automatic way in which all the additional commands could be issued in the preamble rather than inserted between \begin{document} and \end{document}?  An aside: In the main text, there should be no periods after chapter numbers or section numbers.
5282
\usepackage{subcaption}     \begin{figure}[t]     \begin{subfigure}{1\linewidth}     Figure1     \caption{Hello}~\label{fig:TBS}     \end{subfigure}     \begin{subfigure}{1\linewidth}     Figure2     \caption{Hello1}     \end{subfigure}~\label{fig:TBSCompensate}     \caption{BigHello}     \end{figure}   Following is the what appears:    When I use Figure~\ref{fig:TBS} to refer the figure It appears Figure 2a in the pdf, I wish that it could appear as Figure 2(a), is the a way to tweat the formatting of caption for subfigure?
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
124070
Problem:  Getting error messages when trying to cite a reference in the figure caption. Not sure what I am doing wrong. Can't seem to find that this has been up previously either.  Minimal Working Example:  \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx} \usepackage{epstopdf} \graphicspath{{figures/}}  \usepackage{apacite} \bibliographystyle{apacite}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{rub14,    author = {Rubin, Jared},    title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},    journal = {Review of Economics and Statistics},    volume = {96},    number = {2},    pages = {270--286},    year = {2014}, } \end{filecontents}  \begin{document} \begin{figure}[htp] \centering \includegraphics[width=\textwidth]{conceptdriven.eps} \caption{\label{fig:researchscope}The process of concept-driven design approach in relation to theory and use situation, adopted from \citeA[p.~282]{rub14}}  \end{figure}  \bibliography{\jobname}  \end{document}   Desired outcome:  The reference to be directly after the words "adopted from".
882
I am using the 'article' class, 'figure' environment.  My captions are divided in two parts:   the information about the figure the credits of the figure (for which I use \textfff{})   In my list of figures, I would like to omit the second part. Would you have a solution, please?
80528
In LaTeX, how do I change the chapter number to display as text? eg:  CHAPTER ONE not CHAPTER 1;  CHAPTER THIRTEEN not CHAPTER 13.
106439
The reference to my sub caption doesn't work  \documentclass{article}  \usepackage{mwe} \usepackage{subcaption} \usepackage{cleveref}  \begin{document}  \section{Section} \begin{center} \captionsetup{type=figure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-a.pdf} \caption*{Text 0} \end{subfigure} \begin{subfigure}{0.4\textwidth} \includegraphics[width=\textwidth]{example-image-b.pdf} \caption*{Text 1\label{here}} \end{subfigure} \captionof{figure}{Description} \end{center}  Look at \Cref{here}. \end{document}   Output:   Maybe also see     UPDATE:  It should produce Look at Text 1  Actually it's always the same text, so I would really like a solution where my counter is 0,1, ... at the and of the caption. Or (maybe to use with \caption{\empty} where my counter is Text 0, Text 1, ...
111705
--- update ---  Any comments, is this a bug in the caption package or do have have to protect \refstepcounter somehow?  --- \update ---  I have the following MWE:  \documentclass{book}  \usepackage{xparse} %\usepackage{caption}  \newcounter{mycounter} % make a counter \setcounter{mycounter}{0} % init the counter  \NewDocumentCommand \mymark {} {% \refstepcounter{mycounter}% \textsuperscript{\themycounter}}  \begin{document} % one\mymark  \begin{figure} \caption{two\mymark} \label{lab:1} \end{figure}%  three\mymark  \end{document}   without caption package it produces    but if I add the package    Why is the numbering incorrect?
117316
I have a lot of my figures in floats, and LaTeX puts them on good places in the pdf. But for my students it would be great if I could produce a second pdf-version of the same text, without the figures in the text, and all the figures in a separate document.  Why?   figures are in colour, so students can print these figures on a better quality printer. Also, while studying, it is for some students more comfortable to have the figures separate to the text, because I often refer to a figure that appears a few pages earlier then the second or third reference in the text. Of course, the numbering (like "fig. 2.1") should be kept unchanged, so the numbering in both versions of the document stays the same.   I tried using endfloat, pushing all the floats to the end, but then all the numbers start with the number of the last chapter (e.g. 2.1, where it orig. was 1.1). In the example below, the "first version" (which is OK) is produced: the figures are placed in the text by LaTeX, and this placement is fine.  I'm trying to make the second version, just by uncommenting the two lines that are commented in the example. Then you'll see that figures in fact are pushed to the end as desired, but numbers change (undesired, because different from first version).  \documentclass[a4paper,oneside,dutch]{book}   %\usepackage[nomarkers, nolists]{endfloat} %these two lines should be uncommented %\renewcommand{\efloatseparator}{\mbox{}} %these two lines should be uncommented  \begin{document} \chapter{first chapter} \section{first section} Some text referring to this figure, with a number that shows the figure belongs to chapter one: fig.~\ref{fig: 050}. \begin{figure} \begin{centering} {\fboxsep 14pt\fbox{}} \par\end{centering} \caption{\label{fig: 050}figure in chapter one} \end{figure} \section{second section\label{sec:Graad-van-hyperstaticiteit}} Some other text referring to another figure int the same chapter: fig.~\ref{fig: 052} \begin{figure} \begin{centering} {\fboxsep 14pt\fbox{}} \par\end{centering} \caption{\label{fig: 052}another figure in chapter one} \end{figure} \chapter{second chapter} Some text in chapter two, so referring to a fig. with numbering that shows the figure is part of chapter two: fig.~\ref{fig: 054}. \begin{figure} \begin{centering} {\fboxsep 14pt\fbox{}} \par\end{centering} \caption{\label{fig: 054}this figure belongs to chapter two} \end{figure} \end{document}   Is there a workaround? Or another simple way to achieve this? I've had a suggestion to use "preview", but this doesn't seem to solve my problem as a whole... Or is it wishfull thinking to be able to produce the two desired versions?
40328
One of my sections seems to be using the section number rather than the appropriate figure number for \ref's that point to figures. (Theorems and the like work fine.) As far as I can tell, there's nothing differentiating the problematic section from the other sections, but there must be as the problem doesn't go away when I compile that section on its own. Any ideas?  Edit: an example of a broken figure. (Every figure in the section is broken.)  \begin{example}   Figure~\ref{fig: hasse} depicts ... \begin{figure}[htbp]\label{fig: hasse} \begin{center} \begin{tikzpicture}     \tikzstyle{every node}=[draw,circle,fill=black,minimum size=4pt,                             inner sep=0pt]     [bunch of lines for the picture]     \end{tikzpicture} \caption{Hasse diagram} \end{center} \end{figure} \end{example}   This particular instance had the figure inside the example, but that doesn't make a difference.
100146
Possible Duplicate:          I'm having a problem with referencing figures in LaTeX. I have the following text:  \begin{figure}[H] \center \label{fig:enn1015} \includegraphics[scale=0.40]{imagens/outputs/ENN_10_15.eps} \caption{ENN unbalanced 10\%} \end{figure}  The figure \ref{fig:enn1015} (...)   For some reason, the figure caption is:  Figure 3.5 Enn unbalanced 10%   But the text is:  The figure 3.2.1 (...)   Instead of:  The figure 3.5   It is printing the chapter.section.subsection the figure is in, and not the figure. Can anybody help me?
9513
I want my chapter titles to look like as asked in this . I have followed the method suggested by "lockstep", that is, using package titlesec. It works perfectly fine but here is the question: I want this format for main chapters only and for the rest, that is Contents, Declaration, Index, Bibliography etc I want them centered with normal vertical spaces before and after the title. Pasting the code at the start of Chapter 1 solves the problem partially; it leaves the starting ones (contents, declaration) totally unchanged and applies the same format to Index and Bibliography. Please help.
100887
I have two figures with somehow the same caption, see the code:  \begin{figure}[!ht]\centering \includegraphics[height=18cm]{pic1} \caption{caption} \end{figure} \addtocounter{figure}{-1} \begin{figure}[!ht]\centering \includegraphics[height=18cm]{pic2} \caption{(continued)} \end{figure}   Is there a way to have only the first figure referenced in the list of figures?
42657
I'm typesetting a book and one of the chapters separates into two chapters so I need it to count like so:  chapter 1 ---------  chapter 2a ----------  chapter 2b ----------  chapter 3 ---------  chapter 4 ---------   I saw an almost solution . But this solution doesn't allow me to continue with my non-separated chapter counting.  This is chapters only, the sections are not numbered, and I'm using the book class with the hyperref package.
14863
When writing documents, I consider it to be necessary that all figures and tables are referenced (\ref) in the text, whether or not I've remembered to \label them. LaTeX does not currently warn if a figure or table is not referenced. Is there a way to ensure that this is flagged up as a warning?  Note that I am specifically concerned about figures and tables, not chapter or section headings; it will be no good looking just at \labels that don't have an associated \ref.  In other words, it should report boo and not report bla in the following MWE:  \documentclass{article} \begin{document} \section{BLA}\label{bla} \section{BOO}\label{boo} In Section~\ref{bla} we do something. \end{document}