Berikut adalah panduan lengkap untuk menginstal Quarto di sistem operasi Windows serta langkah-langkah dasar penggunaannya.
1. Kunjungi halaman unduhan resmi Quarto: https://quarto.org/docs/download/ [[2]]
2. Pada tabel sistem operasi, cari baris Windows dan klik tombol biru “Download Quarto CLI” untuk mengunduh file installer quarto-{version}-win.msi [[3]]
3. Buka file .msi yang telah diunduh dari folder Downloads
4. Ikuti panduan setup wizard dengan mengklik Next pada setiap langkah
5. Setelah instalasi selesai, klik Close untuk menutup wizard [[3]]
💡 Catatan: Installer Quarto secara otomatis menambahkan jalur eksekusi ke system PATH, sehingga perintah quarto dapat dijalankan langsung dari Command Prompt atau PowerShell.
Jika Anda menggunakan package manager:
• Chocolatey: choco install quarto -y [[1]]
• Winget: winget install Quarto [[1]]
Buka Command Prompt atau PowerShell, lalu jalankan perintah berikut:
quarto --version
Jika instalasi berhasil, versi Quarto akan ditampilkan, misalnya: quarto 1.9.36.
Quarto tidak menyediakan antarmuka grafis tersendiri, melainkan terintegrasi dengan editor teks atau IDE berikut [[3]]:
Jika Anda berencana menggunakan kode Python dalam dokumen Quarto, instal paket berikut melalui terminal:
py -m pip install jupyter matplotlib plotly
1. Buat file baru dengan ekstensi .qmd, misalnya hello.qmd
2. Salin konten berikut ke dalam file tersebut:
---
title: "Dokumen Percobaan Saya"
format: html
jupyter: python3
---
## Halo, Quarto!
Ini adalah paragraf pembuka dalam dokumen Quarto.
```{python}
print("Halo dari Python!")
3. Simpan file di direktori kerja Anda
🔹 Langkah 5: Render dan Pratinjau Dokumen
Buka terminal di direktori tempat file `hello.qmd` disimpan, lalu jalankan:
quarto render hello.qmd --to html # Render ke HTML
quarto render hello.qmd --to docx # Render ke Microsoft Word
quarto render hello.qmd --to pdf # Render ke PDF (memerlukan TinyTeX)
Gunakan perintah berikut untuk melihat hasil render secara langsung di browser:
quarto preview hello.qmd
Dokumen akan otomatis diperbarui setiap kali Anda menyimpan perubahan pada file .qmd.
🔹 Perintah CLI Dasar Quarto
Berikut adalah perintah-perintah inti yang sering digunakan [[11]]:
1. Gunakan PowerShell atau Git Bash untuk pengalaman terminal yang lebih baik
2. Pastikan Python sudah terinstal dan tersedia di PATH jika menggunakan kode Python
3. Instal ekstensi Quarto di VS Code untuk fitur syntax highlighting, autocomplete, dan eksekusi sel kode secara interaktif [[13]]
4. Untuk output PDF berkualitas tinggi, pertimbangkan instalasi MiKTeX atau TinyTeX melalui quarto install tinytex
quarto render dokumen.qmd --to pdf --pdf-engine=xelatex
# Instal TinyTeX
quarto install tinytex
# Verifikasi instalasi
quarto check
# Render ke PDF
quarto render dokumen.qmd --to pdf
# Update TinyTeX
quarto install tinytex --update
# Hapus TinyTeX (jika diperlukan)
quarto install tinytex --uninstall
# Render format sekaligus
quarto render
quarto preview
quarto render index.qmd --to pdf
quarto render index.qmd --to docx
quarto render index.qmd --to html
quarto render index.qmd --to epub
Act as an expert technical author and Quarto framework specialist. Generate a complete, production-ready Quarto book project for [SUBJECT] targeting [AUDIENCE/SYLLABUS]. Follow these exact specifications:
PROJECT STRUCTURE:
- type: book
- output-dir: _output
- chapters: [index.qmd, preface.qmd, syllabus-overview.qmd, math-skills.qmd, chapters/01-*.qmd, chapters/02-*.qmd, ..., practical-exam-prep.qmd]
- formats: html, pdf, docx
_QUARTO.YML CONFIGURATION:
- Clean YAML (no embedded chapter content in metadata)
- execute: engine: python, cache: false, freeze: false, jupyter: [kernel-name], fig-width: 8, fig-height: 5, dpi: 150
- crossref: fig-prefix: "Fig", eq-prefix: "Eq", tbl-prefix: "Table", chapters: true
- format:
html: theme: cosmo, self-contained: true, fig-format: png, dpi: 96
pdf: documentclass: scrreprt, pdf-engine: xelatex, fig-format: pdf, dpi: 300
docx: reference-doc: assets/template.docx, fig-format: png, dpi: 96
- meta: lang: en-GB, keywords: [...], description: "[single-line string]"
CHAPTER TEMPLATE (.qmd):
- YAML header: title, chapter, author, date, format overrides (pdf/html/docx), execute block (echo: false, warning: false, cache: false)
- setup-mpl chunk: include: false, imports matplotlib/numpy/pathlib/IPython.display, matplotlib.use('Agg', force=True), creates figures/ directory, applies consistent plt.rcParams
- figure chunks: explicit save pattern (fig.savefig("figures/fig-name.png", dpi=300, bbox_inches='tight'), plt.close(fig), display(Image(filename=...)))
- pedagogical structure: Learning Objectives, Key Concepts, Worked Examples, Practice Questions, Lab Investigation, Exam-Style Questions, Chapter Summary, Glossary, Further Resources
- cross-references: @fig-label, @eq-label, @tbl-label (no ?@ prefixes)
- callouts: ::: {.callout-warning} / ::: {.callout-note} for misconceptions & tips
TECHNICAL REQUIREMENTS:
- Python 3 + Jupyter kernel registration (ipykernel install --user --name [kernel] --display-name "[Display Name]")
- matplotlib.use('Agg', force=True) in EVERY figure chunk
- No plt.show() for output generation; use explicit save + IPython.display
- Memory optimization: DOCX dpi ≤ 150, PDF uses vector fig-format: pdf
- File lock prevention: .quartoignore excludes _output/, _freeze/, *.log
- VS Code settings: files.watcherExclude for _output/, cache: false during development
OUTPUT EXPECTATIONS:
- HTML: self-contained, responsive, sidebar navigation, working cross-references
- PDF: print-ready (A4, 2.5cm margins), 300 DPI, vector figures, proper equation numbering
- DOCX: editable, reference document applied, embedded PNGs, no missing figures
- Clean build: no YAML errors, no "Unable to resolve crossref" warnings, no file-lock crashes
GENERATE:
1. Complete _quarto.yml
2. Standard chapter template (.qmd) with 3 example figures (cartesian, polar, multi-axis)
3. Figure handling boilerplate script
4. Rendering workflow commands (PowerShell)
5. Troubleshooting checklist for common issues (YAML corruption, figure not embedding, crossref failures, file locks)