On 31 Oct 2007, at 09:46, Guido Governatori wrote:
For many reasons, I would like to have the possibility to hard wrap my file (mainly for LaTeX files).
Reformat paragraph alone (^Q) does not work in the way I like, but selecting a line Shift-cmd-L and ^Q does what I want.
What I would like to know is whether there is a way to automate this procedure for a file (all the line in the file), or whether I have to write my own command for this (or there is a script called by ^Q).
Please forgive me, if I understood your problem wrong!
Sorry I should have been more precise.
Did you try to set the "wrap column" to what ever; select all (APPLE+A); press CTRL+Q?
I have tried it but it does not do what I want.
The problem with CTRL-Q is that it does not "respect" LaTeX constructions.
For example
long line to be wrapped [ math ] long line to be wrapped
with the proposed solution produces
long line to be wrapped [ math ] long line to be wrapped
while with the one line at a time reformatting the above case is handled properly.
Thanks anyway
Guido
-- Dr Guido Governatori School of Information Technology and Electrical Engineering The University of Queensland Brisbane, Queensland, 4072, Australia Phone: +61-(0)7-336 52907 Fax: +61-(0)7-336 54999 http://www.itee.uq.edu.au/~guido http://www.governatori.net http://www.defeasible.org