请问伪代码输入有第二行的怎么和第一行对齐呢? #101
Answered
by
note286
decadesyear
asked this question in
Q&A
-
请问伪代码输入这种有第二行的怎么和第一行对齐呢? \begin{algorithm}[!h]
\caption{样例}
\label{alg:AOA}
\renewcommand{\algorithmicrequire}{\textbf{输入:}}
\renewcommand{\algorithmicensure}{\textbf{输出:}}
\begin{algorithmic}[1]
\REQUIRE 请问伪代码输入这种有第二行的怎么和第一行对齐呢?请问伪代码输入这种有第二行的怎么和第一行对齐呢?(第二行“怎么“突出去了,且和第一行对不齐)
\ENSURE 谢谢!
\end{algorithmic}
\end{algorithm} |
Beta Was this translation helpful? Give feedback.
Answered by
note286
Mar 25, 2023
Replies: 2 comments 2 replies
-
你使用的是什么算法包? |
Beta Was this translation helpful? Give feedback.
1 reply
-
很明显你没有认真看手册。 \documentclass{xdupgthesis}
\usepackage{algorithm}
\usepackage{algpseudocodex}
\renewcommand{\algorithmicrequire}{\textbf{输入:}}
\renewcommand{\algorithmicensure}{\textbf{输出:}}
\begin{document}
\chapter{title}
\begin{algorithm}
\caption{样例}
\begin{algorithmic}[1]
\Require 请问伪代码输入这种有第二行的怎么和第一行对齐呢?请问伪代码输入这种有第二行的怎么和第一行对齐呢?(第二行“怎么“突出去了,且和第一行对不齐)
\Ensure 谢谢!
\end{algorithmic}
\end{algorithm}
\end{document} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
note286
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
很明显你没有认真看手册。