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 have a number of statemts which describe the process of creating a data element which are intergrated within a "data manual". For example:

IF ( ( heigth between 58 AND 76 ) AND ( BMI between 19 AND 24 ) ) THEN obese = 0
ELSE IF ( ( heigth between 58 AND 76 ) AND ( BMI between 25 AND 29 ) ) THEN obese = 1

Is there an elegant way to represent such statements in TeX? I've thought about using tree graphs of some sort but unortunately its hard due to the fact that most elements are not as simple as the example and tend to get very complicated very fast.

share|improve this question
    
I'm not sure what you're after. Do you want to represent the expression as a formula or graphically? –  Count Zero Sep 10 '12 at 10:03
    
Either, I dont mind. I was hoping there is already a "canonical" way of expressing such expressions in an elegant manner. I have no preference as long as the result is readable and parseable by members by humans. –  Spiros Sep 10 '12 at 10:39
add comment

1 Answer 1

I'm not entirely sure about this, but...

$
  \hbox{obese} = \cases{
    0 & if $(58 < \hbox{height} < 76) \land (19 < \hbox{BMI} < 24))$\cr
    1 & if $(58 < \hbox{height} < 76) \land (25 < \hbox{BMI} < 29))$
  }
$
\bye

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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.