diff --git a/examples/sample-article/sample-article.xml b/examples/sample-article/sample-article.xml index 23afa0bd9f..d205e03bd9 100644 --- a/examples/sample-article/sample-article.xml +++ b/examples/sample-article/sample-article.xml @@ -926,7 +926,7 @@ along with MathBook XML. If not, see .

Does the first statement imply the second?

- + The <q>middle</q> case

Does the second statement imply the third?

@@ -12924,6 +12924,28 @@ along with MathBook XML. If not, see . +
+ Literate Programming +

There is support for literate programming using the fragment tag. It should always contain an @xml:id or a @filename attribute, and may contain code segments as well as fragref segments referencing other fragments. The final code is to be assembled starting from a fragment with a filename attribute and traversing the tree of fragment references.

+

For example here is the gcd algorithm in Python. Note that indentation is hard to get right at the moment.

+ + The GCD algorithm + + def gcd(a, b): + while(b): + + + return a + +

The key part is the inner part of the loop

: + + The key loop part + + a, b = b, a % b + + +

This double assignment changes both a and b.

+
Atomic Objects @@ -15563,9 +15585,12 @@ along with MathBook XML. If not, see . -

- Now with one column, do things to the following. -

+ Title of introduction of an exercise group + +

+ Now with one column, do things to the following. +

+
diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index 27098ae6a9..4ab1d07f9b 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -1227,16 +1227,12 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - + + + + + + @@ -1360,31 +1356,28 @@ along with MathBook XML. If not, see . + + + + + - - h - - - 6 - - - - - - - - - heading + + + + hide-type - - + + - - - + + + + + @@ -1966,31 +1959,39 @@ along with MathBook XML. If not, see . + 1 0 - - + + + + + + + + + - + h6 - + @@ -1998,56 +1999,45 @@ along with MathBook XML. If not, see . + - - - - h6 - - - - - - - - - - - - heading - - - - - - - - - - - - - - - - - - - ( - - ) - - - - - - - - - + + + + + + - - + + + + + + + + + + + + + + + ( + + ) + + + + + + + + + + + + + @@ -2095,113 +2085,133 @@ along with MathBook XML. If not, see . - - - - + + + + + + + + + + + - - - h6 - - - - - - - - + + + heading + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - heading - - - - - - - - - + + + + + - - + + + + + + + + - - - - - - heading - - - - - - - - - - + + + + + - - + + + - - + + + + + + + + - - - - - - heading - - - ( - - ) - - - - - + + + + ( + + ) - - + + + + + + + + @@ -2209,80 +2219,68 @@ along with MathBook XML. If not, see . - - - - - - heading - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + - - - - - - heading - - - - - + + + + + + + - - - - - - heading - - - - - - - - - - - - - - - - - -  ( - - ) - - + + + + + + + + + + + + + + + + + + +  ( + + ) + + + @@ -2297,27 +2295,14 @@ along with MathBook XML. If not, see . - - - - h6 - - - - - - - - - - - - heading - - - - - + + + + + + + + @@ -2326,17 +2311,13 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - - + + + + + + + @@ -2381,40 +2362,36 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -2441,22 +2418,18 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - - - - - - - + + + + + + + + + + + + @@ -3645,6 +3618,22 @@ along with MathBook XML. If not, see . + + + + + + + + + + + + + + + + @@ -3811,6 +3800,15 @@ along with MathBook XML. If not, see . + + + + + + + + + @@ -3906,27 +3904,10 @@ along with MathBook XML. If not, see . - - - - - - - - - - - - - - - - - - - - - + + + + @@ -4156,6 +4137,7 @@ along with MathBook XML. If not, see .
+ @@ -4937,21 +4919,17 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - - - - - - + + + + + + + + + + + Root of file: @@ -5586,16 +5564,12 @@ along with MathBook XML. If not, see . - - - - - - heading - - - - + + + + + +