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?
-
Cross-site duplicate: stackoverflow.com/questions/26966661/…– MarijnCommented 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?– scottkostyCommented 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.– perimasuCommented Mar 28, 2021 at 16:03
-
@akarin64 I see, that makes sense!– scottkostyCommented Mar 28, 2021 at 16:19
Add a comment
|