subscript for a join (\bowtie) operation in LyX/LaTeX
Asked Answered
C

3

5

I'm using LyX to write some Relational Algebra queries. I'm using the \bowtie symbol for the join operation but when I try to put a text in subscript directly under the symbol, I get the following error:

...a_{\t{pId}}\t{person}\right)\bowtie\limits {\t{pId}{1}=\t{pId}_{2}... I'm ignoring this misplaced \limits or \nolimits command.

Anyone knows how to do what I want? Preferably in LyX, but ERT code snippets will also be appreciated. Thanks!

Edit: \t is a macro for \text.

Clarke answered 24/5, 2010 at 23:2 Comment(0)
H
4

Your problem is that \bowtie is not math operator such as \int, \sum etc.

Try this in preamble:

\usepackage{amsmath}
\DeclareMathOperator*{\btie}{\bowtie}

and this in document:

\(\btie\limits_{subscript}^{superscript}\)

I hope it's what you're looking for.

Hermaherman answered 25/5, 2010 at 8:29 Comment(2)
More informations are here: ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdfHermaherman
+1 - That's what I'd suggest too. There are many ways to make a new math operator, this is my preferred choice.Plexor
U
9

Better use

\Join

It works fine for me

Unimposing answered 11/12, 2012 at 17:28 Comment(0)
H
4

Your problem is that \bowtie is not math operator such as \int, \sum etc.

Try this in preamble:

\usepackage{amsmath}
\DeclareMathOperator*{\btie}{\bowtie}

and this in document:

\(\btie\limits_{subscript}^{superscript}\)

I hope it's what you're looking for.

Hermaherman answered 25/5, 2010 at 8:29 Comment(2)
More informations are here: ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdfHermaherman
+1 - That's what I'd suggest too. There are many ways to make a new math operator, this is my preferred choice.Plexor
D
1

From http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Above_and_below:

In preamble:

\usepackage{amsmath}

In equation:

\underset{your_subscript_here}{\bowtie}
Dinette answered 29/2, 2012 at 22:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.