Subversion Repositories DMV.t01c1

Rev

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.tpm
Display name:   &Complex Paragraph Joiner
Author:         Gerrit Kiers, January 12 1999
Description:    A complex paragraph joiner for texts containing chapters and (un)orderd lists

Play once.

Recorded keystrokes:
Ctrl-End
Enter
Enter
F5: Mark All '^[\t ]*$'     [Conditions: Text]
MENU: Edit - Cut other - Bookmarked lines
End
Enter
Enter
F8: 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