diff options
author | Denis Maier <maier.de@gmail.com> | 2019-11-17 02:06:26 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-16 17:06:26 -0800 |
commit | c4e198c84d3c3ff499893962f37a5b5ea8462626 (patch) | |
tree | 44da18dadcd09396912295d07f3dc971287ab22e | |
parent | 5bd6d966f4e117ac37eb67dfc78c2345be9991c5 (diff) | |
download | pandoc-c4e198c84d3c3ff499893962f37a5b5ea8462626.tar.gz |
Update default.context (#5875)
Define an start-stop-pair `cslreferences` to allow for hanging indents in the bibliography. Analogous to the cslreferences-environment in the default latex template. See here: https://github.com/jgm/pandoc-citeproc/issues/410
For this to work the context writer must be adapted.
-rw-r--r-- | data/templates/default.context | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/default.context b/data/templates/default.context index dcd2dde5d..89944c372 100644 --- a/data/templates/default.context +++ b/data/templates/default.context @@ -105,6 +105,22 @@ $endif$ \setupxtable[body][] \setupxtable[foot][bottomframe=on] +$if(csl-refs)$ +\newdimen\cslhangindent +\cslhangindent=1.5em +\definestartstop [cslreferences] [ + $if(csl-hanging-indent)$ + before={% + \setupnarrower[left=\cslhangindent] + \startnarrower[left]% + \setupindenting[-\leftskip,yes,first]% + %\setuphead[chapter,section][indentnext=yes]% + \indentation% + }, + after=\stopnarrower, + $endif$ +] +$endif$ $if(includesource)$ $for(sourcefile)$ \attachment[file=$curdir$/$sourcefile$,method=hidden] |