
次のコードを使用すると、関数名 foo は として印刷されます\textsc{foo}
。
\usepackage{algorithmic}
\begin{document}
\begin{frame}
\begin{algorithmic}[1]
\Function{foo}{$a$}
\EndFunction
\end{algorithmic}
\end{frame}
\texttt{foo}
これをすべての\Function
コマンドに変更するにはどうすればよいですか\Call
?
答え1
必要なパッケージは でありalgpseudocode
、 ではありませんalgorithmic
。
\documentclass{article}
\usepackage{algpseudocode}
\algrenewcommand\textproc{\texttt}
\begin{document}
\begin{algorithmic}[1]
\Function{foo}{$a$}
\EndFunction
\end{algorithmic}
\end{document}