diff options
| author | ivan <ivan> | 2003-12-15 03:41:29 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2003-12-15 03:41:29 +0000 | 
| commit | 3069f4a1173f9d20815e682d54e2aabdd0d399ce (patch) | |
| tree | 46b7ec012c9e825e440759b6462f1ad56d23a084 /FS | |
| parent | d711f5482cd5201a4d9d8a4b213e892570868f5e (diff) | |
add _latex_escape sub
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_bill.pm | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 797eb4f8d..f929073d6 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1482,6 +1482,21 @@ sub print_ps {  } +# quick subroutine for print_ps +# +# There are ten characters that LaTeX treats as special characters, which +# means that they do not simply typeset themselves:  +#      # $ % & ~ _ ^ \ { } +# +# TeX ignores blanks following an escaped character; if you want a blank (as +# in "10% of ..."), you have to "escape" the blank as well ("10\%\ of ...").  + +sub _latex_escape { +  my $value = shift; +  $value =~ s/([#\$%&~_\^{}])( )?/"\\$1". ( length($2) ? "\\$2" : '' )/ge; +  $value; +} +  #utility methods for print_*  sub balance_due_msg { | 
