Notebooks, Scripts, and QMD Files
How to create, organize, and work with notebooks, Python scripts, and Quarto Markdown files in InkRider.
New to notebooks? Start with Notebook Basics for a step-by-step introduction. This page is the full reference.
InkRider manages three distinct file types for running code. Each has a different purpose, a different default view, and a different way of being serialized to disk or embedded in a document.
File Types at a Glance
| Type | Extension | Default view | Toggle to raw? | Execution |
|---|---|---|---|---|
| Notebook | .ipynb |
Visual (cell grid) | No | Yes |
| Python script | .py |
Raw (plain code) | No | Yes |
| Quarto Markdown | .qmd |
Visual or raw | Yes | Yes |
| Text file | .txt |
Raw | No | No |
Notebooks (.ipynb)
Notebooks are the primary file type. They open in visual mode: an interactive cell grid where each cell has its own code editor, output area, and controls.
Creating a Notebook
Click the New button at the top of the add-in, then choose Notebook. InkRider auto-names it ("Notebook 1", "Notebook 2", …) and opens it immediately in a new tab.
You can also create a notebook by importing a file; see the Importing page.
Cell Types
Each notebook consists of one or more cells. Cells have a language that determines how they are executed or rendered:
| Language | Purpose |
|---|---|
python |
Python code, executed by the active runtime |
r |
R code, executed by an R kernel (JupyterLite runtime) |
javascript |
JavaScript, executed in the browser |
markdown |
Rendered as Markdown; supports {{ expression }} interpolation |
raw |
Passed through as-is; not executed or rendered |
html |
Rendered as HTML in the output area |
Cell Operations
Every cell supports:
- Run: execute the cell (Shift+Enter shortcut)
- Add cell above / below: insert a new cell
- Delete: remove the cell permanently
- Move up / move down: reorder within the notebook
- Toggle code visibility: hide the source for a clean view
- Toggle output visibility: hide outputs without deleting them
- Change language: switch between Python, Markdown, Raw, etc.
Persistence
Notebooks are stored in IndexedDB inside the browser. Your notebooks survive page refreshes and browser restarts as long as you use the same browser profile.
You can additionally embed a notebook inside the Word document itself (the .docx file), which makes it portable across machines. See Embedding Notebooks in DOCX for details.
Python Scripts (.py)
Python scripts are plain .py files stored in the virtual filesystem. They always open in raw mode: a single Monaco editor showing the full Python source.
Scripts are useful when you want to:
- maintain reusable helper code that notebooks import
- work with a file format that other tools (editors, CI, version control) already understand
- edit the code as a continuous module rather than as individual cells
Cell Markers
Within the raw editor you can still group lines into cells using the standard IPython convention:
# %% [optional label]
x = 1
y = 2
# %%
print(x + y)
Each # %% marker starts a new cell. You can run individual cells from the raw editor toolbar, or run the full script at once.
Creating a Script
Click New → Python script. InkRider auto-names it ("Python script 1", …) and places it in the /scripts/ folder of the virtual filesystem.
Quarto Markdown (.qmd)
Quarto Markdown is a text-based notebook format that can be opened and edited outside InkRider with standard tools. InkRider parses .qmd files into its internal notebook representation so you can edit them in the visual cell grid.
What QMD Supports
- Frontmatter: YAML block at the top of the file for document-level metadata
- Markdown cells: plain prose with optional InkRider metadata stored in invisible HTML comments
- Code cells: fenced blocks annotated with a language tag (
```python ```,```r ``, etc.) - Raw passthrough cells: blocks with
=prefixed language tags (```{=html}) that pass content through to Pandoc without execution
Visual / Raw Toggle
QMD files support switching between visual mode (cell grid) and raw mode (full QMD source) using the toggle in the notebook toolbar. Changes in one mode are reflected when you switch to the other.
The visual-to-raw conversion preserves cell boundaries. Consecutive markdown cells are separated by blank lines (three by default, configurable in Settings → Editor → QMD).
Importing a QMD File
Drop a .qmd file into the add-in. InkRider detects the format automatically and opens it in visual mode. You can also paste QMD content from the clipboard.
Folder Organization
The virtual filesystem keeps notebooks, scripts, and data files organized in a folder tree. Default folders:
| Path | Contents |
|---|---|
/notebooks/ |
.ipynb notebooks |
/scripts/ |
.py Python scripts |
/data/ |
Data files used by notebooks |
/assets/ |
Binary assets (images, etc.) |
You can create additional folders and move files around in the VFS Explorer.
Tabs and Multi-File Editing
InkRider shows each open file in a tab at the top of the panel. You can have multiple notebooks, scripts, and QMD files open at once. Tabs survive panel closes within the same browser session, and InkRider restores the previous set of open tabs on startup.
Auto-Save
InkRider saves automatically. Changes are written to IndexedDB within a few seconds of your last edit. You can also save manually with the Save button or Ctrl+S in any editor.