Skip to content

Commit 87691b9

Browse files
cwickhamcscheidjuliasilge
authored
Add Positron where appropriate (#1719)
* Enable include-dark.lua everywhere * Add Positron to websites quick start * Add Positron to blog quick start * Add Positron to book quick start * Add Positron sections to Guide > Computing * Add Positron to virtual environments * Generalize LUA dev to Positron * Mention Positron where appropriate * Update docs/projects/profiles.qmd Co-authored-by: Julia Silge <[email protected]> * Fix wrong link * Changes based on review * Include both links for extension * Link to both registries for LUA extension too --------- Co-authored-by: Carlos Scheidegger <[email protected]> Co-authored-by: Julia Silge <[email protected]>
1 parent eac0f7f commit 87691b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+147
-50
lines changed

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ format:
691691
filters:
692692
- filters/tools-tabset.lua
693693
- filters/color-box.lua
694+
- at: post-quarto
695+
path: filters/include-dark.lua
694696

695697
freeze: true
696698

docs/authoring/diagrams.qmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ There are a variety of tools available to improve your productivity authoring di
9494

9595
3) [RStudio](https://www.rstudio.com/products/rstudio/download/) includes support for editing and previewing `.mmd` and `.dot` files (with help from the [DiagrammeR](https://rich-iannone.github.io/DiagrammeR/) package).
9696

97-
4) The Quarto [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=quarto.quarto) supports live preview of diagrams embedded in `.qmd` files and in `.mmd` and `.dot` files:
97+
4) The Quarto Extension for VS Code and Positron (available on both [OpenVSX](https://open-vsx.org/extension/quarto/quarto) and [Microsoft's marketplace](https://marketplace.visualstudio.com/items?itemName=quarto.quarto)) supports live preview of diagrams embedded in `.qmd` files and in `.mmd` and `.dot` files:
9898

9999
![](images/vscode-graphviz.gif){.border fig-alt="A Quarto document being edited in Visual Studio Code, with a live preview of the currenly edited diagram shown in a pane to the right"}
100100

101-
Note that you should be sure to have installed the [very latest](https://marketplace.visualstudio.com/items?itemName=quarto.quarto) version of the Quarto VS Code extension to try this out.
102-
103101
## Cross-References
104102

105103
Diagrams can be treated as figures the same way that images and plot output are. For example, if we added the following figure options to the diagram above:

docs/books/book-basics.qmd

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@ Follow the Quick Start for your tool of choice to get a simple book up and runni
3434

3535
::: {.panel-tabset group="tools-tabset"}
3636

37+
### Positron
38+
39+
To create a new book project within Positron, execute the **Quarto: Create Project** command from the command-palette:
40+
41+
![](/docs/websites/images/positron-create-project-command.png){.include-dark .border}
42+
43+
Then, select **Book Project**:
44+
45+
![](images/positron-create-project-book.png){.include-dark .border}
46+
47+
You'll be prompted to select a parent directory to create the project within. Then, you'll be asked to name the directory for your book project:
48+
49+
![](/docs/websites/images/positron-create-project-directory.png){.include-dark .border}
50+
51+
The new book project will be created and opened within Positron. Click the **Preview** button (![](/docs/tools/images/vscode-preview-icon.svg){.light-content fig-alt="Preview icon"}![](/docs/tools/images/vscode-preview-icon-white.svg){.dark-content fig-alt="Preview icon"}) to preview the book:
52+
53+
![](images/positron-create-project-render-book.png){.include-dark .border}
54+
55+
The preview will show to the right of the source file. As you re-render `index.qmd` or render other files like `intro.qmd`, the preview is automatically updated.
56+
3757
### VS Code
3858

3959
To create a new book project within VS Code, execute the **Quarto: Create Project** command from the command-palette:
@@ -48,7 +68,7 @@ You'll be prompted to select a parent directory to create the project within. Th
4868

4969
![](/docs/websites/images/vscode-create-project-directory.png){.border}
5070

51-
The new book project will be created and opened within VS Code. Click the **Preview** button (![](/docs/tools/images/vscode-preview-icon.svg){fig-alt="Preview icon"}) to preview the book:
71+
The new book project will be created and opened within VS Code. Click the **Preview** button (![](/docs/tools/images/vscode-preview-icon.svg){.light-content fig-alt="Preview icon"}![](/docs/tools/images/vscode-preview-icon-white.svg){.dark-content fig-alt="Preview icon"}) to preview the book:
5272

5373
![](/docs/websites/images/vscode-create-project-render-book.png)
5474

101 KB
Loading
101 KB
Loading
143 KB
Loading
148 KB
Loading

docs/computations/_jupyter-authoring-tools.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ quarto preview document.ipynb
1919

2020
In addition to including executable {{< meta jupyter-language >}} code chunks in a Quarto document, you can also embed cells from an external Jupyter Notebook (`.ipynb`). See [Embedding Jupyter Notebook Cells](/docs/authoring/notebook-embed.qmd) for more details.
2121

22+
## Positron
23+
24+
{{< include _positron.md >}}
25+
2226
## VS Code
2327

2428
The [Quarto Extension](https://marketplace.visualstudio.com/items?itemName=quarto.quarto) for VS Code provides a variety of tools for working with `.qmd` files in VS Code. The extension integrates directly with the {{< meta vscode-extension >}} to provide the following {{< meta jupyter-language >}}-specific capabilities:

docs/computations/_positron.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The [Quarto Extension](https://open-vsx.org/extension/quarto/quarto) is bundled with Positron, and provides a variety of tools for working with `.qmd` files. The extension integrates directly with {{< meta positron-extension>}} to provide code completion, cell execution and side-by-side preview of Quarto documents.
2+
3+
![]({{< meta positron-screenshot >}}){.include-dark .border fig-alt="Screen shot of qmd file open in Positron with source markdown shown in Editor pane and a rendered document shown in the Viewer Pane."}
4+
5+
The extension includes a **Quarto: Preview** command that can be accessed via the Command Palette, the keyboard shortcut {{< kbd mac=Command-Shift-K win=Control-Shift-K linux=Control-Shift-K >}}, or a **Preview** button (![](/docs/tools/images/vscode-preview-icon.svg){.light-content fig-alt="Preview icon"}![](/docs/tools/images/vscode-preview-icon-white.svg){.dark-content fig-alt="Preview icon"}) in the editor toolbar.
6+
After rendering, a preview is displayed in the Viewer pane within Positron.
7+
8+
You can read more about using Positron in [Tools: Positron](/docs/tools/positron/index.qmd).
9+
10+
::: {.content-visible unless-meta="is_r"}
11+
You can also use the Positron notebook editor to create `.ipynb` notebooks that you will render with Quarto. The [Jupyter Lab](#jupyter-lab) section discusses using notebooks with Quarto in the context of Jupyter Lab, but the same concepts apply to Positron.
12+
:::
599 KB
Loading

0 commit comments

Comments
 (0)