Skip to content

--smart/-S is said to have been removed in Pandoc 2.0 #1120

Closed

Description

@yihui

This issue has been fixed: install.packages("rmarkdown")


Moving from rstudio/bookdown#412:

--smart/-S has been removed.  Use +smart or -smart extension instead.
For example: pandoc -f markdown+smart -t markdown-smart.
Try pandoc --help for more information.
Error: pandoc document conversion failed with error 2
Please delete sde.Rmd after you finish debugging the error.
Execution halted

Change --smart to +smart.

Activity

  1. added this to the v1.7 milestone on Oct 10, 2017
  2. yihui commented on Oct 13, 2017

    @yihui
    CollaboratorAuthor

    From rstudio/bookdown#475, --latex-engine has been changed to --pdf-engine in Pandoc 2.0.

  3. added
    bug
    on Oct 17, 2017
  4. added a commit that references this issue on Oct 24, 2017
    fa23a72
  5. kenarab commented on Oct 30, 2017

    @kenarab

    I had yet the same problem while executing devtools:document, after brew update including pandoc in OSX.

    It seems became a blocking bug for those which develop packages with no clear origin but a wrong pandoc call.

    > devtools::build()
    '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save  \
      --no-restore --quiet CMD build '/Users/kenarab/git/Rpolyhedra' --no-resave-data --no-manual 
    
    * checking for file ‘/Users/kenarab/git/Rpolyhedra/DESCRIPTION’ ... OK
    * preparing ‘Rpolyhedra’:
    * checking DESCRIPTION meta-information ... OK
    * installing the package to build vignettes
    * creating vignettes ... ERROR
    --smart/-S has been removed.  Use +smart or -smart extension instead.
    For example: pandoc -f markdown+smart -t markdown-smart.
    Try pandoc --help for more information.
    Error: processing vignette 'Rpolyhedra.Rmd' failed with diagnostics:
    pandoc document conversion failed with error 2
    Execution halted
    Error: Command failed (1)

    I have installed the development version of markdown

    devtools::install_github("rstudio/markdown")
    

    But still doesn't works.

    I will downgrade pandoc for beeing able to work with package development until is solved.

  6. yihui commented on Oct 30, 2017

    @yihui
    CollaboratorAuthor

    @kenarab It is rmarkdown instead of markdown:

    devtools::install_github("rstudio/rmarkdown")
  7. kenarab commented on Oct 30, 2017

    @kenarab

    Thanks @yihui. It worked installing rmarkdown development version. A turnaround until current version of rmarkdown is in CRAN.

    devtools::install_github("rstudio/rmarkdown")

    Maybe is good to speed up rmarkdown CRAN publication of current version.

  8. yihui commented on Oct 30, 2017

    @yihui
    CollaboratorAuthor

    @kenarab Yep, we do plan to release the current devel version to CRAN relatively soon. Pandoc 2.0 was released last night, and I guess the problem will first hit Homebrew users who have installed Pandoc. Thanks for the report!

  9. rdrr1990 commented on Oct 30, 2017

    @rdrr1990

    I've been working on a set of Rmd documents, all of which were knitting fine to HTML, docx and PDF (just regular Rmd, not bookdown). When I brew upgraded to pandoc 2.0 this afternoon, I started seeing the --smart error described above. After

    devtools::install_github("rstudio/rmarkdown")
    

    I was able to knit to HTML and docx but not PDF. Instead I get the following:

    pdf-engine /Library/TeX/texbin/pdflatex is not compatible with output format latex
    Error: pandoc document conversion failed with error 1
    

    I am using R 3.4.2, RStudio 1.1.383 on Mac OSX with

    pdflatex --version
    pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
    kpathsea version 6.2.3
    Copyright 2017 Han The Thanh (pdfTeX) et al.     [copyright details omitted]
    Compiled with libpng 1.6.29; using libpng 1.6.29
    Compiled with zlib 1.2.11; using zlib 1.2.11
    Compiled with xpdf version 3.04
    

    This is not urgent in that I'm able to create PDFs by reverting

    brew switch pandoc 1.19.2.4
    

    Is there a way to knit PDFs with pandoc 2.0?

  10. yihui commented on Oct 31, 2017

    @yihui
    CollaboratorAuthor

    @rdrr1990 Thanks! I'll investigate it tomorrow.

  11. pat-s commented on Oct 31, 2017

    @pat-s

    I confirm the error on macOS with pandoc 2.0.

    @rdrr1990 This is only possible if the old version is not automatically removed (as for me).
    Currently it is not possible to install an older version of pandoc from hombrew/core. Could you upload the latest v1 binary (1.19.2.4) to homebrew so that users can do a brew install [email protected]? Would be great!

    I also tried installing the latest v1 using the pandoc.rb formula directly but Github says that the history is too long... I could also do it locally but have no time right now.

    If one has the url to the old v1 pandoc.rb this would also help 👍

  12. kenarab commented on Oct 31, 2017

    @kenarab

    With @leobelen we prepared the configuration for installing [email protected] vía brew as an emergency tweak. We finally find the way recompiling the package, but It seems to be necesary. We will publish it today.

  13. kenarab commented on Oct 31, 2017

    @kenarab
  14. 7 remaining items

  15. rdrr1990 commented on Oct 31, 2017

    @rdrr1990

    works for me--PDF, HTML, and docx all build fine on my mac with that new github version!

  16. yihui commented on Oct 31, 2017

    @yihui
    CollaboratorAuthor

    @rdrr1990 Thanks! Actually you reminded me of a remaining issue with Word output, and I just pushed a fix e0339d3.

  17. pat-s commented on Nov 1, 2017

    @pat-s

    So uninstalling a brew package, unmask the last version (1.19) installed.

    @kenarab this only works if you do not clean up (brew cleanup) after doing brew upgrade - you should (imho) unless you want to keep all old bottles of formulas you installed. They occupy quite some space over time..

    @yihui thanks!

  18. johnfarias commented on Nov 1, 2017

    @johnfarias

    I use eclipse-statet and had the same problem. I installed:
    devtools::install_github("rstudio/rmarkdown")
    and then,
    library(rmarkdown)
    the problem was solved using next configuration in eclipse>Run>External tools>External tools configurations:

    image

    image

    An example:
    image

  19. yueqin-li commented on May 16, 2018

    @yueqin-li

    i could not use devtools::install_github("rstudio/rmarkdown") to solve the problem and it showed that -bash: syntax error near unexpected token `"rstudio/rmarkdown"'. Anyone have some ideas about this?

  20. yihui commented on May 16, 2018

    @yihui
    CollaboratorAuthor

    @yueqin-li This has been fixed long time ago, and you can just install from CRAN: install.packages("rmarkdown").

  21. yueqin-li commented on May 16, 2018

    @yueqin-li

    @yihui Yeah, I got your point that packages("rmarkdown") should be installed. But whenever I tried to do this with 'devtools::install_github("rstudio/rmarkdown"' or 'install.packages("rmarkdown")', it always shows that '-bash: syntax error near unexpected token ···'. Do you have any solutions for this? Thanks!

  22. yihui commented on May 16, 2018

    @yihui
    CollaboratorAuthor

    @yueqin-li So it seems you just cannot install any packages, and your R installation seems to be broken somehow. I have no idea what this error message means. Without seeing your devtools::session_info(), my blind shot in the dark would be to reinstall R.

  23. stevekm commented on Oct 22, 2019

    @stevekm

    I am getting this error with the following Dockerfile installation, which was the only way I could get the following packages installed together in one place

    $ cat Dockerfile
    FROM ubuntu:16.04
    
    RUN apt-get update && \
    apt-get install -y wget \
    bzip2 \
    make \
    rsync \
    libcairo2-dev
    
    RUN wget https://repo.continuum.io/miniconda/Miniconda3-4.4.10-Linux-x86_64.sh && \
    bash Miniconda3-4.4.10-Linux-x86_64.sh -b -p /conda && \
    rm -f Miniconda3-4.4.10-Linux-x86_64.sh
    ENV PATH="/conda/bin:${PATH}"
    
    RUN conda install -y -c r \
    r=3.3.2 \
    r-base=3.3.2 \
    pandoc=2.2.3.2 \
    r-reshape2=1.4.2 \
    r-knitr=1.15.1 \
    r-rmarkdown=1.3 \
    r-ggplot2=2.2.0 \
    r-dt=0.2 \
    r-gridextra=2.2.1 \
    bioconda::r-plotly=4.5.6 \
    bioconda::r-venndiagram=1.6.16
    

    error message:

    >     rmarkdown::render(
    +         input = 'report.Rmd',
    +     output_format = 'html_document',
    +     output_file = 'report.html'
    +     )
    
    
    
    /conda/bin/pandoc +RTS -K512m -RTS report.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output report.html --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template /conda/lib/R/library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --number-sections --variable 'theme:bootstrap' --include-in-header /tmp/Rtmp9PHnR3/rmarkdown-str66a3a39f2e4bb.html --mathjax --variable 'mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
    --smart/-S has been removed.  Use +smart or -smart extension instead.
    For example: pandoc -f markdown+smart -t markdown-smart.
    Try pandoc --help for more information.
    Error: pandoc document conversion failed with error 2
    Execution halted
    
  24. cderv commented on Oct 22, 2019

    @cderv
    Collaborator

    This is because you use rmarkdown 1.3 with Pandoc 2+ .

    r-rmarkdown=1.3
    pandoc=2.2.3.2

    rmarkdown compatibility with pandoc 2 is from version 1.7 and above.

    You either need to downgrade pandoc to a version before 2 or upgrade rmarkdown to at least version 1.7 (that is the one which includes the fix for this issue bye the way - it is normal you encounter it)

    Hope it helps

  25. stevekm commented on Oct 22, 2019

    @stevekm

    Well, the reason I install with conda is to try to avoid such version compatibility issues; I didn't pick these versions, conda did. Is there a correct place to report the incompatibility for the conda package listings? Thanks.

  26. cderv commented on Oct 23, 2019

    @cderv
    Collaborator

    For reference, conda dependency for this package

    (base) C:\Users\chris>conda search r-rmarkdown==1.3 --info
    Loading channels: done
    r-rmarkdown 1.3 r3.3.2_0
    ------------------------
    file name   : r-rmarkdown-1.3-r3.3.2_0.tar.bz2
    name        : r-rmarkdown
    version     : 1.3
    build       : r3.3.2_0
    build number: 0
    size        : 1.9 MB
    license     : GPL-3
    subdir      : win-64
    url         : https://repo.anaconda.com/pkgs/r/win-64/r-rmarkdown-1.3-r3.3.2_0.tar.bz2
    md5         : eb97a67fd14e485843ebd9d66da5df9d
    dependencies:
      - pandoc >=1.19.2
      - r-base 3.3.2*
      - r-base64enc
      - r-catools
      - r-evaluate >=0.8
      - r-htmltools >=0.3.5
      - r-jsonlite
      - r-knitr >=1.14
      - r-rprojroot
      - r-yaml >=2.1.5

    I don't know where you can report, but there are several groups to ask this I think
    https://conda.io/en/latest/help-support.html

    Personaly, for R project with docker, I would use rocker images on docker hub, and install r package using R directly.

  27. github-actions commented on Nov 3, 2020

    @github-actions

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

  28. locked as resolved and limited conversation to collaborators on Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions