Blame | Last modification | View Log | Download
compjoin.txt-------------A complex macro to join block of lines separated by End-Of-Line characters into a single line (a paragraph). The characters !"'.:;’" and ? are recognised as End-Of-Paragraph characters. Numbered titles and lists are recognised. Unorderd lists are recognised by the characters *· and -. All 'air' (multiple tabs and spaces) is removed.A useful preparation before importing texts retrieved from various sources (WWW, CD-roms) into a word processor.Created and contributed by Gerrit Kiers (gkiers@dds.nl)------------------------------------------File name: compjoin.tpmDisplay name: &Complex Paragraph JoinerAuthor: Gerrit Kiers, January 12 1999Description: A complex paragraph joiner for texts containing chapters and (un)orderd listsPlay once.Recorded keystrokes:Ctrl-EndEnterEnterF5: Mark All '^[\t ]*$' [Conditions: Text]MENU: Edit - Cut other - Bookmarked linesEndEnterEnterF8: Replace All ' +' with ' ' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '\t ' with '\t' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All ' \t' with '\t' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '\t+' with '\t' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '^[\t ]+' with '' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '[\t ]+$' with '' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '^\([0-9*·-].*\)' with '\n\1\n' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '\([!"'.:;’"?]\)\n\(["'"‘]?[A-Z]\)' with '\1\n\n\2' [Conditions: Text; MatchC; RegularE] [Scope: ActiveD]F8: Replace All '\(.\)\n\(.\)' with '\1 \2' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '\n\([0-9*·-].*\)\n' with '\1' [Conditions: Text; RegularE] [Scope: ActiveD]F8: Replace All '\([:;]\)\n\n\(["'"‘]?[A-Z]\)' with '\1\n\2' [Conditions: Text; MatchC; RegularE] [Scope: ActiveD]F8: Replace All '\n\n$' with '' [Conditions: Text; RegularE] [Scope: ActiveD]Ctrl-Home