Howdy, Stranger!

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

Enlarging/Expanding Passage

Hello community. I have got a problem with the passages in the format Jonah.
I am using this typewriter effect: and when there is a line break in my text, the passages stretch down automatically so the size of the passages are not same.

for exaple: in the first passage i have got a text with 2 lines (the passage is big)
in the second passage i have got a text with 1 line (the passage is smaller than the first passage)

I tried to make the passages "invisible" and to add a frame around the text, but could not combine it with the text flow.

1. Question: Is it possible to make the passages in the equal size so that you can write a text with max. 3 lines in each passage with steady size?

2. Question: How can i make specific passages invisible and not all? For example only the passages with buttons so you can see only the buttons and not the passage?



  • Is it possible to make the passages in the equal size
    You can use CSS to make all the passage bodies have the same height, the actual height
    value you will need to use depends on the font/line size of your story.

    The follow goes within your story's stylesheet tagged passage, if your staory does not have one yet then use the Story > New > Stylesheet menu options to create one.
    .passage .body {
    	height: 66px;
  • Thanks greyelf! It works. How can I exclude now only some passages to be visible?
  • You will need to manually use Javascript and/or CSS, and to understand about the unique id's Jonah assigns to each Passage shown to the Reader to do what you want.

    So before we dive down that rabbit hole of complexity could you explain in detail what effect/functionality you are trying to achieve and why you think you need to hide parts of the Reader's History through your story to achieve it. There may be an easier way to do what you want.
  • Hi greyelf. I attached a picture where you can see the black passage on which you see the buttons. I want to disable only these black passages. Plus the effect, that you can only choose one button and not both of them. I think there was something with <choose> task...
  • note: the terms hide/invisible and disabled are not the same thing, as disabled generally means that the item is still visible but you can't interact with it.

    The following solution hides a previously shown passage and consists of three parts:

    1. A custom hide macro:
    Add the following Javascript to your story's script tagged passage, if you don't have one yet then use the Story > New > Script menu items to create one. The code will add a hide macro to your story, it has one parameter which is the title of the previously shown passage you want hidden.
    version.extensions['hideMacro'] = {
    	major: 1,
    	minor: 0,
    	revision: 0
    macros['hide'] = {
    	handler: function(parent, macroName, args) {
    		if (args && args.length > 0) {
    			var d = document.getElementById("passage" + args[0]);
    			if (d) {
    				d.className += " hidden";
    2. The CSS used by the macro hide the passage:
    Add the following CSS to your story's stylesheet tagged passage, it causes any element with class attribute containing the word hidden to not be displayed.
    .hidden {
    	display: none;
    3. The usage of the new hide macro:
    You can hide any previously shown passage by using the hide macro inside a passage that is shown later than it.
    eg. In either the "what is your name" or the "how can I help you" passages add the following:
    <<hide "The Passage Title of the passage with buttons">>
  • That is cool. But the problem is, you are hiding with this script not the passages (=black blocks), but the text and the buttons. But i wanted to hide the black blocks and not the buttons :)
  • If I understand correctly this time, you want to style some passages differently than the rest.
    How to do this is covered by the Tagged stylesheets section of the Stylesheets page in the Twine 1 Wiki.

    I can't give you an example because I don't know the structure of the contents of the relevant passages nor the custom CSS you are using to style them.
  • Thanks, i will try it.
Sign In or Register to comment.