latex/pdf tilde mark (bug in texlive, missing (at this instant) provide workaround)
authorRalph Amissah <ralph@amissah.com>
Wed, 31 Dec 2008 05:34:12 +0000 (00:34 -0500)
committerRalph Amissah <ralph@amissah.com>
Wed, 31 Dec 2008 05:34:12 +0000 (00:34 -0500)
CHANGELOG
lib/sisu/v0/texpdf.rb
lib/sisu/v0/texpdf_format.rb

index 4708c150399589f088c99b8ebf03fb9a7552eeda..1a343a70ea48487375c951cd5c064e7acf8955df 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,16 @@ Reverse Chronological:
 
 %% STABLE MANIFEST
 
+%% sisu_0.70.4.orig.tar.gz (2008-12-31:52/3)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.4.orig.tar.gz
+  sisu_0.70.4.orig.tar.gz
+  sisu_0.70.4-1.dsc
+  sisu_0.70.4-1.diff.gz
+
+  * latex/pdf tilde mark (bug in texlive, missing (at this instant) provide
+    workaround), similar to issue with "bullet" noted in sisu 0.70.1
+    [may be necessary to do an inventory of special characters?]
+
 %% sisu_0.70.3.orig.tar.gz (2008-12-24:51/3)
 http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.3.orig.tar.gz
   adb3dbe85004a6bc10443d60029b6a2b0a11b9f7aad10a170f5b278f0a73d5e4 1546917 sisu_0.70.3.orig.tar.gz
index abafb30ff3befc5e334f13dd235b22504a990220..1cad7ca5ec332174fc8bcf265d9897a04c7e8e74 100644 (file)
@@ -545,6 +545,7 @@ module SiSU_TeX
 \\makeatother
 \\makeatother
 \\chardef\\txtbullet="2022
+\\chardef\\tilde="7E
 % \\sloppy
 \\begin{document}
 WOK
index 2efec5c4459c3dbc1e1532348d38f25bded846da..e156c67a3396c08e3f28e34d04579f4706f23d23 100644 (file)
@@ -1103,7 +1103,8 @@ WOK
       while string =~/(http:\/\/\S+?)(?:<=tilde>\S+)+/ #tilde in urls \href treated differently from text
         string.gsub!(/(http:\/\/\S+?)(?:<=tilde>(\S+))+/,'\1~\2')
       end
-      string.gsub!(/<=tilde>/,'{$\sim$}')
+      string.gsub!(/<=tilde>/,'{$\tilde$}')
+      #string.gsub!(/<=tilde>/,'{$\sim$}')
       string.gsub!(/<=pipe>/,'{\textbar}')
       string.gsub!(/<=caret>/,'{\^{~}}')
       #string.gsub!(/<=caret>/,'\^{}')
@@ -1211,6 +1212,12 @@ WOK
       else string.gsub!(/&/,'<=amp>')
       #else string.gsub!(/(\s+&\s+)/,' and ')
       end
+      if @@flag_code;
+        string.gsub!(/\\~(\\\{)/,'{$\tilde$}\1')
+        string.gsub!(/(\\\})\\~/,'\1{$\tilde$}')
+        string.gsub!(/\\~(\[)/,'{$\tilde$}\1')
+        string.gsub!(/(\])\\~/,'\1{$\tilde$}')
+      end
       string.gsub!(/§/u,'\S') #latex: space between next character not preserved? #string.gsub!(/§ /,'\S ')
       string.gsub!(/£/u,'\pounds')
       string.gsub!(/&\S+?;/,' ')
@@ -1283,7 +1290,8 @@ WOK
       while string =~/(http:\/\/\S+?)(?:<=tilde>\S+)+/ #tilde in urls \href treated differently from text
         string.gsub!(/(http:\/\/\S+?)(?:<=tilde>(\S+))+/,'\1~\2')
       end
-      string.gsub!(/<=tilde>/,'{$\sim$}')
+      string.gsub!(/<=tilde>/,'{$\tilde$}')
+      #string.gsub!(/<=tilde>/,'{$\sim$}')
       string.gsub!(/<=pipe>/,'{\textbar}')
       string.gsub!(/<=caret>/,'{\^{~}}')
       #string.gsub!(/<=caret>/,'\^{}')