Edit Links 
Tips /
MathMacrosCategories: Math <<  Page list  >>This page contains tips about Math Macros in LyX § Ways to enter math macrosMathmacros can be defined in three ways.
§ Custom multicharacter functions.Onecharacter functions in math such as f(x) should be in italics so can be entered directly into math. But multicharacter functions such as sin x should be upright and have a bit of extra space, so need special treatment. Some, like sin, are predefined in LaTeX and can be accessed with commands like \sin. Note that this also includes functionlike constructions like lim, sup and arg. (LaTeX note: For technical reasons, these are sometimes called "operators" in LaTeX. In raw LaTeX you would define them with something like To declare a custom function in LyX, insert a math macro as described above, putting something like the following in the TeX part: \operatorname{sgn}
Since LyX doesn't recognise \operatorname, you could put something like If you are declaring a type of limit, then you will want subscripts and superscripts to be placed directly above/below it in displayed text rather than next to it. To do this use the starred variant of \operatorname in the TeX part: \operatorname*{slim}
