Standard Rules and I6 Template Layer web pages

A little while ago, I was surprised to find it was hard to track down a web-accessible copy of the Standard Rules so I made one.

There’s a table of contents and the “documented at” references within the code link to the appropriate documentation page on the Inform 7 website.

Edited: Now with added I6 Template Layer.

15 Likes

This is super helpful – just a couple of days ago I was wishing this existed! Thanks for pulling it together.

3 Likes

Mike, could you tell us a little more about “a couple of days ago?” Where were you? Was there a well, or perhaps a falling star? Maybe you found a tarnished, old brass lamp?

5 Likes

Probably worth mentioning: every line has an id of “line” followed by its line number, so you can link directly to any given line by appending that to the URL, e.g.,

https://zedlopez.github.io/standard_rules#line984

See the order of the rules in the Turn Sequence rulebook.

2 Likes

Since I can only “like” once, I have to add: This is awesome!

It will be so useful for directing others quickly to the answers of many questions on this part of the forum. Thank you so much for doing this. :clap:

1 Like

I’ve added a completely plain copy of the I6 Template Layer alongside the Standard Rules (but I haven’t yet gotten all fancy and put a link to it on the Standard Rules page itself).

1 Like

The effect is somewhat spoiled by index.html remaining ugly as heck, but I have very substantially improved the formatting of the HTML of the templates:

  • the documentation is presented as running text in paragraphs; only the code parts are fixed width
  • the code includes line numbers
  • documentation’s references to other templates now link to them
  • documentation’s references to routines or constants or globals now link to the corresponding definitions
  • the code’s jump statements now link to their destinations
  • as with the HTML of the Standard Rules, the lines of code have IDs and can be linked to directly: Parser_parse

Introduction.i6t

I haven’t yet tried to get to all of the TeXisms in the docs, but have at least gotten the italics and centering.

1 Like

Apparently, publishing slightly prematurely is great for my creative process. Now I’ve cleaned up a bunch of things that were slightly broken and dealt with the TEX-isms. index.html is even slightly less ugly.

I’d like to add indices of functions, constants, and globals, make function calls in the source link to the functions, and maybe the most obvious thing of all: syntax-highlight the code. And refine the typography a little. And I should put id tags on the section headers. But it’s mostly what I wanted it to be: an attractive, convenient way to browse the template layer.

2 Likes

OK, now with syntax highlighting and a Function Index and Rules Index. The rules are also in the function index, being I6 functions… I wasn’t sure if that was the right call. Anyone think they should be omitted, having an index to call their own and all?

[Edited: I’ve dropped the Rules from the Function Index now.]

3 Likes

Including the I6 functions gives the reference more utility.

Very nice.

1 Like

…and after another round of tweaks, the Contents page has summary tags per template file that provide links directly to the template’s sections. Formatting could use some improvement, but that’s enough early morning Inform-stuff-hacking before a work day…

1 Like