I am trying to insert this expression in my Latex file:

enter image description here

When I start entering :


I got an error saying “ unrecognizable environment “

I tried this ( nested arrays) :

Max(i,j), &\text{if min(i,j)=0}\\
Min & {\begin {array} {lr}

When I start the nested array , document review disappeared.

I need help “coding” this expression in Latex .

I am using Texstudio as a Latex editor.

  • 1
    Used editor is not relevant to your problem. Please show us what you try so far.
    – Zarko
    Commented Nov 16, 2019 at 2:09
  • I searched online i found this command (\begin(cases)) , but this command is not available in Latex ..l
    – Paulo
    Commented Nov 16, 2019 at 2:11
  • of course, it is :-) . Of course, t should not be enclosed in parenthesis.
    – Zarko
    Commented Nov 16, 2019 at 2:22
  • Are the lower brackets really cases, or is it just the minimum of three different expressions? In the latter case I would typeset the formula in a way that this gets reflected.
    – user194703
    Commented Nov 16, 2019 at 3:01

2 Answers 2

\documentclass[margin=3mm, varwidth]{standalone}
\usepackage{mathtools}% for cases*, also load amsmath

xxx = \begin{cases*}
    \max(t,f) & if $\min(t,f) = 0$   \\
    xxx & + 1 \\
    xxx & + 1 \\
xxx xxx & + 1 \\
    \end{array}\right. &  otherwise

enter image description here


Your text is very hard to read (which is why most likely some characters are misrepresented below). Yet I could not make sense of having \min in front of cases. So I am wondering if the lower part, i.e. the second case, is the minimum of a list. If so, maybe the following is more appropriate.

  \max(i,j) & \text{if}~\min(i,j)=0\;,\\

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .