Search the web
Sign In
New User? Sign Up
d20-xml · Discussion of XML for d20
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[OT] SRD in LaTeX?   Message List  
Reply | Forward Message #2437 of 2466 |
Re: [d20-xml] [OT] SRD in LaTeX?

On 5/1/06, Jason <desade_ky@...> wrote:
> RTF doesn't look all that difficult to parse, but I'd need to play with
> a bit to make any sort of judgment on that. I've also found some free
> RTF parser code on the 'Net (in C), but I may just write my own as an
> exercise.

It's not all that bad, but not interesting enough by itself to write a
parser for if you already have one.

> What I'd like is something that can use pluggable optables to convert
> from RTF to any other arbitrary markup, essentially a 2-pass compiler
> with a swappable backend. I'm not sure that I'd go so far as to develop
> a fully functional pcode, but I've been known to do crazier things in
> the quest for "correctness." ;)

Table-driven replacements would be trivial, of course; not sure why
you're want something two-pass for that, unless I misunderstand what
you mean.

> Yes, semantically-styled markup would be best, 'cause then you can
> switch the visual output simply by loading a new macro set. Also, if
> you get enough abstraction, you've got yourself an interesting
> substitute for XML that's a bit less verbose.

Much less verbose than DocBook. The light weight of the markup is
definately why we're still using LaTeX for the Python documentation.
That and the cost of toolchain conversion.

> As for the ease of automatic conversion, that depends a lot on how
> consistent the styles are in the SRD RTF documents. If the creators
> used consistent formatting or even defined styles, then the conversion
> by software would be fairly straightforward.

That also assumes that the styles are different for different semantic concepts.

> That sounds interesting. I wouldn't think to put something like this
> into version control, but I can see where that would be handy. You'd
> have your rules at the core with branches for modifications and others
> for software, campaign material, etc. based on those rules.--Not a bad
> idea at all.

I've been doing technical documentation for long enough that
text-based markup and revision control are mandatory for me. It's not
the same as code, but more than close enough.

If nothing else, it provides a backup. :-)

> This thread reminds that I had a thought several months ago to write a
> PC/NPC generator in TeX, or possibly even PostScript. I was just
> beginning to study PostScript seriously at the time and I thought that
> it would make a good exercise. Now, I may just have to go ahead with
> writing one in TeX.--So much for people who think TeX is just a markup
> language! ;)

Now, that's just masochism. :-) What's the motivation to use TeX or
PS instead of conventional programming language, and generate
TeX/PS/PDF? I've done one tool that creates XML, and another that
converts that to OpenDocument files I can feed into OpenOfffice 2.

> On FreeBSD, I have used the docbook-nojadetex port. It works very well
> on the FreeBSD documentation that is written in docbook. I've not tried
> it on the docbook conversion of the SRD. However, in looking at the
> docbook SRD that I had available, I see that it is incomplete.

Does the FreeBSD documentation you've tried it with use XInclude at all?

> I've printed the SRD to PDF on my Windows computer at the office by
> using Microsoft Word, GhostScript and the Redmon port redirector. You
> set up a redirected port with redmon that runs GhostScript to convert
> the output to PDF.--PDF is another area that I have plans to study a
> bit more. I'd like to make my own programs for bookmarking sections,
> etc. after I've created PDFs with GhostScript.

My LaTeX toolchain for the Python documentation does all that, of
course. :-) I'd be interested in making that toolchain more usable
for other applications. There wouldn't be a lot to do, I don't think.
There are a lot of pieces, though.


-Fred

--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Don't let schooling interfere with your education." -- Mark Twain



Mon May 1, 2006 8:27 pm

pythondocs
Offline Offline
Send Email Send Email

Forward
Message #2437 of 2466 |
Expand Messages Author Sort by Date

This is a little off-topic, but this seems as reasonable a place to ask as I'm aware of. Does anyone know of a version of the SRD in LaTeX format, instead of ...
Fred Drake
pythondocs
Offline Send Email
Apr 30, 2006
7:00 pm

... As far as I know, there is no LaTeX-version, but IIRC one could use XeTeX for transforming XML into LaTeX. But I'm not sure which XML formats XeTeX works...
Johannes Luber
verequus
Offline Send Email
Apr 30, 2006
8:54 pm

... I'd like the same thing myself. I've downloaded the latest RTF specs and was thinking of taking a weekend or two to hammer out a RTF to TeX converter. (I...
Jason
desade_ky
Offline Send Email
May 1, 2006
2:20 pm

... I've got an RTF parser (in Python, of course!), but can't share that code since it belongs to my employer. I'd be much more interested in highly semantic...
Fred Drake
pythondocs
Offline Send Email
May 1, 2006
3:11 pm

... RTF doesn't look all that difficult to parse, but I'd need to play with a bit to make any sort of judgment on that. I've also found some free RTF parser...
Jason
desade_ky
Offline Send Email
May 1, 2006
4:57 pm

... It's not all that bad, but not interesting enough by itself to write a parser for if you already have one. ... Table-driven replacements would be trivial,...
Fred Drake
pythondocs
Offline Send Email
May 1, 2006
8:27 pm

... I took a run at this a year or two ago. My first step was to go through the entire RSRD in Word, applying styles consistently (and adding styles to mark...
Keith Davies
jdk_kjdavies
Offline Send Email
May 1, 2006
11:29 pm

... This is very much something I'd like to avoid doing in a word processor of any sort. I can get by doing very basic in MS Word and OpenOffice (including...
Fred Drake
pythondocs
Offline Send Email
May 2, 2006
4:32 am

... I agree entirely. This step took a number of hours -- I could have done it in a single day if I'd had everything set up ahead of time. I wasn't trying to...
Keith Davies
jdk_kjdavies
Offline Send Email
May 2, 2006
9:10 am

... [Snipped for brevity.] ... I was hoping for some consistency in the RTF of the SRD so I could just look at it and not what stylistic changes signal...
Jason
desade_ky
Offline Send Email
May 2, 2006
1:09 pm

... XSLT can easily output to any text based file format. I have generated RTF from XML using XSLT before, you just need to be careful about whitespace and...
frugal@...
frugal10191
Offline Send Email
May 2, 2006
1:37 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help