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.

I'm trying to include a uml diagram, which as it's quite large i'd like to rotate. However, if I try and add a caption I get an error and it won't build.

I'm adding the figure like this:

\usepackage{rotating}
...
\begin{sidewaysfigure}
\centering
\includegraphics[scale=0.6]{clientUML.eps}
\label{fig:clientUML}
\caption{UML for client} 
\end{sidewaysfigure}

And I get this error:

<clientUML.eps>
! Undefined control sequence.
\@tempf ... \@parboxrestore \normalsize \@fs@capt 
                                                  {\@nameuse {fnum@#1}}{\ign...
l.87 \caption{UML for client}

Any ideas? It works if I take the caption line out - but I need to include on.

Thanks in advance.

EDIT:

I also have this in my preamble - I need boxes round my figures:

\usepackage{float}
\floatstyle{boxed} 
\restylefloat{figure}
share|improve this question
1  
If I expand your code to a full, but minimal document it works fine for me. Please add a minimal working example (MWE) that shows the described behavior. Most likely you are using a package which interferes somehow. –  Martin Scharrer Apr 19 '11 at 14:09

1 Answer 1

up vote 4 down vote accepted

Did you use \restylefloat in your preamble? If you omit this command, there will be no error.

Instead of using the rotating and the float package you can simply use the rotfloat package.

\documentclass[a4paper]{report}
\usepackage{rotfloat}
\floatstyle{boxed} 
\restylefloat{figure}
\begin{document}
\begin{sidewaysfigure}
\centering
\includegraphics[scale=0.6]{test.jpg}
\label{fig:clientUML}
\caption{UML for client} 
\end{sidewaysfigure}
\end{document}
share|improve this answer
    
yes - i've added the lines i'm using - I need boxes round my floats if possible. –  Freddie Apr 19 '11 at 14:14
    
@Freddie: I've updated my code. –  Thorsten Apr 19 '11 at 14:23
    
great - that's sorted it. Thanks :) –  Freddie Apr 19 '11 at 14:29

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.