-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于新版本pandoc中citeproc模块的处理 #43
Comments
@huangy10 thanks for your constant feedbacks! This might not be a fix as easy as just changing the read-me. Now this plugin forces pandoc:
- -filter
- <filter name>
- -citeproc
- -M
- <meta key>=<meta value>
- -f
- markdown-smart+<other extension specs>
- -t
- html-smart
- --mathjax This would give users complete freedom in specifying pandoc arguments. Since, correct me if I'm wrong, this problem is not critical to you, |
Thank you for your reply. I just wanna say that |
If your concern is merely that the example given in read-me could cause confusion, then I'm more inclined to simply remove the example, since I could not find a better example. Do you know if there is any other widely used pandoc filter other than citeproc that I can use as a replace? |
FYI, the following (kinda) works for recent versions of pandoc:
pandoc:
filters:
extra:
- citeproc:
- bibliography: "pathto.bib"
- csl: "yourstyle.csl"
template:
meta:
mathEngine: However, the generated bibliography does not blend well with non-citation footnotes, e.g. |
The way your |
Thank you for your prompt reply. I tried removing the The markdown file---
title: First post
date: 2020-06-28 16:47:33
tags: ["test"]
categories: ["Test"]
sticky: 100
---
The stuff you'll see in the front page.
<!-- more -->
Set `sticky: 100` in the frontmatter to pin this post on top.
[@Julia-2017]
Test[^2]
---
[^2]: a footnote Config
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Site title
subtitle: Site subtitle
description: Site description
keywords:
author: Your name
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://sosiristseng.github.io
root: /template-hexo-next/
permalink: :category/:title/
permalink_defaults:
pretty_urls:
trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
trailing_html: false # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: code
i18n_dir: :lang
skip_render: ['code/**']
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
auto_spacing: true # Similar to hexo-pangu
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ' '
wrap: true
hljs: false
# Pandoc config (optional): https://github.com/wzpan/hexo-renderer-pandoc
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: mtime
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
##
include:
exclude:
ignore:
# Plugins: https://hexo.io/plugins/
## Seach data generator plugin for Hexo
## https://github.com/theme-next/hexo-generator-searchdb
search:
path: search.json
field: all
content: true
format: striptags
# Themes: https://hexo.io/themes/
# Next theme: https://theme-next.js.org/
theme: next
# markdown-renderer-pandoc config: https://github.com/wzpan/hexo-renderer-pandoc
pandoc:
extra:
- citeproc:
- bibliography: "julia.bib"
- csl: "vancouver-brackets.csl"
template:
meta:
mathEngine: BibTex% This article is the definitive citation for Julia.
@article{Julia-2017,
title={Julia: A fresh approach to numerical computing},
author={Bezanson, Jeff and Edelman, Alan and Karpinski, Stefan and Shah, Viral B},
journal={SIAM {R}eview},
volume={59},
number={1},
pages={65--98},
year={2017},
publisher={SIAM},
doi={10.1137/141000671},
url={https://epubs.siam.org/doi/10.1137/141000671}
}
% For more details on research related to Julia, see https://julialang.org/research package.json{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo g",
"clean": "hexo cl",
"server": "hexo cl && hexo s -o --debug",
"gzipper": "gzipper",
"compress": "gzipper compress ./public --deflate --brotli"
},
"hexo": {
"version": "5.4.0"
},
"dependencies": {
"gzipper": "^5.0.0",
"hexo": "^5.4.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-searchdb": "^1.3.4",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-pandoc": "^0.3.0",
"hexo-renderer-stylus": "^2.0.1",
"hexo-server": "^2.0.0",
"hexo-theme-next": "^8.7.0",
"hexo-word-counter": "^0.0.3"
}
} Style: Vancouver brackets |
@ sosiristseng Are you expecting that the references generated by bib file and footnotes to be placed in the same section? |
@sosiristseng Your rendered result looks completely reasonable to me. So I guess @huangy10 is right: @sosiristseng you want references and footnote texts to be placed in the same list. Looking at Pandoc's code, I don't think this is possible. Moreover, it looks like Pandoc is suggesting bibliography items are ontologically distinctive from footnotes, which I find reasonable. It might be possible to have bib items and footnotes in the same list, perhaps in the order of their first appeariences, by invoking a customized pandoc filter after calling citeproc (which involves my earlier discussion). However I envision that writing such a filter requires quite some consideration, for example, what if an author-year citation style is used? This could be one major reason to treat bib items and footnotes ontologically differently. @huangy10 I just realized that I never tied up the end of our earlier discussion. Hopefully I will be able to find some time recently and quickly build a prototype. |
@RichardYan314 @huangy10 Yes, I thought pandoc would generate Markdown footnotes for citations. Thank you for pointing out that was not the case. |
Please see the new |
在较新的版本的 pandoc 上,pandoc-citeproc 这个 filter 已经被标注为 deprecated,citeproc 功能被直接整合进了 pandoc 里面,通过 extra 参数
--citeproc
启用。估建议在 README.md 的例子中注明这一点。Reference:
The text was updated successfully, but these errors were encountered: