- Jan 22, 2020
- 59
- 157
So, I've been exploring Twine 2.0/Tweego for a bit. Ran into an interesting challenge (to me lol). I did some lazy typing of a scene just so I had something to work with. It's not great at all, I did not try and it's also not the focus of my question.
I'd like to simplify styling my story text without the need to break every paragraph down into a <P> tag manually. I once wrote an application to take text files and do this for me, and might write another if there are no other options. However, manually adding <p> tags over the length of a story would be incredibly tedious, not to mention obnoxious for editing. So I'm seeking solutions and wisdom before I do something overly complicated (something I do often lol).
Here are my objectives:
Here was my original attempt which produced unexpected results. First, Twine (maybe Tweego's compiler?) added <br> tags after every return. No idea why, but made the whole thing look ridiculous which is why I added the [nobr] tag to the passage. Not sure why it would add them, but this did correct that odd spacing. However, the text-align: justify; did nothing. I figured that's probably an HTML thing or my spotty CSS. Not sure which.
This is what the results looked like:
Here is the code:
Activating [nobr] did what you'd expect. Which lead me to my next solution.
So, I went in and added <p> tags manually, updated the CSS to include indent on them and it produced the following, much cleaner version.
Here is the code that got me there:
So, I technically have a solution but it's a tedious one. Looking for advice or insight as to how some other's would approach this task before I start making side applications to format it for me. lol
Thanks for responses in advance!
I'd like to simplify styling my story text without the need to break every paragraph down into a <P> tag manually. I once wrote an application to take text files and do this for me, and might write another if there are no other options. However, manually adding <p> tags over the length of a story would be incredibly tedious, not to mention obnoxious for editing. So I'm seeking solutions and wisdom before I do something overly complicated (something I do often lol).
Here are my objectives:
- have justified text like a novel would.
- have indention of paragraphs.
CSS:
.story-text {
text-align: justify;
padding: 0;
margin: 0;
}
.story-text p {
text-indent: 30px;
padding: 0;
margin: 0;
}
This is what the results looked like:
Here is the code:
You don't have permission to view the spoiler content.
Log in or register now.
So, I went in and added <p> tags manually, updated the CSS to include indent on them and it produced the following, much cleaner version.
Here is the code that got me there:
You don't have permission to view the spoiler content.
Log in or register now.
So, I technically have a solution but it's a tedious one. Looking for advice or insight as to how some other's would approach this task before I start making side applications to format it for me. lol
Thanks for responses in advance!