Skip to content

Commit 69940ea

Browse files
committed
Fix backticks and spelling
1 parent 3c76361 commit 69940ea

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

README.rst

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ For TODO list support, also add the `sphinx-immaterial <https://github.com/jbms/
7979
"sphinx_notion",
8080
]
8181
82+
For mathematical equation support, also add the ``sphinx.ext.mathjax`` extension:
83+
84+
.. code-block:: python
85+
86+
"""Configuration for Sphinx."""
87+
88+
extensions = [
89+
"sphinx.ext.mathjax",
90+
"sphinx_notion",
91+
]
92+
8293
PDF support is included by default with the sphinx-notionbuilder extension.
8394

8495
Supported markup
@@ -101,6 +112,7 @@ The following syntax is supported:
101112
- Tables
102113
- Strikethrough text
103114
- Colored text and text styles (bold, italic, monospace)
115+
- Mathematical equations (inline and block-level)
104116

105117
See a `sample document source <https://raw.githubusercontent.com/adamtheturtle/sphinx-notionbuilder/refs/heads/main/sample/index.rst>`_ and the `published Notion page <https://www.notion.so/Sphinx-Notionbuilder-Sample-2579ce7b60a48142a556d816c657eb55>`_.
106118

@@ -117,7 +129,7 @@ Audio files can be embedded using the ``audio`` directive. Both remote URLs and
117129
118130
The audio will be rendered as an audio player in the generated Notion page.
119131

120-
Using PDFs
132+
Using PDF
121133
----------
122134

123135
PDF files can be embedded using the ``pdf-include`` directive. Both remote URLs and local file paths are supported.
@@ -202,6 +214,45 @@ TODO lists with checkboxes can be created using the ``sphinx-immaterial.task_lis
202214
203215
The checkboxes will be rendered as interactive TODO items in the generated Notion page, with completed tasks showing as checked and incomplete tasks as unchecked.
204216

217+
Using Mathematical Equations
218+
-----------------------------
219+
220+
Mathematical equations can be embedded using the ``sphinx.ext.mathjax`` extension.
221+
Both inline and block-level equations are supported:
222+
223+
Inline Equations
224+
~~~~~~~~~~~~~~~~
225+
226+
Inline equations can be written using the ``:math:`` role:
227+
228+
.. code-block:: rst
229+
230+
This is an inline equation :math:`E = mc^2` in your text.
231+
232+
Here are some more examples:
233+
234+
- The quadratic formula: :math:`x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}`
235+
- Euler's identity: :math:`e^{i\pi} + 1 = 0`
236+
237+
Block Equations
238+
~~~~~~~~~~~~~~~
239+
240+
Block-level equations can be written using the ``.. math::`` directive:
241+
242+
.. code-block:: rst
243+
244+
.. math::
245+
246+
E = mc^2
247+
248+
The Schrödinger equation:
249+
250+
.. math::
251+
252+
i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = \hat{H}\Psi(\mathbf{r},t)
253+
254+
The equations will be rendered as proper mathematical notation in the generated Notion page, with inline equations appearing within the text flow and block equations appearing as separate equation blocks.
255+
205256
Unsupported Notion Block Types
206257
------------------------------
207258

@@ -212,7 +263,6 @@ Unsupported Notion Block Types
212263
- Column and column list
213264
- Divider
214265
- Embed
215-
- Equation
216266
- File
217267
- Link preview
218268
- Mention

sample/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
callout
22
checkboxes
33
reStructuredText
4+
Schrödinger

0 commit comments

Comments
 (0)