in reply to Suggestion: Optional Line Numbering Tag for CODE
Yery cool idea. It would also be nice to be able to have code numbering continue from one block to the next (obviously under some user control). For example:
1 # This is the start of the code where we set up stuff 2 my $frob = 'gibber'; 3 my $handle = 'hum';
Then some descriptive narrative explaining what is going on. And I pick up from where I left off:
4 # Start doing the real work 5 do_the_real_work($frob, $handle);
Of course sometimes you want the first block and the second to be numbered separately, and you may want to interweave one set of numbers with another. So I would propose amending the syntax to be:
<NCODE section="some_name" start_line="1" order="1"> insert code here </NCODE>
All three attributes are optional. Each named section would have a running counter. The start_line attribute allows you to specify the starting line number of the section. Finally, the order attribute governs the order of the section in the resulting code. The order attribute allows you to talk about a chunk of code that is deep in the body then talk about the stuff that appears before it and have the line numbers make sense. Of course this is all becoming very similar to the Literate Programming stuff, since the "download code" link should reconstruct the code blocks into the right sections and into the right order (possibly with # line statements if lines were skipped).
Of course this is all very complex and tangled and vroom is probably way to busy to do something so frivolous. So how can I help? Is there a cadre of hand picked workers who help maintain the Monastery? Can I get my hands on the current source code through some CVS share and hack it in and submit patches?
-ben
|
---|