-
Notifications
You must be signed in to change notification settings - Fork 28
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
取消listings作为默认代码高亮 #26
Comments
|
默认的代码高亮不支持自动换行,可以pass了。 |
以上问题可以解决 \usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}} |
默认代码高亮加 |
使用 |
pandoc 定义了一些命令去高亮代码,比如 NormalOK,这些命令中的连续字符串即使用了 另外, 以下代码,pandoc定义命令外的无空格长字符串可以换行, \begin{Highlighting}[numbers=left,breaklines=true,breakanywhere=true,breakbefore=C,firstnumber=100,]
\FunctionTok{# Chapter 1}
LongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCode
\NormalTok{LongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCodeLongCode}
\NormalTok{长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码长代码} |
跨页问题
|
https://tex.stackexchange.com/questions/175650/how-to-allow-page-break-inside-a-float-environment
看来长代码只能手动分成多个短代码块了 |
由于
listings
有一些语言不支持,默认改为使用pandoc代码高亮。见 https://github.com/annProg/PanBook/tree/master/test/highlight
The text was updated successfully, but these errors were encountered: