On 10/07/2016 10:22 AM, Joel Kulesza wrote:
Sorry for the quick follow-up, but I should note that this example is
given in the documentation (Math, Section 15.2).
What I'm asking is: is there a way to define this custom function
globally rather than on a document-by-document basis.
Also, I'm wondering if there is a way to carry out the Alt+M M
procedure automatically (as it is done with exp, sin, etc.).
Thank you,
Joel
On Fri, Oct 7, 2016 at 8:17 AM, Joel Kulesza <[email protected]
<mailto:[email protected]>> wrote:
Colleagues:
Does anyone know of a method to define new functions such as \exp,
\sin, etc.?
I'd like to include \sgn or \sign in a document and the only
method I've identified is to include
\usepackage{amsmath}
\DeclareMathOperator{\sgn}{sgn}
in the preamble.
However, when setting the equation LyX does not / can not identify
this so I see "\sgn" in maroon text rather than "sgn" in black
text (like I would with exp or sin).
This is minor, but it would be nice to have a cohesive looking
document with non-standard named functions.
Any thoughts you can provide are appreciated.
Thank you,
Joel
As far as defining them globally, a couple of options come to mind:
1. put them in a file and include it in any document where you need
them; or
2. write a module that contains them, and add it into documents as needed.
Paul