Glulx: The [roman type] tag

Glulx allows for complicated text formatting, but the [roman type] tag wipes out the whole thing. How would you insert an italicized word into a piece of formatted text and then cancel only the italics?

If it’s possible for you to do something like “[bold]text[italic]italics bold text[roman type][bold type]text”, then it might be the best way.

If, on the other hand, the formatting of that particular text is not fixed, then short of tracking it with a variable and having more than one block of text ready to show depending on the value of the variable I have no idea and forward you to the next poster who will surely have a good idea.

I like the idea of a variable. And I’m reminded of an example in the recipe book for making html-style font coding. Have just thrown together an example (only bold and italics here but I think it’s obvious how it could be extended) :

The Stage is a room. "[b]Bold and [i]italic[/i] and still bold[/b].[paragraph break][i]Italics and [b]bold[/b] and still italics[/i]."

Bold_on is a truth state that varies.
Italic_on is a truth state that varies.

To say b:
	now Bold_on is true;
	say bold type.
	
To say i:
	now Italic_on is true;
	say italic type.
	
To say /b:
	now Bold_on is false;
	say roman type;
	if Italic_on is true, say italic type.
	
To say /i:
	now Italic_on is false;
	say roman type;
	if Bold_on is true, say bold type.

Also see ex443 Chanel Version 1 in the manual – I don’t follow the syntax there but it does address an issue I haven’t considered re paragraph breaking/running on.