# HG changeset patch # User Adam Chlipala # Date 1310765517 14400 # Node ID 3010472edf448749de05f6ae980e0624a2edd2fd # Parent af0d4d11c5d70575dd1a1ef2824c1db5d14814b7 Tutorial section headings diff -r af0d4d11c5d7 -r 3010472edf44 doc/intro.ur --- a/doc/intro.ur Fri Jul 15 17:25:09 2011 -0400 +++ b/doc/intro.ur Fri Jul 15 17:31:57 2011 -0400 @@ -1,6 +1,6 @@ (* Introduction *) -(* This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License. *) +(* This tutorial is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License. *) (* Test evaluation.... *) @@ -10,4 +10,6 @@ f 6 (* end *) -(* Did it work? *) +(** Section *) + +val y = 9 diff -r af0d4d11c5d7 -r 3010472edf44 src/tutorial.sml --- a/src/tutorial.sml Fri Jul 15 17:25:09 2011 -0400 +++ b/src/tutorial.sml Fri Jul 15 17:31:57 2011 -0400 @@ -75,7 +75,26 @@ val (befor, after) = Substring.position "(* " source in if Substring.isEmpty after then - TextIO.outputSubstr (outf, source) + let + val (befor, after) = Substring.position "(** " source + in + if Substring.isEmpty after then + TextIO.outputSubstr (outf, source) + else + let + val (befor', after) = Substring.position " *)" + (Substring.slice (after, 65, NONE)) + in + if Substring.isEmpty after then + TextIO.outputSubstr (outf, source) + else + (TextIO.outputSubstr (outf, befor); + TextIO.output (outf, "

"); + proseLoop befor'; + TextIO.output (outf, "

"); + loop (Substring.slice (after, 49, NONE))) + end + end else let val (befor', after) = Substring.position "
*)" @@ -105,6 +124,12 @@ TextIO.output (outf, "\t\tpadding: 5px;\n"); TextIO.output (outf, "\t\tfont-size: larger;\n"); TextIO.output (outf, "\t}\n"); + TextIO.output (outf, "\th2 {\n"); + TextIO.output (outf, "\t\tfont-family: Arial;\n"); + TextIO.output (outf, "\t\tfont-size: 20pt;\n"); + TextIO.output (outf, "\t\tbackground-color: #99FF99;\n"); + TextIO.output (outf, "\t\tpadding: 5px;\n"); + TextIO.output (outf, "\t}\n"); TextIO.output (outf, "-->\n"); TextIO.output (outf, "\n"); TextIO.output (outf, "");