使用TexStudio编写伪代码

点击向导→快速开始新建页面,开始编写代码

下面是我的一个伪代码编写框架

\documentclass{article}
\usepackage[ruled,linesnumbered,lined,commentsnumbered]{algorithm2e} % 更改了lined为vlined
\usepackage[a4paper, total={6in, 8in}]{geometry}
\begin{document}  
	
	\IncMargin{1em}
	\begin{algorithm}
		\SetAlgoLined
		\SetKwData{Left}{left}
		\SetKwData{This}{this}
		\SetKwData{Up}{up}
		\SetKwFunction{Union}{Union}
		\SetKwFunction{FindCompress}{FindCompress}
		\SetKwInOut{Input}{input}
		\SetKwInOut{Output}{output}
		\Input{BMC\_tree\ list\ of\ all\ participants\ $BMC\_list$;number\ of\ participants\ $number$;$P$;$R$;}
		\Output{$R.NegNodeset$}
		\caption{伪代码算法标题}\label{algo_disjdecomp}
		在此输入伪代码逻辑
	\end{algorithm}
	\DecMargin{1em}

\end{document}

编写伪代码时我使用的是 algorithm2e包,可以参照algorithm2e包的官方文档进行编写,可以到下面的网站进行下载。

CTAN: Package algorithm2e

  • 6
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值