I saw a similar post at Automatic equation numbering in LyX but it didn't answer my question, so hopefully someone can help me out.
I have one of my key bindings set to:
command-sequence math-mode; math-mutate align;
I used this to insert align environments all over my document. None of these are numbered. My goal is
- to number every existing equation in the document, or
- to selectively number existing equations without having to cut and paste my equations into new environments.
My LaTeX preamble is listed below. Does anyone know how to turn on numbering?
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath,graphics, setspace}
\usepackage{braket}
\usepackage{color}
\usepackage{multicol}
\let\oldvec\vec
\let\oldsum\sum
\let\oldlim\lim
\let\oldint\int
\renewcommand{\vec}[1]{\oldvec{\mathbf{#1}}}
\renewcommand{\sum}{\displaystyle\oldsum}
\renewcommand{\lim}{\displaystyle\oldlim}
\renewcommand{\int}{\displaystyle\oldint}
\newif\ifsols
\renewcommand{\ifsols}{\ifsols\color{red}}
Edit:
Your suggestions work for my purposes. Thanks for the clear explanations! There is still one problem though. Ideally I would like the equation numbering to continue across multiple align environments. I don't want the numbering to reset at each align environment. Right now, when I click "View" and make my Lyx file into a PDF, the numbers do not reset between environments, which is what I want to happen. However, within the Lyx program, before I make the PDF file the numbers appear to reset at each new align environment. Is it possible to fix this?
alignenvironments, the redefinition ofalign*I describe in the question you mention should work. How does it fail for you? You can of course number individual equations by right clicking -> Number whole formula. (Keyboard shortcut Alt + M, N). – Torbjørn T. Jun 13 '15 at 09:34align*environment. Starred math environments (fromamsmath) are unnumbered. You said numbering all equations in the document was an option, and the redefinition does just that. But as that is not an option, the method I described in my previous comment should work. – Torbjørn T. Jun 13 '15 at 20:46@TorbjørnT. There is tab-completion of usernames, so type@Toand you should be able to press Tab to finish the rest. – Torbjørn T. Jun 15 '15 at 08:09