What is this? I'm just trying to write '
Entry:
Output:
My code:
\documentclass[a4paper]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
\usepackage[most]{tcolorbox}
\usepackage{pgfplots,relsize}
\usepgfplotslibrary{fillbetween}
\def\h {1.3ex} % cup and cap height
\def\w {1.2ex} % cup and cap width
\def\lw{0.12ex} % cup and cap line width
\def\sp{0.7269ex} % space before and after
\newcommand{\mysymbol}[1]
{
\hspace{\sp}
\tikz[line width=\lw,line cap=round,rotate=#1,baseline=-0.4ex] {\draw (-0.5\w,0.5\h) -- (-0.5\w,0.5\w-0.5\h) arc (-180:0:0.5\w) -- (0.5\w,0.5\h);}
\hspace{\sp}
}
\newcommand{\mycup}{\mysymbol{0}}
\newcommand{\mycap}{\mysymbol{180}}
\newcommand{\mysub}{\mysymbol{270}}
\newcommand{\mysup}{\mysymbol{-360}}
\begin{document}
\begin{align*}
p' \wedge q
\end{align*}
\end{document}


\documentclass{article} \begin{document} $\wedge(q' \wedge r)$ \end{document}compiles without problems. – Marijn Sep 19 '21 at 18:56\def\sp{0.7269ex}and\usepackage{mathastext}, commenting either of these out fixes it. Also changing\spto some other name, such as\sppfixes it. – Willoughby Sep 19 '21 at 19:22\sp-- or, for that matter,\sb-- unless you want to come to grief. (Hint:\spand\spare short for superscript and subscript.) – Mico Sep 19 '21 at 19:34\def(which is not LaTeX) - using\newcommandwould have triggered a redefinition error. It's a good habit to use it especially for short macro names, where clashes are more probable. – Rmano Sep 19 '21 at 20:25\newcommandnot\def---to see if this appears anywhere. This method doesn't find the culprit every time, and it certainly doesn't give the full answer given below, but it can help diagnose the issue. [*I feel that it's a good tip; it works well for me, at least!] – Sam OT Sep 20 '21 at 08:25