Hacker News new | past | comments | ask | show | jobs | submit login
Quarto (quarto.org)
205 points by ustad 7 months ago | hide | past | favorite | 61 comments



One of the things I really love about Quarto is that it's a great way to package WebAssembly tools. For example the Shiny for Python website is built using Quarto and has tons of WASM examples which let people play around with the framework without having to install it. It's really changed how we write documentation.

https://shiny.posit.co/py/docs/overview.html

Some other great quarto features:

- Write Python Package documentation with Quarto Doc: https://github.com/machow/quartodoc

- Make static dashboards with Quarto Dashboard https://quarto.org/docs/dashboards/

- Fully integrates Typst: https://quarto.org/docs/blog/posts/2024-01-24-1.4-release/#t...

- Render to a ton of formats including PDF, HTML, Reveal JS, Word, and PowerPoint

- Allows you to use GitHub with a Jupyter Notebook workflow


Just wanted to say I recently converted my personal blog [1] from Wordpress to Quarto and it's been a joy to work in! The fantastic support for literate programming tools (code highlighting/annotation) and cross-referencing has taken away much of the friction to writing and releasing new posts.

[1] See profile


(Hi there!)

If y'all haven't seen the kind of magic that Tyler does with ray tracers in R (yes, you read it right), you're missing out. Go click on that link!


Previous discussion: https://news.ycombinator.com/item?id=30042831 (234 points | Jan 23, 2022 | 33 comments)

Generating website, epub and pdf from markdown is an attractive option. I did it with pandoc/mdbook, but would've likely gone with Quarto if it had been available at that time.


Thanks! Macroexpanded:

Publishing Documents with Quarto - https://news.ycombinator.com/item?id=38358214 - Nov 2023 (1 comment)

Quarto: A scientific and technical publishing system built on Pandoc - https://news.ycombinator.com/item?id=30042831 - Jan 2022 (33 comments)


If you're looking for a place to deploy Quarto projects for free, check out Ploomber Cloud.

We added support recently and have some nice features like password protection: https://docs.cloud.ploomber.io/en/latest/apps/quarto.html


Quarto dev here, happy to answer specific questions you might have!


Hello, I have a rather specific question.

I want to write a detailed tutorial (as HTML page) and a condensed version of it (as Reveal JS slides) from a single document.

I have found this suggestion[1] to specify the separate output file name for the slides in the header, and `quarto render myfile.qmd` will generate both.

Is there a way to include content (long form text, code, or images) that will only be exported in the HTML page but not in the slides (where space is more limited)?

[1] https://github.com/quarto-dev/quarto-cli/discussions/1751


Take a look at our conditional content support.

You'll want to use something like {.content-visible unless-format="revealjs"}

https://quarto.org/docs/authoring/conditional.html


Thanks! I'll give it a try.


I recently did this by putting long form text into the talking notes of the revealjs presentation


Is there support for pluto notebooks? It doesn't seem so from searching online. If not, are there plans for supporting pluto notebooks?


Excellent question.

My understanding is that Pluto has its own execution engine outside of Jupyter, and so would require the creation of a new "engine" in our codebase. We are a pretty lean team that has other priorities for 2024, but we would very much love to see Pluto running in Quarto.

There is an open PR right now (https://github.com/quarto-dev/quarto-cli/pull/8645) to add a Julia-native engine to Quarto, from the developers of Makie which we hope to merge soon. I don't think that will provide instant Pluto support, but it will certainly make it easier for other Julia-native folks to build on.


Thanks for working on Quatro!

I greatly enjoy using Quarto in RStudio but in VS Code I prefer Jupyter notebooks because of the GUI and excellent integration with Data Wrangler. Do you know if there is a public roadmap for your VS Code extension? It would help me decide whether I should consider transitioning from notebooks to Quarto.


Not that I'm aware of.

With that said, Quarto works very well _with_ Jupyter notebooks. You can develop in them and then use them directly as inputs to our system. This is how, for example, Jeremy Howard and Rachel Thomas from fast.ai use it (https://www.fast.ai/).


I wish there was a better way to run quarto as a script, as in, as fast as `source` in R and `include` in Julia. Current behavior

1. Has scoping rules that make it difficult to debug 2. Has low latency, making it frustrating for debugging.


Thanks for the feedback.

The scoping rules are by design and match .ipynb workflows in the case of multiple documents, so we're unlikely to change it.

The render latency of quarto is definitely higher than we'd love, but we have a plan and have been steadily improving it. Quarto 1.4 is generally about 20% faster than 1.3, and we have performance regression infrastructure to not let us slip on it.


Thanks for the feedback! Just to re-state my case in clearer terms:

For my personal workflow (others may differ), compiling to html is only done once at the end of a session, and the latency wouldn't matter if it could execute like a script. Weave.jl^[1] has a great feature called `include_weave` which has the features I like.

But take my feedback with a grain of salt. I generally just save things in folders and compile a pdf separately with many tables and figures.

[1] https://weavejl.mpastell.com/stable/usage/#include_weave


I think this is going to be right up your alley, then:

https://quarto.org/docs/computations/render-scripts.html


Perfect! So glad this exists!


I asked on the Mac OS mailing forum, but no response.

How well does this work w/ a TeX-oriented editor? Say TeXshop?


> I asked on the Mac OS mailing forum, but no response.

I don't know what forum you're referring to. We monitor our GitHub discussions very closely, though: https://github.com/quarto-dev/quarto-cli/discussions/

> How well does this work w/ a TeX-oriented editor? Say TeXshop?

Quarto can produce .tex output from .ipynb or .qmd inputs, which can then be further edited directly in your text editor of choice (TeXshop, or even something like overleaf) should you want to.


My apologies, it was on the Mac OS X TeX mailing list.

My question was whether one could use a TeX-oriented editor in lieu of VS Code --- would this be a reasonable option, or, do the advantages/capabilities conferred by VS Code make it something which pretty much require its use?

I'm trying to work up an environment for a largish project which I'm currently doing on Gitbook:

https://willadams.gitbook.io/design-into-3d/

and I'm just not finding any tools which are a good fit yet, and when I move, I'd like to have a bit of familiarity to begin, and TeXshop is one tool in this space which I am familiar with.


Quarto files are just markdown files, so any text editor will work. There is nice support for Neovim, JupyterLab, and RStudio too, if any of those are more familiar.

That said, the Quarto VS.Code extension has some very nice features that I think would be awfully useful in a big project:

- A visual editor to allow a simpler editing experience (could be a pro or con ;-)).

- Completions for document centric things like cross references and bibliographies, completions for yaml configuration options.

- Live preview of LaTeX math, Mermaid and Graphviz diagrams

- Syntax highlight for the markdown and embedded languages

- A nice preview workflow

I'm not sure if those are enough to overcome the lack of familiarity, but thought I'd highlight some of the benefits. Neovim and Rstudio both have very strong features with most or all of the above. Our JuptyerLab extension is more minimal, really only helping with markdown rendering.


That is _very_ persuasive. Thanks!

Downloading VS Code now.


What's the monetization strategy?


I work for Posit. We're a PBC, and developing open-source software is quite literally our mission. You can read more here: https://posit.co/about/pbc-report/ (we used to be RStudio, so that's the term you're going to find in that 2021 report)

We're for profit, but here's the relevant paragraph: "Together, RStudio’s open-source software and commercial software form a virtuous cycle: The adoption of open-source data science software at scale in organizations creates demand for RStudio’s commercial software; and the revenue from commercial software, in turn, enables deeper investment in open-source software, which benefits everyone."


It's a great piece of software. I write my blog using it and host it on GitHub Pages.


Is there a way (a common template/theme or so) to get small, fast-loading web pages from quarto?

Obviously, as soon as you‘re using math, you‘ll get MathJax or KaTex, all the reactive stuff needs JavaScript libraries, but is there a small baseline for just „heading paragraph paragraph image paragraph“ type pages?


All major browsers supports Mathml now, which means you can type latex and math equations without any need for JS libraries like KaTeX.

And for your request, I would suggest bearblog template [1] (it is inspired by bearblog itself). It doesn't use any JS and provide minimal way to have a blog (website) and quarto supports hugo specific format that can help. [2]

[1] https://github.com/janraasch/hugo-bearblog

[2] https://quarto.org/docs/output-formats/hugo.html


(Disclosure: I'm a Quarto dev)

This is an area we want to improve in the future. Most of the JS libraries can be disabled in the project configuration. We find that our typical user prefers to have access to the features those libraries provide, but I agree with you that we should be doing better. This is a place where some guided documentation would help. We're working on it.

With that said, we dogfood Quarto pretty seriously, and consume the content from mobile devices. I admit that we use devices that are likely in the 90% percentile of speed, but website performance is something we do take into account.


Wouldn't it be possible to parse the list of commands used and only enable the JS libraries which are actually required?


We do generally attempt to only include JS dependencies in the HTML output if they are used. We share those dependencies across pages in a website, so if a single page uses a dependency they all will pick it up, but if you have a minimal world view and disable the various interactive goodies, you should get a _relatively_ more thin set of dependencies.

For HTML output, using `minimal: true` in document front matter will give you very minimal HTML that should be ready to style with CSS (and pretty much no dependencies)


Frankly, that's easier said than done.

The complication is from the implied dependencies. If you've designed from zero to be able to track the requirements everywhere in the code base, then that's (in principle, though still not trivial) possible. But if you're looking to ship fast with a small team on the large feature set that we do have, then it's actually a better call to work on a system that has a fixed set of dependencies known in advance, and quickly iterate to solve other customer problems.

tl;dr: tradeoffs. We chose one that still serves us well, but it does come with consequences.


Is the default template not small and fast enough for you?

It generates html in a folder and afaik it the file is self-contained, i.e. it includes in the html all 200-ish lines of js it uses, no external dependencies.


I don't know. Both the Quarto web site and the Quarto-generated sites I have looked at seem to be rather fat.

Let's look at Lighthouse (I know it's not the be-all and end-all) for https://quarto.org/docs/websites/website-blog.html: performance score 68 with a FCP time of 2.7 seconds, and earlier today it was 4.something.

That seems to be a lot.


I think the gallery might be a better comparison point for what you're looking for as it shows the actual output of Quatro. E.g. https://quarto-dev.github.io/quarto-gallery/articles/html/ht... which matches your description of heading-paragraph-image type of page yields performance 99 and FCP 0.8s.


even back when this was just known as RNotebooks this was a great system for producing executable reports that did not warrant the complications of a full latex setup. it’s only gotten better since


The latest version has Typst support and allow producing pdf files much faster than any LateX distribution. Even with a complex template it compiles almost instantly and you can see the final pdf changing while you are typing.


I'm increasingly accepting of the opinion that PDFs are an obsolete file format.


(disclosure: I work on Quarto) I 100% agree with you. It's partly why tools from the Quarto lineage (knitr, rmarkdown) work hard to make popular latex features like crossreferences work in HTML and other forward-facing formats. At the same time, if you haven't tried Typst, my opinion is that doing so is an afternoon well spent. It's an impressive system even early in its development stage. I'm hoping it finally displaces LaTeX --- and I'm a former academic having written about a hundred papers in LaTeX!


I have high hopes for Typst, but I'm very disappointed they didn't design for accessibility from the start (and nice HTML would have done the job). It's shocking how inaccessible latex's output is, and yet Typst manages to be even worse!

Quarto's html output on the other hand is generally lovely for accessible output.


As an author, PDFs are indispensable. A good chunk of folks still prefer to read physical books.

When I migrated my own tooling from rst, I was looking at Quarto but ended up rolling my own pandoc/md tooling.


Why not use epub?


Hard to print a good looking physical book from EPUBs. (I generate EPUBs too.)


Quarto is pretty different from Rmarkdown because it doesn't require an R runtime. This opens up a lot of possibilities when you don't want to include the R dependency.


How feasible would it be to write a scientific paper in quarto? Is it possible to write something that one could publish at a conference? Or is this primarily for the web?


Very feasible, I write my papers using Quarto in vscode. Really easy to use different journal styles, handle references and cross references.


What is the benefit over rmarkdown? More languages?


> Quarto combines the functionality of R Markdown, bookdown, distill, xaringian, etc into a single consistent system with “batteries included” that reflects everything we’ve learned from R Markdown over the past 10 years.

AND the biggest advantage: it does not require R. I also like it because it brings the Rstudio style notebook to Python. I dislike Jupyter style notebooks, which are these chunks. Just a personal preference.


it feels like jupyter without all the extra baggage


Yup! You can actually render jupyter notebooks into quarto outputs. I like Quarto better than Jupyter because it's a lot easier to version control .qmd files.


(disclosure: I'm a Quarto dev) You can also render _to_ Jupyter notebooks from .qmd files, in case that would be useful for your workflow. We've put a lot of effort into making Jupyter interop a good experience in Quarto, for folks in either the Knitr or Jupyter ecosystem.


Do you map the tags[1] to a hotkey to avoid writing them all the time? Quite interested in this because of the version control as you mention.

1. ```{python}


(Disclosure: I'm a Quarto dev)

Folks have already noted that you can run content through any Jupyter kernel. That lets you run Python and Julia code in a familiar runtime environment, and without having to install the R runtime and dependencies.

I also think that our IDE tooling is pretty good. If you're running in VS code, we'll (for example) highlight problems in your YAML frontmatter, resolve document crossreferences in the editor, etc.

We do this in an editor-agnostic way, so the Quarto IDE tooling can be adopted by third-party. We (Posit the company) develop the RStudio integration and VS Code extension, but there exist modes developed by the community such as quarto-nvim.

A good way to think about Quarto is "a next-generation RMarkdown with many lessons we learned and an emphasis on multiple language support".


The main benefit is that you get a Python (or R, Julia or Rust) interpreter. So you can evaluate code. A good example of the value of this is the Ibis docs which use Quarto: https://ibis-project.org/


I love it for using observable js, which I also love.

it’s a great way to lay out documents with code and have them exist in almost any format.


Quarto is great


I thought that it was the board game: https://en.wikipedia.org/wiki/Quarto_(board_game)


I thought it was the spreadsheet app: https://en.wikipedia.org/wiki/Quattro_Pro


Yeah me too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: