Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Throughout my document I have figures with captions set like this example:

\caption[Surface elevation change for Antarctica and Greenland]{Rate of change of surface elevation for Antarctica and Greenland over the period 2003-2007. Source: \citet{pritchard:09}.}

My problem is that I would like to change my List of Figures from using the short captions to using the long captions instead. Is there any way to do this with \listoffigures without having to change every figure \caption?

My shortened working document:

\documentclass[12pt,twoside]{report} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\pagestyle{headings} 
\usepackage[top=3.4cm,left=2.2cm,right=3.5cm,bottom=3.0cm]{geometry}     
\geometry{a4paper} 

\usepackage[parfill]{parskip} 
\usepackage{natbib} 
\renewcommand\bibname{Reference List}

\usepackage{graphicx}
\usepackage{rotating} 
\usepackage[section]{placeins}
\usepackage[compact]{titlesec}


\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}


\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}

\usepackage{amssymb} 
\usepackage{epstopdf} 
\usepackage{rotating}


\usepackage{setspace}
\usepackage{fixltx2e}
\usepackage{multirow}
\usepackage{tocloft}
\usepackage{longtable}

\renewcommand\contentsname{Contents}
\renewcommand\cftpartpresnum{PART }

\usepackage[pdftex,bookmarks=true,hidelinks,bookmarksopen=true]{hyperref}

\usepackage{lscape} \linespread{1.6} \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}


\setlength{\belowcaptionskip}{18pt} % space below table caption

\begin{document}
\newgeometry{top=3.4cm,left=3.5cm,right=2cm,bottom=3.0cm}
\include{./title/1_tex/title}
\restoregeometry
\newpage
\thispagestyle{empty}
\mbox{}
\pagenumbering{roman} \setcounter{page}{1}
\include{./declaration/1_tex/declarations}

\begin{spacing}{1.1}

\tableofcontents
\newpage
\phantomsection \label{listoffig}
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures

\newpage
\phantomsection \label{listoftab}
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\end{spacing} 

\bibliographystyle{copernicus}
\newpage
\newgeometry{top=3.4cm,left=3.5cm,right=2cm,bottom=3.0cm}
\titlespacing{\chapter}{0pt}{-10mm}{40pt}   
\setlength{\parindent}{25pt}
\begin{spacing}{1.5}
\pagenumbering{arabic} \setcounter{page}{1}
\include{./chapter1/1_tex/chapter1}
...

\end{document}
share|improve this question
    
Welcome to TeX.SX! What do you have the short caption for then? You needn't specify it at all, it exists only for LoF. Or do I miss something? –  yo' Feb 25 '13 at 11:55
    
@tohecz It seems the question is about changing the output of an already written document with lots of captions with optional argument. –  lockstep Feb 25 '13 at 12:08
    
@tohecz Yes, what lockstep has said. The change is an editorial decision. I'm aware I could edit scores of captions, but am wondering if there would be a quicker way of changing the presentation of the LoF. –  rhewlif Feb 25 '13 at 12:15
    
note that your citation of pritchard:09 needs to become \protect\citet{pritchard:09} if you're going to make this change. –  wasteofspace Feb 26 '13 at 9:50
    
@tohecz I've just found this question because, as lockstep suggested, I've got a long document with short captions present, and now it turns out that the department actually wants long captions in the list. –  Joshua Taylor Sep 10 at 3:26

3 Answers 3

up vote 4 down vote accepted

You can "revert" the existence of the optional argument by adding this at the end of your preamble:

\let\origcaption\caption
\renewcommand\caption[2][]{\origcaption{#2}}
share|improve this answer
    
Thanks @tohecz. Does the trick. Between both answers I think I understand how the solution works. –  rhewlif Feb 25 '13 at 13:17

The caption package does offer the option list-entry=headingfor that purpose, at least since v3.3:

\documentclass[12pt,twoside]{report}
\usepackage[list-entry=heading]{caption}
\usepackage[demo]{graphicx}
\begin{document}
\listoffigures
\begin{figure}
\includegraphics{test}
\caption[Short caption text]{Full caption text}
\end{figure}
\end{document}

See endfloat package documentation for details, section "8.4.1 Removing captions".

enter image description here

share|improve this answer

This is highly dependent on what class you are using and whether you are using any caption formatting packages, which you have not shown. Please always post a complete small document that shows the problem that shows the relevant packages used.

If you are using the standard classes then this changes the toc to use #3 (the main argument) instead of #2 (the optional one).

\makeatletter
\long\def\@caption#1[#2]#3{%
  \par
  \addcontentsline{\csname ext@#1\endcsname}{#1}%
    %%%%%%{\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
    {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #3}}%
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
\makeatother
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.