Consider the following MWE:
\documentclass{article}
\usepackage{kpfonts}
\usepackage[utf8]{inputenc}
\begin{document}
This is a formula: $¬¬p \implies p$
\end{document}
The output does not typeset the ¬
unicode symbol (NOT SIGN) and I get this warning:
LaTeX Warning: Command \textlnot invalid in math mode on input line 8
It seems that kpfonts
is taking care of handling ¬
but it assigns to it a command that works in text mode (which seems a strange default since this is a mathematical symbol).
How can I redefine the symbol to something usable in math mode (e.g. \lnot
) or, better, to make it expand to \textlnot
in text mode and \lnot
in math mode?