Help for this page

Select Code to Download


  1. or download this
    ## Perform test and call fraction only if test is true
    if ($str =~ /\d+_\d+) {
    ...
       # convert $str to fraction using mimetex syntax
       return $str;
    }
    
  2. or download this
    # Call fraction and perform the conditional test there
    $str = fraction($str);
    ...
       }
       return $str;
    }