User:Xerxesbacon
Useful REGEX
PPTools/Guiguts/Guiguts 2 Manual/Help Menu#Regex Quick Reference
Potential <abbr> tag
- <abbr title=""></abbr>
- [ |\n|>][A-Z]{1}[a-z]{2}\.
Find a string that begins with either a space, linebreak, or >; has 1 Uppercase letter; has 2 lowercase letters; and ends with 1 period.
The numbers can be changed to look for different types of abbreviations.
Use Ctrl+F's “Find All” with “Alpha/Type” selected in order to more easily see the different types.
Ideally, notice odd abbreviations when sequentially inspecting text and write them down.
Poetry/Metrical Lowercase after Line Break
- \n[a-z]
Because poetry typically has Uppercase characters after each line break. (Find line break, find a lowercase character)
Small Caps Regex
- [A-Z]\.?</sc
Check for All Small Caps, including A.M. and B.C. (Find an uppercase character, find a . either 0 or 1 times, find </sc)
Useful CSS
Side-by-side
TBD
Italic block with normal text for emphasis
/* === Italics block with normal emphasis === */
.italics {font-style: italic;}
.italics em { font-weight: normal; font-family: initial; font-style: normal; }
Hemstitch in Metrical Drama
Hemstitch: spreading a metrical line across the dialogue of multiple speakers, commonly indenting the dialogue so that a metrical line visually flows between the speakers.
Stage directions, speaker, and dialogue are on separate lines:
- Use /$ and $/ for the dialogue in order to preserve leading spaces.
TXT File:
- Surround the /$ $/ block with a /* */ block in order to add 2 spaces while preserving the leading spaces in the text.
- 2-step search/replace with regex:
- Search: /\$
- Replace: /*\n/$
- Search: \$/
- Replace: $/\n*/
- Rewrap the entire document
- The /$ and $/ remain and need to be manually removed like so, noting 2 spaces:
- Search: /\$\n
- Search: \n \$/
- Replace:
- Cleanup Rewrap Markers like normal
HTML File:
In the HTML, the leading space is automatically preserved with <span style="margin-left: 8.0em;"> and <br>
This styling functions, but the text will go off the screen on phones and small screens.
CSS:
.vanish {
visibility: hidden
}
This will render invisible the text used for alignment.
Follow these steps for a more efficient workflow:
- Replace span styling with span vanish:
- Search: style="margin-left:.*?;">(.*?)</span>
- Replace: class="vanish"> </span>\1
- Use this search to find the next and remaining lines:
- Search: <span class="vanish"> </span>
- Within the Span, copy and paste the previous line(s) of dialogue as needed for indentation, leaving a space at the end.