我需要修复这个 LaTeX 代码的对齐方式。
if当我编译它时,输出的, for,语句对齐错误else。
\begin{algorithm}[H]
\caption{:The $ASP\_Tree$ algorithm}
\SetKwInOut{Input}{Input}
\SetKwInOut{Output}{Output}
\Input{TV database and min\_sup }
\Output{Bla bla bla}
\KwData{bla bla bla}
\Procedure{Tree}{$TV_i, min\_sup$}
{
\State {$[Root] \leftarrow [NULL]$} \newline
\For {$i=1$ to $N$} {\label{forins} \newline
{
%\Statex \Comment {\%Comments: insert TV values into the tree based on rules}
\State {$Root \leftarrow TV_1$}
\State {$i \leftarrow i+1$} \newline
\If {TV_i \textgreater Root}
\State Root \gets TV_i
\ELSIF {TV_i\leq Root}
\State i\gets i+1
\ELSE
\State do something …Run Code Online (Sandbox Code Playgroud) latex ×1