QuantEcon.cheatsheet icon indicating copy to clipboard operation
QuantEcon.cheatsheet copied to clipboard

Migration to MyST

Open mmcky opened this issue 3 years ago • 3 comments

I have looked into using rst-to-myst and sphinx-tomyst and both have issues with migrating these tables to markdown

sphinx-tomyst

▶ make myst
sphinx-build -b myst -d _build/doctrees   . _build/myst
Running Sphinx v3.5.4
making output directory... done
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [myst]: targets for 4 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [ 25%] index                                                                                                                         
Exception occurred:
  File "/Users/matthewmckay/anaconda3/lib/python3.8/site-packages/sphinx_tomyst/writers/translator.py", line 146, in unknown_visit
    raise NotImplementedError("Unknown node: " + node.__class__.__name__)
NotImplementedError: Unknown node: substitution_reference
The full traceback has been saved in /var/folders/_w/bsp9j6414gs4gdlnhhcnqm9c0000gn/T/sphinx-err-f1vfoe3z.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [myst] Error 2

rst-to-myst

Works a lot better so would be a better starting point

:::{container} singlelang-table python-table
| Command      | Description                                                                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {python}`*`  | multiplication operation: {python}`2*3` returns `6`                                                                                                     |
| {python}`**` | power operation: {python}`2**3` returns `8`                                                                                                             |
| {python}`@`  | matrix multiplication:```python3
import numpy as np A = np.array([[1, 2, 3]]) B = np.array([[3], [2], [1]]) A @ B ```returns```python
array([[10]]) ``` |
:::

This will require some manual help to get this converted.

mmcky avatar Jan 12 '22 01:01 mmcky

@HumphreyYang -- another project is to complete the migration of this series to MyST

Would you have the time to take this project on?

mmcky avatar Sep 19 '23 04:09 mmcky

FYI -- this repo powers

https://cheatsheets.quantecon.org

mmcky avatar Sep 19 '23 04:09 mmcky

https://github.com/QuantEcon/lecture-python.myst ::

lecture-python.myst

Migration to Myst (Source files for https://python.quantecon.org)

GH-PAGES

This repository is hosted on Github Pages: https://quantecon.github.io/lecture-python.myst/

westurner avatar Oct 14 '23 17:10 westurner