I added a conditional to the text printout: now I only indent the ^text^ when printing the structure; otherwise I leave it unindented.
Here’s the new code block at the end of the HTML item:
^if($Prototype!="Dramatica Definition")^
^if($PrintDramaticaStructure==true)^
^if($Prototype!="Tension Quad Elements")^
<Blockquote><Blockquote> ^text^ </Blockquote></Blockquote>
^else^
<Blockquote><Blockquote> <Blockquote> ^text^ </Blockquote></Blockquote></Blockquote>
^endif^
^else^
^text^
^endif^
^children(/Templates/HTML page/HTML item)^
^endif^
BEWARE. I killed a couple of hours because after I changed the code, the program only printed unindented text, no matter what I did. I thought the problem was in my if-else-endif structure but it turns out that was a red herring. the problem was
^if($PrintDramaticaStructure==true)^
vs
^if ($PrintDramaticaStructure==true)^
On the second version of the line, there is a space between ‘if’ and ‘(’ and that caused the ‘if’ test not to be executed, the parser just killed everything until the ^text^ line after the ^else^. NO SPACES BETWEEN IF AND PAREN here, so now I know that.
I find when debugging Tinderbox it helps to get rid of the visual noise sometimes, so I simplified the block like this:
^if($Prototype!="Dramatica Definition")^
^if($PrintDramaticaStructure==true)^
^if($Prototype!="Tension Quad Elements")^
Amy
^else^
Rory
^endif^
^else^
The Doctor
^endif^
^children(/Templates/HTML page/HTML item)^
^endif^
and that made it easy for me to see the bug. I looked at it went … is that a space…that can’t be the problem…(Tenth Doctor voice) naaaaaaaaaah–but maybe. Allons-y!
Anyone have any thoughts about how to indent first line only?
I’m already evolving this document. I’ll put up an update in a week or two as soon as it’s worthwhile. There’s some new prototypes inherited and whatnot.