0

I'm using LyX to typeset an algorithm containing math symbols. Following the other question, I could create an algorithm figure by Insert->Float->Algorithm and using LyX-code environment inside the box. But I could not find a way to add line numbers to the algorithm. How can I add line numbers to the LyX-code environment?

4
  • Cross-site duplicate: stackoverflow.com/questions/26966661/…
    – Marijn
    Commented Mar 28, 2021 at 13:10
  • I don't think this is a (cross-site) duplicate since it is specifically about "LyX-code" (this is the name of a specific environment), which that question does not address. @akarin64 have you considered using Insert > Program Listing. If you right-click on what that inserts and then go to settings, I think you can add line numbers to it. Would that work for you?
    – scottkosty
    Commented Mar 28, 2021 at 15:55
  • @scottkosty Sure, using Insert > Program Listing and applying line numbering worked, but it does not meet my requirement since I want to use equations inside the algorithm.
    – perimasu
    Commented Mar 28, 2021 at 16:03
  • @akarin64 I see, that makes sense!
    – scottkosty
    Commented Mar 28, 2021 at 16:19

0

You must log in to answer this question.

Browse other questions tagged .