Skip to content

Commit

Permalink
默认高亮换行问题 wip #26 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
annProg committed Jun 11, 2019
1 parent 6c87457 commit a5a2b3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/listings/highlight.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% 解决自动换行问题 https://github.com/annProg/PanBook/issues/26#issuecomment-500458739
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,fontsize=\small,commandchars=\\\{\}}
3 changes: 3 additions & 0 deletions extensions/listings/listings.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
regext listings
getArrayVar _G "ext-listings" true
getArrayVar _G "ext-listings-lstset" "$SCRIPTDIR/${_G[extdir]}/listings/listings-set.tex"
getArrayVar _G "ext-listings-highlight" "$SCRIPTDIR/${_G[extdir]}/listings/highlight.tex"

function listings() {
for i in `echo ${!_P[@]}`;do
Expand All @@ -15,6 +16,8 @@ function ext_listings() {
writeHeader ${_G[ext-listings-lstset]}
_P[listings]=""
_M[listings]=true
else
writeHeader ${_G[ext-listings-highlight]}
fi
}

Expand Down

0 comments on commit a5a2b3f

Please sign in to comment.