public static String prepareFractionsMath(final String input) {
        if (!input.contains("/"))
            return input;
        final String fracBegin = "\\\\left(\\\\frac{";
        final String fracEnd = "}\\\\right)";
        
        String tmp = input;
        final List<String> numbers = matchNumbers(tmp);
        for (int i = 0; i < numbers.size(); i += 2) {
            if (i + 1 < numbers.size()) {
                final String n1 = numbers.get(i);
                final String n2 = numbers.get(i + 1);
                tmp = tmp.replaceAll("\\(" + n1 + "\\/" + n2 + "\\)",
                    fracBegin + n1 + "}{" + n2 + fracEnd);
            }
        }
        return tmp;
    }