<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "nbsphinx": "hidden"
   },
   "source": [
    "This notebook is part of the `nbsphinx` documentation: http://nbsphinx.readthedocs.io/."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prolog and Epilog\n",
    "\n",
    "When including notebooks in your Sphinx documentation, you can choose to add some generic content before and after each notebook.\n",
    "This can be done with the configuration values `nbsphinx_prolog` and `nbsphinx_epilog` in the file `conf.py`.\n",
    "\n",
    "The prolog and epilog strings can hold arbitrary [reST](http://sphinx-doc.org/rest.html) markup.\n",
    "Particularly, the [only](http://www.sphinx-doc.org/markup/misc.html#directive-only) and [raw](http://docutils.sourceforge.net/docs/ref/rst/directives.html#raw-data-pass-through) directives can be used to have different content for HTML and LaTeX output.\n",
    "\n",
    "Those strings are also processed by the [Jinja2](http://jinja.pocoo.org/) templating engine.\n",
    "This means you can run Python-like code within those strings.\n",
    "You have access to the current [Sphinx build environment](http://www.sphinx-doc.org/extdev/envapi.html) via the variable `env`.\n",
    "Most notably, you can get the file name of the current notebook with\n",
    "\n",
    "    {{ env.doc2path(env.docname, base=None) }}\n",
    "\n",
    "Have a look at the [Jinja2 template documentation](http://jinja.pocoo.org/docs/latest/templates/) for more information.\n",
    "\n",
    "<div class=\"alert alert-warning\">\n",
    "\n",
    "**Warning:**\n",
    "\n",
    "If you use invalid syntax, you might get an error like this:\n",
    "\n",
    "    jinja2.exceptions.TemplateSyntaxError: expected token ':', got '}'\n",
    "\n",
    "This is especially prone to happen when using raw LaTeX, with its abundance of braces.\n",<commit_msg>DOC: change link to docutil's "raw" directive<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "nbsphinx": "hidden"
   },
   "source": [
    "This notebook is part of the `nbsphinx` documentation: http://nbsphinx.readthedocs.io/."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prolog and Epilog\n",
    "\n",
    "When including notebooks in your Sphinx documentation, you can choose to add some generic content before and after each notebook.\n",
    "This can be done with the configuration values `nbsphinx_prolog` and `nbsphinx_epilog` in the file `conf.py`.\n",
    "\n",
    "The prolog and epilog strings can hold arbitrary [reST](http://sphinx-doc.org/rest.html) markup.\n",
    "Particularly, the [only](http://www.sphinx-doc.org/markup/misc.html#directive-only) and [raw](https://docutils.readthedocs.io/en/sphinx-docs/ref/rst/directives.html#raw-data-pass-through) directives can be used to have different content for HTML and LaTeX output.\n",
    "\n",
    "Those strings are also processed by the [Jinja2](http://jinja.pocoo.org/) templating engine.\n",
    "This means you can run Python-like code within those strings.\n",
    "You have access to the current [Sphinx build environment](http://www.sphinx-doc.org/extdev/envapi.html) via the variable `env`.\n",
    "Most notably, you can get the file name of the current notebook with\n",
    "\n",
    "    {{ env.doc2path(env.docname, base=None) }}\n",
    "\n",
    "Have a look at the [Jinja2 template documentation](http://jinja.pocoo.org/docs/latest/templates/) for more information.\n",
    "\n",
    "<div class=\"alert alert-warning\">\n",
    "\n",
    "**Warning:**\n",
    "\n",
    "If you use invalid syntax, you might get an error like this:\n",
    "\n",
    "    jinja2.exceptions.TemplateSyntaxError: expected token ':', got '}'\n",
    "\n",
    "This is especially prone to happen when using raw LaTeX, with its abundance of braces.\n",
{'fraction_non_alphanumeric': 0.1565040650406504, 'fraction_numerical': 0.0020325203252032522, 'mean_word_length': 3.2933478735005455, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2331619', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1301, 'n_words': 391}