Curvenote is built to work hand in hand with Jupyter. The Jupyter Extension and Command Line Interface allows you to directly use outputs from Jupyter as figures within your Curvenote articles. The versioning in Curvenote also allows for you to easily update your image in the article, rather than having to copy-and-paste a new static image each time you update your code. Curvenote also supports interactive Jupyter outputs, learn more Interactive Outputs.
Video Demo 📺¶
Jupyter Outputs¶
When a notebook is added to Curvenote, the cells in Jupyter are considered blocks in Curvenote. Thus you can easily import an output cell into your Curvenote articles. Additionally all copies of the same block are linked, meaning each version of that block is available for use no matter where the block is displayed. This makes it easy to see and update plots in your articles when changes have been made on the Jupyter side. Learn more in Reusing Blocks.
Import an Output Cell¶
To bring an output cell into your Curvenote article:
- Copy the oxa link for the block/cell on either Curvenote or Jupyter.
- Open the Options menu in the upper right of the block/cell
- Select Copy Link.
- Open your article in Draft Mode.
- Select the location to add the output cell.
- To import the cell you can either
- Paste the link and add the cell below the selected block.
- Open the More Options menu, select Import Block, paste the link, and click INSERT BLOCK.
Outputs as Figures¶
Once you’ve imported your output cell into a Curvenote article, you can format the output as a figure. You can adjust the size and location, add a caption and numbering, and referencing the figure throughout your text. The formatting options are available in a toolbar that appears above or below the figure when you select the figure. Learn more about referencing figures Internal References.
Update Version¶
A new version of a block/cell is indicated by the icon next to the version number in the upper right of the block:
To preview and switch to another version of the cell:
- Click on the version number icon in the top-right of the block to expand the Block Details Panel.
- Click on a version for the preview to appear.
- When you have chosen a version click USE VERSION #.
- If you want to use the latest version, you can simply click USE LATEST.