I've not tried this, but it would be even better to have a mechanism to directly include a chunk of code from another file, ie specify "give me lines 24-40 from some/path/foo.rb, starts with 'class Something'" - the last bit in the same spirit that diff/patch use context to warn when things don't match up. That would be the ultimate "make the examples match the book" technique.

agility uses git to do this.


Another advantage is that you don't need to learn another editor -- you need an editor with a good markdown mode. Luckily, the editor you currently use for programming will probably work. Both emacs and TextMate have good markdown modes, as will any popular ruby programmer's editor.

I can't think of any reason that the same editors couldn't be used to handle LaTeX - TextMate's got a sizable mode for it, and I remember editing TeX code in emacs on a vt220... Certainly, Markdown is easier for inexperienced users, but I doubt anybody who's afraid of structured markup is hanging around here... :)

The difference is that markdown looks reasonable in a text editor -- LaTeX looks strange, which is why LyX was created.


The biggest issue I could see in transcoding between the two is getting the right figure / chapter markings in. Automatic figure numbering, tables of contents and back/forward refs are some of the major wins for TeX - no more stray references to "Figure XX" floating around.

This is partially mitigated by writing the chapters in markdown and putting the book together in LaTeX. We'd have to have a consistent strategy for figures, tables and indices, but it would be doable, since LaTeX would do the hard stuff.


My other peeve with Markdown is the silly "internal emphasis" rule, which tends to munge Ruby variable names. We've run into it on the cookbook, and Github got so tired of tripping over it that they dropped it in "GitHub-flavored Markdown". Maybe there's a workaround for that?


I think so. The cookbook should definitely steal the underscore rule from GFM. There's too much that would be broken with their new-line rule, though.

cheers,
Bryan
-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.


Reply via email to