提问于:
浏览数:
2721
```tex
\documentclass[11pt]{article}
\usepackage{CJK}
\usepackage[top=1cm, bottom=1cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{algpseudocode}
\usepackage{geometry}
\geometry{paperheight=297mm, paperwidth=150mm}
\floatname{algorithm}{Algorithm}
\makeatletter
\newcommand{\multiline}[1]{%
\begin{tabularx}{\dimexpr\linewidth-\ALG@thistlm}[t]{@{}X@{}}
#1
\end{tabularx}
}
\makeatother
\begin{document}
\begin{CJK*}{UTF8}{gkai}
\begin{algorithm}
\caption{:Intelligent CATG Algorithm}
\begin{algorithmic}[1]%每行显示行号
%for loop
% \begin{minipage}[t]{0.9\linewidth}
\For {every time step {$T_C$}}
\If {%
the traffic is to be groomed, calculate the allocated bandwidth for each ONU in the cluster}
\EndIf
\EndFor
% \end{minipage}
\end{algorithmic}
\end{algorithm}
\end{CJK*}
\end{document}
```
\multiline{}
![](https://pics.latexstudio.net/data/images/202002/1c5e8b75721944f.png)
1 回答
0
```tex
\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{algpseudocode}
\floatname{algorithm}{Algorithm}
\begin{document}
\begin{algorithm}
\caption{:Intelligent CATG Algorithm}
\begin{algorithmic}[1]
\For {every time step {$T_C$}}
\If{the traffic is to be groomed, calculate the allocated bandwidth for each ONU \hspace*{0.8\dimexpr\algorithmicindent} in the cluster}
\EndIf
\EndFor
\end{algorithmic}
\end{algorithm}
\end{document}
```
要求不高就手动调
你的回答
请登录后回答
你的回答将会帮助更多人,请务必认真回答问题。