我有一段乳胶代码,我想删除边框左上角多余的数字 1。我该怎么做?
\begin{algorithm}[t]
\centering
\small
\resizebox{\linewidth}{!}{
\begin{tikzpicture}[baseline=0]
\node[draw, text height=2ex, minimum width=46mm, inner sep=0pt, minimum height=3ex] (headingCBP) at (0,0) {\progHeader{$d$}};
\node[below=0.5ex of headingCBP] (textCBP) {%
\begin{minipage}[h]{46mm}
\begin{algorithmic}[1]
\STATE{$d$;}
\STATE{$d$;}
\WHILE{$d$}
\STATE{$d$;}
\STATE{$d$;}
\ENDWHILE
\RETURN{$f$}
\end{algorithmic}
\end{minipage}
};
\node[draw, text height=2ex, minimum width=68mm, inner sep=0pt, minimum height=3ex] (headingFSP) at (6.6,0) {\progHeader{$f$}};
\node[below=0.5ex of headingFSP] (textFSP) {%
\begin{minipage}[h]{68mm}
\begin{algorithmic}[1]
\FORALL{$f$}
\FORALL{$f$}
\IF{there does not exist $f$ such that $g$}
\RETURN{$d$}
\ENDIF
\ENDFOR
\ENDFOR
\RETURN{$d$};
\end{algorithmic}
\end{minipage}
};
\end{tikzpicture}
}
\end{algorithm}
答案1
评论太长了。
我没有看到额外的“1”:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usetikzlibrary{positioning}
\usepackage{algorithm}
\usepackage{algorithmic}
\providecommand\progHeader{}
\begin{document}
\begin{algorithm}[t]
\centering
\small
\resizebox{\linewidth}{!}{
\begin{tikzpicture}[baseline=0]
\node[draw, text height=2ex, minimum width=46mm, inner sep=0pt, minimum height=3ex] (headingCBP) at (0,0) {\progHeader{$d$}};
\node[below=0.5ex of headingCBP] (textCBP) {%
\begin{minipage}[h]{46mm}
\begin{algorithmic}[1]
\STATE{$d$;}
\STATE{$d$;}
\WHILE{$d$}
\STATE{$d$;}
\STATE{$d$;}
\ENDWHILE
\RETURN{$f$}
\end{algorithmic}
\end{minipage}
};
\node[draw, text height=2ex, minimum width=68mm, inner sep=0pt, minimum height=3ex] (headingFSP) at (6.6,0) {\progHeader{$f$}};
\node[below=0.5ex of headingFSP] (textFSP) {%
\begin{minipage}[h]{68mm}
\begin{algorithmic}[1]
\FORALL{$f$}
\FORALL{$f$}
\IF{there does not exist $f$ such that $g$}
\RETURN{$d$}
\ENDIF
\ENDFOR
\ENDFOR
\RETURN{$d$};
\end{algorithmic}
\end{minipage}
};
\end{tikzpicture}
}
\end{algorithm}
\end{document}