On 19 Dec, 2006, at 12:53 PM, Charles de Miramon wrote:
William Adams wrote:
On Dec 19, 2006, at 12:45 PM, Stefano Franchi wrote:
Unless I could find a program/editor allowing me to do multiple
replace over multiple files at once. I am not aware or any such
programs for Mac/Linux, though?
The free BBedit Lite could do this.
I believe the free TextWrangler can as well.
If you'd liefer stick w/ opensource, smultron can.
William
You can also use a sed script like this one :
----Clean latex before importing ----
#! /bin/sh
TEMP=temp-$1
cp $1 $TEMP
sed '
s/\\"e/ë/g;
s/\\"i/ï/g;
s/\\"u/ü/g;
s/\\^i/î/g;
s/\\^e/ê/g;
s/\\'\''e/é/g;
s/\\`a/à/g;
s/\\`e/è/g;
s/\\^a/à/g;
s/\\^o/ô/g;
s/\\^u/û/g;
s/\\`u/ù/g;
s/\\^I/Î/g;
s/\\^E/Ê/g;
s/\\^O/Ô/g;
s/\\^U/Û/g;
s/\\`A/À/g;
' $TEMP > temp-out
mv temp-out $TEMP
#cmp -s $1 $tmp && rm -f $tmp || mv -f $tmp $1
------------------------------------------
Save the script under the name cleanlatex, make it executable. Install
sed
if it is not on your computer (it is generally a standard on Unix) and
then
run cleanlatex myfile.tex and it will create a temp-myfile.tex
Hi Charles,
many, many thanks. I have never used sed in my life, though, and I
need a bit further help:
the converted pattern for accent-acute e is
\'{e}
which I want to convert to é
Will the pattern be:
s/\\'/\{e\}/é/g;
and similarly for all the other chars?
Thanks,
Stefano
Tested on Linux.
Cheers,
Charles
--
http://www.kde-france.org
__________________________________________________
Stefano Franchi
Department of Philosophy Ph: (64) 9 373-7599 x83940
University Of Auckland Fax: (64) 9 373-8768
Private Bag 92019 [EMAIL PROTECTED]
Auckland
New Zealand