Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to typeset inference rules containing tables (or arrays) in the premises. I'm using the semantic package, which sets the premises (and conclusion) in math mode, so I thought this might work:

\inference{\expr{axis} \in \left\{
    \expr{child}\\ \expr{descendant}
\right\} }{conclusion}

However, this gives me an error message I'm perplexed looking at:

ERROR: Missing \cr inserted.

--- TeX said ---
<inserted text> 
l.56 \right\} }
               {\expr{axis::node-test predicate*} : \<node-set>}
--- HELP ---
From the .log file...

I'm guessing that you meant to end an alignment here.

which is strange, because typesetting the premise alone in a math environment works fine:

\expr{axis} \in \left\{ \begin{array}{l}

Could you shed some light on why am I getting the error message above and how to get rid of it?

PS: \expr{} is basically \texttt{}.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

You can "protect" the array from the \inference construction by using braces:

enter image description here

\usepackage{semantic}% http://ctan.org/pkg/semantic
\inference{\expr{axis} \in \left\{
    \expr{child}\\ \expr{descendant}
\right\} }{conclusion}

The reason for this being a problem is because, in a nested way, the \inference macro processes the premises (first argument) expecting a \\; actually, it expects <something>\\<something>\end, and the \\ in your array construction conflicts with this definition.

In this instance, you could also replace \\ with \cr to remove the conflict usage.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.