+2 votes
by (620 points)
The title pretty much says (or asks) it all...

1 Answer

+1 vote
by (159k points)

You're confusing the functionality of the Twine application (1.x or 2.x) which is responsible with editing and assembling Passages to create a Story HTML file, with the functionality of the Story Format(s) which are responsible for everything else.

The Harlowe story format doesn't include a macro like the third-party <<addtag>> related macros found on the GloriousTrainwrecks website(1), nor does it have the SugarCube (1.x and 2.x) <<addclass>> based equivalents.

You will need to use Javascript code like that found in point 3 of my answer to the Changing the tw-passage color according to a variable. (Harlowe 2.0.1) question to achieve the result you require.

<script>$('an-element-identifier').addClass('a-css-class');</script>

... the above is using jQuery functions to add a CSS class to a HTML element contained within the generated page.

(1): The custom macros found on that site are for the Twine 1.x vanilla story formats only.
eg. Sugarcane, Jonah, and Responsive.

by (620 points)
thanks for answering, you've already solved my dilemma by answering the http://twinery.org/questions/765/changing-the-tw-passage-color-according-to-variable-harlowe question, so that's alright for me. Sorry for the rather unnecessary question.

I wonder if there will be a wiki for twine 2, in time...
by (159k points)

The Twine Wiki covers how to use both the Twine 1.x and 2.x applications, it explains how to use the Passage Editors (Standard, Javascript, and CSS) to edit the relevant content, and how to combine those Passages with a Story Format to generate a Story HITML file.

It also includes basic information about the version of TwineScript used by the most common Twine 1.x story formats, both the vanilla ones (Sugarcane, Jonah, and Responsive) as well as the most popular third-party ones. (SugarCube 1.x and 2.x)

Because the TwineScript languages of the Twine 2.x story formats (Harlowe, Snowman, and SugarCube) are different both in syntax and functionally it was originally decided to add links to each of their official (documentation) websites instead of trying to merge the basics of their documentation together.
There is currently an ongoing project to work out a way to do that merging of the basic documentation so that it is concise and understandable, which is harder than some realise due to the major differences between the main story formats.

...