Editor Basics

In Nextjournal, everything is about notebooks and the Nextjournal editor is the main tool for creating and editing them.

A Nextjournal notebook is composed of nodes of different kinds — each of them providing different functionality. The following video shows how we can combine these nodes to make a notebook that is plotting some uploaded data:

Adding and editing content

Nextjournal’s user interface should be fairly familiar if you already used to other notebook interfaces like Mathematica or Jupyter but there might be some gotchas that work differently here.

Adding Nodes

The + button located at the bottom of each node brings up a menu with a list of all node kinds that you can insert. Here we see how it’s used to insert a new section:

Pressing Enter inside an empty paragraph will also bring up the same menu, allowing you to turn any empty paragraph into another node kind. This is especially handy if you prefer using the keyboard over the mouse.

Editing nodes

Similarily to the + button, the ··· button at the top of each node brings up a list of actions that you can perform on the node. The most basic of them is Delete but there are many different actions depending on the node’s kind, like for replacing a file:

Formatting text

In Nextjournal, most text, apart from code, is rich text. This means, whenever you select text (in a paragraph, list, section heading, etc.) a selection toolbox will pop up allowing you to add text styles (bold, italic, etc.) or to add inline nodes (like LaTeX formulas):

There is also a list of handy keyboard shortcuts and text expansions that you can use to perform most of the above actions.

Rearranging content

Text editing in Nextjournal is free-form. That means you can freely cut, copy and paste like in typical word processing environments. Selections are not text-only but can span over any type of node:

In addition to that you can also rearrange content via drag and drop by dragging the ••• button next to a node:

If you’re dragging a heading, you can press the Option/Alt key to move all its content along with it.

There is also a special outline mode that might come in handy when you're rearranging a lot of content in large documents. You can find it in the ••• menu in the upper right corner under Outline:

Changing node types

You can quickly turn any rich-text node (headings, paragraphs, formulas, lists) into another node type by opening a node’s ••• menu and selecting Turn into.

Working with headings

You can choose different heading levels from the insert menu when inserting a new node. A quicker way to do that is by using the # text expansion in an empty paragraph. Simply type # followed by a Space to quickly insert a level 1 heading, ## for a level 2 heading, and so on. It is also possible to make a level 1 heading collapsible via the ··· button of the node.

Numbered headings

You can also enable numbered headings via ••• menu in the upper right corner of the editor. The numbers are inferred from the heading level.

Working with lists

  • Numbered and Bullet lists

    • can be nested

      • arbitrarily deep.

Simply select Indent or Outdent from a list items ••• menu or press Tab to indent or Shift+Tab to outdent.

Available nodes

For writing

  • Paragraphs

  • Headings

  • Bullet lists, Numbered lists & Todo lists

  • Blockquotes

  • Subtitle

  • Authors field

For programming

  • Code cells: for executing Python, Julia, Bash, R and Clojure code

  • Code listings: for static code samples, supporting many syntaxes

  • Files: for providing data sets to work with

  • GitHub repositories: for accessing GitHub repos from your code

  • Bucket access: for accessing S3 and Google Cloud buckets

  • Docker environments: for importing existing Docker images as runtime environment

Media

  • Images

  • Video and Twitter embeds

  • block LaTeX formulas

  • inline LaTeX formulas (to be used inside paragraphs, lists, etc.)

Text Formattings

  • Bold

  • Italic

  • Strike-through

  • Code

  • Link