Generallist of figure captions

LaTeX specific issues not fitting into one of the other forums of this category.
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

list of figure captions

Post by spiegboy »

I use \listoffigures, but i just want the captions not the page numbering.
how can i get that?

thank you very much

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: list of figure captions

Post by Stefan Kottwitz »

Hi,

\listoffigures (and l@figure) is defined by the document class. Which class do you use?

Stefan
LaTeX.org admin
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Re: list of figure captions

Post by spiegboy »

article,

i dont have to use listoffigures, if there is another way to list all figure captions.

thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

list of figure captions

Post by Stefan Kottwitz »

Hi,

try this:

Code: Select all

{\renewcommand*\numberline[1]{}
\makeatletter
\renewcommand*\l@figure[2]{#1\newline}
\makeatother
\listoffigures}
Stefan
LaTeX.org admin
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Re: list of figure captions

Post by spiegboy »

sorry man, it is good, but not what i want coz there is no figurename on it.
i want it like

fig.1. blahblahblah
fig.2. blahblahblah

thank you very much
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

list of figure captions

Post by Stefan Kottwitz »

Hi,

try this modification:

Code: Select all

{\renewcommand*\numberline[1]{Fig.\,#1:\space}
\makeatletter
\renewcommand*\l@figure[2]{\noindent#1\par}
\makeatother
\listoffigures}
Of course you may replace the colon : by a dot, but I thought the colon would be more common.

Stefan
LaTeX.org admin
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

list of figure captions

Post by spiegboy »

it works fine, but except the caption of this figure, it doesnt break the line automatically. however when i use the \listoffigures, it works fine to this figure, maybe there is a way to solve this problem.


thanks a lot.

Code: Select all

\begin{figure}[!hb]
    \centering
    \includegraphics[width=4.042in]{heatxrd.eps}
    \caption{X-ray diffraction patterns of the as-prepared % 
    and at 600\celsius\xspace heat-treated %
    Co\textsubscript{58.34}Fe\textsubscript{3.84}B\textsubscript{13.06}Si\textsubscript{13.06}Cr\textsubscript{11.7}.}
    \label{fig:heatxrd}
  \end{figure}
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Re: list of figure captions

Post by spiegboy »

btw, i dont want to use the short caption, i have to put the original caption on the paper. thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

list of figure captions

Post by Stefan Kottwitz »

This could help:

Code: Select all

\newlength{\fig}
\settowidth{\fig}{Fig.\,99:~}
{\renewcommand*\numberline[1]{\llap{\makebox[\fig][l]{Fig.\,#1:~}}}
\makeatletter
\renewcommand*\l@figure[2]{\leftskip\fig\noindent#1\par}
\makeatother
\listoffigures}
Stefan
LaTeX.org admin
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

list of figure captions

Post by spiegboy »

thanks
but still it doesnt work, i think maybe it's because of my use of \textsubscript make the composition: Co\textsubscript{58.34}Fe\textsubscript{3.84}B\textsubscript{13.06}Si\textsubscript{13.06}Cr\textsubscript{11.7} cannot be broken apart.

i restructured the caption and make sure the special composition could be normally shown in
the sentence. but i just feel not good. i think there must be some better ways to do it.

another thing is the captions are not be alligned evenly at the right side. when i change the font from mathptmx to palatino, it works fine. here are my premable

Code: Select all

\documentclass[12pt,a4paper,english,titlepage]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage[english]{babel}% clash with \renewcommand{\figurename}{Fig.}
\usepackage[top=2.54cm,left=3cm,right=3cm,bottom=2.54cm]{geometry}% page layout
\usepackage{mathptmx,courier,pifont}
\usepackage[scaled=.92]{helvet}
\usepackage{graphicx}
\usepackage{setspace,xspace,hanging}
\usepackage{fixltx2e} %use \textsubscript




\usepackage{enumerate}
\usepackage{blindtext,textcase,textcomp,gensymb}
\usepackage{url,cite}

\usepackage[normalem]{ulem}
\usepackage{longtable}
\usepackage{subfigure}%it's for subfigures
\usepackage{ccaption}
\captionnamefont{\bfseries}
\captiontitlefont{\small}
\renewcommand{\figurename}{Fig.}
\usepackage{amssymb,amsmath}

another question is when i use document class 'scrartcl' with the option, titlepage and abstracton, the titlepage does not show the right position of authors, they are way too at the right side, could you help me fix this problem, thank you very much.
Post Reply