LyXAlgorithm Line Numbering

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
spuzzdawg
Posts: 2
Joined: Fri Mar 16, 2012 2:33 am

Algorithm Line Numbering

Post by spuzzdawg »

Hi,

I have a few questions regarding algorithms,

1. I need to have the lines of my algorithm numbered but each line number is not necessarily the previous number + 1. For example:

Code: Select all

1. x = 1
2. if some inequality
2.1     do something
3. end if
4. while something
4.1      loop
5 etc
I need the line numbers to become sub line numbers for want of a better word that are dependent on line indentation. Is it possible to do something like this or would I be better off just doing the line numbering manually?

2. Is it possible to change the name of the algorithm float so that my caption says something besides Algorithm?

3. Is it possible to remove the section number from the algorith numbering. My algorithms are for a university assignment that does not have any sections. The section is number is 0 for the whole doucment. The figure float seems to ignore the section number for captioning if the section number is 0 but the algorithm float doesn't.

Thanks in advance,
spuzzdawg

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply