(Disclosure: I work on https://quarto.org, for the same company that the author of WebR works on) Thanks for sharing that PDF link. It's so good! Would you be willing to write a bit about how you produced that PDF? It's a great example of what places like CIDR should be encouraging in terms of academic publications.
I didn't know Quarto, it looks interesting, thanks for sharing!
cloudspecs encodes the entire state (sql code, R code, view state) in the URL compressed and base64 encoded, since we wanted to be able to send links around to share interesting plots/tables with each other and revisit old plots if the data changes, e.g., if new EC2 instances come out.
The PDF is produced by good old latex, and the state-in-URL mechanism allows us to just use regular hyperlinks for the clickable plot. The limit is the max URL length browsers allow, but we haven't hit it.
Since we use R+ggplot for research anyway in the local environment (emacs+RSS), we just copied the code into cloudspecs, then copied the resulting link into latex. So a bit of manual work if we want to change the plots in the paper.
Let me know if you're curious about specific things or want to collaborate. Cheers!