#!/usr/local/bin/perl # # vv - a Perl script for producing "Virtual Viewgraphs", a chain of linked # frames of HTML pages for talks, presented directly off the web, or from # a laptop cache of web pages. # # Released into the public domain by Aake Nordlund, NBIfAFG & TAC, Copenhagen, # 18-sep-98. # # NO support is provided, this is "use as is" software, provided as a service to # those, who in principle could have written this piece of perl code themselves, # and / or are smart enough to adjust it to their own needs and preferences. # # Syntax: vv [ -f ] [ -p pp] [ -c sz ] [ -t sz ] [ 1.sld 2.sld 3.sld ... ] # # -f : "fold" section headers (just try it) # -pr : printout format, with vertical centering and larger text size # -p pp : percentage width of the contents fram # -c sz : relative size of contents text (default: -1) # -t sz : relative size of talks text (default:+2 of web, +3 for printout) # 1.sld : input file (default: all *.sld files) # # The files 1.sld etc contain plain text (and embedded HTML) in the form # (see also http://www.tac.dk/~padoan/talks/dust/[0123].sld): # # title: Protogalaxies at high z [ only one per talk ] # section: Introduction [ one per file ] # head: Acknowledgements [ one per slide # o Collaborators: # + James Dunlop # + Jose Franco # [ blank line separates slides ] # head: Galaxies at High Redshift # o When are galaxies formed? # - Observing distant galaxies is the only direct method to ... # ##################################################################### $windir = "c:\\WINNT\\PROFILES\\aake\\Desktop\\Talks\\"; $macdir = "Macintosh HD:Desktop Folder:Talks:"; $unxdir = "/b/aake/talks/"; ##################################################################### # Default values $talk = "Lund01"; # Talk subdir $filepat = "[0-3].sld\$"; # file pattern of source files $icons = "../../Icons"; # Path of icons dir (relative to subdirs) $psize = "18"; # Percent contents frame $csize = "-1"; # Contents text size delta $verbose = 3; # noisy execution? $printout = 0; # printout(1) or web(0) $eqcol = "blue"; # equation color ##################################################################### sub setDefaults { $menubgcolor = "#779999"; $menufgcolor = "#eeeeee"; $headfgcolor = "#bbbbff"; if ($printout) { ############################################################# # Default values for printing $tsize = 2 if $tsize eq ""; # Main text size delta $folded = 0 if $folded eq ""; # Folded table of contents? $bold = 0; # Boldface text? $vheight = 660; # vertical centering height $bgcolor = "#ffffff"; # page bgcolor $fgcolor = "#ffffbb"; # figure bgcolor } else { ############################################################# # Default values for web presentation $tsize = 2 if $tsize eq ""; # Main text size delta $folded = 0 if $folded eq ""; # Folded table of contents? $bold = 0; # Boldface text? $vheight = 0; # no vertical centering $bgcolor = "#ffffff"; # page bgcolor $fgcolor = "#ffffcc"; # figure bgcolor } if ($verbose) {print "tsize=$tsize folded=$folded\n";} } ##################################################################### sub beginHTML { $page = "$sep1$s$sep2"."page"."$pg.html"; $html = ""; $id = " ($s.$pg)"; } ##################################################################### sub endHTML { $pg++; if ($vheight == 0) {$height="";} else {$height="HEIGHT=60";} open (PGE,">$page"); $lsize = $tsize-1; print PGE "
| $title | $section$id |
| $head |
| $html |
$html