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.

Math symbols (\subseteq and \supseteq) are rotated and rendered successfully in text mode with the aid of \rotatebox{}{}.

In the commented section below, there is a problem with getting these symbols into the subfloat label. I'm using pdflatex

This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) Any ideas? Thanks.

\documentclass[a4paper]{article}

\usepackage{graphicx}
\usepackage{subfig}
\usepackage{tikz}
\usepackage{stmaryrd}
\usepackage{fouriernc}
\usepackage{MnSymbol}
\usepackage{colonequals}
\usepackage{ulem}
\usepackage{fancybox} 

\usetikzlibrary{arrows, shapes, patterns}
\pagestyle{myheadings}

\begin{document}
\rotatebox{90}{$\supseteq$}
\rotatebox{90}{$\subseteq$}

\begin{figure}
\centering
%\subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\rotatebox{90}{$\supseteq$}]{
\subfloat[Text $\overline{A\cup B}$,\;$\downarrow$]{
 \begin{tikzpicture}[scale=0.5, auto, swap]
   \draw (-1,0) circle (1);
   \draw (2,0) circle (1);
   \node at (-2,1) [above left] {$A$};
   \node at (3,1) [above right] {$B$};
 \end{tikzpicture}
}\qquad
\caption{Sets}
\end{figure}
\end{document}

EDIT: Addition of parameter origin=c to \subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\protect\rotatebox[origin=c]{-90}{$\subseteq$}]{ Without as seen in the picture.

enter image description here

Error while compiling Runaway argument? origin=c\caption@ifstrut {\ifhmode \@finalstrut \strutbox \fi }{} ! Paragraph ended before \Grot@box@kv was complete. <to be read again> \par l.30 ...ownarrow$\protect\rotatebox[origin=c]{-90} {$\subseteq$}]{

share|improve this question
    
What version of TeX/TikZ are you using? I seem to be getting an error on tikzlibrary. Latex Error: ./untitled2.tex:13 I can't find file `tikzlibrary'. Is it just my distribution? –  Jack Henahan Jun 17 '11 at 5:04
    
As far as I can tell my configuration is latex2e, pdfTeX, pdflatex, Tex Live 2010...for tikz I would say the latest available version :) My error is ! Argument of \sf@@@subfloat has an extra }. <inserted text> \par l.30 } \qquad –  panny Jun 17 '11 at 5:12
    
Oh, my, it seems I haven't run an update in a while, so I may be a bit outdated. I'll let you know what I find out when it finishes updating. –  Jack Henahan Jun 17 '11 at 5:20

1 Answer 1

up vote 2 down vote accepted

Use \protect before \rotatebox. This prevents the early expansion of \rotatebox, see What is the difference between Fragile and Robust commands for an explanation.

\subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\protect\rotatebox{90}{$\supseteq$}]{

enter image description here

share|improve this answer
    
How can I make \subfloat[Text $\overline{A\cup B}$,\;$\downarrow$\protect\rotatebox[origin=c]{-90}{$\subseteq$}]{ work? rotating \subseteq -90 changes symbol height or moves it vertical lower. –  panny Jun 17 '11 at 13:01
1  
@panny: it works if you define a macro: \newcommand*{\rot}{\rotatebox[origin=c]{-90}{$\subseteq$}} and protect that later in the subfloat command: ...\protect\rot. –  Stefan Kottwitz Jun 17 '11 at 15:13
    
thanks! –  panny Jun 17 '11 at 16:39

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.