Skip to content

Commit

Permalink
code highlight style wip #26
Browse files Browse the repository at this point in the history
  • Loading branch information
annProg committed Jun 10, 2019
1 parent d588eaa commit 12e2e49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crs/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ figPrefix: "图"
eqnPrefix: "公式"
tblPrefix: ""
secPrefix: "章节"
linkReferences: true
listings: true
linkReferences: true
10 changes: 9 additions & 1 deletion extensions/listings/listings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ regext listings
getArrayVar _G "ext-listings" true
getArrayVar _G "ext-listings-lstset" "$SCRIPTDIR/${_G[extdir]}/listings/listings-set.tex"

function listings() {
for i in `echo ${!_P[@]}`;do
[ $i == "listings" ] && echo true && return 0
done
echo false
}

function ext_listings() {
# 依赖add header功能
if [ "${_G[ext-listings]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then
if [ `listings` == "true" -a "${_G[ext-listings]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then
writeHeader ${_G[ext-listings-lstset]}
_P[listings]=""
_M[listings]=true
fi
}

Expand Down
1 change: 0 additions & 1 deletion panbook
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ _G=(

_P=(
[toc]=""
[listings]=""
[csl]=$SCRIPTDIR/csl/chinese-gb7714-2005-numeric.csl # 默认cls文件路径(需要在获取参数后重置)
[bibliography]=$CWD/src/bibliography.bib # 默认bibliography路径(需要在获取参数后删除)
[metadata-file]=$CWD/src/metadata.yaml # 默认metadata.yaml(需要在获取参数后重置)
Expand Down

0 comments on commit 12e2e49

Please sign in to comment.