I'm currently putting together an installation document for some software at work, and I decided that now was as good a time as any to try to ditch the endless frustration that is Microsoft Word, and try and do it using TeX/XeLaTeX.

I'm trying to keep the same feel of previous documents that my team has produced for similar installations, and this means the document is going to be largely composed sections which are basic "1) Do this", "2) now do this" sections. Not terribly enthralling, but it's sort of the standard. The standard also calls for lots of frequent screen shots of the installer, which I've been trying to include directly into an enumerate list, which is how I approached the "1), 2)" format described above.

The problem with LaTeX's usual approach to including figures means that they can end up some way away from the text which is referencing them. This might be fine in an academic paper, but it might be a bridge too far for my colleagues - so I've been trying to include the graphics directly into the list. My results thus far are not perfect.

Here's a snippet of the XeLaTeX:

    \item Navigate to ``d:\textbackslash boringwindowspath''
    \item Run Setupee.exe
            \caption*{Click ``Yes'' to install MS Visual C++ 2008 redistributables.}                

This produces something like this : Sample PDF output

As you can see, the 3rd item is shoved a ways out to the left, and I can't work out why. I've scaled the image itself so it doesn't take up the whole page width - so what's going on here?

Or is my whole approach wrong, and there's some dead easy way to do what I'm trying to achieve?

Answers gratefully received ;)

  • 1
    Remove the figure environment. You'll probably have to use \captionof from the caption package. – qubyte Feb 29 '12 at 11:36
  • the "click ..." doesn't really seem like a caption to me, just item text. if you treat it that way, then also removing the figure environment should give you exactly what you want. – barbara beeton Feb 29 '12 at 13:45

I'd use a minipage:

    \item Navigate to ``\texttt{d:\textbackslash boringwindowspath}''
    \item Run \texttt{Setupee.exe}
    \item \begin{minipage}[t]{\linewidth}

          Click ``Yes'' to install MS Visual C++ 2008 redistributables.

enter image description here

| improve this answer | |
  • Brilliant - this does exactly what I need - thank you so much for such a speedy answer! – GodEater Feb 29 '12 at 12:05
  • Would it still be possible to use a caption? The little text under the \medskip works as a caption if you use \centered. But if caption is used you get the good old "caption outside float" error. – timss Sep 16 '13 at 20:29
  • @timss I don't think this kind of pictures needs a caption. If you really want it, use \begin{minipage}[t]{<dimen>}...\end{minipage} around the adjusted \includegraphics and add \captionof{figure}{...} (requires either the package caption or capt-of). – egreg Sep 16 '13 at 20:32
  • @egreg I'm new to LaTeX and thought that maybe a \caption{} was preferred as it's usually the standard for adding a caption to a figure of a table. In my case I want my figure to be centered and it works just fine using your example, so in that case there's no need to use a caption? If so when should I use a caption? – timss Sep 16 '13 at 22:42
  • 1
    @timss This is only my opinion: any picture that has to stay where we want it (as opposed to the figure environment that places it where it's typographically better) doesn't need a caption, because it's simply part of the text. – egreg Sep 16 '13 at 22:43

Here is a minimal example to show one way to do this. Using the caption package allows you to attach captions to non-floating environments. You can also use the capt-of package for equivalent results.



    \item hello
    \item \parbox{\linewidth}{\centering
        \includegraphics[width=2in, height=1in]{}\\
        \captionof{figure}{Some caption stuff.}
    \item goodbye


enter image description here

However, from your image it seems that you're not interested in labelling your captions. If this is the case, then you must use the caption package rather than capt-of, as caption provides the \captionof* command, which removes the label.

| improve this answer | |
  • I'll have a play with this approach as well - thanks for the quick answer! – GodEater Feb 29 '12 at 12:06
  • No problem. I just noticed that I used itemize here instead of enumerate. It'll still work though. :) – qubyte Feb 29 '12 at 12:10

Depending on how committed you are to the idea of an enumerated list, you might try some alternatives. Here's one using the tufte-handout class, which allows a lot of space for readers to write notes in the margins. The custom \screenshot command may help when you have lots of images you want to keep consistent:

enter image description here



\caption{#2 \label{fig:#1}}


Click the Windows \button{Start} button in the bottom left corner of your screen, then
click the \button{All Programs} menu.
Click the \button{Windows Live Movie Maker} shortcut near the top of the
\button{All Programs} menu (above any program folders).
See Figure~\ref{fig:start-menu} for an example.
\screenshot{start-menu}{Windows Start Menu}
| improve this answer | |
  • This is an interesting approach - but I don't think it'll work well with the size of the screenshots I've got to include. The MSVC++ one I used in the example is bar far the smallest one I have, most of the rest of them are quite a bit larger. – GodEater Mar 1 '12 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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