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.

Can anyone tell me how to change the horizontal position of subfigure labels?

I have:

 \captionsetup[subfigure]{labelformat=simple,position=top}

Is there something like:

 {position=topleft}

to place the label in the top left corner of my subfigures? Thanks

share|improve this question
1  
Welcome to TeX.SE! Hint: you can highlight code either by pressing the {} button above the edit window or by indenting with 4 spaces, or for inline code check here. –  Count Zero Jul 27 '12 at 16:23
add comment

2 Answers 2

Here's one possible solution using the floatrow and subfig packages:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{floatrow}
\usepackage{subfig}

\begin{document}

\floatsetup[figure]{style=plain,subcapbesideposition=top}
\begin{figure}
  \sidesubfloat[]{\includegraphics{image1}\label{fig:sub1}}\quad%
  \sidesubfloat[]{\includegraphics{image2}\label{fig:sub2}}%
  \caption{Two subfigures with their caption beside}\label{fig:test}
\end{figure}

\end{document}

enter image description here

share|improve this answer
    
How do I get subcaptions as well? –  user29730 Apr 26 '13 at 10:00
    
@MLT although related to the original question, your requirement can't be tackled with the approach mentioned in my answer (the question only asks for labels and that's exactly what \sidesubfloat does; it places the labels beside the subfigures). The best thing to do would be for you to ask a follow-up question. –  Gonzalo Medina Apr 26 '13 at 13:29
add comment

A simple way of doing it is to use singlelinecheck=off and justification=raggedright together. Below is an example that creates a bolded caption with left alignment for subfigures only:

  • singlelinecheck=off means that the justification setting is used even when the caption is only a single line long.
  • if singlelinecheck=on, then caption is always centered when the caption is only one line.
  • caption label is bold, the caption text normal.
  • justification is raggedright (i.e. left aligned)

\captionsetup[subfigure]{position=top, labelfont=bf,textfont=normalfont,singlelinecheck=off,justification=raggedright}

The above will place the caption on top of the figure left aligned. It will not place it on the side as Gonzalo example did, but I think this is what the original question was about

share|improve this answer
add comment

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.