2
  1. How can I set the caption to be above the figure ? It has something to do with package floatrow. If I comment the line which is loading it, all is OK. I dont accept solutions as "disable floatrow package". In real project I need it because there is no other way to force caption to be typeset above table.

  2. How can I debug this sort of problems in reasonable time ? For example very often I have problem with additional empty pages latex is inserting in my pages (this has nothing to do with two-sided document class). Every time I use another solution based on series of try and error. I am not satisfied that with every little thing I am trying to achieve in latex (which in MS Word I would done in few minutes) I must write to this forum or use google search. What type of analysing tools Tex environment is offering to have more control over what is happening under the hood ? Take above mentioned example with empty pages only as one problem from many possible. I am interested in the way how to find solution, not in solution for this particular problem. Take in mind that my real project is much bigger with more packages and writing MWE for every little problem is time consuming. Even when beginner my feeling is that this is not the correct way doing things.

This is my MWE:

\documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude,
footinclude=true,cleardoublepage=empty,abstractoff, 
BCOR=5mm,paper=a4,fontsize=11pt,
ngerman,american,slovak%
]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{floatrow}

\begin{document}

\appendix
\part{Prílohy}
\chapter{Zdrojové údaje}

% original resolution of image is 2430x4212 (600 DPI)
\begin{figure}
    \caption{Kópia zoznamu básnikov z Kroeberovej knihy}    
    \includegraphics{kroeber_tabulka1.jpg}
\end{figure}

\end{document}
6
  • 1
    1. Not true. The scrreprt with only the graphicx package do not change the caption position, i.e. you can insert \caption{} before/after a table/image in a float and you obtain exactly that. Really you do not need any package for that.
    – Fran
    Apr 22, 2015 at 17:50
  • If you take example from some textbook then its true. But in real world, where there are many packages, long texts, many chapters and dependencies between various packages, things can differ. Apr 22, 2015 at 17:56
  • 2. A editor with instant previews as Gummi can help. Use often \end{document} often to delimit the source of the problems. Read the cryptic error messages, sometimes have useful information. Use often texdoc name-of-package .... but learn LateX a certain level is not easy and I'm afraid there are no easy shortcuts.
    – Fran
    Apr 22, 2015 at 18:02
  • If you are determined to use floatrow at any cost, then use \floatsetup[figure]{capposition=top} in the preamble, but have you really any reason to use that package? My recommendation: Make it simple. Less is more.
    – Fran
    Apr 22, 2015 at 18:10
  • 1
    When all else fails, read the manual ;-) Apr 22, 2015 at 19:40

1 Answer 1

2

I suggest you read the provided manual more carefully; that could save you a major portion of that frustration.

\documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude,
footinclude=true,cleardoublepage=empty,abstractoff, 
BCOR=5mm,paper=a4,fontsize=11pt,ngerman,american,slovak%
]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[figure]{capposition=top}

\begin{document}
\appendix
\part{Prílohy}
\chapter{Zdrojové údaje}

\begin{figure}
  \ffigbox
    {\rule{3cm}{3cm}}
    {\caption{Kópia zoznamu básnikov z Kroeberovej knihy}}   
\end{figure}

\end{document}
1
  • 2
    Welcome to tex.sx! While code is always useful as a short-term solution, maybe you could add some explanations over what exactly was the problem. This way the OP will not repeat the mistake, and the post will be more useful to future readers.
    – T. Verron
    Apr 22, 2015 at 21:33

You must log in to answer this question.

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