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 would like to use the upside-down version of \bigsqcup to denote its dual operation. The stmaryrd package provides that symbol, \bigsqcap, but I have found that these two symbols are rendered in different sizes.

Below are sample code and its output.

\documentclass[12pt]{article}
\usepackage{mathptmx}
\usepackage{stmaryrd}
\begin{document}
$\bigsqcup \bigsqcap \bigcup \bigcap$
\end{document}

enter image description here

As you can see, \bigsqcap is clearly the odd one out, being slightly bigger than the rest.

Does anyone know how to get \bigsqcap in the same size as \bigsqcup? I need to use the mathptmx font, so I would appreciate a solution that retains it.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

A simple solution is to rotate \bigsqcup to get the missing \bigsqcap:

\documentclass[12pt]{article}
\usepackage{mathptmx}

\usepackage{graphicx}
\makeatletter
\providecommand{\bigsqcap}{%
  \mathop{%
    \mathpalette\@updown\bigsqcup
  }%
}
\newcommand*{\@updown}[2]{%
  \rotatebox[origin=c]{180}{$\m@th#1#2$}%
}
\makeatother

\begin{document}
\[\bigsqcup \bigsqcap \bigcup \bigcap\]
\[X\bigsqcup_0^\infty Y \bigsqcap_0^\infty Z\]
\[\bigsqcup\textstyle\bigsqcup
  \scriptstyle\bigsqcup\scriptscriptstyle\bigsqcup\]
\[\bigsqcup\textstyle\bigsqcap
  \scriptstyle\bigsqcap\scriptscriptstyle\bigsqcap\]
\end{document}

Result

Remarks:

  • The rotation switches to text mode (\hbox). \mathpalette is the method to get the current math style that we need, when we reenter math in the rotated box for \bigsqcup. The first argument of \@updown is the math style (\displaystyle, \textstyle, …), the second argument is the unrotated symbol. Thus \@updown can also be used for the rotation of other symbols.

  • \m@th suppresses \mathsurround for the case this value is set to avoid that space that should surround math formulas appears inside the formula.

share|improve this answer
    
Thank you a lot. This is exactly what I needed! –  Usagi Jun 29 '13 at 18:17

Use package MnSymbol instead of stmaryrd:

\documentclass[12pt]{article}
\usepackage{mathptmx}
\usepackage{MnSymbol}
\begin{document}
$\bigsqcup \bigsqcap \bigcup \bigcap$
\end{document} 

produces

enter image description here

share|improve this answer
1  
beware -- MnSymbol redefines lots of other symbols, so it's advised to limit your use to just the symbols you need. for tips on how to do so, see how to use MnSymbol along with other packages and Discard symbols from package –  barbara beeton Jun 29 '13 at 16:47
    
@barbarabeeton Yes, I know that, but I like this package very much and I use it in conjuction with amssymb, too, despite they say they are not compatible! –  karlkoeller Jun 29 '13 at 18:08
    
Thank you for your answer. This works, but I wanted to retain the mathptmx versions of \bigsqcup, \bigcup and \bigcap. –  Usagi Jun 29 '13 at 18:15
    
@Usagi That's OK. Note however that \bigsqcup, \bigcup and \bigcap don't come from mathptmx but are standard commands. Also, MnSymbol symbols are suitable for fonts like Times (as mathptmx uses) and Minion Pro... –  karlkoeller Jun 29 '13 at 18:25
    
I see. mathptmx wasn't really my personal choice, but something that I am asked to use. Otherwise, I might have used MnSymbol, since it does look nice. –  Usagi Jun 29 '13 at 18:48

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.