diff --git a/book/_ext/sphinx_gated_directives/__init__.py b/book/_ext/sphinx_gated_directives/__init__.py
index 9bb60d8..7afe003 100644
--- a/book/_ext/sphinx_gated_directives/__init__.py
+++ b/book/_ext/sphinx_gated_directives/__init__.py
@@ -450,13 +450,6 @@ class MergeGatedDirectivesTransform(SphinxTransform):
end_index = parent.children.index(end_n)
between_nodes = parent.children[start_index + 1:end_index]
- # print the nodes for debugging
- logger.info(f"{start_n.pformat()}",color="green")
- if between_nodes:
- for bn in between_nodes:
- logger.info(f"{bn.pformat()}",color="yellow")
- logger.info(f"{end_n.pformat()}",color="red")
-
# We have to merge, but how is the question.
# we handle based on "experience" and "observation" of what kind of nodes are generated
# step 1: create a new container node to hold the merged content
@@ -490,14 +483,10 @@ class MergeGatedDirectivesTransform(SphinxTransform):
for i, bn in enumerate(between_nodes):
content.insert(pos + i, bn) # insert sets parent/doc links
else:
- logger.info(f"Found no caption and no section node in start_node content.",color="blue")
# otherwise, we add all between nodes to the main content directly\
for bn in between_nodes:
content += bn # add sets parent/doc links
- logger.info(f"New nodes after merging:",color="blue")
- for nn in new_nodes:
- logger.info(f"{nn.pformat()}",color="blue")
-
+
# finally, replace start_n with new_nodes, and remove end_n and between_nodes
start_pos = parent.children.index(start_n)
# remove end_n
diff --git a/book/intro.md b/book/intro.md
index 165c9f7..5df72ca 100644
--- a/book/intro.md
+++ b/book/intro.md
@@ -1,5 +1,67 @@
+---
+file_format: mystnb
+kernelspec:
+ name: python3
+---
+
# TeachBooks Manual
+:::{prf:theorem-start} A title
+:label: theorem-label
+
+This is a theorem. This text is inside the directive.
+:::
+
+Now some extra text that should come inside the theorem.
+
+:::{figure} images/sphinx-logo.svg
+:alt: Sphinx logo
+:width: 200px
+:align: center
+
+Sphinx is a great tool for documentation! This figure should be inside the theorem.
+:::
+
+```{code-cell} ipython3
+a = "This is some"
+b = "Python code"
+c = "that should be inside the theorem."
+print(f"{a} {b} {c}")
+```
+
+:::{prf:theorem-end}
+:::
+
+:::{figure-start} images/logo-wide.svg
+:name: figure-label
+:alt: JupyterBook logo
+:width: 200px
+:align: center
+
+This is a figure. This text is inside the caption.
+:::
+
+```{code-cell} ipython3
+a = "This is some"
+b = "Python code"
+c = "that should be inside the figure,"
+d = "above the caption."
+print(f"{a} {b} {c} {d}")
+```
+
+Now some extra text that should come inside the figure, above the caption.
+
+:::{figure} images/sphinx-logo.svg
+:alt: Sphinx logo
+:width: 200px
+:align: center
+
+Sphinx is a great tool for documentation! This figure should be inside the parent figure, above the parent caption.
+:::
+
+:::{figure-end}
+:::
+
This manual is primarily designed for and by teachers for use in education, but should be a useful resource for anyone interested in creating and collaborating on a TeachBook: a
v1 using the
Sphinx backend with additional editing tools and book features. Our aim is to provide a simple way to start book-making for new users (it only takes 10 clicks!), ease the editing process for anyone, and provide additional features developed for education-purposes. We hope you find this resource useful and refer back to it often.
TeachBooks originated at Delft University of Technology in the Netherlands, and some of the material in this Manual reflects tools and resources specific to TU Delft. With the exception of a few tools for which we have educational licenses at Delft, everything in this Manual is open source. Despite this, we are happy to grow our open source community beyond Delft and welcome contributions from all users.