Markdown Files#

Whether you write your book’s content in Jupyter Notebooks (.ipynb) or in regular markdown files (.md), you’ll write in the same flavor of markdown called MyST Markdown. This is a simple file to help you get started and show off some syntax.

What is MyST?#

MyST stands for “Markedly Structured Text”. It is a slight variation on a flavor of markdown called “CommonMark” markdown, with small syntax extensions to allow you to write roles and directives in the Sphinx ecosystem.

For more about MyST, see the MyST Markdown Overview.

Sample Roles and Directives#

Roles and directives are two of the most powerful tools in Jupyter Book. They are like functions, but written in a markup language. They both serve a similar purpose, but roles are written in one line, whereas directives span many lines. They both accept different kinds of inputs, and what they do with those inputs depends on the specific role or directive that is being called.

Here is a “note” directive:

Note

Here is a note

It will be rendered in a special box when you build your book.

Here is an inline directive to refer to a document: Notebooks with MyST Markdown.

Citations#

You can also cite references that are stored in a bibtex file. For example, the following syntax: {cite}`holdgraf_evidence_2014` will render like this: [].

Moreover, you can insert a bibliography into your page with this syntax: The {bibliography} directive must be used for all the {cite} roles to render properly. For example, if the references for your book are stored in references.bib, then the bibliography is inserted with:

[DJ97]

C.V. Deutsch and A.G. Journel. GSLIB Geostatistical Software Library and User’s Guide. Oxford University Press, New York, United States, 1997.

[Pyr21]

M.J. Pyrcz. Data Science Interactive Python: Educational Data Science Interactive Python Dashboards Repository. GeostatsGuy/DataScienceInteractivePython, 2021. doi:10.5281/zenodo.5564966.

[Pyr24a]

M.J. Pyrcz. Data Analytics and Geostatistics, GeostatsGuy Lectures. https://www.youtube.com/playlist?list=PLG19vXLQHvSB-D4XKYieEku9GQMQyAzjJ, August 2024.

[Pyr24b]

M.J. Pyrcz. GeostatsPy Demos: GeostatsPy Python Package for Spatial Data Analytics and Geostatistics Demonstration Workflows Repository. GeostatsGuy/GeostatsPyDemos, 2024. doi:10.5281/zenodo.12667035.

[Pyr24c]

M.J. Pyrcz. GeostatsPy: Open-source Geostatistics in Python. In J. Yarus, T. Coburn, M. Maucec, and M.J. Pyrcz, editors, Applied Spatiotemporal Data Analytics and Machine Learning. IntechOpen, London, United Kingdom, 2024. doi:10.5772/intechopen.114981.

[PD14]

M.J. Pyrcz and C.V. Deutsch. Geostatistical Reservoir Modeling. Oxford University Press, New York, United States, 2014.

[PHK+21]

M.J. Pyrcz, Jo. H., A. Kupenko, W. Liu, A.E. Gigliotti, T. Salomaki, and J. Santos. Geostatspy Python Package. GeostatsGuy/GeostatsPy, 2021.