Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Escaping Line Breaks and Documentation Qs

edited January 2015 in Help! with 2.0
Hello all,

I'm new to twine and was reading the documentation to try and figure out how to escape a line break for creating if/else statements for printing. The docs I found said a single slash "\" at the end of a line would suppress the break, but it doesn't seem to work (I'm using Twine 2.0.2). Has the function been updated for Twine 2? If so, could you please:

-let me know how to escape these line breaks
-direct me to documentation that works for the new Twine?

This is especially a big problem when I've got a block of if statements, and the return after each one puts a new empty line in the story. Frustrating! What am I missing regarding formatting here?

Thank you for your help!

Comments

  • There are three Story Formats that come with Twine 2.0.2 and things like what macros are available, the formatting of those macros, and how to suppress extra new-lines depends on which story format you choose before using the "Test", "Play", or "Publish to File" feature to create your HTML file.

    Harlowe's documentation states that you use curly braces to suppress new-lines characters.

    {
    There should be
    no new lines
    in this sentence.
    }
    SugarCube's documentation states that you use a back slash character at the end of a line to suppress the new-line character.

    There should be \
    no new lines \
    in this sentence.
    Snowman 2 documentation does not say much as it expects you to be a javascript programmer.

    Warning: The majority of the information contain in the Twine Wiki is written for Twine 1, this information will be useless to you if your using either Harlowe or Snowman 2.
  • Addendum for SugarCube: As noted above by greyelf, you may use line continuations to suppress line breaks.  Additionally, however, it also has the <<nobr>> macro and nobr tag, which should be equivalent to Harlowe's curly-brace ({}) syntax.  Basically, you have options.
  • Excellent, thank you both! I had been thinking that the formats were simply collections of stylesheets and javascript that modified the non-functional portions of the story. I didn't realize that the one I chose affected the markup I'd be using.
Sign In or Register to comment.