I seem to be experiencing an odd issue with lyx.
I have a macro mapping \leq to \leqslant.
Withing the document I'm editing this works fine, but if I start a new document in which the only macro is the one above and the only symbol is \leq, I get an undefined control sequence error. There are other macros of mine for which this occurs, for example I mapped \ints to \mathbb{Z}, which I've used in new documents in the past. As a process of elimination I removed paragraphs from my original document, until I managed to reproduce the error. It turns out that if the \subsetneq symbol is present, lyx compiles with no issue, but if its removed we're back to the error. I should note that I tried lyx on two different machines. Also, when pasting the latex source into scribtex, without the \subsetneq it compiles just fine.
Here's the source -
Code: Select all
% Preview source code
%% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[11pt,oneside,english]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1.25in,rmargin=1.25in}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{figure}{section}
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[all]{xy}
\let\oldenumerate=\enumerate
\def\enumerate{\oldenumerate%
\setlength{\itemsep}{5pt}\setlength{\parsep}{5pt}}%
\usepackage{mathrsfs}
\usepackage[linktoc=all]{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{todonotes}
\makeatother
\usepackage{babel}
\begin{document}
\global\long\def\leq{\leqslant}
$\subsetneq\leq$
\end{document}
Thanks in advance.
P.S.
I don't know that \subsetneq is the only symbol that works, it's just the only one I've found that works.
P.P.S
Sorry if this problem has already been asked, I couldn't find it in a search.
Thanks.