Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在调用listing环境插入代码块时遇到报错 #29

Open
Kai2510 opened this issue May 14, 2024 · 2 comments
Open

在调用listing环境插入代码块时遇到报错 #29

Kai2510 opened this issue May 14, 2024 · 2 comments

Comments

@Kai2510
Copy link

Kai2510 commented May 14, 2024

RT,想在附录里插入代码,并以Python样式语法高亮。在.dtx文件里面发现了LaTeX的引用格式设置,但是在论文正文的tex文件里调用\lstinputlisting 或者\begin{listings}均提示Undefined control sequence。尝试在main.tex里面加\usepackage{listings},报错变成了Package Listings Error: Couldn't load requested style.
想请教一下,如何修改,才能插入代码。

@LuminolT
Copy link
Collaborator

可以尝试在 \usepackage{listings} 后重新定义列表样式

@Kai2510
Copy link
Author

Kai2510 commented May 15, 2024

可以尝试在 \usepackage{listings} 后重新定义列表样式

感谢。问题已解决。也许我之后可以尝试写到dtx里面去?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants