Re: LaTeX line length formatting

2009-12-03 Thread Jeremy C. Reed
On Tue, 22 Sep 2009, Jeremy C. Reed wrote:

 I am looking for a tool that will fold or format long LaTeX lines. It 
 will need to know LaTeX, so it doesn't break commands or environments. 
 (Examples: will properly handle % comments and not split a long 
 \includegraphics filename.)

So I never found this.

So I always thought that LyX did a good job at this folding long lines 
into multiple lines -- my many .lyx documents show this. But then today 
I looked at a document (#LyX file created by tex2lyx 1.6.2 and 
\lyxformat 247) and it had long lines. I opened it in LyX 1.6.4.1 and 
and LyX said:

Warning: #LyX file created by tex2lyx 1.6.2

Why the warning?

When I saved it, it folded the long lines (which is what I wanted 
because I want diffs to be readable).

So I am using LyX for this project. (I was going to try Kile but it 
chopped and created broken LaTeX when it shortened lines.)

Thanks again to LyX!


Re: LaTeX line length formatting

2009-12-03 Thread Jeremy C. Reed
On Tue, 22 Sep 2009, Jeremy C. Reed wrote:

 I am looking for a tool that will fold or format long LaTeX lines. It 
 will need to know LaTeX, so it doesn't break commands or environments. 
 (Examples: will properly handle % comments and not split a long 
 \includegraphics filename.)

So I never found this.

So I always thought that LyX did a good job at this folding long lines 
into multiple lines -- my many .lyx documents show this. But then today 
I looked at a document (#LyX file created by tex2lyx 1.6.2 and 
\lyxformat 247) and it had long lines. I opened it in LyX 1.6.4.1 and 
and LyX said:

Warning: #LyX file created by tex2lyx 1.6.2

Why the warning?

When I saved it, it folded the long lines (which is what I wanted 
because I want diffs to be readable).

So I am using LyX for this project. (I was going to try Kile but it 
chopped and created broken LaTeX when it shortened lines.)

Thanks again to LyX!


Re: LaTeX line length formatting

2009-12-03 Thread Jeremy C. Reed
On Tue, 22 Sep 2009, Jeremy C. Reed wrote:

> I am looking for a tool that will fold or format long LaTeX lines. It 
> will need to know LaTeX, so it doesn't break commands or environments. 
> (Examples: will properly handle % comments and not split a long 
> \includegraphics filename.)

So I never found this.

So I always thought that LyX did a good job at this folding long lines 
into multiple lines -- my many .lyx documents show this. But then today 
I looked at a document ("#LyX file created by tex2lyx 1.6.2" and 
"\lyxformat 247") and it had long lines. I opened it in LyX 1.6.4.1 and 
and LyX said:

Warning: #LyX file created by tex2lyx 1.6.2

Why the warning?

When I saved it, it folded the long lines (which is what I wanted 
because I want diffs to be readable).

So I am using LyX for this project. (I was going to try Kile but it 
chopped and created broken LaTeX when it shortened lines.)

Thanks again to LyX!


LaTeX line length formatting

2009-09-22 Thread Jeremy C. Reed
I am looking for a tool that will fold or format long LaTeX lines. It 
will need to know LaTeX, so it doesn't break commands or environments. 
(Examples: will properly handle % comments and not split a long 
\includegraphics filename.)

It would be great if the tool can be used non-interactively, such as 
piped on the Unix command line. Like a LaTeX knowledgable fmt or fold.

The reason I need this is that I read diffs of some LaTeX files and I 
don't want to see a diff of 80 word or 500 character lines (multiple 
sentences). By shortening lines, diffs are more manageable.

(On that note, I know some use a % comment on a new line in between 
every sentence -- the paragraph renders together, but diffs are easier 
to read. Can LaTeX export like that?)

I did look at and try LaTeXTidy.pl, but it doesn't do what I want.

Does LyX include any code or scripts that can be reused for that? It 
looks like LyX's LaTeX export formats nicely.

Or do you know of any tools for this?

Thanks


LaTeX line length formatting

2009-09-22 Thread Jeremy C. Reed
I am looking for a tool that will fold or format long LaTeX lines. It 
will need to know LaTeX, so it doesn't break commands or environments. 
(Examples: will properly handle % comments and not split a long 
\includegraphics filename.)

It would be great if the tool can be used non-interactively, such as 
piped on the Unix command line. Like a LaTeX knowledgable fmt or fold.

The reason I need this is that I read diffs of some LaTeX files and I 
don't want to see a diff of 80 word or 500 character lines (multiple 
sentences). By shortening lines, diffs are more manageable.

(On that note, I know some use a % comment on a new line in between 
every sentence -- the paragraph renders together, but diffs are easier 
to read. Can LaTeX export like that?)

I did look at and try LaTeXTidy.pl, but it doesn't do what I want.

Does LyX include any code or scripts that can be reused for that? It 
looks like LyX's LaTeX export formats nicely.

Or do you know of any tools for this?

Thanks


LaTeX line length formatting

2009-09-22 Thread Jeremy C. Reed
I am looking for a tool that will fold or format long LaTeX lines. It 
will need to know LaTeX, so it doesn't break commands or environments. 
(Examples: will properly handle % comments and not split a long 
\includegraphics filename.)

It would be great if the tool can be used non-interactively, such as 
piped on the Unix command line. Like a LaTeX knowledgable fmt or fold.

The reason I need this is that I read diffs of some LaTeX files and I 
don't want to see a diff of 80 word or 500 character lines (multiple 
sentences). By shortening lines, diffs are more manageable.

(On that note, I know some use a % comment on a new line in between 
every sentence -- the paragraph renders together, but diffs are easier 
to read. Can LaTeX export like that?)

I did look at and try LaTeXTidy.pl, but it doesn't do what I want.

Does LyX include any code or scripts that can be reused for that? It 
looks like LyX's LaTeX export formats nicely.

Or do you know of any tools for this?

Thanks