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 Nov 16 '19 at 2:09
  • I searched online i found this command (\begin(cases)) , but this command is not available in Latex ..l – Paulo Nov 16 '19 at 2:11
  • of course, it is :-) . Of course, t should not be enclosed in parenthesis. – Zarko Nov 16 '19 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 Nov 16 '19 at 3:01
\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

  • Thanks a lot . You saved a lot! – Paulo Nov 17 '19 at 2:42

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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