LaTeX forum ⇒ Generalabout Algorithm

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 2
Joined: Sat Jul 05, 2014 12:58 pm

about Algorithm

Postby starnjust » Tue Jul 17, 2018 8:39 am

I have a problem in formatting an algorithm.

How can I generate an algorithm which have the following two features:
1) A title is in the top of the algorithm, not in the bottom;
2) There is no horizontal lines in the algorithm.

I have tried algorithmicx, but it either had three horizontal lines or its tile was at the bottom. When I used pseudocode, it title is in its top and had no such lines, but its title must be a function name with some input parameters, not a title in the form of a sentence.

Could anybody give me some suggestions?


User avatar
Stefan Kottwitz
Site Admin
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Aug 31, 2018 11:19 am

It's actually not algorithmicx that prints the lines. It's the algorithms environment. You can use different styles,

  • plain
  • ruled
  • boxed

by adding them as package option, such as

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \usepackage[boxed]{algorithm}

Furthermore, you could define your own style. Let me know if you still need it.

Stefan admin

Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests