# Figure and Table Caption Delimiters

I am using the memoir class for a thesis document. I need to use different delimiters for the figures ( Fig 1.1, ) and table (Table 1.1. ) captions. I tried using \captiondelim{, } However that changes all the delimiters to ','. I also tried creating a new caption style with \captiondelim{. } for use with the table. However doing this makes the list of tables create the correct table number with an empty caption ( something like 1.1. empty ) in the toc. I am not sure whats the best way to do this.

Thank you

Edit: I am adding the minimum working code for this.

\documentclass{memoir}
\usepackage{lipsum}

\captiondelim{, } % change default delimiter

\newcommand{\mycaption}[2][\@empty]{
\captionnamefont{\scshape}
\changecaptionwidth
\captionwidth{0.9\linewidth}
\captiondelim{.\:}
\indentcaption{0.75cm}
\captionstyle[\centering]{}
\setlength{\belowcaptionskip}{10pt}
\ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}
}

\begin{document}
\listoffigures
\listoftables

\chapter{Chapter 1}
\lipsum

\begin{figure}
\centering
Space for Fig 1
\mycaption{Figure}
\end{figure}

\begin{table}
\centering
Space for Table 1
\caption{Table}
\end{table}

\end{document}


• The behavior you site does not match the manual. Perhaps you are loading a package which redefines \@makecaption. Submit a Minimal Working Example which displays the problem, starting with \documentclass all the way to \end{document} (please, NOT your thesis!). Dec 12 '19 at 15:45

\captiondelim will change the delimiter for all captions, but you want different delimiters for figure and table captions (I have no idea why; is it one of those strange rules promoted by thesis folk who have no idea about good typography?)

Essentially you have to have two different captioning styles, as in the MWE below.

% capdelimprob.tex SE 520197 Different delimiters for figures and tables

\documentclass{memoir}
\usepackage{lipsum}

\captiondelim{. } % change default delimiter
\makeatother
\newcommand{\figcaption}[2][\@empty]{% another delimiter for figures
\captiondelim{, }%
\ifx \@empty#1 \caption{#2} \else \caption[#1]{#2} }
\makeatother

\begin{document}
\listoffigures
\listoftables
\chapter{First}
\lipsum[1]

\begin{figure}
\centering
A FIGURE
\figcaption{Figure caption} % special caption
\end{figure}

\begin{table}
\centering
A TABLE
\caption{Table caption} % regular caption
\end{table}

\end{document}


To begin I used \captiondelim to give the delimiter you wanted for tables. Then I defined a new kind of caption for tables that used the delimiter you wanted for them. See 10.5 Captions in the documentation (> texdoc memoir) for more information.

• Yes I need to use a comma as a delimiter for the figures but that does not look good with the tables and code examples I have so I need to use the different delimiters. I have added a picture of the problem with the table of contents not updating to the correct caption ( the delimiter is correct). The same thing happened with the \figcaption too.