而不是“算法”自动添加当与一起使用时\usepackage{algorithm}
,我希望它显示为“伪代码”,我该怎么做?:
图1的LaTeX代码如下:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{Euclid’s algorithm}\label{alg:euclid}
\begin{algorithmic}[1]
\Statex Input: Something
\end{algorithmic}
\end{algorithm}
\end{document}
答案1
这有效:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\floatname{algorithm}{Pseudocode}
\begin{document}
\setcounter{algorithm}{2}
\begin{algorithm}
\caption{Euclid’s algorithm}\label{alg:euclid}
\begin{algorithmic}[1]
\Statex Input: Something
\end{algorithmic}
\end{algorithm}
\end{document}