Underlining in Inform 7

Total newcomer here. Is there any way to underline text in Inform? Maybe something akin to the tag in html? I’m not having any luck finding anything on it.

Italics is generally to be preferred over underlining. Underlining actually originated/became popular as an alternative to italics as typewritters didn’t have the alternative italic letter forms, but could put a line under text.

inform7.com/learn/man/Rdoc97.html shows how to format text in I7.

If you produce a playable webpage using Parchment or Quixe you could actually change the text styles to use underlines rather than italics, but that would only work for the webpage, and not if the storyfile was used in a traditional interpreter.

Never liked the omission of underlining, though that original decision to not add it even though underlining became available was probably made by Marc Blank or one of those dudes, and then the original Inform just followed the opcodes, I’d guess. I don’t think the omission of underlining from Inform is going to convince anyone about the superiority of Italics. I think it does reflects poorly on the language, since it’s a feature provided by every other modern programming language that specialises in text.

Paul.

Another factor worth considering is the tendency to confuse underlined text with hyperlinks. It’s not such a problem for titles etc. but underlined text in the middle of a sentence always draws clicks when you encounter it on a computer screen (and especially in a browser).

While I prefer italics to underlining for emphasis, this is actually a reason for the inclusion of underlining – since you can have games with hyperlinks.

As far as Inform goes, there are extension that lets you put hyperlinks in a Glulx game, but I’m not sure you can define a text style for Glulx games that will underline text (at least underlining is not among the style hints defined by the Glk standard).

The Glk spec says that hyperlinked text should be displayed in a distinctive way, and suggests blue underlined text.

There’s no way as a game author to control the appearance of hyperlinks, at least for now. I believe the proposed Glk CSS would allow this, though of course it would be Glulx only at the Inform level.

Thanks for all the info.

I also prefer italics over underlining for emphasis, but I was playing with the idea of using underlining to mark things that can be interacted with. (Blue Lacuna did something like this with bold/colored text, which looks goofy in my opinion.)

For example:

Sadly, it doesn’t sound like this would work in Inform.

If you’re targeting the Z-machine, there is no actual italic or underline style. Instead, there is an emphasized style, which can be rendered however the interpreter decides (which might include letting the user decide). The same interpreter might even render the text in different ways depending on the circumstances–in the non-GLK version of my interpreter, italics are used if the terminal supports it (e.g. rxvt-unicode), underline otherwise (e.g. xterm).

Because the Z-machine was designed to target various platforms, it really couldn’t mandate precise text styles. I’m not sure how Glulx differs, if at all, in this respect.