citeproc-js-based-replacer is a tool for generating CSL-M compatible citations using the citeproc-js library. This tool replaces citation keys (@key) in Markdown files and adds a bibliography if a header with the text "Bibliography" or "参考文献" is present.
- Replaces citation keys (
@key) in Markdown files - Adds a bibliography if a "Bibliography" or "参考文献" header is present
- Specifies bibliography file, CSL file, and uncited items to include in the bibliography in the YAML header of the Markdown file
- Run
npm installto install the required libraries - Obtain the desired CSL-M file from sources like jm-styles
- Obtain the necessary locale file(s) (e.g.,
locales-en-US.xml) from citation-style-language / locales - Generate a bibliography with Jurism or Zotero
citeproc-js-based-replacer.jsjm-japan-sociological-society.csllocales-en-US.xmllocales-ja-JP.xmlbibliography.jsoninput.mdnode_modules/
pandoc input.md -s --filter=./citeproc-js-based-replacer.js -o output.mdThis project is in its early stages, and we welcome feedback and bug reports. Pull requests are highly appreciated!
citeproc-js-based-replacerは、citeproc-jsライブラリを使用してCSL-M対応の文献引用を生成するためのツールです。このツールは、Markdownファイル内の引用キー(@key)を置き換え、"参考文献"または"Bibliography"というヘッダーがある場合に文献目録を追加します。
- Markdownファイル内の引用キー(
@key)を置き換えます - "参考文献"または"Bibliography"というヘッダーがある場合に文献目録を追加します
- MarkdownファイルのYAMLヘッダー部分で、bibliographyファイル、CSLファイル、引用しないが参考文献に含めたい文献の指定を行います
npm installを実行して必要なライブラリをインストールする- jm-styles などから、使用したいCSL-Mファイルを入手する
- citation-style-language / locales から必要なlocaleファイル(例:
locales-en-US.xml)を入手する - JurismやZoteroによりJSON形式のbibliographyを生成する
citeproc-js-based-replacer.jsjm-japan-sociological-society.csllocales-en-US.xmllocales-ja-JP.xmlbibliography.jsoninput.mdnode_modules/
pandoc input.md -s --filter=./citeproc-js-based-replacer.js -o output.mdこのプロジェクトはまだ開発が始まったばかりであり、要望や不具合に関するレポートを歓迎します。とくに、プルリクエストは大歓迎です!