--- tags: sphinx date: "2022-10-10" --- # Syntax guide for this website This blog post illustrates some awesome possibilities of the markdown syntax. ## Syntax Here is a brief overview of syntax that can be use to populate this website. Please check the [markdown guide](https://www.markdownguide.org/basic-syntax/) to learn the basic syntax. Additional features are listed below. ## Figures ``````restructuredtext ```{figure} _static/wall-e.jpg --- width: 60% alt: My figure text name: my_figure --- And here is my figure caption. ``` `````` ```{figure} _static/wall-e.jpg --- width: 60% alt: My figure alternative text name: my-figure --- And here is my figure caption. ``` You can use the `:name:` variable to link to figure: ``````restructuredtext {ref}`my-figure` `````` link to the figure {ref}`my-figure` ## Mathematics ```{math} :label: eq-label z=\sqrt{x^2+y^2} ``` You can use the `label` variable to link to equation: ``````restructuredtext {eq}`eq-label` `````` link to the equation {eq}`eq-label` ## Notes ```` ```{note} A note ``` ```` ```{note} A note ``` ## References and bibliographies ### References The extension `sphinxcontrib-bibtex` allows to manage the bibliography of this site. To cite an article, add the reference in bibtex format to the `bibliography.bib` file and refer to the citation using the bibtex keyword: ````markdown {footcite}`ferat2022electroencephalographic` ```` Will be rendered as {footcite}`ferat2022electroencephalographic` ### Bibliography To insert a bibliography on the page use ````markdown ```{footbibliography} ``` ```` ```{footbibliography} ``` ## Tabbed content Tabbed content can be added using `sphinx-tabs`: ``````restructuredtext ````{eval-rst} .. tabs:: .. tab:: MATLAB matlab. .. tab:: PYTHON python. ```` `````` ````{eval-rst} .. tabs:: .. tab:: MATLAB matlab. .. tab:: PYTHON python. ```` ## Custom You can add HTML content directly in your `markdown` files: ``````html `````` ## Toggle content with buttons The extension `sphinx_togglebutton` allows to add content in toggle frames. ``````restructuredtext ```{image} https://media.giphy.com/media/FaKV1cVKlVRxC/giphy.gif :class: toggle ``` `````` ```{image} https://media.giphy.com/media/FaKV1cVKlVRxC/giphy.gif :class: toggle ```