summaryrefslogtreecommitdiff
path: root/info/examples/ltt/conv.pl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/ltt/conv.pl
Initial commit
Diffstat (limited to 'info/examples/ltt/conv.pl')
-rw-r--r--info/examples/ltt/conv.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/info/examples/ltt/conv.pl b/info/examples/ltt/conv.pl
new file mode 100644
index 0000000000..c779961f8d
--- /dev/null
+++ b/info/examples/ltt/conv.pl
@@ -0,0 +1,35 @@
+# conv.pl <indat>
+$rmfont = "/Palatino-Roman";
+$ttfont = "/Courier";
+$sffont = "/Helvetica";
+
+$i=0;
+while (<>)
+{ if (!$i)
+ { ($first,$num) = $ARGV =~ /(\w+).(\d+)/;
+ $output = $first.$num.".eps";
+ print "generating $output\n";
+ open(output,">".$output);
+
+ # ergänze die EPSF-Kennung
+ print output "%!PS-Adobe-3.0 EPS-1.2\n";
+
+ # schreibe den ganzen Prolog
+ do { $_ = <>; print output $_;
+ } while (!/%%EndProlog/);
+
+ # füge nun den Fonthack ein
+ # ist für andere Fonts abzuändern!!!
+ print output <<EOP
+/pala $rmfont def
+/courier $ttfont def
+/cmr10 $rmfont def % wg. TeX-Grundschrift
+/cmr7 $rmfont def
+/fshow {exch findfont exch scalefont setfont show} def
+EOP
+ }
+ else
+ { print output $_; }
+ ++$i;
+ if (eof) { $i=0; close(output); }
+}