1.3. Presentation Format
Bob: I must say, you're making a strong case for writing dialogues.
I'm willing to give it a try.
Alice: okay, let's get started right away! Remember the conversation
we had when we saw each other over coffee, and asked each other what
our research plans were? That's how we got this idea of writing some
code for toy model simulations of dense stellar systems.
Bob: I guess we can reconstruct a dialogue along those lines. That
will be a good place to start, since we were just chatting. It will
become more complicated once we try to reconstruct how we learned to
work with Ruby, how we coded up the two-body problem, how I got
carried away with adding yet more integrators, and so on.
But already with the first volume, a pure dialogue, how do you want to
write that, in what form? Plain text is not very helpful. At the
very least we want to put that material on the web, to make it
accessible to our students and others who may be interested.
Alice: But I don't like writing everything in HTML. For one thing,
mathematical equations don't lend themselves very well to that medium.
For another, I like to make printouts, especially of complex codes and
of text with many equations, and I far prefer LaTeX for that purpose.
Bob: There are programs that can translate LaTeX to HTML, but from
what I've seen, they are not doing a very good job. Perhaps a better
alternative would be to start with a third medium, from which we can
then produce both postscript output, like with LaTeX, and HTML output,
for web sites.
Alice: Do you have any particular example in mind.
Bob: XML is being advertised as a lingua franca for exactly
these purposes, but I'm a little hesitant to make a jump in that
direction. Everything I've seen is rather cumbersome, at least on the
level of writing XML directly, even though the basic idea is fine.
The problem is that the XML source is almost unreadable, with even more
markers and flags and begin-this and end-that than you already have in
HTML.
Alice: How do people then work with XML in practice?
Bob: I presume they use an editor that allows them to add all the extra
information, where needed, without showing it all on the screen.
Alice: A bit like the WYSIWYG, what-you-see-is-what-you-get, way in which
many text editors nowadays show you what will be printed, rather than what
the special symbols are that you type in order to get there?
Bob: Yes. Unlike emacs or vi, which show the full LaTeX commands, you
could imagine working with an editor that would produce the LaTeX
output directly in a window, while giving you a menu from which you
can pick the directives.
Alice: Probably somebody has already written such a thing.
Bob: I bet. However, I'm used to good old ascii coding in editors where
you can exactly see what you put in.
Alice: Me too. I really don't like having to click a mouse at every point
along the way. Besides, if the input is in ascii, you know for sure that you
will still be able to read that material ten years from now. If you write it
in some form of `easier' format, it is quite likely that some day you won't
be able to decode anymore what you wrote!
Bob: I couldn't agree more. So I must admit, I don't like the XML solution
very much, if it would mean working with a WYSIWYG editor. Besides, what
would such an editor show you on the screen? HTML output format? LaTeX
output format? A third type of output format? None of them would cover
all the bases.
Alice: Have you tried writing XML that way?
Bob: No, though I came close. Recently, I was thinking about using some
XML for documenting some of my codes, so I looked around on the web,
to see what kind of editors were available. Unfortunately, the good
ones all seemed te be commercial products, and I couldn't find
anything in the open-source domain that looked appealing.
Alice: There is nothing wrong with paying for a software package.
Bob: Indeed, I'd be happy to pay for a good piece of software. However,
when I do so, I need to be convinced that I will use it often enough
to make it worth the investment. And even more importantly, I do want to
have access to the source code, if I'm going to use it as a foundation
for some of my own code development.
Alice: Those are good points. If we are going to use XML, we would want our
students to join in and write extensions of what we're doing. If they first
need to buy an expensive editor before they can even start working with our
software, that wouldn't be ideal. And yes, it would be much better if they
would have direct access to the source text of our dialogues as well
as the source of our codes.
Bob: So let me look what alternatives there are available. There must be
others who came up to the same dilemmas as we have just summarized. I'll
do a web search, and with a little luck I may come across a better system.
I'll let you know!