# Tag Info

4

According to the documentation on CTAN, the last argument of the \SetKwProg command sets the end text. So get that 'end', the builder for the \myproc command should be \SetKwProg{myproc}{Procedure}{}{end}

2

Probably the user who asked this question is not interested in my answer anymore. But I was in the same quest didn't find any good-looking algorithm package (for my taste). Since I'm a fan of the Listings package I followed Ruben's suggestion and created my own environment. Features: higlights my own specific keywords (but a predefined language can be ...

3

It's not really well documented in algorithm2e manual, but to achieve what you want, you have to issue the command \SetProcNameSty{textsc} The argument of \caption when using the procedure environment can only contain something like name(arg). In the following MWE I've also added \SetProcArgSty{textsc} just in case you are using procedure captions ...

0

Here's a solution I'm using with algorithm2e. The idea is to use right-aligned comments (\tcp*[r]), and put them in a box of fixed length \commentWidth. The important stuff is wrapped in an "aligned comment" marco \atcp for ease of use. \documentclass[11pt,a4paper,twoside,openright]{book} \usepackage[algochapter,linesnumbered,ruled,lined,boxed]{algorithm2e} ...

2

The simplest solution is to use the figure option for algorithm2e; in this way, algorithms are put in figure environments and so are numbered as figures and included in the \listoffigures: \documentclass{IEEEtran} \usepackage[figure]{algorithm2e} \begin{document} \begin{algorithm} \KwData{this text} \KwResult{how to write algorithm with \LaTeX2e} ...

Top 50 recent answers are included