{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "nbsphinx": "hidden"
   },
   "source": [
    "This notebook is part of the `nbsphinx` documentation: https://nbsphinx.readthedocs.io/."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Choosing from Multiple Outputs\n",
    "\n",
    "By default, the last output of the selected cell is used as a thumbnail.\n",
    "If that's what you want, you can simply use the\n",
    "[nbsphinx-thumbnail](cell-tag.ipynb) cell tag.\n",
    "\n",
    "If you want to specify one of multiple outputs,\n",
    "you can add a (zero-based) `\"output-index\"`\n",
    "to your `\"nbsphinx-thumbnail\"` cell metadata.\n",
    "\n",
    "The following cell has this metadata,\n",
    "selecting the third output to be used as thumbnail in\n",
    "[the gallery](gallery-with-nested-documents.ipynb).\n",
    "\n",
    "```json\n",
    "{\n",
    "    \"nbsphinx-thumbnail\": {\n",
    "        \"output-index\": 2\n",
    "    }\n",
    "}\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "nbsphinx-thumbnail": {
     "output-index": 2
    }
   },
   "outputs": [],
   "source": [
    "from IPython.display import Image\n",
    "\n",
    "display(Image(url='https://jupyter.org/assets/homepage/main-logo.svg'))\n",
    "print('Hello!')\n",
    "display(Image(filename='../images/notebook_icon.png'))\n",
    "display(Image(url='https://www.python.org/static/img/python-logo-large.png', embed=True))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
