3

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$}]{

3
  • 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
2

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

2
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.