Line break after x characters?

The official TeXShop Support Forum.

Line break after x characters?

Postby mentor_ » Sun Feb 22, 2009 6:21 pm

Hi,

is it possible to tell TexShop to start a new line after x characters like in Word or Openoffice?
In other words: Is there a way to define a fixed page size?

Regards,
syrvn
mentor_
 
Posts: 5
Joined: Sat Feb 21, 2009 10:23 pm

Re: Line break after x characters?

Postby Herbert Schulz » Sun Feb 22, 2009 7:09 pm

Howdy,

I'd guess you don't really mean a break at the character level (i.e., in the middle of a word) and you don't want the soft wrap. The easiest way to do this is to pick a window width you're happy with (you can make it the default width using Source->Save Source Position), write your document and then choose Source->Wrap Lines->Hard Wrap (Sift-Cmd-H) and the complete document will be hard wrapped. If you really want to wrap at a character, even the middle of a word, select Source->Wrap Lines->by Character first.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: Line break after x characters?

Postby mentor_ » Sun Feb 22, 2009 11:59 pm

Hi,

very good stuff :)

Thank you very much again!

Best regards
Mentor
mentor_
 
Posts: 5
Joined: Sat Feb 21, 2009 10:23 pm

Re: Line break after x characters?

Postby grimpeur78 » Mon Nov 22, 2010 2:30 pm

Hi,

I'm reanimating this subject because I have a slightly different concern:

Is there a possiblity to have TeXShop do line breaks after a determined number of characters, e.g. 80, in order to enable version controlling as described here.

Thanks!
grimpeur78
 
Posts: 2
Joined: Mon Nov 22, 2010 2:24 pm

Re: Line break after x characters?

Postby Herbert Schulz » Mon Nov 22, 2010 6:45 pm

Howdy,

TeXshop is set up to only do soft wrapping although there is a hard wrap command that will put in explicit newlines. So you can pretty much simulate this: 1)use a monospace font for your source display (I use Monaco but there are others); 2) adjust your source window width so it is just 80 chars wide (write 10 Ms and duplicate that 8 times); 3)set the permenant width of the source window to that width (Source->Save Source Position); 4)execute Source->Wrap Lines->Hard Wrap when you're ready to save.

Things to be careful about: keep comments short since an extra newline can prematurely end your comment and leave the rest as confusing text; a similar thing can happen with long command definitions; you can generate extra spaces in long commands when they have newlines in the middle (these will drive you crazy!).

One user I know doesn't do anything like this. He simply hits return whenever a simple thought it complete. If you permanently make your window width 80 characters wide just learn to hit return at a convenient time as you approach that width.

Finally, just wish that those old data cards had more than 80 columns!
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: Line break after x characters?

Postby grimpeur78 » Wed Nov 24, 2010 9:26 pm

Hey,

thanks for that quick answer. I'll give your solution a try. In general I just want to find out how I get along with this way of writing. If it should drive me nuts, I'll prefer not to use diff. Anyway, as a lawyer there's no one around who would want to collaborate with me in LaTeX...

Thanks!
grimpeur78
 
Posts: 2
Joined: Mon Nov 22, 2010 2:24 pm


Return to TeXShop (engl.)

Who is online

Users browsing this forum: BarbDAlb, Jerlylox and 1 guest

cron