diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc index 4e09b5b0e..60e46de0b 100644 --- a/preprocessor/ExprNode.cc +++ b/preprocessor/ExprNode.cc @@ -2056,11 +2056,14 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type, output << "exp"; break; case oLog: - output << "log"; + if (IS_LATEX(output_type)) + output << "\\log"; + else + output << "log"; break; case oLog10: if (IS_LATEX(output_type)) - output << "log_{10}"; + output << "\\log_{10}"; else output << "log10"; break;