I decided to write my completion of course work for my computer's science degree using LaTeX, contrary to university's popular choice, MS Word.

I had a great time venturing though this tool and I must say that I loved it, but I'm having some troubles adapting some of the formatting rules that my university uses, specially with captions.

Inserting figures is a piece of cake, but formatting the caption to look like the way my university wants it is not. Take a look at the picture below:

enter image description here

The figure shown here is centered to the text, and so is the first caption. I've achieve this with the caption package:


The second caption must be left aligned with the first one, and it must not be present at the figures list index.

Even after some though search on the internet, I could not find anything related to creating a second caption (or subcaption) right bellow the first one.

Actually, I don't think this kind of customization has ever been implemented by any package at all.

So what I want to know is: "What's the best way to achieve this specific caption formatting?".

I have another doubt related to customizing the figure's list index at the begging of my paper. I'm using these two commands ...

% Creates an auxiliary command for the criation of the figures list
  \hb@xt@\@pnumwidth{\hfil\normalfont #1}{}\par}

% Changes the way that the figure's list is printed
    \leftskip 3cm
    \rightskip 2cm
    \parfillskip -\rightskip
    \parindent 0cm
    \@tempdima 2.0em
    \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
    {Figure \normalfont #1}\nobreak \figfillnum{#2}}

... to create an output like this one:

Figure 1    Gauntlet ................................................... 1

What I need to do here is to add a dot after the number following the "Figure" text, like this:

Figure 1.   Gauntlet ................................................... 1

I studied those two commands, and I realized that the second one (\l@figure) is the one responsible for placing the "Figure" text, and that it's #1 argument represents this text: "1 \tab Gauntlet".

Now, I don't know where #1 comes from, but what I need to do here is to place a dot between those two words contained in the #1 argument.

Is this possible? How?

  • Welcome to TeX.SE. While code snippets are useful for explaining your code, it is always best to compose a MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Commented Nov 9, 2011 at 4:23
  • Hi Canella! I would recommend you split this question into two, that will make the information much more accessible to people coming across this later on. Also, as Peter said, complete minimal examples are almost always a good idea (certainly in this case).
    – Jake
    Commented Nov 9, 2011 at 4:30
  • Thanks for the tips @Peter. I will keep that in mind the next time I ask a question here. ;)
    – Canella
    Commented Nov 12, 2011 at 1:12
  • Hey @Jake, Gonzalo answered both of my questions, but I will take care to post only one question the next time I use the stack. ;)
    – Canella
    Commented Nov 12, 2011 at 1:14

1 Answer 1


Here's one possible solution using some features provided by the caption package: basically, \caption for the numbered caption and \caption* for the unnumbered caption and some calculations to align both captions; the customization of the list of figures was done using the tocloft package:



% some auxiliary lengths for aligning the captions

% syntax: \MyCaption{First numbered caption}{Second unnumbered caption}
  \settowidth\mylena{\small\itshape\figurename~\thefigure. #1.}
  \settowidth\mylenb{\small\itshape #2.}
  \caption*{\hspace*{\dimexpr\mylenb-\mylena\relax} #2}

% settings for the list of figures
\renewcommand\cftfigpresnum{Figure }



  \MyCaption{Gauntlet}{Source: Atari Games 1990}

  \MyCaption{Some test text}{And some more text for testing purposes}


enter image description here

  • In my solution I considered captions spanning one line; for longer captions some adjustments might be needed. Commented Nov 9, 2011 at 5:20
  • Hey @Gonzalo, I can't thank you enough for these samples you posted to me. Honestly, I didn't know it was possible to automate something like this. Thank you.
    – Canella
    Commented Nov 12, 2011 at 1:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .