Tinderboxwithquarto
A Tinderbox file for Quarto
Install / Use
/learn @fryagbye/TinderboxwithquartoREADME
Introduction
This Tinderbox file supports creating a book, manuscript (beta), revealjs with Quarto.
Tinderbox file for Quarto (Web version)
Tinderbox file for Quarto (Web version) in Japanese
You can easily make qmd files and _quarto.yml with it. Here is an example of books created with Quarto.
- R for Data Science (2e)(@Wickham2016Data)
You can preview Rchunk and Graphs (Mermaid Flowchart and Graphviz) in Tinderbox.
<a href="https://youtu.be/4BEroHg-F8Y"> <img src="output/screenshots/youtube_opening.png" width=70%" /> </a>Software Setup
To run the project in your local environment, please follow the steps below to set up the necessary software and environment.
Required Software
Ensure the following key software is installed on your system.
| Software | Purpose | Official Site | |---|---|---| | Git | Used for version control and cloning the repository. | Official Git Site | | R | Serves as the foundation for data processing and the renv environment. | CRAN (The Comprehensive R Archive Network) | | Python | Used for environment management via Poetry and executing Python scripts. | Official Python Website | | Quarto | Integrates results from R and Python and renders the final documentation. | Quarto Official Installation Guide | | RStudio Desktop | Recommended IDE for R/Quarto development. | RStudio Desktop Download |
💡 Recommendation: Using Homebrew makes it easy to install and manage tools like Git from the terminal.
Repository Cloning and Initial Setup
Mac users should install Git via Homebrew and clone the repository locally.
- Preparing Git (via Homebrew)
For Mac users, installing Git via Homebrew is recommended.
# If Homebrew is not installed, install it first
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Git using Homebrew
brew install git
- Cloning the Repository
Execute the following commands to move into the project directory.
# Open the terminal and navigate to your working directory
git clone https://github.com/fryagbye/tinderboxwithquarto.git
cd tinderboxwithquarto
Python Environment Setup (Poetry)
Python dependencies within the project are managed using Poetry in an isolated virtual environment.
- Install Poetry:
If Poetry is not yet installed on your system, follow the official documentation for installation.
# Example:
curl -sSL https://install.python-poetry.org | python -
- Install Dependencies: Run the following command in the project root folder (where pyproject.toml is located).
This will install all necessary packages into a dedicated virtual environment.
# Create virtual environment and install dependencies
poetry install
- Using the Environment:
To run Python scripts or use this environment within Jupyter/Quarto, either activate the virtual environment with poetry.
# To activate the virtual environment
eval $(poetry env activate)
R Environment Restoration (renv)
R package dependencies are managed by renv (Reproducible Environment).
- Start an R Session:
Launch the R console or RStudio and navigate to the project root directory.
- Restore Dependencies:
Execute the command below to install the exact versions of R packages specified in the renv.lock file.
# Execute inside the R console
renv::restore()
The first time you run renv::restore(), R may automatically prompt you to install renv itself if it's not present. Please allow the installation if prompted.
Usage environment
Please refer to the output results of quato check.
-
Quarto is using the released version 1.8.25 [^noteinstallversion].
-
R is version 4.5.1.
-
I use luaLatex for output in Japanese. I have installed MacTex because TinyTex doesn't include it.
-
It may be better to uninstall TinyTex.
-
I have set it to use the
lightboxextension ( included in Quarto v1.4+.). -
I have set it to use the
quarto-liveextension for revealjs. (quarto live)
[^noteinstallversion]:~~Since the old headless mode has been removed from Chrome 132, Quarto v1.7.13 or later is required.~~
quarto check
Quarto 1.8.25
[✓] Checking environment information...
Quarto cache location: /Users/tk4o2ka/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.25
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
Chromium: 869685
TinyTeX: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.14.0
Path: /opt/homebrew/opt/python@3.14/bin/python3.14
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
There is an unactivated Python environment in .venv. Did you forget to activate it?
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/tk4o2ka/github/tinderboxwithquarto/renv/library/macos/R-4.5/aarch64-apple-darwin20
- /Users/tk4o2ka/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
</details>
Installed packages
#| echo: false
#| message: false
pacman::p_load(tidyverse, gt)
installed.packages() |>
as_tibble() |>
select(Package, Version, Built) |>
gt::gt()
<details>
<summery>Package List</summery>
|Name|Version|Built| |----|-------|-----| |askpass|1.2.1|4.5.0| |backports|1.5.0|4.5.0| |base64enc|0.1-3|4.5.0| |bigD|0.3.1|4.5.0| |bit|4.6.0|4.5.0| |bit64|4.6.0-1|4.5.0| |bitops|1.0-9|4.5.0| |blob|1.2.4|4.5.0| |brio|1.1.5|4.5.0| |broom|1.0.10|4.5.0| |bslib|0.9.0|4.5.0| |cachem|1.1.0|4.5.0| |callr|3.7.6|4.5.0| |cellranger|1.1.0|4.5.0| |cli|3.6.5|4.5.0| |clipr|0.8.0|4.5.0| |commonmark|2.0.0|4.5.0| |conflicted|1.2.0|4.5.0| |cpp11|0.5.2|4.5.0| |crayon|1.5.3|4.5.0| |curl|7.0.0|4.5.0| |data.table|1.17.8|4.5.0| |DBI|1.2.3|4.5.0| |dbplyr|2.5.1|4.5.0| |desc|1.4.3|4.5.0| |digest|0.6.39|4.5.2| |downlit|0.4.5|4.5.2| |dplyr|1.1.4|4.5.0| |dtplyr|1.3.2|4.5.0| |evaluate|1.0.5|4.5.0| |fansi|1.0.7|4.5.2| |farver|2.1.2|4.5.0| |fastmap|1.2.0|4.5.0| |fontawesome|0.5.3|4.5.0| |forcats|1.0.1|4.5.0| |fs|1.6.6|4.5.0| |gargle|1.6.0|4.5.0| |generics|0.1.4|4.5.0| |ggplot2|4.0.1|4.5.2| |glue|1.8.0|4.5.0| |googledrive|2.1.2|4.5.0| |googlesheets4|1.1.2|4.5.0| |gt|1.1.0|4.5.0| |gtable|0.3.6|4.5.0| |gtExtras|0.6.1|4.5.0| |haven|2.5.5|4.5.0| |here|1.0.2|4.5.0| |highr|0.11|4.5.0| |hms|1.1.4|4.5.0| |htmltools|0.5.8.1|4.5.0| |htmlwidgets|1.6.4|4.5.0| |httr|1.4.7|4.5.0| |ids|1.0.1|4.5.0| |isoband|0.2.7|4.5.0| |jquerylib|0.1.4|4.5.0| |jsonlite|2.0.0|4.5.0| |juicyjuice|0.1.0|4.5.0| |kableExtra|1.4.0|4.5.0| |knitr|1.5|4.5.0| |labeling|0.4.3|4.5.0| |lifecycle|1.0.4|4.5.0| |litedown|0.8|4.5.0| |lubridate|1.9.4|4.5.0| |magrittr|2.0.4|4.5.0| |markdown|2|4.5.0| |memoise|2.0.1|4.5.0| |mime|0.13|4.5.0| |modelr|0.1.11|4.5.0| |openssl|2.3.4|4.5.0| |pacman|0.5.1|4.5.0| |paletteer|1.6.0|4.5.0| |pillar|1.11.1|4.5.0| |pkgconfig|2.0.3|4.5.0| |png|0.1-8|4.5.0| |prettyunits|1.2.0|4.5.0| |prismatic|1.1.2|4.5.0| |processx|3.8.6|4.5.0| |progress|1.2.3|4.5.0| |ps|1.9.1|4.5.0| |purrr|1.2.0|4.5.0| |R6|2.6.1|4.5.0| |ragg|1.5.0|4.5.0| |rappdirs|0.3.3|4.5.0| |RColorBrewer|1.1-3|4.5.0| |Rcpp|1.1.0|4.5.0| |RcppTOML|0.2.3|4.5.0| |reactable|0.4.4|4.5.0| |reactR|0.6.1|4.5.0| |readr|2.1.6|4.5.2| |readxl|1.4.5|4.5.0| |rematch|2.0.0|4.5.0| |rematch2|2.1.2|4.5.0| |remotes|2.5.0|4.5.0| |renv|1.1.5|4.5.0| |reprex|2.1.1|4.5.0| |reticulate|1.44.1|4.5.2| |rlang|1.1.6|4.5.0| |rmarkdown|2.3|4.5.0| |rprojroot|2.1.1|4.5.0| |rstudioapi|0.17.1|4.5.0| |rvest|1.0.5|4.5.0| |S7|0.2.1|4.5.2| |sass|0.4.10|4.5.0| |scales|1.4.0|4.5.0| |selectr|0.5-0|4.5.2| |stringi|1.8.7|4.5.0| |stringr|1.6.0|4.5.0| |svglite|2.2.2|4.5.0| |sys|3.4.3|4.5.0| |systemfonts|1.3.1|4.5.0| |textshaping|1.0.4|4.5.0| |tibble|3.3.0|4.5.0| |tidyr|1.3.1|4.5.0| |tidyselect|1.2.1|4.5.0| |tidyverse|2.0.0|4.5.0| |timechange|0.3.0|4.5.0| |tinytex|0.58|4.5.2| |tzdb|0.5.0|4.5.0| |utf8|1.2.6|4.5.0| |uuid|1.2-1|4.5.0| |V8|8.0.1|4.5.0| |vctrs|0.6.5|4.5.0| |viridisLite|0.4.2|4.5.0| |vroom|1.6.6|4.5.0| |withr|3.0.2|4.5.0| |xfun|0.54|4.5.0| |xml2|1.5.0|4.5.2| |yaml|2.3.10|4.5.0| |base|4.5.1|4.5.1| |boot|1.3-31|4.5.1| |class|7.3-23|4.5.1| |cluster|2.1.8.1|4.5.1| |codetools|0.2-20|4.5.1| |compiler|4.5.1|4.5.1| |datasets|4.5.1|4.5.1| |foreign|0.8-90|4.5.1| |graphics|4.5.1|4.5.1| |grDevices|4.5.1|4.5.1| |grid|4.5.1|4.5.1| |KernSmooth|2.23-26|4.5.1| |lattice|0.22-7|4.5.1| |MASS|7.3-65|4.5.1| |Matrix|1.7-3|4.5.1| |methods|4.5.1|4.5.1| |mgcv|1.9-3|4.5.1| |nlme|3.1-168|4.5.1| |nnet|7.3-20|4.5.1| |parallel|4.5.1|4.5.1| |rpart|4.1.24|4.5.1| |spatial|7.3-18|4.5.1| |splines|4.5.1|4.5.1| |stats|4.5.1|4.5.1| |stats4|4.5.1|4.5.1| |survival|3.8
