diff options
author | BrLi | 2020-12-26 07:05:26 +0800 |
---|---|---|
committer | BrLi | 2020-12-26 07:05:26 +0800 |
commit | 02d3d97774b28441e368d54d50992206772e2f7d (patch) | |
tree | 06d7ce235e241b2b0d2062394b7fd01ab1468624 | |
parent | ff5e4d7842ccbc448d556ca04a895974e53de124 (diff) | |
download | aur-02d3d97774b28441e368d54d50992206772e2f7d.tar.gz |
offline backup the pandoc patch
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | pandoc-fix.patch | 338 |
3 files changed, 344 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = zettlr pkgdesc = A markdown editor for writing academic texts and taking notes pkgver = 1.8.4 - pkgrel = 2 + pkgrel = 3 url = https://www.zettlr.com install = install arch = x86_64 @@ -15,12 +15,12 @@ pkgbase = zettlr optdepends = ttf-lato: Display output in a more comfortable way options = !strip source = zettlr-1.8.4.tar.gz::https://github.com/Zettlr/Zettlr/archive/v1.8.4.tar.gz - source = pandoc-fix.patch::https://patch-diff.githubusercontent.com/raw/Zettlr/Zettlr/pull/1565.patch + source = pandoc-fix.patch source = https://github.com/citation-style-language/locales/archive/ecb8e70233e9a68e8b1dda4586061be8f8611a38.zip source = https://github.com/citation-style-language/styles/raw/master/chicago-author-date.csl source = https://github.com/Brli/zetter-zh-TW/raw/master/zh-TW.json sha256sums = da3ba36a98587e258bdb09700343b7a067ee4659aaef6b5021b16dd5b9d00400 - sha256sums = ee0596aba955164e9129bf29d0cf387c133f1ba0bcab4777e2aba4cb9c962dd7 + sha256sums = 488f3c308e0cbdcc626d95798e07fa3489ea28a631e9fbdacb50e6fcf35c5d4c sha256sums = 24503a6cd5b3651a7003353811ae82d3ed707ec8ff932d341668c2ad377434b6 sha256sums = 2b7cd6c1c9be4add8c660fb9c6ca54f1b6c3c4f49d6ed9fa39c9f9b10fcca6f4 sha256sums = 9aef5eec4876aa180fa55cf3bc213a5cf68ab96567bc4021ba58a32fa0fa9f94 @@ -2,7 +2,7 @@ pkgname=zettlr pkgver=1.8.4 -pkgrel=2 +pkgrel=3 pkgdesc="A markdown editor for writing academic texts and taking notes" arch=('x86_64') url='https://www.zettlr.com' @@ -16,14 +16,14 @@ _csl_locale_commit=ecb8e70233e9a68e8b1dda4586061be8f8611a38 # Dec 11, 2020 options=(!strip) install=install source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Zettlr/Zettlr/archive/v${pkgver}.tar.gz" - pandoc-fix.patch::"https://patch-diff.githubusercontent.com/raw/Zettlr/Zettlr/pull/1565.patch" + pandoc-fix.patch # citation style "https://github.com/citation-style-language/locales/archive/${_csl_locale_commit}.zip" https://github.com/citation-style-language/styles/raw/master/chicago-author-date.csl # Chinese(Taiwan) translation https://github.com/Brli/zetter-zh-TW/raw/master/zh-TW.json) sha256sums=('da3ba36a98587e258bdb09700343b7a067ee4659aaef6b5021b16dd5b9d00400' - 'ee0596aba955164e9129bf29d0cf387c133f1ba0bcab4777e2aba4cb9c962dd7' + '488f3c308e0cbdcc626d95798e07fa3489ea28a631e9fbdacb50e6fcf35c5d4c' '24503a6cd5b3651a7003353811ae82d3ed707ec8ff932d341668c2ad377434b6' '2b7cd6c1c9be4add8c660fb9c6ca54f1b6c3c4f49d6ed9fa39c9f9b10fcca6f4' '9aef5eec4876aa180fa55cf3bc213a5cf68ab96567bc4021ba58a32fa0fa9f94') diff --git a/pandoc-fix.patch b/pandoc-fix.patch new file mode 100644 index 000000000000..4f44ef94e673 --- /dev/null +++ b/pandoc-fix.patch @@ -0,0 +1,338 @@ +From d7a70345f468911ab024b06f030def5427588a4f Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 12:29:56 +0800 +Subject: [PATCH 1/7] paramatrized bibliography, fold cslstyle if-else + statement into property + +--- + CHANGELOG.md | 6 ++++++ + source/app/service-providers/config-provider.js | 2 +- + source/main/modules/export/run-pandoc.js | 11 ++++------- + source/renderer/dialog/preferences.js | 2 +- + 4 files changed, 12 insertions(+), 9 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 8d637001..6ba35b40 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,3 +1,9 @@ ++# 1.8.5 ++ ++## Pandoc Command update ++ ++**In order to use the new command, make sure to "reset" it once, or (if it contains customisations) replace `--bibliography "$bibliography$" $cslstyle$` with `$bibliography$ $cslstyle$`.** ++ + # 1.8.4 + + ## Deprecating 32 bit builds +diff --git a/source/app/service-providers/config-provider.js b/source/app/service-providers/config-provider.js +index ad5799fd..42ea83d3 100644 +--- a/source/app/service-providers/config-provider.js ++++ b/source/app/service-providers/config-provider.js +@@ -118,7 +118,7 @@ module.exports = class ConfigProvider extends EventEmitter { + 'pandoc': '', + 'xelatex': '', + // The pandoc command to be run on export +- 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc --bibliography "$bibliography$" $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', ++ 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', + 'export': { + 'dir': 'temp', // Can either be "temp" or "cwd" (current working directory) + 'stripIDs': false, // Strip ZKN IDs such as @ID:<id> +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index 3874aa07..28dbadee 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -47,11 +47,8 @@ module.exports = async function (options) { + throw new Error(trans('system.error.no_xelatex_message'), trans('system.error.no_xelatex_title')) + } + +- // Add a custom CSL style if applicable +- let cslstyle = '' +- if (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) { +- cslstyle = `--csl "${options.cslStyle}"` +- } ++ // Add bibliography if exists ++ let bibliography = global.config.get('export.cslLibrary') + + // Pandoc flags to be passed to the compiler + let pandocFlags = { +@@ -59,8 +56,8 @@ module.exports = async function (options) { + 'infile': options.sourceFile, + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', +- 'bibliography': global.config.get('export.cslLibrary'), +- 'cslstyle': cslstyle, ++ 'bibliography': (global.config.get('export.cslLibrary')) ? `--bibliography "${bibliography}"` : '', ++ 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl + "${options.cslStyle}"` : '', + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), + 'format': options.format, +diff --git a/source/renderer/dialog/preferences.js b/source/renderer/dialog/preferences.js +index 15630b68..cce2a90c 100644 +--- a/source/renderer/dialog/preferences.js ++++ b/source/renderer/dialog/preferences.js +@@ -190,7 +190,7 @@ class PreferencesDialog extends ZettlrDialog { + + // Reset the pandoc command + $('#reset-pandoc-command').on('click', (e) => { +- document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc --bibliography "$bibliography$" $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' ++ document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' + }) + + const reportTestResult = (resultTranslationKey) => { + +From 7ed897e2d3f95f43a22defab71b9b380ea759ce0 Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 13:48:25 +0800 +Subject: [PATCH 2/7] remove typo + in command + +--- + source/main/modules/export/run-pandoc.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index 28dbadee..a2b2f10e 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -57,7 +57,7 @@ module.exports = async function (options) { + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', + 'bibliography': (global.config.get('export.cslLibrary')) ? `--bibliography "${bibliography}"` : '', +- 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl + "${options.cslStyle}"` : '', ++ 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--citeproc --csl "${options.cslStyle}"` : '', + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), + 'format': options.format, + +From 238056421cf0d28926fa4901e1857e860fa35dd2 Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 14:03:21 +0800 +Subject: [PATCH 3/7] move --citeproc into cslstyle variable + +--- + source/app/service-providers/config-provider.js | 2 +- + source/renderer/dialog/preferences.js | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/source/app/service-providers/config-provider.js b/source/app/service-providers/config-provider.js +index 42ea83d3..049c9188 100644 +--- a/source/app/service-providers/config-provider.js ++++ b/source/app/service-providers/config-provider.js +@@ -118,7 +118,7 @@ module.exports = class ConfigProvider extends EventEmitter { + 'pandoc': '', + 'xelatex': '', + // The pandoc command to be run on export +- 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', ++ 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', + 'export': { + 'dir': 'temp', // Can either be "temp" or "cwd" (current working directory) + 'stripIDs': false, // Strip ZKN IDs such as @ID:<id> +diff --git a/source/renderer/dialog/preferences.js b/source/renderer/dialog/preferences.js +index cce2a90c..a2ba8ba3 100644 +--- a/source/renderer/dialog/preferences.js ++++ b/source/renderer/dialog/preferences.js +@@ -190,7 +190,7 @@ class PreferencesDialog extends ZettlrDialog { + + // Reset the pandoc command + $('#reset-pandoc-command').on('click', (e) => { +- document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ --citeproc $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' ++ document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' + }) + + const reportTestResult = (resultTranslationKey) => { + +From 40ba77f1539de8421438c1d61d4c1069866b405d Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 14:09:29 +0800 +Subject: [PATCH 4/7] isolate --citeproc parameter + +--- + source/app/service-providers/config-provider.js | 2 +- + source/main/modules/export/run-pandoc.js | 3 ++- + source/renderer/dialog/preferences.js | 2 +- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/source/app/service-providers/config-provider.js b/source/app/service-providers/config-provider.js +index 049c9188..bbb4d40d 100644 +--- a/source/app/service-providers/config-provider.js ++++ b/source/app/service-providers/config-provider.js +@@ -118,7 +118,7 @@ module.exports = class ConfigProvider extends EventEmitter { + 'pandoc': '', + 'xelatex': '', + // The pandoc command to be run on export +- 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', ++ 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $citeproc$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', + 'export': { + 'dir': 'temp', // Can either be "temp" or "cwd" (current working directory) + 'stripIDs': false, // Strip ZKN IDs such as @ID:<id> +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index a2b2f10e..2ae386ef 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -56,8 +56,9 @@ module.exports = async function (options) { + 'infile': options.sourceFile, + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', ++ 'citeproc': (bibliography && isFile(options.cslStyle)) ? '--citeproc' : '', + 'bibliography': (global.config.get('export.cslLibrary')) ? `--bibliography "${bibliography}"` : '', +- 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--citeproc --csl "${options.cslStyle}"` : '', ++ 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl "${options.cslStyle}"` : '', + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), + 'format': options.format, +diff --git a/source/renderer/dialog/preferences.js b/source/renderer/dialog/preferences.js +index a2ba8ba3..cc5b6448 100644 +--- a/source/renderer/dialog/preferences.js ++++ b/source/renderer/dialog/preferences.js +@@ -190,7 +190,7 @@ class PreferencesDialog extends ZettlrDialog { + + // Reset the pandoc command + $('#reset-pandoc-command').on('click', (e) => { +- document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' ++ document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $citeproc$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' + }) + + const reportTestResult = (resultTranslationKey) => { + +From f448a058b74cfff679f00a4dfcd70ae426959845 Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 16:46:24 +0800 +Subject: [PATCH 5/7] move --citeproc to $bibliography$ + +--- + source/app/service-providers/config-provider.js | 2 +- + source/main/modules/export/run-pandoc.js | 3 +-- + source/renderer/dialog/preferences.js | 2 +- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/source/app/service-providers/config-provider.js b/source/app/service-providers/config-provider.js +index bbb4d40d..672c9cfb 100644 +--- a/source/app/service-providers/config-provider.js ++++ b/source/app/service-providers/config-provider.js +@@ -118,7 +118,7 @@ module.exports = class ConfigProvider extends EventEmitter { + 'pandoc': '', + 'xelatex': '', + // The pandoc command to be run on export +- 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $citeproc$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', ++ 'pandocCommand': 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"', + 'export': { + 'dir': 'temp', // Can either be "temp" or "cwd" (current working directory) + 'stripIDs': false, // Strip ZKN IDs such as @ID:<id> +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index 2ae386ef..af3b9817 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -56,8 +56,7 @@ module.exports = async function (options) { + 'infile': options.sourceFile, + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', +- 'citeproc': (bibliography && isFile(options.cslStyle)) ? '--citeproc' : '', +- 'bibliography': (global.config.get('export.cslLibrary')) ? `--bibliography "${bibliography}"` : '', ++ 'bibliography': (global.config.get('export.cslLibrary')) ? `--citeproc --bibliography "${bibliography}"` : '', + 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl "${options.cslStyle}"` : '', + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), +diff --git a/source/renderer/dialog/preferences.js b/source/renderer/dialog/preferences.js +index cc5b6448..65a9957f 100644 +--- a/source/renderer/dialog/preferences.js ++++ b/source/renderer/dialog/preferences.js +@@ -190,7 +190,7 @@ class PreferencesDialog extends ZettlrDialog { + + // Reset the pandoc command + $('#reset-pandoc-command').on('click', (e) => { +- document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $citeproc$ $cslstyle$ $bibliography$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' ++ document.getElementById('pandocCommand').value = 'pandoc "$infile$" -f markdown $outflag$ $tpl$ $toc$ $tocdepth$ $bibliography$ $cslstyle$ $standalone$ --pdf-engine=xelatex --mathjax -o "$outfile$"' + }) + + const reportTestResult = (resultTranslationKey) => { + +From fc9e4ee487f67d131596c92b506ee062788631f4 Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Fri, 25 Dec 2020 17:47:42 +0800 +Subject: [PATCH 6/7] remove explicit declare of bibliography, use global + variable instead + +--- + CHANGELOG.md | 2 +- + source/main/modules/export/run-pandoc.js | 5 +---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 6ba35b40..86bf1fc2 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -2,7 +2,7 @@ + + ## Pandoc Command update + +-**In order to use the new command, make sure to "reset" it once, or (if it contains customisations) replace `--bibliography "$bibliography$" $cslstyle$` with `$bibliography$ $cslstyle$`.** ++**In order to use the new command, make sure to "reset" it once, or (if it contains customisations) replace `--citeproc --bibliography "$bibliography$" $cslstyle$` with `$bibliography$ $cslstyle$`.** + + # 1.8.4 + +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index af3b9817..f5f9e692 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -47,16 +47,13 @@ module.exports = async function (options) { + throw new Error(trans('system.error.no_xelatex_message'), trans('system.error.no_xelatex_title')) + } + +- // Add bibliography if exists +- let bibliography = global.config.get('export.cslLibrary') +- + // Pandoc flags to be passed to the compiler + let pandocFlags = { + 'tpl': (options.template) ? `--template="${options.template}"` : '', + 'infile': options.sourceFile, + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', +- 'bibliography': (global.config.get('export.cslLibrary')) ? `--citeproc --bibliography "${bibliography}"` : '', ++ 'bibliography': (global.config.get('export.cslLibrary')) ? `--citeproc --bibliography "${global.config.get('export.cslLibrary')}"` : '', + 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl "${options.cslStyle}"` : '', + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), + +From 994ec0b4ce01381b50cac05e8108374ff21aeff3 Mon Sep 17 00:00:00 2001 +From: BrLi <brli@chakralinux.org> +Date: Sat, 26 Dec 2020 06:56:27 +0800 +Subject: [PATCH 7/7] separate cslstyle and bibliography as per maintainer + instruction + +--- + source/main/modules/export/run-pandoc.js | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/source/main/modules/export/run-pandoc.js b/source/main/modules/export/run-pandoc.js +index f5f9e692..2402da71 100644 +--- a/source/main/modules/export/run-pandoc.js ++++ b/source/main/modules/export/run-pandoc.js +@@ -47,14 +47,26 @@ module.exports = async function (options) { + throw new Error(trans('system.error.no_xelatex_message'), trans('system.error.no_xelatex_title')) + } + ++ // Include CSL library if exist ++ let bibliography = '' ++ if (global.config.get('export.cslLibrary')) { ++ bibliography = `--citeproc --bibliography "${global.config.get('export.cslLibrary')}"` ++ } ++ ++ // Add a custom CSL style if applicable ++ let cslstyle = '' ++ if (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) { ++ cslstyle = `--csl "${options.cslStyle}"` ++ } ++ + // Pandoc flags to be passed to the compiler + let pandocFlags = { + 'tpl': (options.template) ? `--template="${options.template}"` : '', + 'infile': options.sourceFile, + 'toc': (options.pdf.toc && options.format === 'pdf') ? '--toc' : '', + 'tocdepth': (options.pdf.tocDepth) ? '--toc-depth=' + options.pdf.tocDepth : '', +- 'bibliography': (global.config.get('export.cslLibrary')) ? `--citeproc --bibliography "${global.config.get('export.cslLibrary')}"` : '', +- 'cslstyle': (options.hasOwnProperty('cslStyle') && isFile(options.cslStyle)) ? `--csl "${options.cslStyle}"` : '', ++ 'bibliography': bibliography, ++ 'cslstyle': cslstyle, + 'outfile': options.targetFile, + 'outflag': '-t ' + ((options.format === 'pdf') ? 'latex' : options.format), + 'format': options.format, |