Twine 1.4.2 (Windows, OS X) is a minor update for Twine 1.4.
>
symbols in their titles.<div data-tags=“…”>
)<span>
element wrapped around individual text characters for the purposes of CSS effects) had the classes “char” and a second one representing the char contents - for instance, “v” for lowercase v. But, having a single-character classname for charspans is causing some collisions with certain Firefox extensions. Now, the character is stored in a data-char attribute, so CSS can still potentially select it by, e.g. .char[data-char=v]
.<span class="...">
HTML tag. @@.robot;This is a robot-class span@@
is equivalent to This is a robot-class span
.@@.robot;text-decoration:underline;This is a robot-class span with an underline@@
<a data-passage=“Distant woods”>Some text</a>
is equivalent to [[Some text|Distant woods]]
, but allows you to add extra HTML attributes to the link, like “style”.<img data-passage=“Trees”>
is equivalent to [img[Trees]]
- thus, you can now refer to imported images in HTML. (If you wish to make an image that links to a passage, put the <img> inside an <a> element.)<area data-passage=“Trapdoor” coords=”…“>
is how you can make an image map area link to a passage.This looks like ordinary text
.Collect teeth
. Note that it does nothing without a data-passage attribute as well.<<<
) or HTML <blockquote> tags.position: fixed
again.#passages
, so that the present passage isn't always uncomfortably flush with the bottom of the window.@import
declarations are now hoisted to the top of the <style> element, thus causing them to work regardless of which stylesheet passage they're included in. So, if you've had problems with them, this may be the answer.either()
may now accept a single array as a sole argument, and will pick a value from within that array. This allows you to <<set>> a bunch of either() arguments in an array variable, and call either() with it in many places: «set $a to [“Red”,”Blue“,”Green“]» «print either($a) + ” and “ + either($a)»
visitedTag()
may now accept a string of space-delimited tags, as an alternative to several strings or an array.random()
, a function seen in Twine 2 and SugarCube. Given two numbers (such as random(3,12)
) it returns a random integer between them, inclusive. While I generally recommend continuing to use either()
for choosing between a small set of numbers, I recommend random()
for long ranges, as an alternative to the cumbersome Math.random()
.rot13()
function that returns the given string in ROT13 encoding.bookmark()
function, which provides the bookmark hash for the current passage, the same as that used by the built-in “bookmark” links.