How to specify number of lines per page?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
unwatched
Posts: 1
Joined: Mon Apr 21, 2008 6:35 am

How to specify number of lines per page?

Post by unwatched »

Hi,

I'm working on a transcript; I need the text to be 25 lines per page, with an automatic page break after 25 lines. Is it possible to do? If so, how?

Thanks in advance.
ACRobin
Posts: 134
Joined: Fri Nov 04, 2005 9:51 pm
Location: Northumberland,UK
Contact:

Post by ACRobin »

I am sure it is possible and there at least two ways of doing what you want.

A page beak character is a form feed - character 12 is ASCII (0x0C in hex).

My solution would be to write a macro to move down 25 lines and insert a page break (Edit - Insert - Page Break). I would then run this macro until end of file.

A crude solution but will work.

I am sure there will be a way to do the same using a regular expression.
HerNameWasTextPad
Posts: 59
Joined: Fri Apr 18, 2008 3:25 am

Post by HerNameWasTextPad »

ACRobin wrote:A crude solution . . . would be to write a macro to move down 25 lines and insert a page break (Edit - Insert - Page Break).
With all due respect, ACRobin, yours is not a crude solution. It is an intelligent solution and, in fact, THE solution, as this is not a job for regular expressions.

It is no accident that the creators of TextPad have implemented a macro facility. Macros are very useful.
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

This is very much a job for regular expressions. But TextPad's regex engine is too weak to do it. WildEdit's one can do it.

Yes, macros are useful, but far less useful than a scripting facility.

Edit: Corrected typo.
Last edited by ben_josephs on Fri Apr 25, 2008 10:53 pm, edited 1 time in total.
HerNameWasTextPad
Posts: 59
Joined: Fri Apr 18, 2008 3:25 am

Post by HerNameWasTextPad »

ben_josephs wrote:WildEdit . . . can do it.
Right . . . but at the moment "unwatched" appears to be in need of a quick TextPad solution, so "macros to the rescue!"
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
HerNameWasTextPad
Posts: 59
Joined: Fri Apr 18, 2008 3:25 am

Post by HerNameWasTextPad »

- Before running the macro, don't forget to take the word wrap off manually (Ctrl+Q, W), for each file that is to be processed

- When recording the macro, don't forget to press "Home" after inserting the Page Break character, so that the cursor will be ready for the macro's succeeding iteration
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
Post Reply