Hi,
I just wanted to share a simple and probably imperfect layout module for
LyX 1.6. I do not know much about LaTeX, so I used the examples provided
with LyX and google to create this file. I called it
"moremathsfunctions.module" (it should be placed in the "layouts" folder
in the lyx 1.6 preference folder of your home directory -- in
"Application Data" for windows users), and here is the content (between
the dashed lines, so people can comment on the code):
------------------------------------------------------------------------
#\DeclareLyXModule{More Maths Functions}
#DescriptionBegin
#Additional functions: erf, erfc, sinc, sgn , missing hyperbolic &
inverse hyperbolic functions,
#Fourier transform & inverse, logarithms in base 10 and 2, floor/ceil
(letters and mathematical
#notation).
#DescriptionEnd
# Author : Olivier Ripoll
Format 7
Requires amsmath,mathrsfs
AddToPreamble
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\erfc}{erfc}
\DeclareMathOperator{\FT}{\mathscr{F}}
\DeclareMathOperator{\iFT}{\mathscr{F}^{-1}}
\DeclareMathOperator{\logten}{log_{10}}
\DeclareMathOperator{\logtwo}{log_2}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
\DeclareMathOperator{\arsinh}{arsinh}
\DeclareMathOperator{\arcosh}{arcosh}
\DeclareMathOperator{\artanh}{artanh}
\DeclareMathOperator{\arcoth}{arcoth}
\DeclareMathOperator{\arsech}{arsech}
\DeclareMathOperator{\arcsch}{arcsch}
\newcommand{\Floor}[1]
{\left\lfloor {#1} \right\rfloor}
\DeclareMathOperator{\floor}{floor}
\newcommand{\Ceil}[1]
{\left\lceil #1 \right\rceil}
\DeclareMathOperator{\ceil}{ceil}
EndPreamble
------------------------------------------------------------------------
As the description says, this module simply defines several useful math
functions that are not available by default (I hope I did not overwrite
existing LaTeX stuff). There are two versions of the "floor" and "ceil"
functions, the one with a capital letter must be followed by \{xxx}
where xxx is the number to which it is applied. It provides an aspect
like in http://en.wikipedia.org/wiki/Floor_function
I used http://en.wikipedia.org/wiki/List_of_mathematical_functions as a
reference for the functions I added. And before someone says so, Fourier
transform and its inverse are not functions, but I do not care ;-)
I hope this can be helpful to someone. I like this layout module feature
a lot, I created another one with custom char styles for filenames and
code, based on Martin Vermeer's "logicalmkup.module".
Small question: should I change the "Format 7" to "Format 8" ?
Best regards,
Olivier
PS: be careful, some lines are wrapped by the mail agent in the description.