我需要使用 Windows 文字编写下面的 Latex 算法,我该怎么做?
\documentclass{article}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}% http://ctan.org/pkg/algorithm2e
\DontPrintSemicolon
\begin{document}
\begin{algorithm}
\KwIn{$a$, $b$, $c$, $d$}
\KwOut{$e$, $r$}
Calculate~$x$ and~$y$\;
\lIf{$k \geq n$}{$m_2$}\;
\lIf{$h \geq j$}{$m_1$}\;
\Else{%
\Repeat{$|a(i+1)-a(i)| < \epsilon$}{%
Initialisation: $g(0) = nj$\;\label{stepA}
$i=0$\;
Compute~$n_2$
\[
n(i) = \frac{a}{b(i)\sqrt{3v}}
\]
\nl Update~$b$
\[
b(i+1) = (-\frac{1}{2(g(i)/D} + 1)
\]
\nl $i = i + 1$\;
}
}
\caption{My algorithm}
\label{algo:b}
\end{algorithm}
\end{document}