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 have this MWE drawing a caption over an image but when I load the floatrow package, the caption will be drawn under the image. When I only write a text over the image it works.

\documentclass{article}

\usepackage{graphicx}
\usepackage{tikz}

%problem!
\usepackage{floatrow}

\begin{document}

\begin{figure}
    \begin{tikzpicture}
     \node [draw=black, anchor=south west] at (0,0) {\includegraphics[width=\textwidth]{fig1}};

     \node [draw=black, anchor=south west, text width=.3\textwidth] at (0,0) {        \caption{A picture of a X.}};
    \end{tikzpicture} 
\end{figure}
\end{document}
share|improve this question
1  
Put a \RawFloats after \begin{figure}. For details see floatrow documentation, section 2.4 "Running Floats in the Raw LATEX Mode". –  Axel Sommerfeldt Oct 16 '13 at 17:58
    
@AxelSommerfeld Thanks, his solves the problem. –  susis strolch Oct 16 '13 at 18:10

1 Answer 1

up vote 4 down vote accepted

I don’t know the floatrow package but it seems like you want to use \RawCaption:

This command allows to “release” caption contents from special box register created by floatrow package for the creation of necessary layout.

Code

\documentclass{article}
\usepackage{tikz}
\usepackage{floatrow}
\begin{document}
\begin{figure}
  \begin{tikzpicture}
   \fill (up:4) -| (right:4) -| (2,2) -| (up:4);

   \node [anchor=south west, text width=2cm-2*\pgfkeysvalueof{/pgf/inner xsep}]
     {\RawCaption{\caption{A picture of a Y.}}};
  \end{tikzpicture}
\end{figure}
\end{document}
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.