Howdy, Stranger!

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

How to Format Lines

Hello.

I've looked, but I can't seem to find the answer anywhere, and when I try something, I have results I didn't plan on. Long story short, for an English class at UNLV my group is utilizing Allen Ginsberg's 1956 poem, "America." No matter what (so far), I cannot replicate his format. For example:

"The Russia wants to eat us alive. The Russia's power made. She
wants to take our cars from out our garages."

There are several passages like this, including 2-3 indented lines below the original line. But I cannot figure out how to indent a line or several lines in Twine.

Thanks.

Stan

Comments

  • Update: I see the formatting example I provided above did not take. After the end of the first line "She", the second line is indented to begin under "ts" of "wants" on the first line. Thanks.
  • You need to state which Story Format you are using when you ask a question, as answers can be different for each one.

    If you wrap each paragraph of the poem within a HTML p element like so:
    <p>"The Russia wants to eat us alive. The Russia's power made. She
    wants to take our cars from out our garages."</p>
    
    ... then you can use CSS like the following to indent all lines (excluding the first) of the paragraph. The CSS needs to be place in your Story Stylesheet area.

    a. Harlowe
    p {
    	margin-left: 7em;
    	text-indent: -7em;
    }
    
    b. SugarCube 1.x
    p {
    	margin-left: 8em;
    	text-indent: -8em;
    }
    
  • edited March 2016
    You can use <<print " ">> where the space inside the "" is actually the unicode letter for "non-breaking space", with the Windows input of Alt+0+1+6+0, OS X Opt+Space & Linux (X11) Compose+Space+Space.
    You can then insert more of the No-Break Space as needed inside the <<print>>, to indent the text.
    Using 25 of the Non-Break spaces within a <<print>>, I got this
    yxoJwQx.png?1
    It sure as heck is a round-about way of indentation, but does work for precise work.
    You can write the Non-Break Spaces directly into the text, but I found incapsulating them into a <<print>> statement worked better for managing what is normal-spaced, and what is not. Output will be the same though.
  • If your alignments need to be spot on (i.e. initial character of line 2 must begin directly underneath 't' of preceding line), then you will probably want either a preformat element (where you may align as needed with normal space, e.g. <pre></pre>) or to use greyelf's suggestion (since you may use decimal values to really tune the alignment, e.g. -7.5em).

    You can use <<print " ">> where the space inside the "" is actually the unicode letter for "non-breaking space", […]
    I'd recommend against adding any raw invisibles which aren't normal spaces or line breaks. Tracking them down, should they escape, is a pain in the arse. If anyone was inclined to do it this way, I'd suggest using one of the NBSP's character escapes, '\xA0' or '\u00A0'. For example:
    → Harlowe
    (print: '\u00A0\u00A0\u00A0\u00A0')
    
    → SugarCube
    <<print '\u00A0\u00A0\u00A0\u00A0'>>
    

    Better yet, simply use the NBSP HTML character entity reference, &nbsp;. For example:
    &nbsp;&nbsp;&nbsp;&nbsp;
    
  • Thank you everyone. I am using Harlowe, apparently. I have not been able to get the various suggestions to work other than <pre> at the beginning of the stanza and </pre> at the end. That provided the format I am looking for. The problem is that when I look at the test result, everything within the <pre> becomes Times New Roman and all of the red lettering that was there, has converted to black. And, the resulting font size is smaller than the surrounding fonts of the rest of the document.
  • You can change the font-family and the font-size of the pre element using CSS like the following, which makes them both the same the text in the rest of the passage. The CSS needs to be placed within your Story Stylesheet area.
    pre {
    	font-family: inherit;
    	font-size: inherit;
    }
    
    ... you can assign other values to both the font-family and the font-size properties.

    You don't explain how you were making some of the lettering red but Harlowe does have a (colour:) macro which can be used to do this.
    <pre>"The Russia wants to eat us alive. The Russia's power made. She
    wants to (colour: red)[take] our cars from out our garages."</pre>
    
    ... note: I left out the whitespace needed to align the second line correctly below the first.
  • Greyelf,

    I was making selected portions of the poem red by using:

    <span style="color:red;">Wellll, it depends on who's sitting in the Big White House.<pre>...remaining text including the format of having succeeding lines being indented....</span>

    One of the other students looking at the current situatino discovered that making the change of adding the color again after the initial <pre> converted the following sentences back to red:

    <span style="color:red;">Wellll, it depends on who's sitting in the Big White House.<pre><span style="color:red;">...remaining text including the format of having succeeding lines being indented....</span>

    Like I said previously, I hope, the project is looking at Alan Ginsberg's poem "America" and relating it to today. In my section his lines are in black and in whatever default font and size that Twine uses, while my "response" to his lines are in red. And used to be the same size and font, but now appears to be Times New Roman and smaller than the Twine default font and size.

    Ah well, such is life.

    Thanks.

    Stan
Sign In or Register to comment.