[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5746] trunk/LedgerSMB/Template/LaTeX.pm



Revision: 5746
          http://sourceforge.net/p/ledger-smb/code/5746
Author:   einhverfr
Date:     2013-05-04 07:53:57 +0000 (Sat, 04 May 2013)
Log Message:
-----------
To be merged with 1.3, better fix for emdashes and en-dashes in LaTeX

Modified Paths:
--------------
    trunk/LedgerSMB/Template/LaTeX.pm

Modified: trunk/LedgerSMB/Template/LaTeX.pm
===================================================================
--- trunk/LedgerSMB/Template/LaTeX.pm	2013-05-04 05:01:15 UTC (rev 5745)
+++ trunk/LedgerSMB/Template/LaTeX.pm	2013-05-04 07:53:57 UTC (rev 5746)
@@ -125,8 +125,25 @@
 
     if (defined $vars){
             $vars =~ s/([&\$\\_<>~^#\%\{\}])/$escapes{$1}/g;
+            $vars =~ s/[ââ]/---/g;
+            $vars =~ s/\xa0/ /g;
+            $vars =~ s/\x91/'/g;
+            $vars =~ s/\x92/'/g;
+            $vars =~ s/\x93/"/g;
+            $vars =~ s/\x94/"/g;
+            $vars =~ s/\x97/-/g;
+            $vars =~ s/\xab/"/g;
+            $vars =~ s/\xa9//g;
+            $vars =~ s/\xae//g;
+            $vars =~ s/\x{2018}/'/g;
+            $vars =~ s/\x{2019}/'/g;
+            $vars =~ s/\x{201C}/"/g;
+            $vars =~ s/\x{201D}/"/g;
+            $vars =~ s/\x{2022}//g;
+            $vars =~ s/\x{2013}/-/g;
+            $vars =~ s/\x{2014}/-/g;
+            $vars =~ s/\x{2122}//g; 
             $vars =~ s/â/--/g;
-            $vars =~ s/[ââ]/---/g;
             $vars =~ s/"(.*)"/``$1''/gs;
             $vars =~ s/\n/\\\\/gm;
             $vars =~ s/(\\)*$//g;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.