0 votes
by (160 points)
edited by

I have some passages that have multiple if visited statements in them to display different text.
Example:

<<if visited("PassageA")>>
"Text 1"[[...|PassageA2]]
<<endif>>
<<if visited("PassageB")>>
Text 2"[[...|PassageB2]]
<<endif>>

The problem is, the text prints on the line that it's written in the passage, rather than beginning at the top-left as if it was basic text in a passage; it seems to be taking the lines of code into consideration with the formatting.
Example:


Text 1...

Text 2...

Is there a way to make the output begin printing at the top left, so it appears on the first line regardless of what line the actual text is written on?

2 Answers

+1 vote
by (63.7k points)
selected by
 
Best answer

You may control where line breaks occur via combinations of one of the line break control mechanisms (i.e. line continuations, <<nobr>> macro, nobr special tag, Config.passages.nobr setting; see also: <<silently>> macro) and the line break markup (i.e. <br>).

by (160 points)
Exactly what I was looking for, thanks! :D
0 votes
by (410 points)

You can use <<nobr>>code<<endnobr>>

For more information: https://www.motoslave.net/sugarcube/2/docs/macros.html#macros-nobr

by (63.7k points)

NOTE: Use of the <<end…>> style tags is disrecommended as they're deprecated.

by (410 points)
Thank you for the tip. What could be the possible negative effects of using end instead of / ?
by (61.5k points)
It's deprecated, meaning its there for compatibility reasons, but may be removed in the future. I would stop using it, and I wouldn't recommend it's use to others, but it shouldn't have any ill effects at this point, and you shouldn't need to go back and rewrite code you've already written.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...