加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

[转载]latex algorithm 算法 宽度 width 调整

(2014-12-10 11:04:07)
标签:

转载

分类: Latex
刚好要用

在使用latex编辑algorithm时,如何控制算法的宽度呢?

documentclass{article}

usepackage{algorithm}

usepackage{algorithmic}
floatstyle{plain}
newfloat{myalgo}{tbhp}{mya}

newenvironment{Algorithm}[2][tbh]%
{begin{myalgo}[#1]
centering
begin{minipage}{#2}
begin{algorithm}[H]}%
{end{algorithm}
end{minipage}
end{myalgo}}


begin{document}
begin{Algorithm}[t]{10cm}
caption{Does work, though no nice solution.}

begin{algorithmic}

STATE your algo

end{algorithmic}
end{Algorithm}
end{document}

0

  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有