#!/usr/bin/perl -i.bak use English; ## get input undef $INPUT_RECORD_SEPARATOR; $file = <>; #print STDERR "*********** I got: $file\n"; ## transform it $file =~ s/^:(.*)/\n\\ \\ \\ \\ \\ $1\n\\\\\n/gm; $file =~ s/
/\\begin{verbatim}/g; $file =~ s/<\/pre>/\\end{verbatim}/g; $file =~ s/-->/\\to/g; #s/http:\/\/([\w\/\.]+)~([\w\/\.]*)/http:\/\/$1\\~{}$2/g; $file =~ s/~/\\~{}/g; $file =~ s/\*\*([a-zA-Z][^\*]+)\*\*/\\textbf{$1}/g; $file =~ s/__([a-zA-Z][^_]+)__/\\emph{$1}/g; # print output print $file