This site is a showcase for using LatexRender for mathematics in WordPress

Using LaTeX in WordPress

Using cosec

Saturday 2nd April 2005

Filed under: — Steve @ 10:49 pm

British (and who else?)1 prefer to use \cosec x for \frac{1}{\sin x} but \LaTeX doesn’t recognise \cosec as a command. You could use \mathrm{cosec} which produces \mathrm{cosec} or even use Babel, but a very simple method would be to add a line in class.latexrender.php Just after
$string .= "\begin{document}\n";
add the line
$string .= "\newcommand{\cosec}{\operatorname{cosec}}\n";
and then you’ll be able to use \cosec wherever you want eg \cosec^2x=1+\cot^2x

You can find a whole lot more newcommands at Birmingham (UK) University Maths Postgrad Committee’s Latex Commands page

1. Russian Babel has the \cosec command; so who else uses cosec rather than csc?


 

This site is a showcase for using LatexRender for mathematics in WordPress