shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.41k stars 170 forks source link

pandoc: unrecognized option `--citeproc' #531

Open Yujie-Cui opened 2 years ago

Yujie-Cui commented 2 years ago

When I tried to open the markdown preview, it appeared:

Error: Command failed: pandoc --from=markdown-raw_tex+tex_math_single_backslash --to=html --katex --citeproc
pandoc: unrecognized option `--citeproc'
Try pandoc --help for more information.

But my pandoc version is the latest version.

pandoc --version

pandoc 2.14.2
Compiled with pandoc-types 1.22, texmath 0.12.3.1, skylighting 0.11,
citeproc 0.5, ipynb 0.1.0.1
User data directory: /home/cuiyujie/.local/share/pandoc
Copyright (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

I found the corresponding option:


(py36) cui@server81:~$ pandoc --help |grep cite
  -C                    --citeproc

Why does this problem occur?

Thanks

janosh commented 2 years ago

@Yujie-Cui Did you manage to figure this out?

felixroos commented 1 year ago

same here.. while the web manual lists this option, man pandoc is missing the citeproc option:

Citation rendering
       --bibliography=FILE
              Set the bibliography field in the document's metadata to FILE, overriding any value set in the metadata, and process  cita‐
              tions using pandoc-citeproc.  (This is equivalent to --metadata bibliography=FILE --filter pandoc-citeproc.) If --natbib or
              --biblatex is also supplied, pandoc-citeproc is not used, making this equivalent to --metadata bibliography=FILE.   If  you
              supply this argument multiple times, each FILE will be added to bibliography.

       --csl=FILE
              Set  the  csl  field  in the document's metadata to FILE, overriding any value set in the metadata.  (This is equivalent to
              --metadata csl=FILE.) This option is only relevant with pandoc-citeproc.

       --citation-abbreviations=FILE
              Set the citation-abbreviations field in the document's metadata to FILE, overriding any value set in the  metadata.   (This
              is equivalent to --metadata citation-abbreviations=FILE.) This option is only relevant with pandoc-citeproc.

       --natbib
              Use  natbib  for citations in LaTeX output.  This option is not for use with the pandoc-citeproc filter or with PDF output.
              It is intended for use in producing a LaTeX file that can be processed with bibtex.

       --biblatex
              Use biblatex for citations in LaTeX output.  This option is not for use with the pandoc-citeproc filter or with PDF output.
              It is intended for use in producing a LaTeX file that can be processed with bibtex or biber.

I've installed pandoc via sudo apt install pandoc. It runs fine without the option

Getting

> cd paper && pandoc --template=pandoc/iclc.html --citeproc  --number-sections iclc2023.md -o iclc2023.html && pandoc --template=pandoc/iclc.latex --citeproc --number-sections iclc2023.md -o iclc2023.pdf

Unknown option --citeproc.
Try pandoc --help for more information.
yaxu commented 1 year ago

If you're on a debian-based system, you might need to install the separate pandoc-citeproc package

felixroos commented 1 year ago

i realized now that the debian package is on 2.9.2.1, while the citeproc option has been added in 2.19.2. Installing it with cabal works see https://pandoc.org/installing.html#quick-cabal-method

Amogh-Joshi commented 1 year ago

@yaxu I installed this package but I still get the message: Unknown option --citeproc. Try pandoc --help for more information

Ni-Ar commented 1 year ago

Any update on this issue?

Amogh-Joshi commented 1 year ago

Yes, I found that my pandoc was outdated. I updated my pandoc and it solved my issue.

Regards,

On Wed, Feb 8, 2023 at 2:59 PM Ni-Ar @.***> wrote:

Any update on this issue?

— Reply to this email directly, view it on GitHub https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/531#issuecomment-1423166166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AODV26MVV5IITBYI5NE5SFLWWP3I3ANCNFSM5DRN2FIA . You are receiving this because you commented.Message ID: @.*** com>

-- amogh

teddyand commented 1 year ago

"Failed to render page: Unknown option ----citeproc. Try pandoc --help for more information." when I run gollum it display on Home page but when i "pandoc --citeproc *.bib -o .html" at terminal it's ok .....??? how can i run it with gollum

zacniewski commented 6 months ago

You can find proper version here: https://github.com/jgm/pandoc/releases/ as @felixroos mentioned.