STP: Story Text Preparation
Purpose
I write stories in MS Word, then submit text versions to Literotica. I do not want to submit the MS Word documents because I prefer to have control over the conversion process. Converting Word documents to the text required by Literotica can be tedious, so I implemented the Story Text Preparation tool (STP) to automate it.
When copying text to the clipboard, MS Word puts multiple text formats on the clipboard including plain text ("text/plain") and HTML ("text/html"). STP reads the HTML version of the content when pasting from MS Word and that allows STP to support various formatting options including the simple ones (bold, italic) as well as heading text at various levels (heading 1, heading 2, etc.).
When STP converts the input text, it creates two versions of the output: the story text and the proof text.
The story text is mostly plain text. It will include limited HTML elements, such as B, EM, I, and STRONG. Literotica and other sites accept only a small subset of HTML elements and STP aims to follow those rules.
If some of your paragraphs are aligned center, right, or justified, STP will enclose that paragraph in the HTML P element and include the alignment attribute. It appears that LE will accept that HTML in plain text.
If your Word document includes lines that are split with shift-enter, STP will use the HTML BR element to split the lines.
The proof text includes all the story text and additional HTML. It has these goals:
- Make the story look similar to how it will appear on Literotica.
-
Provide tools to make proofing easier.
- A word count
- A table of contents to help navigation
- Highlights that call attention to words that are commonly misused
- Buttons to navigate to highlighted words so you can review them
The proof text is rendered on the STP page. You can review the story there if you want. If you prefer, you can save it to a local HTML file.
Usage
-
In MS Word or your editor of choice, copy the story text.
STP has been optimized for use with the HTML written to the clipboard by MS Word, but it will process any HTML you pass to it.
- On the STP page, set the options to suit your preferences. STP remembers your choices. If you close the page, the next time you open it, the options will have the same values.
- On the STP page, click in the large textbox in the Input panel.
- Press Ctrl+V to paste the text into the Input panel textbox.
- If the clipboard contains HTML, as it will when you copy the text from MS Word or another editor that places HTML on the clipboard, STP will process the HTML and insert the resulting text. Pasting HTML will also trigger the next step automatically.
- If you did not paste HTML, click the Convert Text to Story button or press Ctrl+Alt+C.
For a demonstration, download the example MS Word document then use it following the instructions above.
Keywords
STP supports several keywords you may add to your document to influence the story text, the proof text, or both.
Keywords take the general form keyword: text. For several keywords, the text is optional or ignored.
- Story: title
-
The Story keyword sets the title of the story. Any text prior to the Story keyword will not be part of the story text. This is useful because you can add notes you don't want to publish, such as character descriptions or other notes, and that text can remain in your MS Word document without becoming part of the story text.
When STP counts the words in your story, it ignores any words that precede the Story keyword.
Story Details
In the MS Word Navigation pane shown below, there are several headings above the Story heading (Cast, Outline). The content in those sections is not part of the story. Because of the inclusion of the Story keyword, all the content before it is not included in the story text. It is only included in the proof text.
- Bookmark: <text>
-
The Bookmark keyword creates a table-of-contents entry in the proof version of the story. The bookmark is not included in the story text.
Bookmark Details
In MS Word, it's useful to include mock headings that help you locate places of interest in your story. It might be some text that you want to rewrite or background information that you need to reference when writing another part of the story. You do not want those headings to create text in the actual story because they are for your use only. If you use the keyword "Bookmark:" as a prefix in the heading, STP will create a table-of-contents entry and will include the bookmark text in the proof version. The bookmark text will be ghost text.
- Chapter: title
-
The Chapter keyword designates the start of a chapter within the current story. If your story is split into multiple separate Literotica stories, you may or may not divide each story into chapters or some other kind of sub-section.
Typically, you do not need to specify the Chapter keyword when copying text from MS Word into STP. STP recognizes text set to a heading style, such as Heading 1 or Heading 2, as a chapter title.
In the story text, the chapter title will appear in bold after the Chapter Divider text, if any.
In the proof text, the chapter title will appear in the table of contents and as bold text in the body of the story.
See: Chapter Numbers
- Description: <text>
-
Adds the story description to the proof text. The description does not appear in the story text.
- Epilog: <optional title>
-
Creates a chapter break and includes the optional title or "Epilog".
You may use the keyword "Epilogue:" instead. It includes the optional title or "Epilogue".
Epilog chapters are not numbered.
- Scene: <optional scene title>
-
The Scene keyword designates the start of a new scene.
In the story text, the new scene will be indicated by the Scene Divider. The optional scene title does not appear in the story text.
In the proof text, the scene title will appear in the table of contents and as ghost text in the body of the story.
Scene Details
In MS Word, you can indicate Scene changes by including a heading with the "Scene:" keyword as a prefix. This adds the scene to the MS Word Navigation page, which is convenient.
Using the Scene keyword helps ensure that your scene breaks are consistent.
General Options
Chapter Numbers
The Chapter Numbers checkbox determines whether or not STP adds a sequential chapter number as a prefix to the heading text. When checked, STP will add the chapter number. The default is checked.
Allow Curly Quotes
The Allow Curly Quotes checkbox determines whether or not STP converts "curly" quotes to "straight" quotes. When checked, STP will not change curly quotes to plain quotes. When unchecked, STP will change curly quotes to plain quotes. The default is unchecked.
Chapter Divider
The Chapter Divider textbox determines the text STP will insert into the story text before a chapter heading. The default is empty, so no divider text is inserted. If you want to add symbols or other text on a line above the chapter title, key the desired text into the textbox.
Scene Divider
The Scene Divider textbox determines the text STP will insert into the story text to signify a change of scene. The default is "***
", three asterisks.
Highlight Options
STP will highlight words in the proof version of the story based on the checkboxes in the Highlights panel. Highlights are not added to the story text. Highlights are intended to help you find commonly misused words.
If Enable is checked, the highlight feature ie enabled. When enabled, the remaining checkboxes detemine which words are highlighted.
Quotes
The Quotes checkbox is used to highlight all quotes—single and double, plain and curly—to draw attention to possible quote usage errors. The default is unchecked.
Whether the Quotes checkbox is checked or unchecked, STP attempts to identify unbalanced quotes.
Unbalanced Quotes Details
STP counts the number of double-quote characters ("
, “
, or ”
) in a paragraph. If there is an odd number, STP highlights the last double-quote character. The intent is to alert you to unbalanced quotes. You may have forgotten to add an ending quote, or added an extra one.
If there is only one double-quote character, and it is the first character in the paragraph, STP will highlight the double-quote character. If the paragraph is part of a monologue where the speaker continues talking in the next paragraph, omitting the trailing double-quote character is not an error. However, STP does not recognize monologues. Ignore the highlight in that case.
Problem Word Checkboxes
The remaining checkboxes highlight problem words that may be misused. English is complicated and the problem words have more meanings or usages than described here. This is intended as a rough guide.
The problem word options are described at the end of this page.
All and None Buttons
The All button is a shortcut for checking all the options.
The None button is a shortcut for unchecking all the options.
Ghost Text
The proof version includes text that is not included in the story text. This incldues scene titles, bookmarks, etc., that you have added for your own use while writing or proofing the story. STP calls those items "ghost text". Ghost text is gray so you can identify it easily.
Proof Navigation
After STP converts the text and produces both the plain text version and the proof version, it adds the proof version to the end of the page. It also adds some navigation buttons at the bottom of the window:
- Toggle Highlights – Turn the problem words highlighting off or on.
- Toggle Ghost Text – Show or Hide ghost text entries.
- Previous Highlight – Move to the previous highlighted word.
- Next Highlight – Move to the next highlighted word.
Saving Proof Version
You can use the Copy to Clipboard button in the Proof Version pane to copy the HTML for the proof version to the clipboard. From there, you can paste the clipboard contents into a text editor, such as Notepad, to save the proof version as its own standalone HTML page. Double-click the resulting file to open the file in your browser.
To operate properly, the standalone HTML page must be saved in a folder that includes these two files:
Problem Words
- Affect, Effect
-
Both "affect" and "effect" can be be nouns or verbs.
Typically, "affect" is used as a verb and means "to change or influence", so, "Diet affects health."
"Effect" is typically used as a noun and means "a change as the result of some action or condition", so, "Her makeup had the desired effect."
- Complement, Compliment
-
"Complement" describes how something makes another thing better, "The wine complements the cheese."
"Compliment" means praise, "He complimented her dress."
- Desert, Dessert
-
As a noun, a desert is land where there is lots of sand. As a verb, to desert means to abandon, leave, or withdraw.
A dessert is food typically served at the end of a meal.
- Ensure, Insure
-
These words have an overlap in meaning and that introduces confusion.
To ensure means to make certain, "His support ensured our victory."
To insure may also mean to make certain, but also means to guarantee financial compensation. Use insure for financial matters.
- Hear, Here
-
These homonyms are sometimes used incorrectly, perhaps due to speach-to-text tools.
"Hear" is a verb meaing to perceive sound, "I cannot hear you, you're speaking too softly."
"Here" indicates location or placement, "The party is here."
- Its, It's
-
"Its" is the possessive of it.
"It's" is the contraction of "it is" or "it has".
- Lose, Loose
-
Lose means to fail to win, "I hope I don't lose the game." Lose also means to fail to keep control, "I hope I don't lose my keys."
Loose means not tight, "The screw was loose." Loose also means not gathered together, "The papers were loose all over the desk."
- Their, Their, They're
-
These homonyms are often used incorrectly.
"Their" is the possessive of they, "Their goal was to win."
"There" indicates location or placement, "The keys are over there."
"There" has other meanings, but none overlap with "their" or "they're".
"They're" is the contraction of "they are", "They're going to leave soon."
- To, Too, Two
-
These homonyms are sometimes used incorrectly.
"To" is a preposition used in many different ways. None of its meanings overlap with "too" or "two".
"Too" means "also" or "very", "You're invited, too," or "You're too funny!"
"Two" is the number after one, "I have two left feet."
- Your, You're
-
"Your" is the possessive of you.
"You're" is the contraction of "you are".
Privacy
STP is a single-page application where all processing occurs in scripts that run on your PC. When you visit the page, your browser downloads STP's HTML, stylesheets, and script. After that, there is no further communication with the server. Your story text stays on your PC and is never shared with any remote server. STP does not use cookies and does not serve ads. It is completely free to use.
STP keeps track of your preferences for its options. It writes them using localStorage, a facility provided by the browser. STP does not save any of the story text, and it does not save any personally identifiable information in localStorage or anywhere else.
STP does not use any third-party scripts. It does not fetch any assets (stylesheets, images) from any third-party sites.
Copyright
Story Text Preparation, also known as STP, is subject to copyright and you may not copy, redistribute, or amend the STP HTML, stylesheets, or script.
Copyright © 2023 by Muralibis.com