### Setup Scanpy Environment Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/07/02/index-nil-value-caption-long-lightbox-bug/notebook.ipynb Initializes the Scanpy environment, sets figure parameters, and prints the header. Ensure Scanpy and its dependencies are installed. ```python #| label: setup #| output: true import scanpy as sc from matplotlib.pyplot import rc_context sc.set_figure_params(dpi=100, color_map="viridis_r") sc.settings.verbosity = 0 sc.logging.print_header() ``` -------------------------------- ### Basic Theorion Environments: Example Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Illustrates the `example` environment for providing examples related to mathematical concepts. This example references other Theorion elements like a corollary and a theorem. ```typst #example[ The numbers $2$, $3$, and $17$ are prime. As proven in @cor:infinite-prime, this list is far from complete! See @thm:euclid for the full proof. ] ``` -------------------------------- ### Bash Script for Fresh Environment Setup Source: https://github.com/quarto-dev/quarto-cli/blob/main/dev-docs/debugging-flaky-tests.md A basic bash script intended for setting up a fresh test environment. This serves as a starting point for verification scripts to ensure a clean state before testing. ```bash #!/bin/bash echo ">>> Fresh environment setup" ``` -------------------------------- ### Import Theorion and Simple Cosmos Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Imports the Theorion preview package and the simple cosmos module. Use this to start with a basic setup. ```typst #import "@preview/theorion:0.4.1": * #import cosmos.simple: * #show: show-theorion ``` -------------------------------- ### Install Multiplex Server Dependencies Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/integration/playwright/multiplex-server/README.md Run this command to install the necessary dependencies for the multiplex server. ```bash npm install ``` -------------------------------- ### Setup Marginalia Package Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst/packages/preview/marginalia/0.3.1/README.md Import and configure the marginalia package at the start of your Typst file. Customize margin sizes, spacing, and book mode. Default values are shown as comments. ```typ #import "@preview/marginalia:0.3.1" as marginalia: note, notefigure, wideblock #show: marginalia.setup.with( // inner: ( far: 5mm, width: 15mm, sep: 5mm ), // outer: ( far: 5mm, width: 15mm, sep: 5mm ), // top: 2.5cm, // bottom: 2.5cm, // book: false, // clearance: 12pt, ) ``` -------------------------------- ### Install TileDB-SQL-Py Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/04/02/9255.ipynb Install the TileDB-SQL-Py capability for executing SQL queries directly on TileDB arrays. ```bash conda install -c conda-forge libtiledb-sql-py ``` -------------------------------- ### Manually Install and Import Library Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/fontawesome/0.5.0/README.md Manually install by copying library files to your project and importing. This method avoids potential conflicts with other libraries. ```typst #import "lib.typ": * ``` -------------------------------- ### Start Documentation Preview Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Start the nbdev preview server to render your documentation locally using Quarto. This command watches for changes and updates the preview automatically. ```shell nbdev_preview ``` -------------------------------- ### Start Multiplex Server Manually Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/integration/playwright/multiplex-server/README.md Execute this command to manually start the local multiplex server for testing. ```bash npm start ``` -------------------------------- ### Automate Setup Tasks with quarto use Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Apply templates, configure Binder environments, or set up brand configuration for a document or project. This command helps in standardizing project setups and configurations. ```bash # Apply a template from GitHub quarto use template quarto-ext/revealjs-clean # Apply a template from a local path quarto use template ./my-template # Configure a Binder environment for the project quarto use binder # Set up brand configuration quarto use brand # Skip confirmation prompts quarto use template quarto-ext/revealjs-clean --no-prompt ``` -------------------------------- ### Setup and Version Check Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/04/02/9255.ipynb Import necessary libraries, connect to TileDB-SQL, and print versions of TileDB core, TileDB-Py, and TileDB-SQL-Py. ```python import pandas as pd, numpy as np import shutil, urllib.request, os.path import tiledb, tiledb.sql print("TileDB core version: {}".format(tiledb.libtiledb.version())) print("TileDB-Py version: {}".format(tiledb.version())) db = tiledb.sql.connect() print("TileDB-SQL-Py version: {}".format(pd.read_sql("SELECT PLUGIN_AUTH_VERSION FROM information_schema.PLUGINS WHERE PLUGIN_NAME='mytile'", con=db)['PLUGIN_AUTH_VERSION'][0])) ``` -------------------------------- ### Minimal HTML Document Example Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/create/extensions/format-html/README.md This is a minimal example of a Quarto document using a custom HTML format. It serves as a starting point for creating your own articles. ```markdown --- title: "My Document" format: html: toc: true --- # Introduction This is a sample document. ``` -------------------------------- ### Install DOCX Format Extension Template Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/create/extensions/format-docx/README.ejs.md Use this command to install the extension template. Replace `` with your GitHub organization name. ```bash quarto use template /<%= filesafename %> ``` -------------------------------- ### Install Altair and Vega Datasets with Pip Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/books/visualization-curriculum/altair_debugging.ipynb Use this command in your terminal to install the necessary packages if you are using Pip. ```bash pip install altair vega_datasets ``` -------------------------------- ### List Installed Quarto Extensions and Tools Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Lists all extensions installed in the current project or all globally installed tools, displayed as a formatted table. ```bash quarto list extensions ``` ```bash quarto list tools ``` -------------------------------- ### Install and Use Custom Extension Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Commands to install a Quarto extension from GitHub and configure its usage within a document's YAML front matter. ```bash # Install and use: quarto add ghuser/my-callout # In document YAML: # filters: # - my-callout ``` -------------------------------- ### Install twine for PyPI uploads Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Install the `twine` package, which is necessary for uploading your project to PyPI. Run this command in your terminal. ```bash pip install twine ``` -------------------------------- ### Install Orange Book Extension Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/extension-subtrees/orange-book/README.md Use this command to explicitly install the Orange Book extension for Quarto projects. ```bash quarto add quarto-ext/orange-book ``` -------------------------------- ### Install Quarto Extensions Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Downloads and installs a Quarto extension from GitHub, a local zip file, or a URL into the current project's `_extensions/` directory. Use `--no-prompt` for CI environments. ```bash quarto add quarto-ext/lightbox ``` ```bash quarto add quarto-ext/lightbox@v0.1.2 ``` ```bash quarto add path/to/extension.zip ``` ```bash quarto add https://example.com/extension.zip ``` ```bash quarto add quarto-ext/lightbox --no-prompt ``` ```bash quarto add quarto-ext/fancy-text --embed my-extension ``` -------------------------------- ### Install and Snapshot R Dependencies Source: https://github.com/quarto-dev/quarto-cli/blob/main/llm-docs/testing-patterns.md Installs project dependencies and creates a snapshot for reproducible R environments. This is a prerequisite for running tests. ```bash cd tests Rscript -e "renv::install()" Rscript -e "renv::snapshot()" ``` -------------------------------- ### Install Quarto Extension Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/create/extensions/brand/README.ejs.md Use this command to add a Quarto extension from a GitHub repository. The extension will be installed in the `_extensions` directory. ```bash quarto add /<%= filesafename %> ``` -------------------------------- ### Install Anaconda client and build tools Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Install the necessary packages for uploading to Anaconda: `anaconda-client`, `conda-build`, and `conda-verify`. These are required for creating and verifying conda packages. ```bash pip install anaconda-client conda-build conda-verify ``` -------------------------------- ### Install Quarto using nbdev Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb nbdev provides a command to install the latest version of Quarto. Your password may be requested. ```shell nbdev_install_quarto ``` -------------------------------- ### Install Quarto CLI from Test PyPI Source: https://github.com/quarto-dev/quarto-cli/blob/main/dev-docs/checklist-make-a-new-quarto-release.md Use this command to install the Quarto CLI from the test PyPI repository. You may need to run this command twice if the package is not found initially due to cache invalidation. ```bash python3 -m pip install --index-url https://test.pypi.org/ --extra-index-url https://pypi.org/ quarto-cli ``` -------------------------------- ### Theorion Environments: Example of Ring Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Provides an `example` of an algebraic structure, specifically the ring of integers, to illustrate the concept defined earlier and its properties. ```typst #example[ Consider @def:ring. The ring of integers $ZZ$ is not a field, as no elements except $plus.minus 1$ have multiplicative inverses. ] ``` -------------------------------- ### Install Quarto CLI Development Version Source: https://github.com/quarto-dev/quarto-cli/blob/main/README.md Clone the repository and run the configure script for your platform to install the development version of Quarto CLI. This script adds a symlink to your path. ```bash git clone https://github.com/quarto-dev/quarto-cli cd quarto-cli ./configure.sh ``` -------------------------------- ### Initialize Python Environment Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/05/14/issue-9056.ipynb Initializes a Python variable. This is a basic setup for subsequent code execution. ```python # import plotly.express as px # df = px.data.gapminder() foo = 1 ``` -------------------------------- ### Install typst-octique Package Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/octique/0.1.1/README.md Import the octique package to begin using its features. Ensure you are using version 0.1.0 or later. ```typst #import "@preview/octique:0.1.0": * ``` -------------------------------- ### Bar Chart for Ranges Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/books/visualization-curriculum/altair_marks_encoding.ipynb The bar mark can specify starting and ending points to convey ranges. This example shows the range of life expectancies within clusters using min and max aggregation. ```python alt.Chart(data2000).mark_bar().encode( alt.X('min(life_expect):Q'), alt.X2('max(life_expect):Q'), alt.Y('cluster:N') ) ``` -------------------------------- ### Initialize Orange Book Template with CLI Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst/packages/preview/orange-book/0.7.1/README.md Use this command to create a new project initialized with the orange-book template. ```bash typst init @preview/orange-book ``` -------------------------------- ### Generate Line Plot with Matplotlib Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/jats/computations.ipynb This Python snippet uses Matplotlib and NumPy to generate a line plot with a shaded region. It includes setup for data generation and plot customization. Ensure Matplotlib and NumPy are installed. ```python #| label: fig-line #| fig-cap: A display of a line and region moving up and to the right. import matplotlib.pyplot as plt import numpy as np # make data np.random.seed(1) x = np.linspace(0, 8, 16) y1 = 3 + 4*x/8 + np.random.uniform(0.0, 0.5, len(x)) y2 = 1 + 2*x/8 + np.random.uniform(0.0, 0.5, len(x)) # plot fig, ax = plt.subplots() ax.fill_between(x, y1, y2, alpha=.5, linewidth=0) ax.plot(x, (y1 + y2)/2, linewidth=2) ax.set(xlim=(0, 8), xticks=np.arange(1, 8), ylim=(0, 8), yticks=np.arange(1, 8)) plt.show() ``` -------------------------------- ### Basic Theorion Environments: Proof Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Shows the usage of the `proof` environment to present the proof for a theorem. This example provides a proof by contradiction for the infinitude of primes. ```typst #proof[ By contradiction: Suppose $p_1, p_2, dots, p_n$ is a finite enumeration of all primes. Let $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list, it cannot be prime. Thus, some prime $p_j$ divides $P + 1$. Since $p_j$ also divides $P$, it must divide their difference $(P + 1) - P = 1$, a contradiction. ] ``` -------------------------------- ### Install TileDB-Py Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/04/02/9255.ipynb Install TileDB-Py using pip or conda. Ensure numpy and pandas are also installed. ```bash # Pip: $ pip install tiledb # Or Conda: $ conda install -c conda-forge tiledb-py ``` ```bash # Pip: $ pip install numpy pandas # Or Conda: $ conda install numpy pandas ``` -------------------------------- ### Reset TinyTeX Installation Source: https://github.com/quarto-dev/quarto-cli/blob/main/dev-docs/debugging-flaky-tests.md Perform a clean installation of TinyTeX by removing the existing installation directory and then reinstalling. This is critical for resolving environment pollution issues. ```bash rm -rf ~/.TinyTeX quarto install tinytex ``` -------------------------------- ### Build Test Extension Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/smoke/build-ts-extension/README.md Navigate to the test extension's directory and execute the build command. ```bash cd tests/smoke/build-ts-extension quarto dev-call build-ts-extension ``` -------------------------------- ### Install nbdev with Conda Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb For Mac and Linux users, install nbdev using this conda command. ```shell conda install -c fastai nbdev ``` -------------------------------- ### Configure Quarto CLI from Source (Windows) Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Run the configure script on Windows to set up the development environment for the Quarto CLI, downloading necessary binary dependencies. ```bash # Configure on Windows configure.cmd ``` -------------------------------- ### Install nbdev with Pip Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb For Mac, Linux, and Windows users, install nbdev using this pip command. ```shell pip install nbdev ``` -------------------------------- ### Install pyarrow for Optimization Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2024/04/02/9255.ipynb Install pyarrow to enable zero-copy integration with pandas dataframes for improved performance. ```bash # Pip: $ pip install pyarrow # Or Conda: $ conda install -c conda-forge pyarrow ``` -------------------------------- ### Running Async Cycle Analysis Tool Source: https://github.com/quarto-dev/quarto-cli/blob/main/package/src/common/import-report/report-bundle-async-cycles.md These bash commands show how to run the async cycle analysis tool. You can use the default entry point or specify a custom one for analyzing different parts of your application. ```bash # Run the tool (uses default entry point: src/quarto.ts) quarto run --dev package/src/common/import-report/report-bundle-async-cycles.ts ``` ```bash # Or specify a different entry point quarto run --dev package/src/common/import-report/report-bundle-async-cycles.ts src/your-entry.ts ``` -------------------------------- ### Check Quarto CLI Version Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Verify the installed version of the Quarto CLI after building from source or installing. ```bash # Check the version quarto --version # 1.10.3 ``` -------------------------------- ### Publish to Hosting Providers Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Renders and deploys a document or project to supported providers. Accounts are configured interactively on first use. Supports CI/CD via token-based authentication with `--no-prompt`. ```bash quarto publish quarto-pub ``` ```bash quarto publish gh-pages ``` ```bash quarto publish netlify ``` ```bash quarto publish connect ``` ```bash quarto publish posit-connect-cloud ``` ```bash quarto publish confluence ``` ```bash quarto publish huggingface ``` ```bash quarto publish quarto-pub document.qmd ``` ```bash quarto publish gh-pages ./my-site ``` ```bash quarto publish gh-pages --no-render ``` ```bash quarto publish connect --no-prompt --token $CONNECT_API_KEY --server https://connect.example.com ``` ```bash quarto publish connect --id abc123 --no-prompt ``` ```bash quarto publish accounts ``` -------------------------------- ### Install Jupyter Notebook with Pip Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Use this command to install Jupyter Notebook if you are using the pip package manager. ```shell pip install notebook ``` -------------------------------- ### Configure Quarto CLI from Source (Linux/macOS) Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Clone the Quarto CLI repository and run the configure script to set up a development environment, downloading necessary binary dependencies. ```bash # Clone and configure (Linux/macOS) git clone https://github.com/quarto-dev/quarto-cli cd quarto-cli ./configure.sh # Adds quarto symlink to PATH; binary also at package/dist/bin/quarto ``` -------------------------------- ### Install Jupyter Notebook with Conda Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Use this command to install Jupyter Notebook if you are using the conda package manager. ```shell conda install notebook ``` -------------------------------- ### Install Altair and Vega Datasets with Conda Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/books/visualization-curriculum/altair_debugging.ipynb Use this command in your terminal to install the necessary packages if you are using Conda. ```bash conda install -c conda-forge altair vega_datasets ``` -------------------------------- ### Basic Theorion Environments: Theorem Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Demonstrates the standard `theorem` environment for stating theorems. This example defines Euclid's Theorem about the infinitude of prime numbers. ```typst #theorem(title: "Euclid's Theorem")[ There are infinitely many prime numbers. ] ``` -------------------------------- ### Configure Reveal.js Chalkboard Plugin Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/revealjs/plugins/chalkboard/README.md Example of initializing Reveal.js with the chalkboard plugin and its various configuration options. This includes settings for drawing tools, storage, appearance, and custom elements. ```javascript Reveal.initialize({ // ... chalkboard: { boardmarkerWidth: 3, chalkWidth: 7, chalkEffect: 1.0, storage: null, src: null, readOnly: undefined, transition: 800, theme: "chalkboard", background: [ 'rgba(127,127,127,.1)' , path + 'img/blackboard.png' ], grid: { color: 'rgb(50,50,10,0.5)', distance: 80, width: 2}, eraser: { src: path + 'img/sponge.png', radius: 20}, boardmarkers : [ { color: 'rgba(100,100,100,1)', cursor: 'url(' + path + 'img/boardmarker-black.png), auto'}, { color: 'rgba(30,144,255, 1)', cursor: 'url(' + path + 'img/boardmarker-blue.png), auto'}, { color: 'rgba(220,20,60,1)', cursor: 'url(' + path + 'img/boardmarker-red.png), auto'}, { color: 'rgba(50,205,50,1)', cursor: 'url(' + path + 'img/boardmarker-green.png), auto'}, { color: 'rgba(255,140,0,1)', cursor: 'url(' + path + 'img/boardmarker-orange.png), auto'}, { color: 'rgba(150,0,20150,1)', cursor: 'url(' + path + 'img/boardmarker-purple.png), auto'}, { color: 'rgba(255,220,0,1)', cursor: 'url(' + path + 'img/boardmarker-yellow.png), auto'} ], chalks: [ { color: 'rgba(255,255,255,0.5)', cursor: 'url(' + path + 'img/chalk-white.png), auto'}, { color: 'rgba(96, 154, 244, 0.5)', cursor: 'url(' + path + 'img/chalk-blue.png), auto'}, { color: 'rgba(237, 20, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-red.png), auto'}, { color: 'rgba(20, 237, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-green.png), auto'}, { color: 'rgba(220, 133, 41, 0.5)', cursor: 'url(' + path + 'img/chalk-orange.png), auto'}, { color: 'rgba(220,0,220,0.5)', cursor: 'url(' + path + 'img/chalk-purple.png), auto'}, { color: 'rgba(255,220,0,0.5)', cursor: 'url(' + path + 'img/chalk-yellow.png), auto'} ] }, // ... }); ``` -------------------------------- ### Initialize Build Configuration for TypeScript Extension Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/create/extensions/engine/README.ejs.md Set up the initial build configuration, including the import map, for a TypeScript Quarto extension. Run this command once before building. ```bash # First time setup - creates deno.json with import map configuration quarto dev-call build-ts-extension --init-config ``` -------------------------------- ### Initialize nbdev Project Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Use the `nbdev_new` command to initialize your nbdev repository. This command infers project details from git and GitHub and sets up essential files for package publishing and documentation. ```bash nbdev_new ``` -------------------------------- ### Install MyST CLI Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/manuscript/ipynb-full/README.md Install the MyST CLI to build PDF/JATS output from your source data. This command is run in your terminal. ```bash npm install myst-cli ``` -------------------------------- ### Configure console scripts with setuptools Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Define console scripts for your project using the `setuptools` format. This allows for the automatic creation of cross-platform console scripts. Separate multiple script definitions with whitespace. ```ini console_scripts = nbdev_export=nbdev.cli:nbdev_export ``` -------------------------------- ### Custom Theorem Environment Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/typst/packages/preview/theorion/0.4.1/README.md Demonstrates how to create a custom theorem environment using `make-frame`. This allows for custom naming, numbering inheritance, and specific rendering logic for theorems. ```typst #let (theorem-counter, theorem-box, theorem, show-theorem) = make-frame( "theorem", "Theorem", // supplement, string or dictionary like `(en: "Theorem")`, or `theorion-i18n-map.at("theorem")` for built-in i18n support counter: theorem-counter, // inherit the counter, `none` by default inherited-levels: 2, // useful when you need a new counter inherited-from: heading, // heading or another counter render: (prefix: none, title: "", full-title: auto, body) => [#strong[#full-title.]#sym.space#emph(body)], ) #show: show-theorem ``` -------------------------------- ### Install ValidMind Client Library Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/jupyter/title/simple-title.ipynb Install the ValidMind client library for Python using pip. This is a prerequisite for using the ValidMind Developer Framework. ```python %pip install -q validmind ``` -------------------------------- ### Publish Website or Document Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/publish/README.md Execute this command from within your project directory to publish. ```bash quarto publish ``` -------------------------------- ### Prepare and Bundle Code Source: https://github.com/quarto-dev/quarto-cli/blob/main/tools/bundle-bug-finder/README.md Copy the generated bundled file and concatenate it with the prelude script to create a single bundle file for analysis. ```bash cat _prelude.js quarto.js > bundle.js ``` -------------------------------- ### Example Usage of HelloSayer Class Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Instantiate the HelloSayer class and call its `say` method to demonstrate its functionality. This example shows how to create an object and invoke its method. ```python o = HelloSayer("Alexis") o.say() ``` -------------------------------- ### Example Timed Test Output Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/README.md This is an example of the output generated by timed tests, showing the execution time for individual test files and specific 'smoke-all' documents. ```text ./smoke/directives/include-fixups.test.ts 0.02 real 0.02 user 0.00 sys ./smoke/filters/filters.test.ts 3.26 real 3.79 user 0.47 sys ./smoke/filters/editor-support.test.ts 0.72 real 0.58 user 0.14 sys ./smoke/engine/include-engine-detection.test.ts 3.61 real 3.11 user 0.24 sys ./smoke/smoke-all.test.ts -- docs/smoke-all/2022/12/12/code-annotation.qmd 4.81 real 4.32 user 0.33 sys ./smoke/smoke-all.test.ts -- docs/smoke-all/2022/12/9/jats/computations.out.ipynb 2.22 real 2.83 user 0.27 sys ``` -------------------------------- ### Render Notebook Article with Quarto CLI Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/manuscript/ipynb-single/README.md Use the Quarto CLI to render your notebook article. Ensure Quarto is installed before running this command. ```bash quarto render article.ipynb ``` -------------------------------- ### Install Vega for Offline Jupyter Notebooks Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/books/visualization-curriculum/altair_debugging.ipynb Install the 'vega' package, a required dependency for running Altair visualizations offline within a Jupyter Notebook environment. ```bash pip install vega ``` -------------------------------- ### Testing and Verification Steps Source: https://github.com/quarto-dev/quarto-cli/blob/main/package/src/common/import-report/report-bundle-async-cycles.md This sequence of bash commands outlines the steps to test and verify fixes for async module cycles. It includes type checking, building the project, and re-running the analysis tool to confirm resolution. ```bash # 1. Typecheck package/dist/bin/quarto ``` ```bash # 2. Build cd package && ./scripts/common/prepare-dist.sh ``` ```bash # 3. Re-run analysis to verify quarto run --dev package/src/common/import-report/report-bundle-async-cycles.ts ``` -------------------------------- ### Remove Quarto Extensions and Tools Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Removes installed extensions from the current project or uninstalls globally installed tools. Use `--no-prompt` for non-interactive removal. ```bash quarto remove quarto-ext/lightbox ``` ```bash quarto remove lightbox ``` ```bash quarto remove extension ``` ```bash quarto remove tool tinytex ``` ```bash quarto remove tool chrome-headless-shell ``` ```bash quarto remove tool ``` ```bash quarto remove quarto-ext/lightbox --no-prompt ``` -------------------------------- ### Publish to Posit Connect via Command Line Source: https://github.com/quarto-dev/quarto-cli/blob/main/src/publish/README.md Provide server, token, and ID directly on the command line for Posit Connect publishing. ```bash quarto publish connect \ --server https://connect.example.com/ \ --token 7C0947A852D8 \ --id DDA36416-F950-4647-815C-01A24233E294 ``` -------------------------------- ### Install @quarto/types Package Source: https://github.com/quarto-dev/quarto-cli/blob/main/packages/quarto-types/README.md Install the @quarto/types package using npm. Note that this package is not yet published and is intended for internal use or direct build copying. ```bash npm install @quarto/types ``` -------------------------------- ### Preview Documentation Template Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/jupyter/title/simple-title.ipynb Use the `vm.preview_template()` function to view the structure of your documentation project. This helps in understanding the predefined sections and the overall outline. ```python vm.preview_template() ``` -------------------------------- ### Install Package in Editable Mode Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Install your Python package in editable mode, allowing immediate use of changes during development. Includes development requirements for documentation and testing. ```shell pip install -e '.[dev]' ``` -------------------------------- ### Install nbdev Hooks Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb Install nbdev's git hooks to manage Jupyter notebooks. This helps fix merge conflicts and automatically cleans notebook metadata on save. ```shell nbdev_install_hooks ``` -------------------------------- ### Configure PyPI upload credentials Source: https://github.com/quarto-dev/quarto-cli/blob/main/tests/docs/smoke-all/2023/02/09/tutorial.ipynb To upload your project to PyPI, create a `~/.pypirc` file with your PyPI username and password under the `[pypi]` section. Ensure you have `twine` installed. ```ini [pypi] username = your_pypi_username password = your_pypi_password ``` -------------------------------- ### Project Configuration (_quarto.yml) Source: https://context7.com/quarto-dev/quarto-cli/llms.txt Define a multi-document website project, including output directory, navigation, sidebar, and HTML format options. Options propagate to all documents. ```yaml # Website project project: type: website output-dir: _site resources: - "*.csv" website: title: "My Documentation Site" navbar: left: - href: index.qmd text: Home - href: guide/index.qmd text: Guide - href: api/index.qmd text: API Reference sidebar: style: "docked" contents: - guide/index.qmd - guide/installation.qmd - guide/usage.qmd page-footer: "© 2024 My Project" format: html: theme: [cosmo, custom.scss] toc: true code-copy: true code-overflow: wrap execute: freeze: auto echo: true # Book project example: # project: # type: book # book: # title: "My Book" # author: "Author Name" # chapters: # - index.qmd # - intro.qmd # - chapters/part1.qmd ``` -------------------------------- ### TinyTeX Package Management Source: https://github.com/quarto-dev/quarto-cli/blob/main/dev-docs/debugging-flaky-tests.md Manage TinyTeX installations by listing installed packages, checking package information, and finding file locations. Useful for debugging TeX-related build issues. ```bash tlmgr list --only-installed ``` ```bash tlmgr info ``` ```bash kpsewhich elsarticle.cls ``` ```bash ls -la $(kpsewhich -var-value TEXMFSYSVAR)/web2c/luatex/ ```