This follows a previous post which can be found here.
I'm now trying to used that command but I get lots of compilation mistakes and I really don't understand where the problem comes from. This is how I'm using the command:
\documentclass{article}
\usepackage{mathtools}
\newcommand{\twopartdef}[3]{%
\left\{
\begin{array}{ll}
#1 & \mbox{if } #2 \\
#3 & \mbox{otherwise}
\end{array}
\right.
}
\begin{document}
%some text ...
\[
join^\sharp_{KSet_n}(\{ \alpha_1, \hdots, \alpha_p \}, \{ \beta_1, \hdots, \beta_q \}) =
\twopartdef{\{\alpha_1, \hdots, \alpha_p\} \cup \{\beta_1, \hdots, \beta_q\}}{p \leq n et q \leq n}{\top}
\]
%more text
\end{document}
Here are the main compilation errors:
Missing $ inserted
I've inserted a begin-math/end-math symbol since I think you left one out
....
I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$'..
....
I can't figure out why you would want to use a tab mark here.
....
A left brace was mandatory here, so I've put one in.
....
I found that the problem is from this line (by commenting it)
\twopartdef{\{\alpha_1, \hdots, \alpha_p\} \cup \{\beta_1, \hdots, \beta_q\}}{p \leq n et q \leq n}{\top}
So I tried to put $ $
, lbrace rbrace
instead of \{ \}
but it didn't change anything. I've used the same command for other definition and it work fine. What am I missing?
Edit: I tried compiling the code above alone and it worked. So why doesn't it work with the remaining document?
\twopartdef
that you use. Also there's no formal definition given\hdots
.\hbox
" message.