11

Where do I find a symbol that looks like a slightly smaller version of a 90 degrees rotated \Bowtie from the wasysym package?

Something like alt text.

I couldn't find anything in the usual tables. The detexify site yields nothing close. I managed the following hack (which defines a binary operator):

\documentclass[12pt]{article}  
\usepackage{wasysym,graphicx}  
\newcommand{\uproduct}{\mathbin{\;{\rotatebox{90}{$\small\Bowtie$}}}}
\begin{document}  
$A \uproduct B$  
\end{document}

It produces alt text. Although it looks OK here, it looks bad when used in a subscript. This is surely not the right solution. I'd well believe that a solution using metafont exists, but would prefer something less esoteric. Perhaps there is a standard symbols package that I overlooked?


**EDIT: Geoffrey and Aditya gave admirable solutions for creating this symbol (I'm sorry for previously calling them "hacks"). And Seamus found a font package.

7
  • Konrad I suggested the \scalebox, but I am very curious as to where you are using it. I presume as a relational symbol for a join? Never thought of it as a subscript!
    – yannisl
    Sep 26, 2010 at 17:46
  • I'd like to use it for the join of two graphs. It would be a nice suggestive notation. And in principle something like $G_1\uproduct G_2$ could end up in a sub- or superscript somewhere. Sep 26, 2010 at 17:58
  • 2
    Konrad, don't worry. The given solutions (well, at least mine ;) ) are not "hacks". Of course it would be nice if every conceivable symbol were natively available. However, it's quite usual to construct one when this can't be. The \mathchoice-based solution should be safe to most contingencies. \mathchoice (like \;, \[ etc) is a TeX primitive, aditya's \mathpalette comes from plain.tex, \scalebox from graphics.sty and \rotatebox from graphicx.sty have both been around for 15+ years. I.e., 99.99% of the problems that might surface have already been ironed out. Rest easy. :) Sep 27, 2010 at 3:34
  • 1
    And you will be surprised how many of the basic math symbols are made using similar techniques :)
    – Aditya
    Sep 27, 2010 at 5:14
  • @Geoffrey and Aditya: thanks for the reassurances and for providing some perspective. Sep 27, 2010 at 8:19

5 Answers 5

7

\udtimes is defined in the mathdesign package

4
4

I think that judiciously combining \mathchoice, \rotatebox and scalebox should give you what you want:

\documentclass{article}
\usepackage{graphicx,wasysym}

\newcommand\uproduct{%
  \mathchoice{\mathbin{\;\rotatebox{90}{$\Bowtie$}}}%
             {\mathbin{\;\rotatebox{90}{$\Bowtie$}}}%
             {\mathbin{\;\rotatebox{90}{\scalebox{0.65}{$\Bowtie$}}}}%
             {\mathbin{\;\rotatebox{90}{\scalebox{0.65}{$\Bowtie$}}}}%
}

\begin{document}
  $A = B \uproduct C$, whereas $X_{B \uproduct C} > Y$
  \[
    A=\sum_{B \uproduct C}^{D \uproduct E}{F \uproduct G}
  \]
\end{document}

Of course, the spacing and the scaling are still up to you.

3
  • Aha, this is what my hack should have been! And you're right: the spacing and scaling still have to be tweaked somewhat. Sep 26, 2010 at 18:48
  • Part of the problem is that \\Bowtie itself doesn't scale when used in a subscript, which means that wasysym is not perfect. On the other hand, \\udtimes from Seamus's answer does scale. Sep 28, 2010 at 20:23
  • 1
    @Konrad, of course. That's why \mathchoice was implemented early on in TeX. Native font characters like mathdesign's \udtimes are always the best way to go if you can. I'd definitely go for it if you're OK with using (or at least loading) mathdesign within your work. In any event, now you're aware of the TeX-general approach to cleanly solving your problem. Useful to know for those times when loading in another font package isn't the ideal way to go (e.g., if it changes your typography in ways you don't want or interferes with other code you use). Sep 29, 2010 at 1:31
4

In modern TeX engines (XeTeX, LuaTeX), this symbol is avaiable with unicode-math as \hourglass:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\begin{document}
    \(A\hourglass B\)
\end{document}

output result

2
  • Great! I've tried it using xelatex, which didn't work, and using lualatex, which did work. Any reason for the difference? (I used MacTex, Tex Live 2011.) Dec 29, 2011 at 11:09
  • @KonradSwanepoel For me, it works with both engines, so it shouldn't be a general problem with XeTeX. Did you run fc-cache before using xelatex (see Lualatex sees a font while fc-list doesn't)?
    – diabonas
    Dec 29, 2011 at 18:12
3

Here is an attempt with slightly better spacing:

\makeatletter
\newcommand\douproduct[1]%
  {\mathbin
  {\m@th\leavevmode\raisebox{-0.03ex}
    {\vbox{\baselineskip\z@skip \lineskip-.2ex% =0.25*0.8
     \ialign{##\cr
     \rotatebox{90}{\scalebox{0.8}{$#1\triangleleft $}}\cr
     \rotatebox{90}{\scalebox{0.8}{$#1\triangleright$}}\cr}}}}}
\makeatother

\newcommand\uproduct{\mathpalette\douproduct\relax}

4
  • It's a little too high when used in a subscript, although the symbol is smaller. Sep 26, 2010 at 20:35
  • Try the updated version.
    – Aditya
    Sep 26, 2010 at 21:11
  • The updated one doesn't compile properly. Sep 27, 2010 at 8:17
  • Sorry, I forgot a \makeatletter in the beginning. Try again.
    – Aditya
    Sep 27, 2010 at 14:37
1

Try it with the \scalebox command for example:

\rotatebox{90}{\scalebox{0.5}{$\Bowtie$}}

The \scalebox can virtually scale anything.

2
  • This gives the same behaviour: it doesn't scale right in a subscript. Sep 26, 2010 at 17:52
  • You can change the scaling factor and you can also raise it or lower it if you like. However, I agree with you a readymade symbol will always look better. Thanks for the comment on usage.
    – yannisl
    Sep 26, 2010 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .