Skip to content

Commit

Permalink
Tutorial 6. Animations (#16)
Browse files Browse the repository at this point in the history
* Add docs for tutorial 6

* Use sphinx.ext.extlinks for gmt-module links

Xref https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html

* Add sphinxcontrib-youtube

Xref GenericMappingTools/gmt-examples#37

* Add sphinx_gmt.gmtplot

Sphinx extension used to define the `gmtplot` directive that will execute the given GMT code and insert the generated figure into the document. Need to set `highlight_language: bash` otherwise there will be an `UnboundLocalError: cannot access local variable 'suffix' where it is not associated with a value`.

---------

Co-authored-by: Wei Ji <[email protected]>
  • Loading branch information
Esteban82 and weiji14 authored Dec 2, 2024
1 parent a08f3ed commit 68ae095
Show file tree
Hide file tree
Showing 5 changed files with 955 additions and 2 deletions.
10 changes: 10 additions & 0 deletions book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ sphinx:
config:
bibtex_reference_style: author_year
html_show_copyright: false
# Adjust highlight language for sphinx_gmt examples
highlight_language: bash
extlinks:
gmt-module:
- "https://docs.generic-mapping-tools.org/6.5/%s"
- "%s"
extra_extensions:
- sphinx.ext.extlinks
- sphinx_gmt.gmtplot
- sphinxcontrib.youtube
5 changes: 4 additions & 1 deletion book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ parts:
- file: markdown-notebooks
- file: tut01_firstfigure
- file: tut02_spe_pd_gpd
- file: tut03_spe_xarray
- file: tut03_spe_xarray
- file: tut06_animation
sections:
- file: tut06_animation_extended
Loading

0 comments on commit 68ae095

Please sign in to comment.