Skip to content

Commit

Permalink
Update explanation regarding Raw cells (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner committed Feb 6, 2022
1 parent 64cd5a4 commit d7241b1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
Binary file removed doc/images/raw_cells.png
Binary file not shown.
Binary file added doc/images/raw_cells_jupyter_notebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/raw_cells_jupyterlab.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 36 additions & 7 deletions doc/raw-cells.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,46 @@
"source": [
"# Raw Cells\n",
"\n",
"The \"Raw NBConvert\" cell type can be used to render different code formats into HTML or LaTeX by Sphinx. This information is stored in the notebook metadata and converted appropriately.\n",
"Any Jupyter Notebook consists of cells of three different types:\n",
"[Code cells](./code-cells.ipynb),\n",
"[Markdown cells](./markdown-cells.ipynb)\n",
", and/or Raw cells.\n",
"While most Jupyter Notebook users are very familiar with Code cells and Markdown cells in Jupyter Notebooks, Raw cells are less frequently used.\n",
"For Jupyter Notebook, they are introduced\n",
"[here](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html?highlight=raw#raw-cells)\n",
"and for JupyterLab\n",
"[here](https://jupyterlab.readthedocs.io/en/stable/extension/notebook.html?highlight=raw#model).\n",
"The Raw cells are also sometimes referred to as Raw NBConvert cells in the context of\n",
"[nbconvert](https://nbconvert.readthedocs.io/en/latest/architecture.html?highlight=raw#a-detailed-pipeline-exploration).\n",
"The Raw cell type can be used to render different code formats into HTML or LaTeX by Sphinx.\n",
"This information is stored in the notebook metadata and converted appropriately.\n",
"\n",
"## Usage\n",
"\n",
"To select a desired format from within Jupyter, select the cell containing your special code and choose options from the following dropdown menus: \n",
"Raw cells are created differently depending on the user interface.\n",
"\n",
"1. Select \"Raw NBConvert\"\n",
"2. Switch the Cell Toolbar to \"Raw Cell Format\"\n",
"3. Chose the appropriate \"Raw NBConvert Format\" within the cell\n",
"### Jupyter Notebook\n",
"\n",
"![Steps for converting cells to Raw formats in Jupyter](images/raw_cells.png)\n",
"To select a desired format from within Jupyter Notebook, select the cell containing your special code and choose options from the following dropdown menus:\n",
"\n",
"1. Select \"Raw NBConvert\" in the Menu Toolbar (just below the two menus \"Widgets\" and \"Help\").\n",
"2. Click on the \"Raw NBConvert Format\" dropdown menu within the cell and select \"reST\".\n",
"\n",
"![Steps for converting cells to Raw formats in Jupyter Notebook](images/raw_cells_jupyter_notebook.png)\n",
"<!-- this comment makes pandoc create an in-line image -->\n",
"\n",
"### JupyterLab\n",
"\n",
"To select a desired format from within JupyterLab, first activate the right sidebar by clicking on View in the Menu Toolbar.\n",
"Then you ensure that in front of Show Right Sidebar there is a tick.\n",
"Once the Right Sidebar is shown, you are ready to go.\n",
"\n",
"Now you select the cell containing your special code and choose options from the following dropdown menus:\n",
"\n",
"1. Select \"Raw\" in the Notebook Toolbar (just next to the symbols that run cells or reload the kernel).\n",
"2. Click on \"Raw NBConvert Format\" in the Right Sidebar and select \"reStructured Text\".\n",
"\n",
"![Steps for converting cells to Raw formats in JupyterLab](images/raw_cells_jupyterlab.png)\n",
"<!-- this comment makes pandoc create an in-line image -->"
]
},
Expand Down Expand Up @@ -176,5 +205,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}

0 comments on commit d7241b1

Please sign in to comment.