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 am using the memoir class to generate my thesis and when I declare a figure or table using a position specifier, where the position specifier is h, t, etc., my final PDF document has the label/position specifier printed over the figure.

I am using

\begin{figure}[h] 

to declare my figure.

In this case my figure prints where i want it but prints 'h' above the figure.

Any ideas as to what's going on or how to fix would be much appreciated.

share|improve this question
1  
Welcome to TeX.sx!](meta.tex.stackexchange.com/q/1436) Please add a minimal working example (MWE) that illustrates your problem. It is considered a lot better to put in some code that will compile, as it makes it a lot easier for us to copy it into our text editor and work with it, and see exactly what it is you are trying to do. –  egreg Nov 23 '12 at 15:12
    
I had trouble getting a minimal example working as i am using a large stylefile that I have been piecing together for some time. If it helps anyone else though, in trying to produce a minimal working example I discovered the root of the problem. \renewenvironment{figure}{\@float{figure}\sffamily\mathversion{sans}}{\end@float‌​} - i have reverted to using the standard figure environment. –  felice Nov 23 '12 at 16:13
    
It's clearly that definition that produces the problem. Please, add the code to your question and a workaround will be provided. –  egreg Nov 23 '12 at 16:26
    
You probably need simply \captionnamefont{\sffamily} and \captiontitlefont{\sffamily\mathversion{sans}} –  egreg Nov 23 '12 at 16:35
    
% Caption styling \captionnamefont{\sffamily\small\bfseries\color{Heading}} \captiontitlefont{\sffamily\small\mathversion{sans}} \subcaptionfont{\sffamily\mathversion{sans}} \subcaptionlabelfont{\sffamily} \hangcaption \hangsubcaption \captiontitlefinal{.} This did the trick. Thank you. –  felice Nov 23 '12 at 16:54
add comment

1 Answer

up vote 3 down vote accepted

If you need text also outside of the caption in the figure environment, then you can correct your redefinition in

\renewenvironment{figure}[1][\fps@figure]
  {\@float{figure}[#1]\sffamily\mathversion{sans}}
  {\end@float‌​}

Otherwise I suggest a simpler

% how to typeset the caption label
\captionnamefont{\sffamily}
% how to typeset the caption text
\captiontitlefont{\sffamily\small\mathversion{sans}}

with maybe something similar for subcaptions.

Adjust to suit, adding other settings, if desired.

share|improve this answer
    
Thanks for your help. Great resource! –  felice Nov 23 '12 at 22:06
    
@felice Please, consider to register, so as to enjoy better the site. We wait for other contributions from you. Your name looks Italian. :) –  egreg Nov 23 '12 at 22:07
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.