Wikisource:TemplateScript

Usage
This library is useful when proofreading pages in the namespace. To enable it:  Paste this code into your Special:MyPage/common.js or m:Special:MyPage/global.js:  (optional) Go to Special:TemplateScript to disable scripts you don't use. 

Scripts
This library adds the following links to your sidebar:

 Add header adds the Template:Running header template to the header (and will use the special header for the current work if it's known). See here for instructions on how to use this script once installed TemplateScript/RunningHeader Add footer adds a reference list to the footer if the page contains references. Clean up OCR makes many automatic corrections and cleanup when proofreading a page after OCR:  You should always carefully review the changes after applying this script, since some changes may not always be correct. Make reference automatically gathers references. As you work your way through the page, when you encounter a reference, just mark it with  tags and continue. Once you've got to the end of the page and proofed the references, simply highlight each reference in turn, and use this function to move it to its proper position. <li>Convert to small caps converts the selected text to using the Template:Small-caps template.</li> <li>Convert to uppercase converts the selected text to UPPERCASE.</li> </ul>
 * clean up format:
 * move content at the start or end of the page into the header or footer;
 * replace <center ></center> with center;
 * replace Template:Float center with Template:Block center;
 * clean up whitespace:
 * remove trailing spaces;
 * remove spacing around em dashes or punctuation marks;
 * replace consecutive spaces with one space;
 * clean up newlines:
 * join words that are hyphenated across a line break;
 * move lines beginning with a quote character to a new paragraph;
 * move punctuation on a new line back onto previous line;
 * remove single line breaks (no effect in wikitext and usually an unneeded word wrap);
 * remove forced hard breaks at the end of paragraphs;
 * convert characters:
 * convert double hyphens to em dashes;
 * convert common HTML entity codes (like ) to characters (like );
 * convert curved quotes (“”‘’`) to straight quotes ("');
 * convert diacritic templates (like ) to characters (like );
 * correct common OCR errors:
 * remove numerals at the end of the page text (nearly always page numbers in the footer);
 * convert '1' parsed as 'i' (e.g., → );
 * correct 'th' parsed as 'tli' (e.g., → );
 * correct 'll' parsed as 'U' (e.g., → );
 * correct 'oul' parsed as 'oid' (e.g., → );
 * correct missing apostrophes (e.g., → ).

Usage
This library adds scripts for adding diacritics (like àéîö) and changing letter case. To enable it: <ol> <li>Paste this code into your Special:MyPage/common.js or m:Special:MyPage/global.js: </li> <li>(optional) Go to Special:TemplateScript to disable scripts you don't use.</li> </ol>

Scripts
This library adds the following links to your sidebar:


 * Make title link converts the selected text into a link with title case (like " " → " ").
 * Make author link converts the selected text into an author link with appropriate capitalisation (like " " → " " or " " → " ").
 * Convert to  converts the selected text to . This adds the  template, and converts the text to title case if it's in UPPERCASE.
 * Convert to UPPER converts the selected text to UPPERCASE.
 * Add diaeresis (ä) adds a diaeresis mark to the selected character (like " " → " ").
 * Add acute (á) adds an acute accent to the selected character (like " " → " ").
 * Add grave (à) adds a grave accent to the selected character (like " " → " ").
 * Add circumflex (â) adds a circumflex to the selected character (like " " → " ").
 * Add macron (ā) adds a macron to the selected character (like " " → " ").
 * Add ligature or hook converts the selected text to a ligature (like " " → " ") or adds a hook (like " " → " ").