Insert programming code in a Lyx document

后端 未结 3 1532
暖寄归人
暖寄归人 2021-01-30 00:04

What is the best way of inserting python/C++ code in a Lyx document? The code is small examples less than 20 lines.

My Lyx document is using the Book document class.

3条回答
  •  暖寄归人
    2021-01-30 00:43

    There should be an Insert -> Program Listing option. That uses listings Latex package, so you should have that installed. The support seems to have been added in Lyx 1.5, and from their screenshot, it seems it gives you a lot of customization options.

提交回复
热议问题