在Lyx文档中插入编程代码 [英] Insert programming code in a Lyx document

查看:231
本文介绍了在Lyx文档中插入编程代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Lyx文档中插入python/C ++代码的最佳方法是什么?该代码是少于20行的小示例.

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

我的Lyx文档正在使用Book文档类.

My Lyx document is using the Book document class.

Orjanp

推荐答案

应该有一个 Insert-> Program Listing 选项.它使用列表 Latex软件包,因此您应该安装该软件包.该支持似乎已添加到 Lyx 1.5 中,并且看起来像这样为您提供了许多自定义选项.

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.

这篇关于在Lyx文档中插入编程代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆