root/trunk/spec/preprocess_ps.pl

Revision 7, 0.7 KB (checked in by oren, 8 months ago)

April 06, 2008 draft.

Implemented by YamlReference? 0.9.

Contains new productions, new examples, all the changes collected throughout
the last 3 years, and of course JSON compatibility.

Line 
1#!/usr/bin/perl -w
2
3use strict;
4use English;
5
6my $in_mark = 0;
7my $text = "";
8while (my $line = <>) {
9    # Change hl2 (dotted) to larger, more sparse dots
10    $line =~ s/\[0.5 0.5\] 0.0 setdash/[1 2] 0.0 setdash/g;
11    # Change hl4 to dot-dashed.
12    $line =~ s/\[0.499 0.499\] 0.0 setdash/[3.0 2.0 0.5 1.5] 0.0 setdash/g;
13    # Change all line widths to 0.6 for consistency
14    $line =~ s/[0-9.]* setlinewidth/0.5 setlinewidth/g;
15    # Remove the RenderX watermark
16    $in_mark = 1 if $line =~ /\(XSL\)/;
17    $in_mark = 0 if $line =~ /\(FO\)/;
18    $line =~ s/\(XSL\) show//g;
19    $line =~ s/\(\xb7\) show//g if $in_mark;
20    $line =~ s/\(FO\) show//g;
21    $line =~ s/\(RenderX\) show//g;
22
23    print $line;
24}
Note: See TracBrowser for help on using the browser.