TeX/LaTeX算法包问题
我尝试使用 TeX 和“algorithmic”包以伪代码布局算法。它变得一团糟:单词之间没有空格,也没有换行符。谁能帮我一下。
如何在算法注释中添加间距和换行符?
谢谢!
这是我的 TeX 代码:
\documentclass{llncs}
\usepackage{algorithmic}
\begin{document}
\begin{algorithmic}
\REQUIRE{ $ Some long text here. Unfortunately this text is a mess. Spaces and line breaks are missing and the text gets weird block layout when setting line breaks manually. $}
\FORALL{$i = 1 \ldots \mid L_{items}\mid $ }
\STATE { $ i miss spaces here, too $}
\ENDFOR
\end{algorithmic}
\end{document}
I try to layout an algorithm in pseudocode with TeX and the package "algorithmic". It gets a mess: no spaces between words, and no linebreaks. Can anyone help me out.
How do I get spacing and linebreaks into algorithmic comments?
Thanks!
Here's my TeX code:
\documentclass{llncs}
\usepackage{algorithmic}
\begin{document}
\begin{algorithmic}
\REQUIRE{ $ Some long text here. Unfortunately this text is a mess. Spaces and line breaks are missing and the text gets weird block layout when setting line breaks manually. $}
\FORALL{$i = 1 \ldots \mid L_{items}\mid $ }
\STATE { $ i miss spaces here, too $}
\ENDFOR
\end{algorithmic}
\end{document}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那么第一个问题是您的文本以美元符号
$ ... $
表示,这意味着要在数学模式下输入它。所以间距会很远。试试这个Well the first problem is that you have your text in dollar signs
$ ... $
that means to typest it in math mode. So the spaceing would be way off. Try this