[OS X TeX] verbatim problems
David Watson
dewatson at mac.com
Thu Jul 6 04:27:44 CEST 2006
If the line endings are DOS, here is a little perl script to remove
them.
#!/usr/bin/perl
{
foreach $inFileName (@ARGV) {
open INTEXTFILE , $inFileName;
open OUTTEXTFILE, ">". $inFileName . ".con";
binmode OUTTEXTFILE;
binmode INTEXTFILE;
@textFile = <INTEXTFILE>;
foreach $textline (@textFile) {
$textline =~ s/\x0d//g;
print OUTTEXTFILE $textline ;
};
close (INTEXTFILE);
close (OUTTEXTFILE);
rename($inFileName,$inFileName . ".dos");
rename($inFileName . ".con",$inFileName);
}
}
Save this code to dos2unix.pl and run "chmod 755 dos2unix.pl".
Run the code with your source file from the Terminal as follows:
./dos2unix.pl source
On Jul 5, 2006, at 7:53 PM, Alan Litchfield wrote:
>
> George Gratzer wrote:
>> Trying to typeset by LaTeX book, starting with Chapter 15 (the BiBTeX
>> chapter), I get error messages
>>
>> !Missing $ inserted.
>> <inserted text>
>> $
>> l.712 Algebra",^^M
>>
>
> [snipped]
>
> Looks like a line ending problem to me. Try opening the file in a
> local text
> editor, remove the line break, hit return, and save it. Then try
> again. It
> should remove the error.
>
> Usually these come from text that has been brought in from 'other
> platforms'.
>
> Cheers
> Alan
>
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
> & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list