{
 "metadata":{},
 "nbformat":4,
 "nbformat_minor":4,
 "cells":[
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "<!-- jupyter-book 04_06_testdoc.ipynb -->\n",
    "# Exercise: Determine some Distance\n",
    "\n",
    "<div id=\"exer:dist\"></div>\n",
    "\n",
    "Intro to this exercise. Questions are in subexercises below.\n",
    "\n",
    "!bsubex\n",
    "Subexercises are numbered a), b), etc.\n",
    "\n",
    "file=subexer_a.pdf\n",
    "\n",
    "!bans\n",
    "Short answer to subexercise a).\n",
    "With math in answer: $a=b$.\n",
    "!eans\n",
    "\n",
    "**Hint.**\n",
    "\n",
    "First hint to subexercise a).\n",
    "With math $a=b$ in hint:"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "$$\n",
    "a=b.\n",
    "$$"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "And with code (in plain verbatim) returning $x+1$ in hint:"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "        def func(x):\n",
    "            return x + 1  # with code in hint\n"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "**Hint.**\n",
    "\n",
    "Second hint to subexercise a).\n",
    "\n",
    "Test list in hint:\n",
    "\n",
    "1. item1\n",
    "\n",
    "2. item2\n",
    "\n",
    "\n",
    "!esubex\n",
    "\n",
    "!bsubex\n",
    "Here goes the text for subexercise b).\n",
    "\n",
    "file=subexer_b.pdf\n",
    "\n",
    "Some math $\\cos^2 x + \\sin^2 x = 1$ written one a single line:"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "$$\n",
    "\\cos^2 x + \\sin^2 x = 1 \\thinspace .\n",
    "$$"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "**Hint.**\n",
    "\n",
    "A hint for this subexercise.\n",
    "\n",
    "\n",
    "\n",
    "!bsol\n",
    "Here goes the solution of this subexercise.\n",
    "!esol\n",
    "!esubex\n",
    "\n",
    "**Remarks.**\n",
    "\n",
    "Some final closing remarks, e.g., summarizing the main findings\n",
    "and their implications in other problems can be made. These\n",
    "remarks will appear at the end of the typeset exercise.\n",
    "\n",
    "\n",
    "\n",
    "!bsol\n",
    "Here goes a full solution of the whole exercise.\n",
    "With some math $a=b$ in this solution:"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "$$\n",
    "\\hbox{math in solution: } a = b\n",
    "$$"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "And code `a=b` in this solution:"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "        a = b  # code in solution\n"
   ]
  },
  {
   "cell_type":"markdown",
   "metadata":{
    "editable":true
   },
   "source":[
    "End of solution is here.\n",
    "!esol\n",
    "\n",
    "<!-- No meaning in this weired test example: -->\n",
    "The text here belongs to the main (intro) part of the exercise. Need\n",
    "closing remarks to have text after subexercises.\n",
    "\n",
    "Test list in exercise:\n",
    "\n",
    "1. item1\n",
    "\n",
    "2. item2"
   ]
  }
 ]
}