Code Monkey home page Code Monkey logo

Comments (6)

yihui avatar yihui commented on June 11, 2024

RStudio will remember your last choice in the Build menu. I believe all formats should be built if you click All Formats in the menu:

image

from bookdown-demo.

slonik-az avatar slonik-az commented on June 11, 2024

Thanks for a fast reply. But, unfortunately, my RStudio (macosx) does not remember the last choice in 'Build Book'. If I click knitr button it always produces a PDF file.

from bookdown-demo.

yihui avatar yihui commented on June 11, 2024

I think it is just that the PDF output is displayed, but actually all formats were generated. You can verify this by deleting the _book directory and clicking the Build Book button again, and you should see PDF, EPUB, and HTML files under the _book directory.

from bookdown-demo.

slonik-az avatar slonik-az commented on June 11, 2024

Unfortunately it is not the case. After I cleaned _book directory and rerun by clicking on 'knitr' button the _book directory contains only PDF and TEX files
$ ls -1 _book
bookdown-demo.pdf
bookdown-demo.tex

Also from the output in the 'R markdown window' I only see latex processing chain
pandoc +RTS -K512m -RTS bookdown-demo.utf8.md --to latex
Nothing about html.

from bookdown-demo.

slonik-az avatar slonik-az commented on June 11, 2024

It seems that the first entry in _output.yml defines the default output type used when knitr button is clicked. I reordered the entries making html output first. Now it is a new default:

_output.yml

bookdown::gitbook:
  css: style.css
  config:
    toc:
      before: |
        <li><a href="./">A Minimal Book Example</a></li>
      after: |
        <li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
    edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
bookdown::pdf_book:
  includes:
    in_header: preamble.tex
  latex_engine: xelatex
  citation_package: natbib
  keep_tex: yes
bookdown::epub_book: default

from bookdown-demo.

yihui avatar yihui commented on June 11, 2024

You are right about the order of the formats in _output.yml, but I said "click the Build Book button" instead of the Knit button, and I showed a screenshot above.

from bookdown-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.