Index for join (\ bowtie) operation in LyX / LaTeX

I use LyX to write Relational Algebra queries. I use the \ bowtie character for the join operation, but when I try to put text in the index under the direct character, I get the following error:

... A _ {\ t {Pid}} \ t {person} \ on the right) \ Bowtie \ limits {\ t {pId} {1} = \ t {pId} _ {2} ... I ignore this inappropriate \ restriction or \ nolimits.

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

Edit: \t is the macro for \text .

+4
source share
3 answers

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

Try this in the preamble:

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

and this is in the document:

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

Hope this is what you are looking for.

+4
source

Better to use

 \Join 

This works great for me.

+5
source

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

In the preamble:

 \usepackage{amsmath} 

In the equation:

 \underset{your_subscript_here}{\bowtie} 
+1
source

Source: https://habr.com/ru/post/1310796/