Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
go ahead... be a heretic
 
PerlMonks  

Re: PostScript-Report - Sections

by Monk::Thomas (Sexton)
on Aug 13, 2013 at 16:28 UTC ( #1049311=note: print w/ replies, xml ) Need Help??


in reply to PostScript-Report - Sections

Is PostScript-Report absolutely necessary? If not, then there may be a different way: Use TeX as intermediate format. This comes especially handy if the report is also required as HTML or any other format that TeX can produce.

Richard Hardwick has written a nice article about that: http://tug.org/pracjourn/2010-1/hardwick/

However I must confess it introduces a new set of problem: Properly escaping the meta characters. This is what I came up with. A more elegant solution may exist.

# requires 'use utf8' and a utf8-enabled editor sub latexise_umlauts { my $string = shift; $string =~ s/\\/{\\backslash}/g; $string =~ s/\$/{\\\$}/g; $string =~ s/&/{\\&}/g; $string =~ s/%/{\\%}/g; $string =~ s/#/{\\#}/g; $string =~ s/_/{\\_}/g; $string =~ s/>/{\\textgreater}/g; $string =~ s/</{\\textless}/g; $string =~ s//\\"a/g; $string =~ s//\\"o/g; $string =~ s//\\"u/g; $string =~ s//\\"A/g; $string =~ s//\\"O/g; $string =~ s//\\"U/g; $string =~ s//\\ss{}/g; $string =~ s//\\textsuperscript{2}/g; $string =~ s//\\textsuperscript{3}/g; return $string; }


Comment on Re: PostScript-Report - Sections
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1049311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-04-17 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (451 votes), past polls