-
Notifications
You must be signed in to change notification settings - Fork 6
Home
lvjr edited this page Apr 29, 2022
·
4 revisions
This package uses the l3regex
package from the expl3
(LaTeX3 Programming Layer) to parse and highlight source code and demos. It is more powerful than listings
package, and more easy to use than minted
package. But it is slower than both of them. Therefore in LuaTeX the package provides another way to highlight code: using LPeg
(Parsing Expression Grammars for Lua). LPeg
is much more powerful and faster than l3regex
.
这个宏包使用 expl3
(LaTeX3 Programming Layer)里的 l3regex
解析和高亮代码。这比 listings
宏包更加强大,而比 minted
宏包更加易用。但是 l3regex
导致它比后两者都慢,因此在 LuaTeX 中这个宏包利用 LPeg
(Parsing Expression Grammars for Lua)解析和高亮代码。相比 l3regex
,LPeg
速度更快,功能更强大。