@Override
    public synchronized Document convertToDoc(String latex) {
        try {
            parseCurrentSession(latex);
            LOG.debug("Done. Return snuggletexs parsed document.");
            return createDocument();
        } catch (IOException ioe) {
            throw new MathConverterException("Cannot convert latex with SnuggleTeX: " + latex, ioe);
        } finally {
            session.reset();
        }
    }
@ Override public synchronized Document convertToDoc ( String latex ) { try { parseCurrentSession ( latex ) ; LOG . debug ( "Done. Return snuggletexs parsed document." ) ; return createDocument ( ) ; } catch ( IOException ioe ) { throw new MathConverterException ( "Cannot convert latex with SnuggleTeX: " + latex , ioe ) ; } finally { session . reset ( ) ; } }
@param latex
@throws IOException