From 0b0cd79df48d0960febe885308fbbb34227f4fd4 Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Wed, 7 Sep 2011 17:56:30 +0200 Subject: [PATCH] _ escaping moved to .tex output --- populate.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/populate.sh b/populate.sh index 9a9b7e6..6dec3fa 100755 --- a/populate.sh +++ b/populate.sh @@ -114,15 +114,15 @@ function formatify() { ) | ( if [ "$1" = "tex" ]; then sed 's/à/\\`a/g;s/è/\\`e/g;s/ì/\\`i/g;s/ò/\\`o/g;s/ù/\\`u/g;s/áéíóú/\\'"'"'a/g; -s/é/\\'"'"'e/g;s/í/\\'"'"'i/g;s/ó/\\'"'"'o/g;s/ú/\\'"'"'u/g;s/°/\$\^\\circ\$/g; -s//\\textit{/g;s//\\textbf{/g;s/<\/[ib]>/}/g;s//URL: \\textit\{/g;s/<\/url>/\}/g; -s/“/``/g;s/”/'"''"'/g;s///g;s/<\/lang:tex>//g;s/]*>.*<\/lang:[^>]*>//g' + s/é/\\'"'"'e/g;s/í/\\'"'"'i/g;s/ó/\\'"'"'o/g;s/ú/\\'"'"'u/g;s/°/\$\^\\circ\$/g; + s//\\textit{/g;s//\\textbf{/g;s/<\/[ib]>/}/g; + s//\n\n/g;s/<\/url>/\n<\/url>\n/g;' | \ + sed '/^$/,/^<\/url>$/ { s/_/\\_/g; };' | tee -a loggone.txt | tr -d '\n' | \ + sed 's//URL: \\textit\{/g;s/<\/url>/\}/g; + s/“/``/g;s/”/'"''"'/g;s///g;s/<\/lang:tex>//g;s/]*>.*<\/lang:[^>]*>//g' elif [ "$1" = "htm" ]; then - sed 's//\n\n/g;s/<\/url>/\n<\/url>\n/g; - /^$/,/^<\/url>$/ { s/\\_/_/g; }; - /^$/,/^<\/url>$/ { s/\(^[^<].*\)/\1<\/a>/g; }; - s/^$//g;s/^<\/url>$//g' | tr -d '\n' | \ - sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + s/\([^<]*\)<\/url>/
\1<\/a>/g; s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' fi ) -- 2.17.1