Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 857
Amir Rachum Avatar asked May 24 '10 23:05

Amir Rachum


2 Answers

Better use

\Join

It works fine for me

like image 57
Nitesh Avatar answered Nov 15 '22 11:11

Nitesh


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.

like image 30
Crowley Avatar answered Nov 15 '22 09:11

Crowley