GeneralNeed no caption below the figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Need no caption below the figures

Post by pallav »

I need table of figures at the end of article. All of my figures have their captions. I want not to get the captions of figures at the end of figures rather, I need then in the table of figures.

To get table of figures, I have used

Code: Select all

\listoffigures
and as my captions are long enough, I have used the following in my preamble.

Code: Select all

\usepackage[breaklinks=true]{hyperref}
I am getting the table of figures well. But how to remove the captions below the figs.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Need no caption below the figures

Post by cgnieder »

This is a strange request… you want a list of figures (LoF) but no figure captions?

The standard use of \caption would provide the means for that:

Code: Select all

\caption[this goes in the LoF]{this goes in the caption}
If you leave the mandatory argument empty and only use the optional argument you'll get empty captions and a full LoF.

Regards
site moderator & package author
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Need no caption below the figures

Post by pallav »

Thanks you very much. It works good. One thing is that the figure nos. are missing. What to do?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Need no caption below the figures

Post by cgnieder »

pallav wrote:What to do?
I can tell you if you provide a Infominimal working example. :) There are too many possible interactions by document classes and/or packages that I really don't want to guess.

Regards
site moderator & package author
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Need no caption below the figures

Post by pallav »

Here is a brief

Code: Select all

%% Template article for Elsevier's document class `elsarticle'
%% with numbered style bibliographic references
\documentclass[final,3p,times,twocolumn]{elsarticle}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{graphicx,subfigure,amssymb,amsfonts,latexsym,amsmath,amsthm,enumerate}
\usepackage[colorlinks, bookmarks=true, breaklinks=true]{hyperref}
\hypersetup{colorlinks = true, linkcolor = blue, anchorcolor = blue, citecolor = blue, filecolor = red, urlcolor = red}
\usepackage{hypcap}
\usepackage[nodots]{numcompress}
\usepackage[labelformat=empty]{caption}
\usepackage{lineno}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgment}[theorem]{Acknowledgment}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\hypersetup{colorlinks = true, linkcolor = blue, anchorcolor = blue, citecolor = blue, filecolor = red, urlcolor = red}
\newcommand\mycaption[2]{\caption[#1]{#1.\ #2}}

\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\thesection\arabic{subsection}.}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}.}
\renewcommand\theequation{\thesection\arabic{equation}}


\biboptions{comma,round,sort&compress}


\journal{Chaos}


\begin{document}

\begin{frontmatter}


\begin{abstract}
This paper is 
\end{abstract}

\end{frontmatter}

kdsfhs sdgohjsdgoi dsg sdg hsdg hsdG hdgs

\begin{figure}[!htb]
\includegraphics[width=6cm,height=6cm]{n_b.eps}
\caption[To my family]{}
\end{figure}

\begin{figure}[ht]
\centering
\subfigure[]{
    \includegraphics[height=2in,width=3in]{n_2.eps}
    \label{fig:subfig1}
}
\subfigure[]{
    \includegraphics[height=2in,width=3in]{n_1.eps}
    \label{fig:subfig2}
}
\subfigure[]{
    \includegraphics[height=2in,width=3in]{n_0.eps}
    \label{fig:subfig3}
}
\subfigure[]{
    \includegraphics[height=2in,width=3in]{nu.eps}
    \label{fig:subfig4}
}
\caption[\scriptsize (Colour online) The long long long]{}
\label{fig:nullcline_1}
\end{figure}
\bibliography{bib-my}
\bibliographystyle{elsarticle-num}

\listoffigures

\end{document}
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Need no caption below the figures

Post by cgnieder »

This is certainly no MWE! Did you even follow the link I provided? The point is to make the document as short as possible, i.e. also delete all unnecessary packages and definitions from the preamble. During that process one quite often finds the source of the problem.

The numbers are missing because you're are using

Code: Select all

\usepackage[labelformat=empty]{caption}
You could change it to labelformat=simple, for example.

Code: Select all

% _this_ is an MWE!
\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage[labelformat=simple]{caption}

\begin{document}

\begin{figure}[!htb]
 \centering
 \includegraphics[width=6cm,height=6cm]{mypic.eps}
 \caption[To my family]{}
\end{figure}

\listoffigures

\end{document}
For details please read the documentation of the caption package.

Regards
site moderator & package author
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Need no caption below the figures

Post by pallav »

Oh yes. Very sorry. Now everything is ok. Thanks a lot.
Post Reply