html2ps-1.0b7/0000755000016200175370000000000011370777733011167 5ustar janithtml2ps-1.0b7/html2ps0000755000016200175370000040233611370773744012514 0ustar janit: # Use perl eval 'exec perl -S $0 "$@"' if $running_under_some_shell; # This is html2ps version 1.0 beta7, an HTML-to-PostScript converter. # Copyright (C) 1995-2010 Jan Karrman. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Author: Jan Karrman, Dept. of Information Technology, Uppsala University, # Sweden, e-mail: jan@it.uu.se. # Set the name of the global configuration file. See the installation notes # and manual page for more details on configuration files. $globrc='/it/sw/share/www/lib/html2ps/html2psrc'; $ug='/it/sw/share/www/lib/html2ps/html2ps.html'; $conf=<<'EOR'; @html2ps { package { PerlMagick: 0; ImageMagick: 0; pbmplus: 0; netpbm: 0; djpeg: 0; Ghostscript: 0; TeX: 0; dvips: 0; libwww-perl: 0; geturl: ""; check: ""; path: ""; } paper { type: A4; height: ""; width: ""; } option { twoup: 0; base: ""; check: 0; toc: ""; debug: 0; DSC: 0; encoding: "ISO-8859-1"; rcfile: ""; frame: 0; grayscale: 0; help: 0; hyphenate: 0; scaleimage: 1; cookie: ""; language: ""; landscape: 0; scalemath: 1; mainchapter: 1; number: 0; startno: ""; output: ""; original: 0; rootdir: ""; xref: 0; scaledoc: 1; style: ""; titlepage: 0; text: 0; underline: 0; colour: 0; version: 0; web: ""; duplex: ""; } margin { middle: 2cm; } xref { text: "[p $N]"; passes: 1; } quote { en { open: "“"; close: "”"; open2: "`"; close2: "'"; } sv { open: "”"; close: "”"; open2: "'"; close2: "'"; } da { open: "»"; close: "«"; } no { open: "«"; close: "»"; } fr { open: "« "; close: " »"; } de { open: "„"; close: "“"; open2: "‚"; close2: "`"; } fi: sv; es: en; it: no; nn: no; nb: no; } toc { heading: "

Table of Contents

"; level: 6; indent: 1em; } titlepage { content: "

$T

$[author]

"; margin-top: 4cm; } font { times { names: "Times-Roman Times-Italic Times-Bold Times-BoldItalic"; } new-century-schoolbook { names: "NewCenturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic"; } helvetica { names: "Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique"; } helvetica-narrow { names: "Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique"; } palatino { names: "Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic"; } avantgarde { names: "AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique"; } bookman { names: "Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic"; } courier { names: "Courier Courier-Oblique Courier-Bold Courier-BoldOblique"; } } hyphenation { min: 8; start: 4; end: 3; en { file: ""; extfile: ""; } } header { left: ""; center: ""; right: ""; odd-left: ""; odd-center: ""; odd-right: ""; even-left: ""; even-center: ""; even-right: ""; font-family: Helvetica; font-size: 8pt; font-style: normal; font-weight: normal; color: black; alternate: 1; } footer { left: ""; center: ""; right: ""; odd-left: ""; odd-center: ""; odd-right: ""; even-left: ""; even-center: ""; even-right: ""; font-family: Helvetica; font-size: 8pt; font-style: normal; font-weight: normal; color: black; alternate: 1; } frame { width: 0.6pt; margin: 0.5cm; color: black; } justify { word: 15pt; letter: 0pt; } draft { text: DRAFT; print: ""; dir: 0; font-family: Helvetica; font-style: normal; font-weight: bold; color: F0F0F0; } colour { black: 000000; green: 008000; silver: C0C0C0; lime: 00FF00; gray: 808080; olive: 808000; white: FFFFFF; yellow: FFFF00; maroon: 800000; navy: 000080; red: FF0000; blue: 0000FF; purple: 800080; teal: 008080; fuchsia: FF00FF; aqua: 00FFFF; } html2psrc: "$HOME/.html2psrc"; imgalt: "[IMAGE]"; datefmt: "%e %b %Y %R"; locale: ""; doc-sep: ""; ball-radius: 0.25em; numbstyle: 0; showurl: 0; seq-number: 0; extrapage: 1; break-table: 0; forms: 1; textarea-data: 0; page-break: 1; expand-acronyms: 0; spoof: ""; ssi: 0; prefilled: 0; } BODY { font-family: Times; font-size: 11pt; text-align: left; background: white; } H1, H2, H3, H4, H5, H6 { font-weight: bold; margin-top: 0.8em; margin-bottom: 0.5em; } H1 { font-size: 19pt } H2 { font-size: 17pt } H3 { font-size: 15pt } H4 { font-size: 13pt } H5 { font-size: 12pt } H6 { font-size: 11pt } P, OL, UL, DL, BLOCKQUOTE, PRE { margin-top: 1em; margin-bottom: 1em; } P { line-height: 1.2em; text-indent: 0; } OL, UL, DD { margin-left: 2em } TT, KBD, PRE { font-family: Courier } PRE { font-size: 9pt } BLOCKQUOTE { margin-left: 1em; margin-right: 1em; } ADDRESS { margin-top: 0.5em; margin-bottom: 0.5em; } TABLE { margin-top: 1.3em; margin-bottom: 1em; } DIV.noprint { display: none } DEL { text-decoration: line-through } A:link, HR { color: black } @page { margin-left: 2.5cm; margin-right: 2.5cm; margin-top: 3cm; margin-bottom: 3cm; } EOR eval "require POSIX"; $posix = !$@; %extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1); %fal=("serif","times", "sans_serif","helvetica", "monospace","courier"); @fo=("p","pre","h1","h2","h3","h4","h5","h6","i","b","tt","kbd","cite","samp", "address","blockquote","ol","ul","dl","dt","dd","table","header","footer"); %quote=('','en'); %valid=('font',1, 'font_files',1, 'margin,left',1, 'margin,right',1, 'margin,top',1, 'margin,bottom',1); %cm=('cm',1, 'mm',0.1, 'in',2.54, 'pt',2.54/72, 'pc',2.54/6); %pt=('cm',72/2.54, 'mm',72/25.4, 'in',72, 'pt',1, 'pc',12); %space=('thinsp',6, '#8201',6, 'ensp',2, '#8194',2, 'emsp',1, '#8195',1); $space=join('|',keys %space); %vars=("T","Ti", "N","Pn", "U","UR", "H","h", "A","Au"); %height=("letter",27.9, "legal",35.6, "arche",121.9, "archd",91.4, "archc",61, "archb",45.7, "archa",30.5, "flsa",33, "flse",33, "halfletter",21.6, "11x17",43.2, "ledger",27.9); %width=("letter",21.6, "legal",21.6, "arche",91.4, "archd",61, "archc",45.7, "archb",30.5, "archa",22.9, "flsa",21.6, "flse",21.6, "halfletter",14, "11x17",27.9, "ledger",43.2); $version="html2ps version 1.0 beta7"; $opts="2|b:|c|C:|d|D|e:|f:|F|g|h|H|i:|k:|l:|L|m:|M:|n|N:|o:|O|r:|R|s:|S:|t|T|" ."u|U|v|W:|x:"; %optalias=( 'twoup','2', 'base','b', 'check','c', 'toc','C', 'debug','d', 'DSC','D', 'encoding','e', 'rcfile','f', 'frame','F', 'grayscale','g', 'help','h', 'hyphenate','H', 'scaleimage','i', 'cookie','k', 'language','l', 'landscape','L', 'scalemath','m', 'mainchapter','M', 'number','n', 'startno','N', 'output','o', 'original','O', 'rootdir','r', 'xref','R', 'scaledoc','s', 'style','S', 'titlepage','t', 'text','T', 'underline','u', 'colour','U', 'version','v', 'web','W', 'duplex','x'); %type=( 'paper,height',2, 'paper,width',2, 'option,i',3, 'option,m',3, 'option,M',4, 'option,N',4, 'option,s',3, 'option,x',4, 'xref,passes',4, 'draft,print',5); $usage=<html2ps.dbg") || die "Error opening debug file: html2ps.dbg\n"; print STDERR "***** Writing debug info to html2ps.dbg\n"; print DBG "***** $version\n***** Command: $0 $args\n***** Perl: $]\n"; print DBG "***** HTML2PSPATH=$ENV{'HTML2PSPATH'}\n"; } undef $/; $user=0; $V='(-?\d+\.?\d*|-?\d*\.?\d+)'; &getconf($conf); &pagedef; undef %AT_page; for(@fo,"draft") { eval "\$deffnt{'$_'}=defined \$$_\{'font-family'\}?" ."\$$_\{'font-family'\}:\$body{'font-family'}"; } $user=1; if(open(RC,"<$globrc")) { $conf=; print DBG "***** Global file $globrc:\n$conf" if($opt_d); &getconf($conf); close RC; } else { &dbg("Warning: cannot open the global resource file: $globrc\n") if($globrc); } $html2psrc=~s/^(~|\$HOME)/$ENV{"HOME"}/; $prc=$html2psrc; if($opt_f) { ($prc=$opt_f)=~s/^:/$html2psrc:/; $prc=~s/:$/:$html2psrc/; $prc=~s/::/:$html2psrc:/; } $cwd=$posix?POSIX::getcwd():""; opendir(DIR,$cwd); @local=readdir DIR; closedir DIR; $globrc=~/html2psrc/; $gdir=$`; $hpath=$ENV{"HTML2PSPATH"}?$ENV{"HTML2PSPATH"}:".:"; $hpath=~s/^:/$gdir:/; $hpath=~s/:$/:$gdir/; $hpath=~s/::/:$gdir:/; $cur=$hpath=~s/(^|:)\.($|:)/$1$cwd$2/; @hpath=split(/:/,$hpath); for(@hpath) { if(opendir(DIR,$_)) { @files=readdir DIR; $files{$_}=" @files "; closedir DIR; } } @rc=split(/:/,$prc); for $rc (@rc) { $found=0; S:for $dir (@hpath) { if(-r $rc && !grep(/^$rc$/,@local) || $files{$dir}=~/ $rc /) { chdir $dir if($files{$dir}=~/ $rc / && $cwd); if(open(RC,"<$rc")) { $conf=; print DBG "***** Personal file $rc:\n$conf" if($opt_d); &getconf($conf); close RC; $found=1; } last S; } } &dbg("Error opening resource file: $rc\n") if($opt_f && !$found); } chdir $cwd if($cwd); $user=2; &getconf($opt_S) if($opt_S); print DBG "*****\n" if($opt_d); &pagedef; ($pagew,$pageh)=split /\s+/, $AT_page{'size'} if(defined $AT_page{'size'}); require Image::Magick if($package{'PerlMagick'}); $geturl=$package{'geturl'}; $ulanch="f"; $f=72/2.54; $giftopm="giftopnm" if($package{'netpbm'}); $giftopm="giftoppm" if($package{'pbmplus'}); for(keys %option){eval "\$opt_$_='$option{$_}' if(!defined \$opt_$_)"}; die $usage if $opt_h; die "$version\n" if $opt_v; &dbg("$version\n") if ($opt_v||$opt_d); die "Ghostscript is required to generate DSC PostScript\n" if($opt_D && !$package{'Ghostscript'}); die "Ghostscript is required to generate cross references\n" if($opt_R && !$package{'Ghostscript'}); $tmpname=$posix?POSIX::tmpnam():"h2p_$$"; ($scr=$tmpname)=~/\w+$/; $tempdir=$`; if($opt_u) {$ulanch="t"}; if(defined $opt_x && $opt_x!~/^[0-2]$/) { die "Illegal duplex value: $opt_x\n"; } $V='(-?\d+\.?\d*|-?\d*\.?\d+)'; for $o ($opt_s,$opt_i,$opt_m,$opt_N) { die "Non numeric: $o\n" if(defined($o) && $o!~/^$V$/); } $twoup=$opt_2?"t":"f"; $xp=$extrapage?"t":"f"; die "Invalid option: -W $opt_W\n" if($opt_W!~/^[abflprsL\d]*$/); $tocdoc=$opt_C=~/[ft]/; if($tocdoc && !defined $opt_W) {$opt_W=4}; $mult=$#ARGV>0 || $opt_W; $maxlev=$opt_W=~/(\d+)/?$1:4; $link=$opt_W=~/l/; $local=$opt_W=~/s/; $rel=$opt_W=~/r/; $below=$opt_W=~/b/; $layer=$opt_W=~/L/; $prompt=$opt_W=~/p/; if($opt_C && $opt_C!~/^(b?[ft]|[ft]b?|b?h|hb?)$/) {die "Invalid option: -C $opt_C\n"}; $tc=$opt_C?"t":"f"; $rev=$opt_C=~/t/; $first=$opt_C=~/b/ || $opt_R; $th=$tocdoc?"f":"t"; $oeh=0; $oef=0; @now=localtime; @gmnow=gmtime; POSIX::setlocale(&POSIX::LC_TIME,$locale) if($posix); $R='(\s*>|[^a-zA-Z0-9>][^>]*>)'; $S='([\w.:/%-]+)|"([^"]*)"|\'([^\']*)\''; $X='[\da-fA-F]'; $IM='(gif|jpeg|jpg|png|xbm|xpm|ps|eps)'; for('odd-left','odd-center','odd-right','even-left','even-center','even-right') { $oeh=1 if defined $header{$_}; $oef=1 if defined $footer{$_}; } %metarc=(); for $a ('left','center','right') { if(defined $header{"odd-$a"} || defined $header{"even-$a"}) { $oeh=1; } if(defined $footer{"odd-$a"} || defined $footer{"even-$a"}) { $oef=1; } for('','odd-','even-') { $apa=$header{$_.$a}; $numb=1 if($apa=~/(^|[^\$])\$N/); &spec($header{$_.$a}); &spec($footer{$_.$a}); $header{$_.$a}="($apa)"; $apa=$footer{$_.$a}; $numb=1 if($apa=~/(^|[^\$])\$N/); $footer{$_.$a}="($apa)"; &varsub($header{$_.$a},$footer{$_.$a}); } } if($oeh) { $yz="/YY [[{$header{'odd-left'}}{$header{'even-left'}}]" ."[{$header{'odd-right'}}{$header{'even-right'}}]" ."[{$header{'odd-center'}}{$header{'even-center'}}]] D\n"; } else { $ind=$header{'alternate'}; $yz="/YY [[{$header{'left'}}$ind][{$header{'right'}}".(1-$ind) ."][{$header{'center'}}2]] D\n"; } if($oef) { $yz.="/ZZ [[{$footer{'odd-left'}}{$footer{'even-left'}}]" ."[{$footer{'odd-right'}}{$footer{'even-right'}}]" ."[{$footer{'odd-center'}}{$footer{'even-center'}}]] D"; } else { $ind=$footer{'alternate'}; $yz.="/ZZ [[{$footer{'left'}}$ind][{$footer{'right'}}".(1-$ind) ."][{$footer{'center'}}2]] D"; } $number=$opt_n || !$numb && ($opt_C || $opt_N || $opt_R)?"t":"f"; $tih=$titlepage{'content'}; $toch=$toc{'heading'}; for ($imgalt,$xref{'text'},$tih,$toch,$inh,$draft{'text'}) { &spec($_); } for ($paper{'height'},$paper{'width'},$margin{'middle'},$frame{'margin'}, $mlr,$mrl,$mtl,$mbl,$mll,$mrr,$mtr,$mbr,$pagew,$pageh) { &getval($_,1); } $opt_s*=0.65 if($opt_2 && $opt_L); $opt_N=1 if(!defined $opt_N); $opt_N=int($opt_N-1); $mm=int($margin{'middle'}*$f); $is=0.8*$opt_i; $msc=1/$opt_s; $mag=1200*$opt_m*$opt_s; $xref=$opt_R?"t":"f"; $xref{'text'}=~s/\$N/) WB pN WB (/g; $d=int($f*$frame{'margin'}); for (0..10) { $temp=2**(-$_/2); $width{"a$_"}=int($temp*2**(-1/4)*1000+.5)/10; $height{"a$_"}=int($temp*2**(1/4)*1000+.5)/10; $width{"b$_"}=int($temp*1000+.5)/10; $height{"b$_"}=int($temp*2**(1/2)*1000+.5)/10; } if(!$pagew || !$pageh) { if($width{"\L$paper{'type'}"}) { $paper{'width'}=$width{"\L$paper{'type'}"} if(!defined $paper{'width'}); $paper{'height'}=$height{"\L$paper{'type'}"} if(!defined $paper{'height'}); ($pagew,$pageh)=($paper{'width'},$paper{'height'}); } elsif($paper{'type'}) { &dbg("Unknown paper type: $paper{'type'}\n"); } } if($opt_L) { $wl=$pageh-$mll-$mrl; $wr=$pageh-$mlr-$mrr; $hl=int(($pagew-$mtl-$mbl)*$f+.5); $hr=int(($pagew-$mtr-$mbr)*$f+.5); $xl=int($mtl*$f+.5); $xr=int($mtr*$f+.5); $yl=int($mll*$f+.5); $yr=int($mlr*$f+.5); $rot=" 90 rotate"; } else { $wl=$pagew-$mll-$mrl; $wr=$pagew-$mlr-$mrr; $hl=int(($pageh-$mtl-$mbl)*$f+.5); $hr=int(($pageh-$mtr-$mbr)*$f+.5); $xl=int($mll*$f+.5); $xr=int($mlr*$f+.5); $yl=int(($pageh-$mtl)*$f+.5); $yr=int(($pageh-$mtr)*$f+.5); $rot=""; } if($opt_2) { $wl=($wl-$margin{'middle'})/2; $wr=($wr-$margin{'middle'})/2; } $wl=int($wl*$f+.5); $wr=int($wr*$f+.5); $pag=int($pageh*$f+.5); $fe=$opt_F?"t":"f"; $cf=$opt_U?"t":"f"; $tp=$opt_t?"t":"f"; $rm=$numbstyle?"t":"f"; $pa=$showurl?"t":"f"; $nh=$seq_number?"t":"f"; $bt=$break_table?"t":"f"; $ea=$expand_acronyms?"t":"f"; $fi=$prefilled?"t":"f"; $latin1=$opt_e=~/ISO-8859-1/i; $lt=$del{'text-decoration'}=~/^line-through$/i?"SE":"WB"; if(!$opt_x && defined $opt_x) { $dupl="[{false statusdict/setduplexmode get exec} stopped cleartomark"; } if($opt_x) { $dupl="[{true statusdict/setduplexmode get exec} stopped cleartomark"; } if($opt_x==2) { $dupl.="\n[{true statusdict/settumble get exec} stopped cleartomark"; } %head=("html",1, "head",1, "title",1, "base",1, "meta",1, "link",1, "style",1, "script",1, "isindex",1); %algn=("left",1, "center",2, "right",3, "justify",4, "char",5); %f=("void",1, "above",2, "below",3, "hsides",4, "lhs",5, "rhs",6, "vsides",7, "box",8, "border",9); %r=("none",1, "groups",2, "rows",3, "cols",4, "all",5); %v=("top",1, "middle",2, "bottom",3, "baseline",4); %it=("radio",0, "checkbox",1, "text",2, "password",2, "image",3); %ssy=(200,"\\", 201, "(", 202, ")"); %lity=("I",0, "i",1, "A",2, "a",3, "1",4, "disc",5, "square",6, "circle",7); $ltr=join('|',keys %lity); %tex=('`a',"\340", '\^a',"\342", '`e',"\350", '`e',"\350", 'c\{c\}',"\347", "'e","\351", '\^e',"\352", '"e',"\353", '\^i',"\356", '"i',"\357", '\^o',"\364", '`u',"\371", '\^u',"\373", '"u',"\374", '"y',"\377", 'aa',"\345", '"a',"\344", '"o',"\366", 'ae',"\346", 'oe',"\225"); $opt_M = 1 unless defined $opt_M; @hind=(int($opt_M)-1,0,0,0,0,0); $ltrs='A-Za-z\222-\226\300-\377'; %ent=( "lsquo|#8216",96, "rsquo|#8217",39, "circ|#710",141, "tilde|#732",142, "permil|#8240",143, "dagger|#8224",144, "Dagger|#8225",145, "Yuml|#376",146, "scaron|#353",147, "Scaron|#352",148, "oelig|#339",149, "OElig|#338",150, "lsaquo|#8249",151, "rsaquo|#8250",152, "sbquo|#8218",153, "bdquo|#8222",154, "ldquo|#8220",155, "rdquo|#8221",156, "ndash|#8211",157, "mdash|#8212",158, "trade|#8482",159, "nbsp",160, "iexcl",161, "cent",162, "pound",163, "curren",164, "yen",165, "brvbar",166, "sect",167, "uml",168, "copy",169, "ordf",170, "laquo",171, "not",172, "reg",174, "macr",175, "deg",176, "plusmn",177, "sup2",178, "sup3",179, "acute",180, "micro",181, "para",182, "middot",183, "cedil",184, "sup1",185, "ordm",186, "raquo",187, "frac14",188, "frac12",189, "frac34",190, "iquest",191, "Agrave",192, "Aacute",193, "Acirc",194, "Atilde",195, "Auml",196, "Aring",197, "AElig",198, "Ccedil",199, "Egrave",200, "Eacute",201, "Ecirc",202, "Euml",203, "Igrave",204, "Iacute",205, "Icirc",206, "Iuml",207, "ETH",208, "Ntilde",209, "Ograve",210, "Oacute",211, "Ocirc",212, "Otilde",213, "Ouml",214, "times",215, "Oslash",216, "Ugrave",217, "Uacute",218, "Ucirc",219, "Uuml",220, "Yacute",221, "THORN",222, "szlig",223, "agrave",224, "aacute",225, "acirc",226, "atilde",227, "auml",228, "aring",229, "aelig",230, "ccedil",231, "egrave",232, "eacute",233, "ecirc",234, "euml",235, "igrave",236, "iacute",237, "icirc",238, "iuml",239, "eth",240, "ntilde",241, "ograve",242, "oacute",243, "ocirc",244, "otilde",245, "ouml",246, "divide",247, "oslash",248, "ugrave",249, "uacute",250, "ucirc",251, "uuml",252, "yacute",253, "thorn",254, "yuml",255); %symb=( "alpha|#945",141, "beta|#946",142, "gamma|#947",147, "delta|#948",144, "epsilon|#949",145, "zeta|#950",172, "eta|#951",150, "theta|#952",161, "thetasym|#977",112, "iota|#953",151, "kappa|#954",153, "lambda|#955",154, "mu|#956",155, "nu|#957",156, "xi|#958",170, "pi|#960",160, "piv|#982",166, "omicron|#959",157, "rho|#961",162, "sigma|#963",163, "sigmaf|#962",126, "tau|#964",164, "upsilon|#965",165, "upsih|#978",241, "phi|#966",146, "phiv",152, "chi|#967",143, "psi|#968",171, "omega|#969",167, "Alpha|#913",101, "Beta|#914",102, "Gamma|#915",107, "Delta|#916",104, "Epsilon|#917",105, "Zeta|#918",132, "Eta|#919",110, "Theta|#920",121, "Iota|#921",111, "Kappa|#922",113, "Lambda|#923",114, "Mu|#924",115, "Nu|#925",116, "Xi|#926",130, "Omicron|#927",117, "Pi|#928",120, "Rho|#929",122, "Sigma|#931",123, "Tau|#932",124, "Upsilon|#933",125, "Phi|#934",106, "Chi|#935",103, "Psi|#936",131, "Omega|#937",127, "fnof|#402",246, "perp|#8869",136, "plusmn|#177",261, "cdot|#183",327, "or|#8744",332, "and|#8743",331, "le|#8804",243, "ge|#8805",263, "equiv|#8801",272, "cong|#8773",100, "asymp|#8776",273, "ne|#8800",271, "sub|#8834",314, "sube|#8838",315, "sup|#8835",311, "supe|#8839",312, "isin|#8712",316, "larr|#8592",254, "rarr|#8594",256, "uarr|#8593",255, "darr|#8595",257, "harr|#8596",253, "lArr|#8656",334, "rArr|#8658",336, "uArr|#8657",335, "dArr|#8659",337, "hArr|#8660",333, "forall|#8704","042", "exist|#8707","044", "infin|#8734",245, "nabla|#8711",321, "part|#8706",266, "hellip|#8230",274, "int|#8747",362, "sum|#8721",345, "prod|#8719",325, "real|#8476",302, "image|#8465",301, "bull|#8226",267, "prime|#8242",242, "Prime|#8243",262, "oline|#8254",140, "frasl|#8260",244, "weierp|#8472",303, "alefsym|#8501",300, "crarr|#8629",277, "empty|#8709",306, "notin|#8713",317, "ni|#8715","047", "minus|#8722","055", "lowast|#8727","052", "radic|#8730",326, "prop|#8733",265, "ang|#8736",320, "cap|#8745",307, "cup|#8746",310, "sim|#8764",176, "nsub|#8836",313, "oplus|#8853",305, "otimes|#8855",304, "sdot|#8901",327, "lceil|#8968",351, "rceil|#8969",371, "lfloor|#8970",353, "rfloor|#8971",373, "lang|#9001",341, "rang|#9002",361, "spades|#9824",252, "clubs|#9827",247, "hearts|#9829",251, "diams|#9830",250, "loz|#9674",340); $pc=')WB NL NP('; $nimg=-1; $nm=-1; @font=(); @size=(); @styl=(); @alig=(); @colr=(); @topm=(); @botm=(); @lftm=(); @rgtm=(); @z1=(); @z2=(); @z3=(); &Subst($doc_sep); ($toct=$toch)=~s|<[\w/!?][^>]*>||g; $dh="/h0 [()($toct)] D\n"; &Subst($toch); $toch=~s/ H\(/ -1 H(/g; $toch="($toch)"; &varsub($toch); &Subst($tih); $tih=~s/ H\(/ -1 H(/g; $tih="($tih)"; &varsub($tih); $mn=0; $nfont=0; $mi=0; for (@fo) {&setel($_)}; %arr=%draft; &fs("draft"); if(!$latin1 && !defined $fontid{"times"}) { $fontid{"times"}=$nfont++; @docfonts=(@docfonts,split(/\s+/,$font_names{"times"})); } $wind=0; $wf="t"; if(!$latin1) { $wind=$fontid{"times"}; $wf="f"; } for $k (keys %font_files){ @ff=split(/\s+/,$font_files{$k}); @fn=split(/\s+/,$font_names{$k}); for (0..3) { if($ff[$_]) { $ff{$fn[$_]}=$ff[$_]; } elsif(!$ff{$fn[$_]}) { $ff{$fn[$_]}=$ff[0]; } $fr{$fn[$_]}=$k; } } $pta=defined $p{"text-align"}?$p{"text-align"}:$body{"text-align"}; $pal=0; $pal=1 if($pta=~/^c/i); $pal=2 if($pta=~/^r/i); $pal=3 if($pta=~/^j/i); $bgcol=&col2rgb($body{"background"}); if(!$bgcol) {$bgcol="[16#FF 16#FF 16#FF]"}; if(!$p{"color"}) {$p{"color"}="black"}; $tcol=&col2rgb($p{"color"}); $lcol=&col2rgb($a__link{"color"}); if($lcol) { $Lc="/Lc t D\n/Dl $lcol D\n"; $Lc.=$tcol ne $lcol?"/LX t D":"/LX f D"; } else { $Lc="/Lc f D\n/LX f D"; } $pcol=&col2rgb($pre{"color"}); if(!$pcol) {$pcol="[0 0 0]"}; $deftbg=&col2rgb($table{"background"}); $hc=&col2rgb($hr{"color"}); if(!$hc) {$hc="[0 0 0]"}; $fcol=&col2rgb($frame{"color"}); if(!$fcol) {$fcol="[0 0 0]"}; for ($p{"font-size"},$pre{"font-size"},$header{"font-size"},$frame{'width'}, $footer{"font-size"},$justify{'letter'},$justify{'word'}, $titlepage{'margin-top'}) { &getval($_,2); } for ($p{"line-height"},$p{"text-indent"},$p{"margin-top"},$toc{'indent'}, $ball_radius) { &getval($_,0); } $fl="/FL [/".join("\n/",@docfonts)."] D"; for $k (keys %ff) { $f=$ff{$k}; if(defined $fontid{$fr{$k}} && !defined($cont{$f})) { open(FONT,"<$f") || &dbg("Error opening fontfile $f\n"); ($cont{$f}=)=~s/(^|\r?\n|\r)%.*//g; close FONT; } } $fontdef=""; for (keys %cont) { $fontdef.=$cont{$_}; } &ent($yz); &ent($xref{'text'}); &ent($draft{'text'}); $lnum=0; for (keys %quote_open) { $lid{$_}=$lnum++; if(!defined $quote_close{$_}) {$quote_close{$_}=$quote_open{$_}}; if(!defined $quote_open2{$_}) {$quote_open2{$_}=$quote_open{$_}}; if(!defined $quote_close2{$_}) {$quote_close2{$_}=$quote_close{$_}}; &ent($quote_open{$_}); &ent($quote_close{$_}); &ent($quote_open2{$_}); &ent($quote_close2{$_}); push(@qo,$quote_open{$_}); push(@qc,$quote_close{$_}); push(@qo2,$quote_open2{$_}); push(@qc2,$quote_close2{$_}); } $qo=join(')(',@qo); $qc=join(')(',@qc); $qo2=join(')(',@qo2); $qc2=join(')(',@qc2); $hyphenation_file{''}=$hyphenation_file{'en'}; $br=$collapse_br?"f":"t"; $gd=0; $ddr=defined $draft{'print'}; if($ddr) { if($draft{'print'}==0) { $draft="f"; } else { $gd=1; $draft="t"; } } if(-e '/dev/null' || !-e 'nul') { $pathsep=':'; $gs='gs'; } else { $pathsep=';'; $gs='gswin32c'; } $gb=$gs_bug?"t":"f"; for (keys %quote) {$lid{$_}=$lid{$quote{$_}}}; $ENV{'PATH'}.="$pathsep$package{'path'}" if($package{'path'}); $delim="%-- End of variable part --"; $cd="/Cd {aload length 2 idiv dup dict begin {D} repeat currentdict end} D"; $mysymb=<1?"s":"")." remaining\n"); } if($banner) { $_="/Ba t D /BA {($banner)BN} D\nBs f Pb CP /BO E D pop\n"; &Subst($_); s/ H\(/ -1 H(/g; } else { $_="/Ba f D /BO 0 D Bs"; } if($tocdoc && $first && $ndoc==1) { $TC=" TC\n"; $et=" NP Ep ET /Tc f D"; } else { $TC=""; $et=""; } $_.="\n/UR ($html) D\n/Ti ($ti) D\n/Au ($au) D\n/Df $draft D\n/ME ["; for $i (sort {$metarc{$a} <=> $metarc{$b}} keys %metarc){ $_.="($meta{$i})"; } $_.="] D\n$TC"; if($ndoc==1) {$top=$_}; if(!$tocdoc) { $toc.="ND 1 gt{Ts 3 mul Np $refs{$html}()0 C()BD($ti)ES()$refs{$html}" ." 1 TN()EA()BN}if\n"; } $hv=0; while($P2=~s/(\d) (\d) H\(([^\s<)]*)/$1 $2 $nhd H($3)WB $nref Sn(/) { $nhd++; if($hv+1<$2) { for($hv+1..$2-1) { push(@z1,-$nref); push(@z2,$_); } } $hv=$2; $hind[$hv-1]++; for $i ($hv..5) {$hind[$i]=0}; $hind=join('.',@hind[0..$hv-1]); $hst=$3; $'=~/\)EH/; ($htxt=$hst.$`)=~s/\)EA\(//g; if(!$tocdoc) { $toc.="$hv NH le{$nref($hind\\240\\240)$hv C($htxt)$nref 1 TN()EA()BN}if\n"; } push(@z1,$nref); push(@z2,$hv); $nref++; $htxt=~s/(\s+|\)BR\()/ /g; $htxt=~s/(^\s+|\)[^(]*\(|\s+$)//g; $htxt=~s/\\(200|201|202)/\\$ssy{$1}/g; $htxt="" if(!$latin1); $dh.="/h$nhd [($hind\\240\\240)($htxt)] D\n"; } if($tocdoc) { if($ndoc==1 && !$first) { $toc="TC RC ZF $_ $P2 WB () BN\n"; $P2=""; $P3=""; $np=""; $_=""; } } $P3.="$fl1\n/Cb $bg D /Ct $tcol D /Cl $lcol D /CL -1 D Ct Sc\n"; if($ndoc==1 && !$first) {$P3.="Pt\n"}; $P3.="$fl2\n$_\n$np\n$P2"; if($tocdoc && $ndoc==1 && !$first) { $np="/Cb $bg D NP RC ZF"; } else { $fl1="WB NL$et"; $fl2="DS"; $np="0 BO R"; } } } $P3.=($P3!~/\)\s*$/?"()":"")."WB NL"; if(!$tocdoc && $first && $nhd){$P3="$toc/OU t D /Cb $bg D NP Ep ET $P3"}; if(!$first && ($tocdoc || !$tocdoc && $nhd)){$P3.=" $toc"}; if($ntab>=0) { $_="$tables] D"; &ack($_); y/\t\f/ /; s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; s/\)XX/)9 9 PR/g; s/ H\(/ -1 H(/g; $tables=$_; } $_="%!PS\n%%Title: $title\n$P0$P1"; if($nimg>=0) { $_.="/AX [".join(' ',@XS)."] D\n/AY [".join(' ',@YS)."] D\n" ."/IX [".join(' ',@IX)."] D\n/IT [".join(' ',@IT)."] D\n"; if($nm>=0) { $_.="/AZ [".join(' ',@DP)."] D\n/WS [".join(' ',@WS)."] D\n" ."/FC [".join(' ',@FC)."] D\n/NI $nm D\n/BM ".($nm+1)." array D\nSB\n"; for $i (0..$nm) {$_.="$BM[$i]\n\n"} } $_.="\n$pv%Endpv\n" if($nps); } @kw=split(/[, ]+/,$kw); @Kw=(); for $i (@kw){push(@Kw,$i) if(!grep(/^\Q$i\E$/,@Kw))}; $kw=join(', ',@Kw); for $i (0..$#z2) { $n=0; $j=$i; while($j++<=$#z2 && $z2[$j]>$z2[$i]) {$n++ if($z2[$j]==$z2[$i]+1)}; push(@z3,$n); } $tdef=$ntab>=0?"$tbl$tables\n0 1 $ntab\{TS}for RC ZF\n":""; $hd="/Hr [@z1]D\n/HV [@z2]D\n/Cn [@z3]D"; &cut($hd); if($gd) { $sd="/Df t D /DG IW IW mul IL IL mul add sqrt D IW IL IW IL lt{E}if" ." /WM E D /WX E D /DZ 180 D gsave SD /DZ DZ DF mul D SD grestore\n"; } else { $sd="/Df f D\n"; } $_.=<}ie SW pop D ET RC ZF $sd$rfs$tdef$top$P3 /TE t D NP /OU t D TU PM 1 eq and{/Pn () D showpage}if end restore EOD if(($first || $opt_R) && $xref{'passes'}) { &dbg("Inserting cross references\n") if($opt_d); for $i (1..$xref{'passes'}) {&ref}; } &fin; sub h2p { if($html eq '-') { $_=<>; } elsif($html=~m|://|) { if(($prompt || $nrem>50) && $level>1) { &prompt("Retrieve document $html (y/n/q)? ",$ans); if($ans=~/q/i) {undef @docs}; return 0 unless($ans=~/y/i); } &geturl($html,$_) || return; $nrem++; if($contyp!~m|text/html|i) {$_=" \n$_"}; unless(($ba2)=$html=~m|(.*://.*/)|) {$ba2=$html."/"}; } else { if(open(FILE,"<$html")) { &dbg("Reading $html\n") if($opt_W || $opt_d); $_=<FILE>; if(!/<HTML/i && $html!~/html?$/i && ($html!~/\.ps$/i || $ndoc>1)) { $_=" <plaintext>\n$_"; } close FILE; $var{DOCUMENT_NAME}=$html; if($posix) { $var{LAST_MODIFIED}=POSIX::strftime("%c",localtime((stat $html)[9])); $var{DATE_LOCAL}=POSIX::strftime("%c",@now); $var{DATE_GMT}=POSIX::strftime("%c",@gmnow); } $mod=(stat $html)[9]; } else { &dbg("*** Error opening $html\n"); return 0; } } if(/^%!/ && /$delim/) { $psin=1; &openps if($opt_o); $_=$P0.$'; for $s ("b","c","cw","g","t") { &dbg("Option -$s ignored\n") if(eval "\$opt_$s"); } &fin; } &hb($_,$head); $head=~/<title$R\s*([\w\W]*)<\/title/i; ($ti=$2)=~s/\s+/ /g; $ti=$doctit{$html} if(!$ti); $ti=~s/\s*$//g; &spec($ti); &ent($ti); $ti="<Untitled>" if(!$ti); $title=$ti if(!$title); $draft="f" if(!$ddr); %meta=(); $au=""; while($head=~/<meta\s[^>]*(name|http-equiv)\s*=\s*["']?\s*(\w+)$R/gi) { $k=lc $2; ($v)=$&=~/content\s*=\s*["']\s*([^"']+)/i; $v=~s/\s+/ /g; $v=~s/\s*$//g; &spec($v); &ent($v); $meta{$k}=$v; if($k=~/author/) {$au=$au?"$au, $v":$v}; if($k=~/keywords/) {$kw=$kw?"$kw, $v":$v}; if($k=~/subject/ && !$su) {$su=$v}; if(!$ddr && $k=~/status/ && $v=~/draft/i) {$draft="t";$gd=1}; } $Au.=($Au?" + ":"").$au if($au); $b2=$opt_b; unless($b2) { ($b2)=$head=~/<base\s+href\s*=\s*"([^"]*)"$R/i; unless($b2) {($b2)=$head=~/<base\s+href\s*=\s*([\w\.-]+)$R/i} unless($b2) {$b2=$ba2} } $b2=~s|[^/]*$||; ($b1)=$b2=~m|(.*://[^/]*)/|; unless($b1) {$b1=$opt_r}; unless($b2) {$b2=$html=~m|(.*/)[^/]*$|?$1:""}; if(!defined $B2) {$B2=$b2}; $levl{$b2.$html}=$levl{$html}; while($link && $head=~/<link\s+[^>]*rel\s*=\s*["']?next$R/gi) { if(($lnk)=$&=~/href\s*=\s*["']?\s*([^"' >]*)/gi) { if($lnk=~m|.+//[^/]+$|) {$lnk=$&."/"} if($lnk=~m|://|) { $rlnk=0; } else { $rlnk=1; if($lnk=~m|^/|) {$lnk=$b1.$lnk} else {$lnk=$b2.$lnk} } while($lnk!~m|^\.\./| && $lnk=~m|[^/]*/\.\./|) {$lnk=$`.$'}; $lnk=~s|/\./|/|g; if(&follow && !$levl{$lnk}) { $levl{$lnk}=$level+1; push(@links,$lnk); } } } ($battr)=/<BODY$R/i; ($lang)=$battr=~/\slang\s*=\s*['"]?([a-zA-Z-]+)/i; ($lang)=$head=~/<html[^>]+lang\s*=\s*['"]?([a-zA-Z-]+)/i if(!$lang); $lang=$opt_l if($opt_l); $lang='en' if(!$lang); $lang=lc $lang; if($battr=~/\stext\s*=\s*['"]?\s*#?(\w+)/i) {$tcol=&col2rgb($1)}; if(!$tcol) {$tcol="Dt"}; if($battr=~/\slink\s*=\s*['"]?\s*#?(\w+)/i) {$lcol=&col2rgb($1)}; if(!$lcol) {$lcol="Dl"}; &inihyph if($opt_H); ($bg)=$battr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $bg=&col2rgb($bg); if($bg) { ($red,$grn,$blu)=@cvec; } else { ($red,$grn,$blu)=$bgcol=~/#(\w+).*#(\w+).*#(\w+)/; $bg="Db"; } $temp=""; while(/<object$R/i) { $temp.=$`; $tag=$&; $end=$'; $type=$tag=~/type\s*=\s*($S)/i?$+:""; $uaddr=$tag=~/data\s*=\s*($S)/i?$+:""; if($type=~/^text\/(html|plain)$/i || !$type && $uaddr=~m"(\.html?|://.+/|://[^/]+)$"i) { $tag=~/data\s*=\s*/i; if(&open($uaddr,"<$idoc")) { if($type=~/plain/i) { $idoc="<XMP>$idoc</XMP>"; } else { &hb($idoc,$dum); } $_=$idoc; $_.=$' if($end=~/<\/object>/i); } else { &dbg("\n*** Error opening $uaddr\n"); $_=$end; } } else { $temp.=$tag; $_=$end; } } $_=$temp.$_; if($opt_c && defined $package{'check'}) { $file=$html; if($html=~m|://|) { open(SCRATCH,">$scr"); print SCRATCH; close SCRATCH; $file="$scr"; } &dbg(`$package{'check'} $file`); } if(!$latin1) { if($opt_e=~/EUC-/i) { s/([\216\217\241-\376].)+/\000$&\000/g; &spec($_); s/\000(.+?)\000/)F1($1)F2(/g; } elsif($opt_e=~/SHIFT-JIS/i) { s/[\201-\237\340-\374][@-~\200-\374]/$&\000/g; s/[\241-\337]+(?!\000)/$&\000/g; s/[ -~\t\n\r\240]+(?!\000)/\002$&\001/g; &spec($_); s/\000//g; } else { while(/\e\$B([^\e]*)/) { $beg=$`; $end=$'; $mat=$1; $mat=~s/\s//g; $_="$beg\001$mat$end"; } s/\e\([BJ]/\002/g; &spec($_); } s/\001/)F1(/g; s/\002/)F2(/g; $_=")F2($_"; y/\000-\010\013\016-\037\177//d; } else { &spec($_); y/\000-\010\013\016-\037\177-\237//d; } s/(\r\n|\r)/\n/g; $refs{$html}=$nref++ if(!defined $refs{$html}); $_="\004$lang\004)WB $refs{$html} Sn($_"; # Yes, I know Perl has case-insensitive pattern matching. But on my system # it takes about 10 times longer to run! $pt=""; if(/<[pP][lL][aA][iI][nN][tT][eE][xX][tT]$R/) {$_=$`;$pt=$'}; while($_){ if(/(<[lL][iI][sS][tT][iI][nN][gG]$R)/) {$_=$`; $tag=$1; $rest=$'; if(/<[xX][mM][pP]$R/){$_=$`; &Subst($_); $P2.="$_)XX("; $_=$'.$tag.$rest; if(m|</[xX][mM][pP]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}} else {&Subst($_); $P2.="$_)XX("; $_=$rest; if(m|</[lL][iI][sS][tT][iI][nN][gG]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}}} elsif(/<[xX][mM][pP]$R/) {$_=$`; &Subst($_); $P2.="$_)XX("; $_=$'; if(m|</[xX][mM][pP]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}} else {&Subst($_);$P2.=$_; $_=""} } $pt=~s/\f/$pc/g; if($pt) {$P2.=")XX($pt"}; $P2.=")"; if($plain) {$P2.="RP ()"}; while($P2=~/XX\(/) { $beg=$`; $'=~/\)(RP|$)/; $mat=$`; $end=$&.$'; $mat=~s/(.*\n){30}.*/$&)WR(/g; ($temp=$mat)=~s/\)[^(]+\(//g; @prel=split(' *\n',$temp); $maxl=0; for $line (@prel) { $line=~s/\\.../x/g; while($line=~/\t+/) { $sp=' ' x (length($&)*8-length($`)%8); $line=~s/\t+/$sp/; $mat=~s/\t+/$sp/; } $ll=length($line); $maxl=$ll if($ll > $maxl); } $P2="$beg ".($#prel+1)." $maxl PR($mat$end"; } $P1=~s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; $P2=~s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; $P2=~y/\t\f/ /; 1; } sub Subst{ local($_)=@_; if($page_break) { s/<!--NewPage-->/$pc/g; s/<(\?|hr\s+class\s*=\s*["']?)\s*page-break$R/$pc/gi; } s/<!--OddPage-->/)WB NL OP(/g; if($ssi && $html!~m|://|) { while(/<!--#(include|config|echo)\s+(\w+)\s*="([^"]+)"\s*-->/) { $inc=""; $file=$3; my ($prefix, $suffix) = ($`,$'); if($1 eq "include" && ($file !~m"^/|\.\." || $opt_r)) { if(substr($file,0,1) ne "/") { $file=$B2.$file; } elsif($2 eq "virtual") { $file=$opt_r.$file; } if(open INC,"<$file") { $inc=<INC>; &spec($inc); close INC; } } elsif ($1 eq "config" && $2 eq "timefmt") { if($posix) { $var{LAST_MODIFIED}=POSIX::strftime($3,localtime((stat $html)[9])); $var{DATE_LOCAL}=POSIX::strftime($3,@now); $var{DATE_GMT}=POSIX::strftime($3,@gmnow); } } elsif ($1 eq "echo") { $inc=$var{$3}; } $_=$prefix.$inc.$suffix; } } s/(&shy;?|&#173;?|<!--hy-->)/)HY(/g; while(/<!--/) { $_=$`; &getcom; $_.=$rest; } $temp=""; while(/<([^"'>]*=\s*["'])/) { $temp.=$`."<"; $_=$1.$'; while(/^[^"'>]*=\s*(["'])/) { $temp.=$&; $_=$'; if(/$1/) { ($tg=$`)=~y/>/\003/; $temp.=$tg.$&; $_=$'; } } } $_=$temp.$_; $a='[aA][lL][iI][gG][nN]'; $Y='[sS][tT][yY][lL][eE]'; $A="($a\\s*=\"?|$Y\\s*=\\s*\"?[tT][eE][xX][tT]-\\s*$a:)"; $I='[lL][eE][fF][tT]'; $C='[cC][eE][nN][tT][eE][rR]'; $D='[rR][iI][gG][hH][tT]'; $J='[jJ][uU][sS][tT][iI][fF][yY]'; $s='[sS][eE][lL][eE][cC][tT]'; $F='[fF][oO][nN][tT]'; $U='[cC][oO][lL][oO][rR]'; $O='[cC][oO][mM][pP][aA][cC][tT]'; s/<\w+[^>]*\s+[iI][dD]\s*=\s*($S)[^>]*>/$&<a name="$+">/g; s|<[dD][eE][lL]$R[\w\W]*?</[dD][eE][lL]>||g if($del{'display'}=~/^none$/); $ndiv=1; s|</?[dD][iI][vV]\d$R||g; s|<(/?)([dD][iI][vV])([>\s])|"<$1$2".($1?--$ndiv:$ndiv++).$3|eg; while(/<[dD][iI][vV](\d+)$R/) { $dbeg=$`; $dnum=$1; $dattr=$2; $dend=$'; $div=""; $ediv=""; if($2=~/class\s*=\s*["']?noprint$R/i) { $_=$dbeg; $_.=$' if($dend=~/<\/[dD][iI][vV]$dnum>/); } else { if($dattr=~/$A\s*($I|$C|$D|$J)/) { $div.=")".$algn{"\L$2"}." Al("; $ediv.=")Ea("; } if($dattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i) { $lang=lc $1; $div.="\004$lang\004"; &inihyph if($opt_H); $dbeg=~/(\004[^\004]*\004)[^\004]*$/; $ediv.=$1; } $dend=~s|</[dD][iI][vV]$dnum>|$ediv)BR(|; $_="$dbeg$div)BR($dend"; } } s|<$C$R|)2 Al(|g; s|</$C$R|)Ea(|g; s/(<\w+[^>]*>)\n|\n(<\/\w+>)/$+/g; s|(<[lL][iI])$R\s*<[pP]>|)0 P($1$2|g; s/<[hH]([1-6])\s+$A\s*($I|$C|$D|$J)$R/)$algn{"\L$3"} $1 H(/g; s|<[hH]([1-6])$R|)0 $1 H(|g; s|</[hH][1-6]>|)EH(|g; s|<[bB][rR]$R|)BR(|g; s/<[pP]\s+[^>]*$A\s*($I|$C|$D|$J)$R/)$algn{"\L$2"} P(/g; s|<[pP]$R|)0 P(|g; s|</[pP]>|)EP(|g; s|<[aA][dD][dD][rR][eE][sS][sS]$R|)AD(|g; s|</[aA][dD][dD][rR][eE][sS][sS]>|)DA(|g; s|<[pP][rR][eE]$R\n?|)XX(|g; s|\n? *</[pP][rR][eE]>|)RP(|g; s|<[dD][tT]\s[^>]*$O$R|)1 DT(|g; s|<[dD][tT]$R|)0 DT(|g; s|<[dD][dD]$R|)DD(|g; s|<[dD][lL]\s[^>]*$O$R|)1 DL(|g; s|<[dD][lL]$R|)0 DL(|g; s|</[dD][lL]>|)LD(|g; s|<[uU][lL]$R|)UL(|g; s|</[uU][lL]>|)LU(|g; s|<[mM][eE][nN][uU]$R|)UL(|g; s|</[mM][eE][nN][uU]>|)LU(|g; s|<[dD][iI][rR]$R|)UL(|g; s|</[dD][iI][rR]>|)LU(|g; s|<[oO][lL]\s[^>]*[sS][tT][aA][rR][tT]\s*=\s*['"]?(-?\d+)$R|$&)WB $1 Ln(|g; s|<[oO][lL]\s[^>]*[tT][yY][pP][eE]\s*=\s*['"]?([1iIaA])$R|)$lity{$1} OL(|g; s|<[oO][lL]$R|)4 OL(|g; s|</[oO][lL]>|)LO(|g; s|<[lL][iI]\s[^>]*[vV][aA][lL][uU][eE]\s*=\s*['"]?(-?\d+)$R|$&)WB $1 Ln(|g; s|<[lL][iI]\s[^>]*[tT][yY][pP][eE]\s*=\s*['"]?($ltr)$R|)$lity{$1} LI(|g; s|<[lL][iI]$R|)-1 LI(|g; s|</[lL][iI]$R||g; s"<([bB][qQ]|[bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE])$R")BQ("g; s"</([bB][qQ]|[bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE])>")QB("g; s|<[sS][tT][rR][oO][nN][gG]$R|)BD(|g; s|</[sS][tT][rR][oO][nN][gG]>|)ES(|g; s|<[sS][aA][mM][pP]$R|)SM(|g; s|</[sS][aA][mM][pP]>|)ES(|g; s|<[qQ]$R(\s*)|$2)Q(|g; s|(\s*)</[qQ]>|)EQ($1|g; s|<[cC][iI][tT][eE]$R|)CT(|g; s|</[cC][iI][tT][eE]>|)ES(|g; s|<[vV][aA][rR]$R|)I(|g; s|</[vV][aA][rR]>|)ES(|g; s|<[bB]$R|)BD(|g; s|</[bB]>|)ES(|g; s|<[iI]$R|)I(|g; s|</[iI]>|)ES(|g; s|<[tT][tT]$R|)TT(|g; s|</[tT][tT]>|)ES(|g; s|<[uU]$R|)UN(|g; s|</[uU]>|)NU(|g; s|<[sS]([tT][rR][iI][kK][eE])?$R|)SE(|g; s|</[sS]([tT][rR][iI][kK][eE])?>|)XE(|g; s|<[dD][fF][nN]$R|)I(|g; s|</[dD][fF][nN]>|)ES(|g; s|<[eE][mM]$R|)EM(|g; s|</[eE][mM]>|)ES(|g; s|<[cC][oO][dD][eE]$R|)SM(|g; s|</[cC][oO][dD][eE]>|)ES(|g; s|<[kK][bB][dD]$R|)KB(|g; s|</[kK][bB][dD]>|)ES(|g; s|<[bB][iI][gG]$R|)4 FZ(|g; s|</[bB][iI][gG]>|)ES(|g; s|<[sS][mM][aA][lL][lL]$R|)2 FZ(|g; s|</[sS][mM][aA][lL][lL]>|)ES(|g; s|<[iI][nN][sS]$R|)sM WB(|g; s|</[iI][nN][sS]>|)WB eM(|g; s|<[dD][eE][lL]$R|)sM $lt(|g; s|</[dD][eE][lL]>|)XE eM(|g; s|<[aA][cC][rR][oO][nN][yY][mM][^>]+[tT][iI][tT][lL][eE]\s*=\s*($S)[^>]*>|)($+)Ac(|g; s|</[aA][cC][rR][oO][nN][yY][mM]>|)Ca(|g; s|<[sS][cC][rR][iI][pP][tT][\w\W]*?</[sS][cC][rR][iI][pP][tT]>||g; s|<[fF][oO][rR][mM][\w\W]*?</[fF][oO][rR][mM]>||g if(!$forms); s|</?[fF][oO][rR][mM]$R|)Ts BE(|g; s/<$s[^>]*[mM][uU][lL][tT][iI][pP][lL][eE]$R/)1 MS(<table>/g; s/<$s$R/)0 MS(<table>/g; s|</$s>|</table>|g; s/<[oO][pP][tT][iI][oO][nN]$R/<tr><td>)O(/g; while(/<[iI][nN][pP][uU][tT]$R/) { $beg=$`; $iattr=$1; $rest=$'; $it=2; if($iattr=~/type\s*=\s*["']?(\w+)/i) {$it=$it{"\L$1"}}; if(defined($it) && $it<2) { $it=($iattr=~/\schecked\W/i?1:0) ." $it"; } elsif($it==2) { $siz=$iattr=~/size\s*=\s*["']?(\d+)/i?$1:12; $ival=$iattr=~/value\s*=\s*($S)/i?$+:""; $it="($ival)$siz $it"; } if(defined($it)) { $cmd=$it==3?"<img $iattr":")$it BX("; } else { $cmd=""; } $_=$beg.$cmd.$rest; } while(/<[tT][eE][xX][tT][aA][rR][eE][aA]$R/) { $beg=$`; $txatr=$1; $rest=$'; if($rest=~m|</[tT][eE][xX][tT][aA][rR][eE][aA]>|) { $rest=$'; $data=$prefilled||$textarea_data?$`:""; $rows=4; $cols=20; if($txatr=~/rows\s*=\s*["']?(\d+)/i) {$rows=$1}; if($txatr=~/cols\s*=\s*["']?(\d+)/i) {$cols=$1}; $nl=$data=~y/\n/\n/; for ($nl..$rows) {$data.="\n"}; $data=~/(.*\n){$rows}/; $tfont=$prefilled?"TT":"0 FZ"; ($data=$&)=~s/.*\n/<tr height=24><td valign=top>)$tfont($&)ES(/g; $wi=10*$cols; $frame=$prefilled?"frame=box":"border"; $_="$beg<table $frame width=$wi cellpadding=2>$data</table>$rest"; } else { $_=$beg.$rest; } } $nfnt=1; s|<(/?)($F)([>\s])|"<$1$2".($1?--$nfnt:$nfnt++).$3|eg; while(/<$F(\d+)([^>]*)$U\s*=\s*["']?\s*#?(\w+)$R/) { $rgb=&col2rgb($3); $_=$`.($rgb?")WB $rgb Sc(":"")."<font$2$4"; $temp=$'; $temp=~s|</$F$1>|</font>)Ec(| if($rgb); $_.=$temp; } $base{"+"}="Bf add "; $base{"-"}="Bf add "; s/<$F\d*\s[^>]*[sS][iI][zZ][eE]\s*=\s*["']?([+-]?)(\d+\.?\d*)$R/)$1$2 $base{$1}FZ(/g; s|<$F\d*$R|)3 FZ(|g; s|</$F\d*>|)Ef(|g; s|<[bB][aA][sS][eE]$F\s[^>]*[sS][iI][zZ][eE]\s*=\s*["']?(\d+)$R|)$1 BZ(|g; while(/(<[aA]\s+[^>]*)[nN][aA][mM][eE]\s*=\s*(["']?)([^"'\s>]*)$R([^\s<)]*)/) { $lnk="$html#$3"; $refs{$lnk}=$nref++ unless(defined $refs{$lnk}); $_="$`$1$4$5)WB $refs{$lnk} Sn($'"; } while(/<[aA]\s+[^>]*[hH][rR][eE][fF]\s*=\s*["']?\s*([^"'\s>]*)$R/) { $beg=$`; $tag=$&; $rest=$'; $lnk=$1; $revtoc=$tag=~/rev\s*=['"]?\s*toc/i; $html=~m|[^/]*$|; $lnk=~s/^\Q$&#/#/; $loc=$lnk=~/^#/; if($loc) { $html=~m|[^/]*$|; $lnk=$&.$lnk; } if($lnk=~m|.+//[^/]+$|) {$lnk=$&."/"} if($lnk=~m|://|) { $rlnk=0; } else { $rlnk=1; if($lnk=~m|^/|) {$lnk=$b1.$lnk} elsif($lnk!~m|^\w+:|) {$lnk=$b2.$lnk}; } while($lnk!~m|^\.\./| && $lnk=~m|[^/]*/\.\./|) {$lnk=$`.$'}; $lnk=~s"(^|/)\./"$1"g; ($doc)=$lnk=~/([^#]*)/; ($doctit{$doc})=$tag=~/title\s*=['"]([^'"]*)['"]/i; $T=0; $anch=2; if($loc || grep(/^\Q$doc\E$/,(@docs,@links)) || $opt_W && !$link && $level<=$maxlev && &follow){ $refs{$lnk}=$nref++ unless(defined $refs{$lnk}); $anch="$refs{$lnk} 1"; $ltype=$rev && $revtoc && $ndoc==1 || $opt_C=~/f/ && $ndoc==1?1:0; $rest=~s|</a>|)$refs{$lnk} $ltype TN TL()Ec /AF f D(|i; if(&follow && !$levl{$doc}) { &dbg("Link: $doc\n") if($opt_d); $levl{$doc}=$level+1; push(@links,$doc); } } elsif(defined $refs{$lnk}) { $anch="$refs{$lnk} 1"; } $addr=$dum{$lnk}?"R$dum{$lnk}":0; if(!$dum{$lnk} && $lnk=~m|://|) { $dum{$lnk}=$nlnk++; $rfs.="/R$dum{$lnk} ($lnk) D\n"; $addr="R$dum{$lnk}"; } $_=$beg.")$addr $anch A(".$rest; } s|</[aA]>|)EA(|g; if((!$mult || $doc_sep eq $pc && $mult) && m|<[bB][aA][nN][nN][eE][rR]$R([\w\W]*)</[bB][aA][nN][nN][eE][rR]>|) { $banner=$2; $_=$`.$'; } while(/<[tT][aA][bB][lL][eE]([^>]*)>/) { local($beg)=$`; local($rest)=$'; $tattr=$1; $tag=$&; $rest=~/(<\/[tT][aA][bB][lL][eE]>|$)/; $table=$`; $rest=$'; while($table=~/<[tT][aA][bB][lL][eE]([^>]*)>/) { $tattr=$1; $table=$'; $beg.=$tag.$`; $tag=$&; } ($tla)=$tattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; if(!$tla) {($tla)=$beg=~/\004_?([^\004]*)\004[^\004]*$/}; $ntab++; $table=~s/^\s*//; undef %cells; undef %rd; undef @cali; undef @cval; undef @cgrp; undef @cwid; undef @codc; undef @r0; undef @c0; ($capat,$cap)=$table=~m|<caption$R([\w\W]*)</caption>|i; $capat=~/ALIGN\s*=\s*["']?\s*(\w+)/i; $capa=0; $capa=1 if("\L$1" eq "bottom"); $capa=-1 if($cap!~/\S/); $bord=0; if($tattr=~/border/i) { ($bord)=$'=~/^\s*=\s*["']?(\d+)/; if(!$bord && $bord ne "0") {$bord=1}; } ($talgn)=$tattr=~/ALIGN\s*=\s*["']?\s*(\w+)/i; $tal=-1; $tal=0 if($talgn=~/^left$/i); $tal=1 if($talgn=~/^center$/i); $tal=2 if($talgn=~/^right$/i); ($fra)=$tattr=~/FRAME\s*=\s*["']?\s*(\w+)/i; if($fra && $f{"\L$fra"}) {$fra=$f{"\L$fra"}} else {$fra=$bord?9:1}; ($rul)=$tattr=~/RULES\s*=\s*["']?\s*(\w+)/i; if($rul && $r{"\L$rul"}) {$rul=$r{"\L$rul"}} else {$rul=$bord?5:1}; unless(($twid)=$tattr=~/WIDTH\s*=\s*["']?(\d+\.?\d*%?)/i) {$twid=0}; $twid=$twid=~/%$/?$`/100:-$twid; ($cpad)=$tattr=~/CELLPADDING\s*=\s*["']?\s*$V/i; if($tattr=~/CELLSPACING\s*=\s*["']?\s*$V/i && $1!=0) {$cpad+=$1/2}; ($tbg)=$tattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $tbg=&col2rgb($tbg); ($tcl)=$tattr=~/CLASS\s*=\s*["']?\s*(\w+)/i; $tcl="\L$tcl" eq "telelista"? 1: 0; $ic=0; $span=1; undef $gal; undef $gva; undef $odc; undef $gwi; $cgs=0; while($table=~/<[cC][oO][lL]([^>]*>)/g && $span>0) { $cola=$1; $ab=$`; $aft=$'; $cola=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $alg=$algn{"\L$2"}; ($val)=$cola=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $val=$v{"\L$val"}; ($odc)=$cola=~/CHAR\s*=\s*["']?(.)/i; unless(($wid)=$cola=~/WIDTH\s*=\s*["'](\d+%?)/i) {$wid=0}; if($wid=~/%$/) {$wid=$`/100}; ($span)=$cola=~/SPAN\s*=\s*["']?\s*(\d+)/i; if(!$span && $span ne "0") {$span=1}; $us=1; if($cola=~/^GROUP/i) { $gal=$alg; $gva=$val; $gdc=$odc; $gwi=$wid; $cgs=1; if($aft=~/<COL\s/i) { $us=$`=~m|</?COLGROUP|i; } } else { while($ab=~/<COLGROUP/i) {$ab=$'}; if($ab=~m|</COLGROUP|i) { undef $gal; undef $gva; undef $odc; undef $gwi; } if(!$alg) {$alg=$gal}; if(!$val) {$val=$gva}; if(!$odc) {$odc=$gdc}; if(!$wid) {$wid=$gwi}; if($span eq "0") { $ic++; push(@cali,$alg); push(@cval,$val); push(@cwid,$wid); push(@codc,$odc); push(@cgrp,1); } } if($us) { for (1..$span) { $ic++; push(@cali,$alg); push(@cval,$val); push(@cwid,$wid); push(@codc,$odc); push(@cgrp,$cgs); $cgs=0; } } } $table=~/<t[hd][\s>]/i; if($`!~/<tr/i) {$table="<TR>$table"}; $nrow=-1; $ncol=-1; $nhead=0; $nfoot=0; $nb=0; unless($table=~/<tbody$R/i || $table=~s|</tfoot>|$&<tbody>|i) { $table=~s|</thead>|$&<tbody>|i; } while($table=~/<[tT][rR]\s*([^>]*)>/g) { $nrow++; $ab=$`; $row=$'; $rattr=$1; for $j (@c0) { $cells{"$nrow,$j,0"}=1; } $rgrp=0; if($ab=~/<tbody$R/i) { $ib=0; while($ab=~/<[tT][bB][oO][dD][yY]$R/g) { $ib++; $battr=$1; if($ib>$nb) { $rgrp=1; $nb=$ib; } } } else { if($ab=~/<tfoot$R/i) { $nfoot++; $battr=$1; } elsif($ab=~/<thead$R/i) { $nhead++; $battr=$1; } } $battr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $balgn=$algn{"\L$2"}; $battr=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $bva=$v{"\L$1"}; ($bdc)=$battr=~/CHAR\s*=\s*["']?(.)/i; $rd{"$nrow,0"}=0; $rd{"$nrow,1"}=0; $rd{"$nrow,2"}=0 unless($rd{"$nrow,2"}); $rd{"$nrow,3"}=$rgrp; $rattr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $ralgn=$algn{"\L$2"}; $rattr=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $rva=$v{"\L$1"}; ($rla[$nrow])=$rattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; ($rbg)=$rattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $rbg[$nrow]=&col2rgb($rbg); ($rdc)=$rattr=~/CHAR\s*=\s*["']?(.)/i; if($row=~/<tr/i) {$row=$`}; $rh[$nrow]=$rattr=~/HEIGHT\s*=\s*["']?(\d+)/i?$1:0; $icol=0; $colsp=1; while($row=~/<[tT]([hH]|[dD])(\s*[^>]*)>/g && $colsp>0) { $cattr=$2; $cell=$'; $ctype=$1=~/h/i?1:0; if($cell=~/<t[hd]/i) {$cell=$`}; $cell=~s/\s+$//; $cell=~s/\)HY\($/\255/; $cell=~s/[\200-\377]([^\\]|\\20.)/$&)WB(/g if(!$latin1); ($rowsp)=$cattr=~/ROWSPAN\s*=\s*["']?(\d+)/i; $rsp=$rowsp; if(!$rsp) { if($rsp eq "0") { push(@c0,$icol); } else { $rowsp=1; } $rsp=1; } ($colsp)=$cattr=~/COLSPAN\s*=\s*["']?(\d+)/i; $csp=$colsp; if(!$csp) { if($csp eq "0") { push(@r0,$nrow); $csp=$ncol-$icol<0? 1: $ncol-$icol+1; } else { $colsp=1; $csp=1; } } ($cdc)=$cattr=~/CHAR\s*=\s*["']?(.)/i; while($cells{"$nrow,$icol,0"}==1) {$icol++}; # for $i ($nrow..$nrow+$rsp-2) {$rd{"$i,2"}=1}; for $j ($icol..$icol+$csp-1) { for $i ($nrow..$nrow+$rsp-1) { $cells{"$i,$j,0"}=1; } } if($colsp) { for $j ($ncol+1..$icol+$csp) { for $i (@r0) { $cells{"$i,$j,0"}=1; } } } if($ic<$icol+$csp) { for ($ic..$icol+$csp-1) { push(@cali,$cali[$ic-1]); push(@cval,$cval[$ic-1]); push(@cgrp,0); } $ic=$icol+$csp; } $cal=$ctype; $cal=$balgn-1 if($balgn); $cal=$ralgn-1 if($ralgn); $cal=$cali[$icol]-1 if($cali[$icol]); if($cattr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i) { $cal=$algn{"\L$2"}-1 if($algn{"\L$2"}); } $cvl=2; $cvl=$cval[$icol] if($cval[$icol]); $cvl=$bva if($bva); $cvl=$rva if($rva); if($cattr=~/VALIGN\s*=\s*["']?\s*(\w+)/i) { $cvl=$v{"\L$1"} if($v{"\L$1"}); } ($cbg)=$cattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $cbg=&col2rgb($cbg); for($rbg[$nrow],$tbg,$deftbg,$bg) {$cbg=$_ if(!$cbg)}; $now=0; $ro=$cattr=~/class\s*=\s*["']?rot(-?90)/i?$1:0; if($cattr=~/NOWRAP/i || $cal==4 || $ro) {$now=1}; $dc="."; $dc=$bdc if($bdc || $bdc eq "0"); $dc=$rdc if($rdc || $rdc eq "0"); $dc=$codc[$icol] if($codc[$icol] || $codc[$icol] eq "0"); $dc=$cdc if($cdc || $cdc eq "0"); ($wid)=$cattr=~/WIDTH\s*=\s*["'](\d+%?)/i; if($wid=~/%$/) {$wid=$`/100}; if($wid>$cwid[$icol]) {$cwid[$icol]=$wid}; if($cpad || $cpad eq "0") { $clm=$cpad; $crm=$cpad; $ctm=$cpad; $cbm=$cpad; } else { $clm=$rul<5?8:4; $crm=$rul<5?8:4; $ctm=2; $cbm=6; } if($tcl==1) { $clm=$icol>0?12:2; $crm=12; $ctm=0; $cbm=0; } if($rul==1 && $fra==1 && $icol==0 && $tal==0) {$clm=0}; ($lang)=$cattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; for($rla[$nrow],$tla) {$lang=$_ if(!$lang)}; $lang=lc $lang; &inihyph if($opt_H); $cbg=~/#(\w+).*#(\w+).*#(\w+)/; &img($cell,$1,$2,$3); @cll=("{(\004$lang\004)WB($cell)}",0,0,$ctype,0,$colsp,$rowsp,$cal, "($dc)",$cvl,$now,$clm,$crm,$ctm,$cbm,0,0,0,0,$cbg,$ro); for $i (0..$#cll) {$cells{"$nrow,$icol,$i"}=$cll[$i]}; $icol+=$csp; if($icol-1>$ncol) {$ncol=$icol-1}; } } for $j (0..$ncol) { for $i (0..$nrow) { if($cells{"$i,$j,0"} && $cells{"$i,$j,0"}!=1) { if($cells{"$i,$j,6"}>$nrow-$i+1) {$cells{"$i,$j,6"}=$nrow-$i+1}; if($cells{"$i,$j,6"}>1) {$rd{"$i,2"}=1}; } } } $rd{"$nrow,2"}=0; $rw="["; for $i (0..$nrow) { $rw.="[$rh[$i] ".$rd{"$i,1"}." ".$rd{"$i,2"}." ".$rd{"$i,3"}." 0 0 ["; for $j (0..$ncol) { $cbg=""; for($rbg[$i],$tbg,$deftbg,$bg) {$cbg=$_ if(!$cbg)}; $temp="[{()}0 0 0 0 1 1 0(.)0 0 $clm $crm $ctm $cbm 0 0 0 0 $cbg $ro]"; if($cells{"$i,$j,0"}==1) { $temp="0"; } elsif($cells{"$i,$j,0"}) { $temp="["; for $k (0..$#cll) { $temp.=$cells{"$i,$j,$k"}." "; } $temp.="]"; } $rw.="$temp\n"; } $rw.="]]\n"; } if($nrow==$nhead+$nfoot-1) { $nhead=0; $nfoot=0; } $tdesc="[0 0 $tcl 0 0 $tal 0 $twid $bord $nrow $ncol" ." $nhead $nfoot $fra $rul {($cap)} $capa]\n"; $cdesc="["; for (0..$ncol) { unless($wid=$cwid[$_]) {$wid=0}; $cdesc.="[0 0 0 $wid $cgrp[$_] 0 0]"; } $cdesc.="]\n"; $tables.="[$tdesc $cdesc $rw]]\n"; $_=$beg.")$ntab PT(".$rest; } &img($_,$red,$grn,$blu); &ack($_); $_[0]=$_; } sub getcom{ $com=$&; $'=~/--\s*(--|>)/; $com.=$`.$&; $rest=$'; while($1 eq "--") { $'=~/(>)/ if($'!~/--\s*(--|>)/); $com.=$`.$&; $rest=$'; } } sub getl { ($l)=@_; if(!$lid{$l}) { while($l=~s/-[^-]+$// && !$lid{$l}) {}; } $lid{$l}; } sub ack { local($_)=@_; chdir $tempdir; while (/<[mM][aA][tT][hH]/) { $beg=$`; $rest=$&.$'; $rest=~m|</[mM][aA][tT][hH]>|; $end=$'; $math=$`; if(&math2sym($math)) { $_=$beg.$sym.$end; } elsif($package{'TeX'} && $package{'dvips'}) { $math=~s|\\200|\\|g; $math=~s|\\201|\(|g; $math=~s|\\202|\)|g; &math2tex($math); open(SCRATCH,">$scr.tex"); print SCRATCH $tex; close SCRATCH; `tex $scr.tex`; `dvips -E -o $scr.ps $scr.dvi`; open(LOG,"$scr.log"); $log=<LOG>; close LOG; ($h,$d)=$log=~/[\w\W]*$prog: +([\d.]+)pt: +([\d.]+)/ ? ($1,$2) : (1,0); $above=$h+$d>0?sprintf("%.4f",$h/($h+$d)):0; open(PS,"$scr.ps"); $pic=<PS>; if($pic=~/^%!/ && $pic=~/%%BoundingBox: +$V +$V +$V +$V/) { $xs=$3-$1; $ys=$4-$2; $llx=$1; $lly=$2; $ps=""; for $i (split(/\n/,$pic)) { $ps.=$i."\n" if($i && $i!~/^%/); } if($ps=~/\nTeXDict begin/) { if(!$ph) { $ph="/DH {1 F div dup scale /showpage {} D\n$`$&} D\n%EndDH\n"; $pv=$ph.$pv; } $ps="save -$llx -$lly translate\nDH$' restore"; } } $nimg++; $nps--; push(@XS,$xs); push(@YS,$ys); push(@IX,$nps); push(@IT,2); $pv.="/P$nimg {$ps} D\n"; $eps{"P$nimg"}=$ps; $_=$beg.")$above 3 (P$nimg) $nimg IM(".$end; } else { $math=~s/<math$R//i; $_=$beg.$math.$end; } } chdir $cwd; s|<[sS][uU][bB]$R|)Sb(|g; s|<[sS][uU][pP]$R|)Sp(|g; s"</[sS][uU]([bB]|[pP])>")Es("g; s|<[A-Za-z/!?]\w*$R||g; &ent($_); y/\003/>/; s/\004([^\004]*)\004/")".&getl($1)." Sl($&"/eg; if($opt_H) { &dbg("Inserting potential hyphenation points\n") if($opt_d && $ndoc>0); $temp=""; while(/\004([^\004]*)\004/) { $temp.=$`; $lang=$1; $end=$'; if($end=~/\004([^\004]*)\004/) { $htext=$`; $end=$&.$'; } else { $htext=$end; $end=""; } $apa=""; while($htext=~/(..?)\(([^)]*)/) { $slut=$'; if($1 eq "XX") { $apa.=$`.$&; if($'=~/RP\(/) { $apa.=$`; $htext=$&.$'; } else { $apa.=$slut; $htext=""; } } elsif($1 eq ") ") { $apa.=$`.$&; $htext=$'; } else { $apa.="$`$1("; $htext=$'; ($txt=$2)=~s/[$ltrs]{$hyphenation{'min'},}/&hyph($&)/eg; $apa.=$txt; } } $_=$apa.$slut.$end; } $_=$temp.$_; } s/\004([^\004]*)\004//g; $_[0]=$_; } sub ent { local($_)=@_; s|&#x($X+);?|"&#".hex($1).";"|egi; for $char (keys %ent) {s/&($char)(;|$|(?=\W))/chr($ent{$char})/eg}; for $char (keys %symb) {s/&($char)(;|$|(?=\W))/)SY(\\$symb{$char})ES(/g}; s/&(euro|#8364)(;|$|(?=\W))/)MY(e)ES(/g; s|&lt;?|<|g; s|&gt;?|>|g; s|&quot;?|"|g; s/&($space);?/)$space{$1} Se(/g; s|&#(\d+);?|$1==38?"\005":$1<256?chr($1):$&|eg; s/(\005|&amp;?)/\&/g; $_[0]=$_; } sub spec { $_[0]=~s/(\\|&#92(;|$|(?=\W)))/\\200/g; $_[0]=~s/(\(|&#40(;|$|(?=\W)))/\\201/g; $_[0]=~s/(\)|&#41(;|$|(?=\W)))/\\202/g; $_[0]=~s/&(there4|#8756|#[xX]2234)(;|$|(?=\W))/)SY(\\200)ES(/g; } sub math2tex { local($_)=@_; local($beg,$rest); %a=("line","overline", "cub","overbrace", "hat","widehat", "tilde","widetilde", "larr", "overleftarrow", "rarr", "overrightarrow"); %b=("line","underline", "cub","underbrace", "hat","widehat", "tilde","widetilde"); %s=("medium","\\big", "large","\\Big", "huge","\\bigg"); ($mattr)=/<math$R/i; $st=$mattr=~/class\s*=\s*["']?chem/i?'\rm ':''; $di=$mattr=~/class\s*=\s*["']?displayed/i?'\displaystyle ':''; s/<math$R//gi; s/\\/\\backslash/g; s/__/_\\>_/gi; s/\^\^/^\\>^/gi; s/_([^_]+)_/_{$1}/g; s/\^([^^]+)\^/^{$1}/g; s/&thinsp;?/\\,/g; s/&sp;?/\\>/g; s/&emsp;?/\\;/g; s/&nbsp;?/\\>/g; s/&epsi;?/\\varepsilon /g; s/&upsi;?/\\upsilon /g; s/&piv;?/\\varpi /g; s/&sigmav;?/\\varsigma /g; s/&thetav;?/\\vartheta /g; s/&phiv;?/\\varphi /g; s/&Upsi;?/\\Upsilon /g; s/&omicron;?/o/g; s/&plusmn;?/\\pm /g; s/&or;?/\\vee /g; s/&and;?/\\wedge /g; s/&ap;?/\\approx /g; s/&sube;?/\\subseteq /g; s/&sub;?/\\subset /g; s/&supe;?/\\supseteq /g; s/&sup;?/\\supset /g; s/&isin;?/\\in /g; s/&larr;?/\\leftarrow /g; s/&rarr;?([_^])/\\mathop\\rightarrow\\limits$1 /g; s/&rarr;?/\\rightarrow /g; s/&uarr;?/\\uparrow /g; s/&darr;?/\\downarrow /g; s/&harr;?/\\leftrightarrow /g; s/&lArr;?/\\Leftarrow /g; s/&rArr;?/\\Rightarrow /g; s/&uArr;?/\\Uparrow /g; s/&dArr;?/\\Downarrow /g; s/&exist;?/\\exists /g; s/&inf;?/\\infty /g; s/&?int;?/\\int\\limits /g; s/&?sum;?/\\sum\\limits /g; s/&?prod;?/\\prod\\limits /g; s/&pd;?/\\partial /g; s/&lcub;?/\\{/g; s/&rcub;?/\\}/g; s/<t>/\\hbox{/gi; s/<b>/\\bf /gi; s/<bt>/{\\bf\\hbox{/gi; s/<sub$R/_{/gi; s/<sup$R/\^{/gi; s/<box\s*size=["']?(\w+)["']?>/{\\def\\lft{$s{$1}}\\def\\rgt{$s{$1}}/gi; s/<box$R/{/gi; s/<text\s*>/\\hbox{/gi; s/([\(\[\|])\s*<left>/\\lft$1/gi; s/<right>/\\rgt /gi; s/<(atop|choose|over)>/\\\L$1 /gi; s/<of>/}\\of{/gi; s/<bar>/\\overline{/gi; s/<vec>/\\overrightarrow{/gi; s/<hat>/\\widehat{/gi; s/<tilde>/\\widetilde{/gi; s/<(sqrt|root|vec|dot|ddot|hat|tilde)>/\\\L$1\{/gi; while(/<above\s+sym\s*=\s*["']?equals["']?\s*>/i) { $beg=$`."\\overline{\\overline{"; $rest=$'; $rest=~s/<\/above>/}}/i; $_=$beg.$rest; } s/<above\s*>/\\overline{/gi; s/<above\s+sym\s*=\s*["']?(\w+)["']?\s*>/\\$a{$1}\{/gi; s/<below\s*>/\\underline{/gi; s/<below\s+sym\s*=\s*["']?(\w+)["']?\s*>/\\$b{$1}\{/gi; s/<\/(math|row|item|b)>//gi; s/<\/(box|t|sup|sub|sqrt|root|vec|bar|dot|ddot|hat|tilde|above|below|text|array)>/}/gi; s/<\/bt>/}}/gi; s/&lt;?/< /gi; s/&gt;?/>/gi; s/&(\w+);?/\\$1 /gi; s/<array$R/\\matrix{/gi; s/<row>\s*<item$R//i; s/<row>\s*<item$R/\\cr /gi; s/<item>/&/gi; s/<[^ ]$R//gi; s/\n*$//; $tex="\\batchmode\\magnification=$mag\\hsize=40cm\\nopagenumbers\n" ."\\def\\lft{\\left}\\def\\rgt{\\right}\n\\setbox0=\\hbox{\$$st$di".$_."\$}\n" ."\\immediate\\write0{$prog: \\the\\ht0: \\the\\dp0}\\box0\n\\end\n"; } sub Getopts { local($optlist)=@_; local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts); local($errs)=0; local($[)=0; @args=split( /\|/, $optlist ); for $opt (@args) { if(substr($opt,-1,1) ne ':') {$olist.=$opt} else {$plist.=$opt} } @popts=split(/:/,$plist); while(@ARGV && ($_=$ARGV[0]) =~ /^-(.*)/) { $opt=$1; if($opt=~/^-/ && $optalias{"\L$'"}) {$opt=$optalias{"\L$'"}}; if($opt =~ /^[$olist]+$/) { while ($char=chop $opt) {eval "\$opt_$char=1"} shift(@ARGV); } else { $found=0; for $opts (@popts) { $rest=substr($opt,length($opts)); if(index($opt,$opts)==0) { $found=1; shift(@ARGV); if(length($rest)==0) { ++$errs unless @ARGV; $rest=shift(@ARGV); } eval "\$opt_$opts=\$rest"; } } if(!$found) { &dbg("Unknown option: $opt\n"); ++$errs; shift(@ARGV); } } } $errs==0; } sub openps { open(STDOUT,">$opt_o") || die "*** Error opening $opt_o for output\n"; } sub getalt { if($imgcmd eq "img") { $alt=""; $match=0; if($img=~/alt\s*=\s*"([^"]*)"/i) {$alt=$1; $match=1}; if(!$match && $img=~/alt\s*=\s*([\w\.-]+)/i) {$alt=$1; $match=1}; if(!$match) {$alt=")WB IA WB("}; $text="$alt )WB("; return; } if($imgcmd eq "hr") { $text=$img=~/align\s*=\s*["']?(left|center|right)/i?")$algn{lc $1} ":")2 "; $text.=$img=~/size\s*=\s*["']?$V/i?$1:.6; $wd=1; if($img=~/width\s*=\s*["']?$V(%?)/i) {$wd=$2?$1/100:-$1}; $text.=" $wd HR("; return; } if($imgcmd eq "fig") { $text=")BN("; } } sub xbmtops { $fc=1; $dp=1; ($xs,$ys)=$pic=~/^#define.* (\d+)[\w\W]*^#define.* (\d+)/; $nd=2*int(($xs+7)/8)*$ys; ($pic)=$pic=~/[^#].* char.*[\w\W]*{([\w\W]*)}/; $pic=~s/[ ,\n\r]*0x[ ,]*//g; $pic=~y/01246789bdef/f7bd91e62480/; $bm=unpack("H*", pack("h*",$pic)); } sub pmtops { pmtoraw($pm) if($pm=~/^P([1-3])/); $pm=~/^P([4-6])/; $maptype=$1; return if(!$maptype); $pm=$'; $bm=""; $nint=3; $dp=8; if($maptype==4) { $nint=2; $dp=1; } undef @num; $found=0; while($pm && $found<$nint) { if($pm=~/^\s*(\d+)/) {$num[$found]=$1}; if($num[$found]) { $found++; $pm=$'; } elsif($pm=~/^\s*#.*\n/) { $pm=$'; } else { return; } } ($b)=$pm=~/\s([\w\W]*)/; ($xs,$ys,$bits)=@num; return if($bits>255); $fc=1; if($maptype==6) { $fc=3; $nd=6*$xs*$ys; $bm=unpack("H*",$b); } else { $bm=unpack("H*",$b); if($maptype==4) { $nd=2*int(($xs+7)/8)*$ys; $bm=~y/0123456789abcdef/fedcba9876543210/; } else { $nd=2*$xs*$ys; } } } sub trans { $next = 13; $temp = ord substr($pic,10,1); if($temp & 0x80) {$next += 3*2**(($temp & 0x07) + 1)} else {return}; $byte = ord substr($pic,$next,1); while($byte != 0x3b && $next <= length $pic) { if($byte == 0x21) { if(ord substr($pic,$next+1,1) == 0xf9) { if(ord substr($pic,$next+3,1) & 0x01) { &dbg("Transparent\n") if($opt_d); $src{$URL}=$pic; $idx = 3*(ord substr($pic,$next+6,1))+13; substr($pic,$idx,3) = pack("H*",$red.$grn.$blu) if($idx<length $pic); } return; $next += 2; &skip; } else { $next += 2; &skip; } } elsif($byte == 0x2c) { $next += 10; $temp = ord substr($pic,$next-1,1); if($temp & 0x80) {$next += 3*2**(($temp & 0x07) + 1)}; $next++; &skip; } else {return} } } sub skip { $byte = ord substr($pic,$next,1); while($byte != 0) { $next += $byte + 1; $byte = ord substr($pic,$next,1); } $next++; $byte = ord substr($pic,$next,1); } sub run { &dbg("@_\n") if($opt_d); $pm=`@_`; } sub geturl { local($url)=@_; &dbg("Retrieving $url"); if($package{'libwww-perl'} || $package{'jfriedl'}) { warn "\n"; &gu(); if($code==401) { &prompt("\nDocument requires username and password\n\nUsername: ",$user); &prompt("Password: ",$pass); &gu($user,$pass); } $_[1]=$cont; } elsif(defined $geturl) { &dbg("..."); $_[1]=`$geturl '$url'`; if($?) { &dbg("\n*** Error opening $url\n"); return 0; } &dbg("done\n"); if($_[1]=~/\r?\n\r?\n/) { $_[1]=$'; $dhead=$`; ($code)=$dhead=~/HTTP\/\S+ +(\d+)/i; ($contyp)=$dhead=~/Content-type:\s+(.*)/i; } else { $code=500; } } $_[0]=$url; $code<300; } sub gu { if($package{'libwww-perl'}) { require LWP::UserAgent; $ua=new LWP::UserAgent; $ua->env_proxy(); if ($opt_k) { require HTTP::Cookies; $cookie_jar = HTTP::Cookies::Netscape->new(File => $opt_k, AutoSave => 1); $ua->cookie_jar($cookie_jar); } $req = HTTP::Request->new(GET => $url); $req->authorization_basic(@_) if(@_); $ua->agent($spoof) if($spoof); my $res = $ua->request($req); $code=$res->code; $contyp=$res->header('content-type'); $cont=$res->content; } else { require "www.pl"; @opts=@_?("authorization=$_[0]:$_[1]"):(); push(@opts,"quiet") if(!$opt_d); $www::useragent=$spoof if($spoof); ($status,$memo,%info)=&www::open_http_url(*FILE,$url,@opts); $code=$info{'CODE'}; ($contyp)=$info{'HEADER'}=~/Content-type:\s+(.*)/i; $cont=<FILE>; } } sub pictops { if($opt_g) { $fc=1; $pg1="pgm"; $pg2="|ppmtopgm"; } else { $fc=3; $pg1="ppm"; $pg2=""; } ($type)=$URL=~/([^\?]+)\??/; ($type)=$type=~/\.(\w+)$/; $bm=""; $ps=""; $pm=""; if($opt_U && $src{$URL} && !$cmd{$URL.$red.$grn.$blu}) { $pic=$src{$URL}; } elsif($URL=~m|://|) { &geturl($URL,$pic) || return; } else { $flag=0; if($opt_O) { $orig=$URL; unless($orig=~s/\.\w*$/.ps/) {$orig.=".ps"}; if(open(ORIG,"<$orig")) { $pic=<ORIG>; close ORIG; if($pic=~/^%!/ && $pic=~/%%BoundingBox:/) { $flag=1; &dbg("Using $orig as original for $URL\n") if($opt_d); } } } if(!$flag) { if(open(PIC,"<$URL")) { binmode PIC; $pic=<PIC>; close PIC; } else { &dbg("*** Error opening $URL\n"); return; } } } $pic=~s/^[\n\r]*//; &trans if($pic=~/^GIF/); if($pic=~/^P[1-6]/) { $pm=$pic; } else { open(SCRATCH,">$scr"); binmode(SCRATCH); print SCRATCH "$pic"; close SCRATCH; if($pic=~/^%!/ && $pic=~/%%BoundingBox: +$V +$V +$V +$V/) { $xs=$3-$1; $ys=$4-$2; $ps="save\n0 0 M\nIS IS scale\n/showpage {}D\n".(0-$1)." ".(0-$2)." translate\n"; for $i (split(/\n/,$pic)) { $ps.=$i."\n" if($i && $i!~/^%/); } $ps.="restore"; } elsif($type=~/.xbm$/i || $pic=~/^#define/) { &xbmtops; } elsif($package{'ImageMagick'}) { if($package{'PerlMagick'}) { $imobj=Image::Magick->new; $mess=$imobj->Read($scr); if($mess) { &dbg("$mess\n"); } else { $mess=$imobj->Write("$scr\.$pg1"); &dbg("$mess\n") if($mess); } undef $imobj; } else { # &run("convert $scr $pg1:-"); &run("convert $scr $scr\.$pg1"); } open(PNM,"$scr\.$pg1"); binmode PNM; $pm=<PNM>; close PNM; if(!$pm && $pic=~/^\377\330/ && $package{'djpeg'}) { &run("djpeg $scr$pg2"); } } elsif($pic=~/^\377\330/ && $package{'djpeg'}) { &run("djpeg $scr$pg2"); } elsif($package{'pbmplus'} || $package{'netpbm'}) { if($pic=~/^GIF/) { &run("$giftopm $scr"); } else { &run("anytopnm $scr"); } if($opt_g && $pm=~/^P6/) { open(SCRATCH,">$scr"); binmode(SCRATCH); print SCRATCH $pm; close SCRATCH; &run("ppmtopgm $scr"); } } } &pmtops if(!$bm); return if(!$bm); $bm=substr($bm,0,$nd); $pad=$nd-length($bm); if($pad) {$bm.="f" x $pad}; $bm=~s/(.{60})/$1\n/g; } sub math2sym { local($_)=@_; s/<math$R//gi; for $char (keys %symb) {s/&($char)(;|$|(?=\W))/\\$symb{$char}/g}; $stat=!/([&<][a-zA-Z]|[_^{])/; s/[a-zA-Z\s]*[a-zA-Z][a-zA-Z\s]*/)ES()I($&)ES()SY(/g; s/(\\200|\\201|\\202)/)RO($&)ES(/g; $sym=")SY($_)ES("; $stat; } sub varsub { for (@_) { s/\\\\/\000/g; s/\([^)]+\)/()$&join /g; s/(^|[^\\])\$(T|N|U|H|A)/$1)join $vars{$2} join(/g; s/(^|[^\\])\$D\{"(.*?)"\}/"$1".POSIX::strftime($+,@now)/eg if($posix); s/(^|[^\\])\$D/"$1".POSIX::strftime($datefmt,@now)/eg if($posix); # while(/(?=[^\\])\${([^}]+)}/) { while(/(?=[^\\])\$\[([^]]+)\]/) { if(!defined $metarc{lc $1}) { $metarc{lc $1}=$mn++; } $_="$`)join ME $metarc{lc $1} get join($'"; } s/\\\$/\$/g; s/\000/\\\\/g; s/\(\)join//g; s/\(\) ?(\([^)]*\)|\w+) ?join/ $1/g; } } sub follow { return 0 if(!$opt_W); $H=$lnk=~/\.html?(#|$)/i || $lnk=~m|.+//.+/[^/\.]*$|; $T=$rev && ($revtoc && $ndoc==1 || $ndoc>1 && $H); $L=$b1=~m|://| && $lnk=~m"^$b1(/|$)" || $b1!~m|://| && $lnk!~m|://|; $B=$B2 && $lnk=~/^$B2/ || !$B2 && $lnk!~m"(^\.\.|://)"; return $rlnk && ($H || $T) if($rel); return $L && ($H || $T) if($local); return $B && ($H || $T) if($below); return $H || $T if($rev); $H; } sub DSC { &dbg("Generating DSC PostScript\n") if($opt_d); %op=("moveto",2, "rmoveto",2, "lineto",2, "rlineto",2, "translate",2, "scale",2, "show",1, "awidthshow",6, "stroke",0, "save",0, "restore",0, "gsave",0, "grestore",0, "showpage",0, "newpath",0, "setlinewidth",1, "setlinejoin",1, "setgray",1, "closepath",0, "fill",0, "arc",5, "setrgbcolor",3, "rotate",1, "image",5, "colorimage",7); %sho=("moveto","M", "rmoveto","RM", "lineto","L", "rlineto","RL", "show","S", "showpage","N", "awidthshow","A"); $i=0; $po="/OU true D\n"; for (keys %op) { $cmd=$sho{$_}?$sho{$_}:$_; push(@val,$cmd); $in{$_}=$i++; $j=$op{$_}+1; $extra=""; if(/showpage/) {$extra="Bb{Xl Yl Xh Yh}if Pn "}; if(/image/) {$extra="K2 ";$j++}; $t=$op{$_}?"$op{$_} copy $extra$in{$_} $j array astore":"[$extra$in{$_}]"; $po.="/$_ {OU {$t ==} if $_}d\n"; } $po.="/pdfmark {$i] ==} D\n"; $in{"pdfmark"}=$i++; push(@val,"pdfmark"); $po.="/NF {OU{2 copy E $i 3 array astore ==}if ONF}d\n" ."/EX {[IS EC] ==} D\n/Cd {} D\n/DU {TU PM 1 eq and TP and{Pn ==}if}d\n" ."/BB {US Bb{dup Yl lt{dup /Yl E D}if dup Yh gt{/Yh E D}{pop}ie\n" ." dup Xl lt{dup /Xl E D}if dup Xh gt{/Xh E D}{pop}ie}\n" ." {/Yl E D /Yh Yl D /Xl E D /Xh Xl D /Bb t D}ie}D\n"; $in{"Nf"}=$i++; s|/(NF.*)|/O$1|; s|/BB .*|$po|; push(@val,"Nf"); if($psin) { ($ti)=/%%Title: (.*)/; if(m|/BM (\d+)|) { $nbit=$1; for $vec ("IT","WS") { /\/$vec \[(.*)\]/; @$vec=split(' ',$1); } /\nSB/; for (0..$nbit-1) { $'=~/\n\n/; push(@BM,$`); } } ($epsf)=/(\n\/P\d+_?\d* [\w\W]*)%Endpv/; while($epsf=~/\n\/(P\d+_?\d*) \{/g) { $pid=$1; $rest=$'; $temp=$'=~/\/P\d+_?\d* \{/?$`:$rest; ($eps{$pid})=$temp=~/([\w\W]*)} D/; } if(/\/DH {/) { $'=~/%EndDH/; $ph="/DH {$`"; } } $j=-1; for $i (0..$#IT) { $j++ if($IT[$i] == 0); push(@ix,$j); } $dfn="/F $opt_s D\n$ph"; for (keys %sho) { $dfn.="/$sho{$_} {$_} d\n"; } open(SCR,">$scr.ps"); print SCR "$_ quit\n"; close SCR; $cd{')]'}="Cd "; $io="($in{'image'}|$in{'colorimage'})"; $_=""; $temp=""; $pn=""; $start=1; $EPS="%%EndPageSetup"; $pp=0; $n=0; for $line (split(/\r?\n/,`$gs -q -dNODISPLAY $scr.ps -c quit`)) { if(!$pp) { $mv=""; $cx=""; $cy=""; } if($start && $line!~/ $in{"pdfmark"}\]$/) { $pdf=$temp; $temp=""; $start=0; } $pp=$line=~/^\[(\S+) (\S+) ($in{'moveto'}|$in{'rmoveto'}|$in{'Nf'})\]$/; S:{ if($pp && $3==$in{"Nf"}) { $fn="$1 $2 $val[$3]\n"; last S; } if($pp && $3==$in{"moveto"}) { $cx=$1; $cy=$2; $mv=sprintf("%.1f %.1f %s\n",$1,$2,$val[$3]); last S; } if($pp && $3==$in{"rmoveto"}) { if($mv) { $cx+=$1; $cy+=$2; $mv=sprintf("%.1f %.1f %s\n",$cx,$cy,$val[$in{"moveto"}]); } else { $temp.=sprintf("%.1f %.1f %s\n",$1,$2,$val[$3]) if($1||$2); } last S; } if($line=~s/^\[(.*)\((\S*)\) ($in{"showpage"})\]$/pgsave restore $val[$3]/) { $pbb=""; if($1) { ($llx,$lly,$urx,$ury)=split(/ /,$1); $llx=int($llx); $lly=int($lly); $urx=int($urx+1); $ury=int($ury+1); $pbb="%%PageBoundingBox: $llx $lly $urx $ury\n"; if(!defined($Llx) || $llx<$Llx) {$Llx=$llx}; if(!defined($Lly) || $lly<$Lly) {$Lly=$lly}; if(!defined($Urx) || $urx>$Urx) {$Urx=$urx}; if(!defined($Ury) || $ury>$Ury) {$Ury=$ury}; } $pn.="," if($pn && $2); $n++; @df=(); for(0..$#docfonts) { push(@df,$docfonts[$_]) if($uf{$_}==$n); } push(@df,"Symbol") if($uf{"-1"}==$n); $fu=""; $tmp=@df?"%%PageResources: font":""; &splitline(@df); $_.="%%Page: $pn$2 $n\n$fu$pbb%%BeginPageSetup\n/pgsave save D\n$temp$line\n"; $EPS="%%EndPageSetup"; $temp=""; $line=""; $fn=""; $mv=""; $pn=""; last S; } if($line=~/^\[([^(]*)(\(.*\)) ($in{"show"}|$in{"awidthshow"})\]$/) { if(length $2>2) { $line="$fn$1$2 $val[$3]"; if($fn=~/(\S+) Nf/ && $uf{$1}!=$n+1) { $uf{$1}=$n+1; $fnt=$1<0?"Symbol":$docfonts[$1]; $line="%%IncludeResource: font $fnt\n$line"; } $fn=""; $pp=0; } else { $pp=1; } last S; } if($line=~/^\[(\S+) (\S+) ($in{"scale"})\]$/) { $line=$1!=1||$2!=1?"$1 $2 $val[$3]\n$EPS":"$EPS"; $EPS=""; last S; } if($line=~/^\[(.*) (\d+) $io\]$/) { $li=$BM[$2]=~y/\n/\n/+2; $line="\/picstr $WS[$ix[$2]] string D\n$1\n" ."%%BeginData: $li Hex Lines\n$val[$3]\n$BM[$2]\n%%EndData"; last S; } if($line=~/^\((.*)\)$/) { $pn=$1; $line=""; last S; } last S if($line=~s/^\[([^\/].* )?(\d+)\]$/$1$val[$2]/); last S if($line=~s/(\)\])? (\/\w+) $in{"pdfmark"}\]$/$1 $cd{$1}$2 pdfmark/); last S if($line=~s/^\[(\S+) \((P\d+.*)\)\]$/\/IS $1 D\n$eps{$2}/); &dbg("$line\n"); } if(!$pp && $mv.$line) { $mv=~s/\.0//g; $temp.="$mv$line\n"; } } @nf=(); @sf=(); $fontdef=""; for(0..$#docfonts) { $ff=$ff{$docfonts[$_]}; if($ff && $uf{$_}>0) { push(@sf,$docfonts[$_]); $fontdef.="%%BeginResource: font $docfonts[$_]\n$cont{$ff}\n%%EndResource\n"; $cont{$ff}=""; } push(@nf,$docfonts[$_]) if(!$ff && $uf{$_}>0); } push(@nf,"Symbol") if($uf{"-1"}>0); $ti="@ARGV" unless($psin); $or=$opt_L?"Landscape":"Portrait"; $setup="%%BeginSetup\n"; $setup.="$dupl\n" if($dupl); $setup.="$fontdef" if($fontdef); $fu=""; $tmp=@nf?"%%DocumentNeededResources: font":""; &splitline(@nf); $tmp=@sf?"%%DocumentSuppliedResources: font":""; &splitline(@sf); s/\\(200|201|202)/\\$ssy{$1}/g; $dd="Clean7Bit"; $dd="Clean8Bit" if(($fontdef.$_)=~/[\200-\377]/); $dd="Binary" if(($fontdef.$_)=~/[\000-\010\013-\014\016-\036]/); $time=localtime; print <<EOT; %!PS-Adobe-3.0 %%Title: $title %%Creator: $version %%CreationDate: $time $fu%%DocumentData: $dd %%Orientation: $or %%BoundingBox: $Llx $Lly $Urx $Ury %%Pages: $n %%EndComments %%BeginProlog /d {bind def} bind def /D {def} d /ie {ifelse} d /E {exch} d /t true D /f false D $fl $cd $defs $mysymb/Nf {dup 0 ge{FL E get}{-1 eq{/Symbol}{/MySymbol}ie}ie findfont E scalefont setfont} D /IP {currentfile picstr readhexstring pop} D /WF $wf D $dfn%%EndProlog $setup$reenc$pdf%%EndSetup $_%%EOF EOT } sub splitline { for (@_) { if(length($tmp.$_)>78) { $fu.="$tmp\n"; $tmp="%%+ font"; } $tmp.=" $_"; } $fu.="$tmp\n" if($tmp); } sub ref { @pnum=(); /.*\s*$/; open(SCR,">$scr.ps"); print SCR "$`HN{==}forall $& quit\n"; close SCR; $pnum=`$gs -q -dNODISPLAY $scr.ps -c quit`; while($pnum=~/\([^)]*\)/g) {push(@pnum,$&)}; $pnum="@pnum"; &cut($pnum); s|/HN [^D]*D|/HN [$pnum] D|; } sub cut { $_[0]=~s/(.{70}[^ \n]*) ([^ ])/$1\n$2/g; } sub fin { if($opt_D) { &DSC; } else { print; } if($opt_d) { print DBG "\n"; close DBG; } unlink "$scr","$scr.ps","$scr.ppm","$scr.tex","$scr.dvi","$scr.log" if($scr); exit; } sub col2rgb { $rgb=$colour{"\L$_[0]"}?($colour{"\L$_[0]"}):$_[0]; @cvec=$rgb=~/($X$X)($X$X)($X$X)/?($1,$2,$3):(); @cvec?"[16#$1 16#$2 16#$3]":""; } sub inihyph { if($hyphenation_file{$lang}) { $hyfile=$hyphenation_file{$lang}; } else { &dbg("No hyphenation file for language '$lang'\n"); $lng=$lang; while($lng=~s/-?[^-]+$// && !$hyphenation_file{$lng}) {}; $hyfile=$hyphenation_file{$lng}; &dbg(" ..using $hyfile\n"); } if($init{$hyfile}) { $rep{$lang}=$refl{$hyfile}; return; } if(open(HYPH,"<$hyfile")) { &dbg("Reading hyphenation patterns from $hyfile\n") if($opt_d); <HYPH>=~/\\patterns{.*/; close HYPH; $def=$`; ($patterns=$')=~s/\^\^($X$X)/chr hex $1/eg; $upp{$lang}=''; $low{$lang}=''; while ($def=~/\\lccode(`\\?\^\^|")($X$X)=(`\\?\^\^|")($X$X)/g) { if($2 ne $4) { $uc=$2; $lc=$4; if($`=~/\n$/ || $`!~/%.*$/) { $upp{$lang}.=chr hex $uc; $low{$lang}.=chr hex $lc; } } } while ($def=~/\\let\\(\w+)=(\^\^|")($X$X)/g) { $key=$1; $value=chr hex $3; $tex{$key}=$value if($`=~/\n$/ || $`!~/%.*$/); } for $key (keys %tex) { $patterns=~s/\\$key */$tex{$key}/g; } if($lang=~/^de/) { %de=('"a',228, '"o',246, '"u',252, '\3', 223); $patterns=~s/\\c\{[^}]*\}//g; $patterns=~s/\\n\{([^}]*)\}/$1/g; $patterns=~s/("a|"o|"u|\\3)/chr $de{$1}/eg; $upp{"de"}=~s/\337//; $low{"de"}=~s/\377//; } if($lang=~/^is/ && !$upp{"is"}) { %is=("'a","\341", "'e","\351", "'i","\355", "'o","\363", "'u","\372", "'y","\375", '"x',"\346", '"o',"\366", "'d","\360", "`t","\376"); $isch=join("|",keys %is); $patterns=~s/($isch)/$is{$1}/g; $upp{"is"}="\301\311\315\323\332\335\306\326\336\320"; $low{"is"}="\341\351\355\363\372\375\346\366\376\360"; } if($lang=~/^fi/ && !$upp{"fi"}) { $upp{"fi"}="\304\326"; $low{"fi"}="\344\366"; } if($lang=~/^fr/ && !$upp{"fr"}) { $upp{"fr"}="\300\302\307\311\310\312\313\316\317\324\326\333\226"; $low{"fr"}="\340\342\347\351\350\352\353\356\357\364\366\373\225"; } if($lang=~/^es/ && !$upp{"es"}) { $upp{"es"}="\301\311\315\323\321\332\334"; $low{"es"}="\341\351\355\363\361\372\374"; } $patterns=~s/\{([\w\W]*?)\}/[$1]/g; $patterns=~/}/; $end=$`; if($def.$'=~/\\hyphenation\[.*/) { $'=~/]/; $hyext=$`; } ($patterns=$end)=~s/%.*//g; for $key (split('\s+',$patterns)) { $value=$key; $key=~s/\d//g; $value=~s/^([$ltrs.])/0$1/; $value=~s/[$ltrs](\d)/$1/g; $value=~s/[$ltrs.]/0/g; $patt{"$key,$lang"}=$value if($value=~/^\d+$/); } } else { &dbg("Cannot open hyphenation file: $hyfile\n"); } $hext=$hyphenation_extfile{$lang}; for(split('\s*:\s*',$hext)) { if(open(HEXT,"<$_")) { &dbg("Reading hyphenation extensions from $_\n") if($opt_d); $hyext.=<HEXT>; close HEXT; } else { &dbg("Cannot open hyphenation extension file: $_\n"); } } if($hyext) { for $key (keys %tex) { $hyext=~s/$key */$tex{$key}/g; } for $key (split('\s+',$hyext)) { $key=~s/\s+//g; $value="00$key\0"; $key=~s/-//g; $value=~s/[$ltrs]/0/g; $value=~s/0-/1/g; $hext{"$key,$lang"}=$value; } } $refl{$hyfile}=$lang; $rep{$lang}=$lang; $init{$hyfile}=1; } sub hyph { $word="\L$_[0]"; eval "\$word=~y/$upp{$rep{$lang}}/$low{$rep{$lang}}/" if($upp{$rep{$lang}}); $len=length($word); $h=$hext{"$word,$rep{$lang}"}; if($h) { @br=split(//,$h); } else { @br=(0) x ($len+3); for $i (0..$len) { for $j (0..$len-$i) { $str=substr(".$word.",$j,$i+2); $pstr=$patt{"$str,$rep{$lang}"}; if($pstr) { @patt=split(//,$pstr); for $k (0..$#patt) { $br[$k+$j]=$patt[$k] if($br[$k+$j]<$patt[$k]); } } } } } $hword=""; for $i (0..$len-1) { $hword.=substr($_[0],$i,1); if(($h || $i>$hyphenation{'start'}-2 && $i<$len-$hyphenation{'end'}) && $br[$i+2]%2==1) {$hword.=")HY("}; } $hword.=")YH(" if(length $word < length $hword); $hword; } sub setel { $el=$_[0]; eval "\%arr=\%$el"; &fs($el); push(@font,$fontid{"\L$font"}); push(@styl,$styl); push(@size,$arr{'font-size'}); push(@alig,$algn{$arr{'text-align'}}-1); push(@topm,$arr{'margin-top'}); push(@botm,$arr{'margin-bottom'}); push(@lftm,$arr{'margin-left'}); push(@rgtm,$arr{'margin-right'}); push(@colr,$col eq "[16#00 16#00 16#00]"?0:$col); $temp=$arr{'margin-top'}*$arr{'font-size'}; $mi=$temp if($temp>$mi); $temp=$arr{'margin-bottom'}*$arr{'font-size'}; $mi=$temp if($temp>$mi); } sub fs { $arr{'font-family'}='times' if($el ne 'p' && !$latin1 && !defined $arr{$_}); for ("font-family","font-size") { $arr{$_}=$body{$_} if(!defined $arr{$_}); } ($font=$arr{'font-family'})=~s/\W/-/g; if(!$font_names{"\L$font"}) {$font=$fal{$font}}; if(!$font_names{"\L$font"}) { &dbg("Unknown font: $arr{'font-family'}, using $deffnt{$_[0]}\n"); $font=$deffnt{$_[0]}; } if(!defined $fontid{"\L$font"}) { $fontid{"\L$font"}=$nfont++; @names=split(/\s+/,$font_names{"\L$font"}); for($#names+1..3) {push(@names,$names[0])}; @docfonts=(@docfonts,@names); } &getval($arr{"font-size"},2); for ('left','right','top','bottom') { $arr{"margin-$_"}=0 if(!defined $arr{"margin-$_"}); } for ($arr{"text-indent"},$arr{"margin-top"},$arr{"margin-bottom"}, $arr{"margin-left"},$arr{"margin-right"}) { &getval($_,0); } $styl=$arr{'font-style'}=~/^(i|o)/+2*($arr{'font-weight'}=~/^b/); $col=$arr{'color'}?&col2rgb($arr{'color'}):-1; } sub img { local($_,$red,$grn,$blu)=@_; local($beg,$end); ($red,$grn,$blu)=("FF","FF","FF") if(!$opt_U || $red.$grn.$blu !~ /^\w{6}$/); while (/<(img|fig|hr|overlay|object)\s/i) { $imgcmd="\L$1"; $beg=$`; $'=~/>/; $img=" $`"; $end=$'; $img=~s/\n/ /g; if($imgcmd ne "object" || $img=~/data\s*=\s*['"]?([\w\/\.:~%-]+\.$IM)/i || $img=~/type\s*=\s*['"]?(image\/|application\/postscript)/i){ if($opt_T) { &getalt; } else { $al=0; $off=""; ($align)=$img=~/align\s*=\s*['"]?(\w*)/i; if($align=~/^middle$/i) {$al=1}; if($align=~/^top$/i) {$al=2}; if($imgcmd eq "overlay") { $al=4; $xoff=0; $yoff=0; if($img=~/\s*x\s*=\s*['"]?(\d+)/i) {$xoff=$1}; if($img=~/\s*y\s*=\s*['"]?(\d+)/i) {$yoff=$1}; $off="$xoff $yoff "; } $url=""; if($img=~/\s(src|data)\s*=\s*($S)/i) {($url)=$+=~/([^ \n]*)/}; &dbg("Image: $url\n") if($opt_d && $url); $URL=$url; unless($url=~m|://|) { $url=~s/^file://; if($url=~m|^/|) {$URL=$b1.$url} else {$URL=$b2.$url} } while($URL!~m|^\.\./| && $URL=~m|[^/]*/\.\./|) {$URL=$`.$'}; $URL=~s|/\./|/|g; $text=$src{$URL}?$cmd{$URL.$red.$grn.$blu}:$cmd{$URL}; if(!$text || $opt_U && $src{$URL} && !$cmd{$URL.$red.$grn.$blu}) { if(!$url || $failed{$url}) { &getalt; } else { &pictops; if($bm || $ps) { &dbg("Size: $xs*$ys\n") if($opt_d); $nimg++; push(@XS,$xs); push(@YS,$ys); if($bm) { $nm++; push(@DP,$dp); push(@BM,$bm); push(@WS,int(($xs-1)*$dp/8)+1); push(@FC,$fc); push(@IX,$nm); push(@IT,0); } if($ps) { $nps--; push(@IX,$nps); push(@IT,1); $nli=30000; $n=1; $npr=$ps=~s|(.*\n){$nli}|sprintf("$&} D\n/P$nimg\_%d {",$n++)|eg; if($npr) { $proc=" ("; for $i (0..$npr) { $proc.="P$nimg\_$i "; } $proc.=")"; $pv.="/P$nimg\_0 {$ps} D\n"; $eps{"P$nimg\_0"}=$ps; } else { $proc=" (P$nimg)"; $pv.="/P$nimg {$ps} D\n"; $eps{"P$nimg"}=$ps; } } $text="$proc $nimg IM("; $cmd{$URL}=$text if(!$cmd{$URL}); $cmd{$URL.$red.$grn.$blu}=$text if($src{$URL}); $proc=""; $end=$' if($imgcmd eq "object" && $end=~m|</object>|i); } else { &getalt; $failed{"$url"}=1; } } } elsif($imgcmd eq "object" && $end=~m|</object>|i) { $end=$'; } } if($cmd{$URL}) { $text=")".$off.$al.$text; if($imgcmd eq "fig") { $end=~m|</fig>|i; $fig=$`; $end=$'; $over=""; while($fig=~/(<overlay$R)/ig) {$over.=$1}; ($dum,$cap)=$fig=~m|<caption$R([\w\W]*)</caption>|i; ($dum,$cred)=$fig=~m|<credit$R([\w\W]*)</credit>|i; $text=")BN($text$over)BN($cap)BN($cred)BN("; } } } $_=$beg.$text.$end; } s|<[hH][rR]$R|)2 1 1 HR(|g; $_[0]=$_; } sub getval{ local($val,$unit)=$_[0]=~/$V\s*(\w*)/g; $val*=$cm{$unit} if($_[1]==1 && defined $cm{$unit}); $val*=$pt{$unit} if($_[1]==2 && defined $pt{$unit}); $_[0]=$val; } sub getconf { local($_)=@_; while(/\@import\s+(([\w.\/-]+)|"([^"]*)"|'([^']*)')\s*;/) { if(open(SS,"<$+") && !$read{$+}) { $conf=<SS>; $_=$`.$conf.$'; print DBG "***** $+:\n$conf" if($opt_d); close SS; $read{$+}=1; } else { &dbg($read{$+}?"Infinite \@import loop: $+\n":"Error opening: $+\n"); $_=$`.$'; } } @block=(); while(&getblk($_)){}; } sub getblk { local($_)=@_; local ($beg,$match,$end,$blk,$key,$val,$id,$temp); while(/^\s*\/\*/) { /\*\/|$/; $_=$'; } return 0 if !/\S/; /[\w,:.@\s-]+\{/; $_=$'; ($id=$&)=~s/^\s*|\s*\{//g; $id=lc $id; push(@block,"\L$id"); if($#block==1) { $valid{$id}=1 if(!$user); if($id eq "color") {$id="colour"}; if(!$valid{$id}) { &dbg("Error in configuration file: unknown block name '$id'\n"); } } $blk=""; W:while(/\s*(\/\*|[\w][\w-]*\s*:|[\w,:.\s-]+\{|\})\s*/) { $blk.=$1 if($1 ne "/*"); $beg=$`; $match=$1; $end=$'; S:{ if($match=~/\{$/) { $temp=$match.$end; $blk.=&getblk($temp); $_=$temp; last S; } if($match=~/:$/) { ($key=$`)=~s/\s*$//; # $end=~/([\w.\$-]+|"[^"]*"|'[^']*')\s*;?/; $end=~/("[^"]*"|'[^']*'|.*?(?= *(\/\*|;|}|$)))/m; $blk.=$`.$&; $_=$'; ($val=$1)=~s/^["']|["']$//g; $val=~s/'|\\/\\$&/g; $typ=1; $typ=2 if($val=~/^$V(cm|mm|in|pt|pc|em)$/); $typ=3 if($val=~/^$V$/); $typ=4 if($val=~/^-?\d+$/); $typ=5 if($val eq "0" || $val eq "1"); if($block[0] eq '@html2ps') { if($#block==0) { if(!$user) { $valid{$key}=1; $type{$key}=$typ if(!defined $type{$key}); } if($valid{$key}) { if($typ>=$type{$key}) { $key=~s/-/_/g; eval "\$$key='$val'" if($user || $val ne ''); # print DBG "\$$key='$val'\n" if($opt_d && $user); } elsif($user) { &dbg("Error in configuration file: bad value for $key: $val\n"); } } else { &dbg("Error in configuration file: unknown key '$key'\n"); } } if($#block==1) { if($id eq "option" && $optalias{$key}) {$key=$optalias{$key}}; if(!$user) { $valid{"$id,$key"}=1; $type{"$id,$key"}=$typ if(!defined $type{"$id,$key"}); } if($valid{"$id,$key"} || $extend{$id}) { if($typ>=$type{"$id,$key"} || $id eq "colour") { eval "\$$id\{'$key'}='$val'" if($user || $val ne ''); # print DBG "\$$id\{'$key'}='$val'\n" if($opt_d && $user); } elsif($user) { &dbg("Error in configuration file: bad value for $key: $val\n"); } } else { &dbg("Error in block '$id' in configuration file:" ." unknown key '$key'\n"); } } if($#block>1) { $temp="$block[$#block-1]_$key"; $valid{$temp}=1 if(!$user); $parblk=$block[$#block-1]; if($valid{$temp}) { eval "\$$parblk\_$key\{'$id'}='$val'"; # print DBG "\$$parblk\_$key\{'$id'}='$val'\n" if($opt_d && $user); } elsif($valid{$parblk}) { &dbg("Error in block '$parblk' in configuration file:" ." unknown key '$key'\n"); } } } else { for $i (split(',\s*',$id)) { $i=~s/@/AT_/; $i=~s/\./_/; $i=~s/ *:/__/; eval "\$$i\{'\L$key'}='\L$val'"; # print DBG "\$$i\{'\L$key'}='\L$val'\n" if($opt_d && $user); } } last S; } if($match eq "/*") { /\*\/|$/; $_=$'; last S; } last W; } } pop(@block); $_[0]=$end; $blk; } sub prompt { local($/)="\n"; &dbg($_[0]); chop($_[1]=<STDIN>); } sub dbg { print STDERR $_[0]; print DBG $_[0]; } sub hb { local($_)=@_; local($head,$body,$beg,$end,$match,$tag); #If neither </HEAD> nor <BODY> can be found, find the separation point (messy). if(!/<(body|\/head)/i || $`=~/<plaintext|<xmp|<listing|<!--/i) { $head=""; $int=""; S1: while(/<(\/?\w+|!--|!|\?)/) { S2:{ $beg=$`; $end=$'; $match=$&; $tag=$1; if($tag eq "!--") { $int.=$`; &getcom; $int.=$com; $_=$rest; last S2; } if($tag=~/[!?]/) { $end=~/>/; $int.="$beg$match$`>"; $_=$'; last S2; } $tag=~s|/||; last S1 if(!$head{"\L$tag"}); $end=~/$R/; $head.=$int.$beg.$match.$&; $int=""; $_=$'; } } $body=$int.$_; } else { $head=$`; $body=$&.$'; } $_[0]=$body; $_[1]=$head; } sub open { if($_[0]=~m|://|) { &geturl($_[0],$_[1]); } elsif(open(FILE,"<$_[0]")) { $_[1]=<FILE>; close FILE; } else { 0; } } sub pagedef { for $margin ('left','right','top','bottom') { ($m)=$margin=~/(.)/; if(defined $margin{$margin}) { &dbg("'margin { margin-$margin:... }' is obsolete, use '\@page'\n"); $AT_page{"margin-$margin"}=$margin{$margin} if(!defined $AT_page{"margin-$margin"}); } for $page ('left','right') { ($p)=$page=~/(.)/; eval "\$m$m$p=\$AT_page\{'margin'} if(defined \$AT_page\{'margin'})"; eval "\$m$m$p=\$AT_page\{'margin-$margin'} if(defined \$AT_page\{'margin-$margin'})"; eval "\$m$m$p=\$AT_page__$page\{'margin'} if(defined \$AT_page__$page\{'margin'})"; eval "\$m$m$p=\$AT_page__$page\{'margin-$margin'} if(defined \$AT_page__$page\{'margin-$margin'})"; } } } sub pmtoraw { @pars=(); ($temp)=@_; for $i (0..3) { 1 while ($temp=~s/^\s*#.*//); next if($pars[0] eq 'P1' && $i == 3); $temp=~s/\s*(\S+)\s*//; $pars[$i]=$1; } $temp=~s/#.*//g; $pars[0]=~s/\d/$&+3/e; $_[0]="$pars[0]\n$pars[1] $pars[2]\n"; if($pars[0] eq 'P4') { $temp=~s/\s//g; $_[0].=pack("B*",$temp); } else { $_[0].="255\n"; while ($temp=~/\d+/g) { $_[0].=pack("C",int(255*$&/$pars[3]+.5)); } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/backout�������������������������������������������������������������������������������0000755�0000162�0017537�00000001303�11370774453�012536� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl use strict; use File::Copy; use File::Path; use Cwd 'chdir'; use vars qw(%dest $odir $curr $file $dir); %dest = (); $0 =~ /(.*)backout$/i; chdir $1 if $1; $curr = $ENV{PWD}; open DAT, 'backout.dat' || die "Cannot open backout.dat\n"; chomp ($odir =<DAT>); chdir $odir; if($ENV{PWD} eq $curr) {die "Cannot chdir to backout directory $odir\n"}; while (($file, $dir) = split /\s+/, <DAT>) { unless(-r $file) {die "Cannot copy $file\n"}; unless(-w $dir) {die "$dir is not writable\n"}; $dest{$file} = $dir; } close DAT; while (($file, $dir) = each %dest) { copy $file => $dir or die "Cannot copy $file to $dir\n"; } chdir $curr; rmtree "$odir", 0, 0; unlink 'backout.dat'; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/COPYING�������������������������������������������������������������������������������0000644�0000162�0017537�00000043076�11370774453�012230� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/html2ps.html��������������������������������������������������������������������������0000644�0000162�0017537�00000170057�11370773744�013456� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <TITLE>Using html2ps</TITLE> <LINK REV=MADE HREF="mailto:&#x6a;&#x61;&#x6e;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65;"> <META NAME="Author" CONTENT="Jan K&auml;rrman"> <META NAME="Description" CONTENT="html2ps - an HTML to PostScript converter written in Perl"> <META NAME="Keywords" CONTENT="html2ps,HTML,PostScript,PDF,Convert,Conversion"> <META NAME="Created" CONTENT=" 7 May 2010"> <STYLE type="text/css"> body{ background: #ffffd0; color: black; } </STYLE> </HEAD> <BODY LANG="en"> <H1>Introduction</H1> <P> This document describes the Perl script <A HREF="http://user.it.uu.se/~jan/html2ps.html">html2ps</A> &ndash; an HTML to PostScript converter. The program is developed on a Unix system (Sun Solaris), but have also been reported working on other platforms, such as Windows, MS-DOS, VAX/VMS and MacIntosh. <P> First, do not get intimidated by the size of this document. At least on a Unix system with Perl installed, you should be able to convert a local text-only HTML file directly without doing any preparation at all. Just execute the script with the HTML file as parameter and direct the output to a file or a printer, for example: <PRE> html2ps file.html &gt; file.ps </PRE> <P> or perhaps <PRE> perl html2ps file.html &gt; file.ps </PRE> <P> There are several possibilities to control the appearance of the output. Starting with version 1.0 of html2ps, most of this is done via configuration files, and not with command line options only. A sample configuration file 'sample' is included with the html2ps distribution (used by the installation script to convert this document to postscript). You can take a look at this file to see an example of a configuration file. The command line options, and how to set their defaults using a configuration file, are described in the <A HREF="#OPTION"> <CODE>option</CODE></A> block below. <P> Jean-Philippe Argaud has written a GUI (xhtml2ps) for html2ps. You can find this in the directory 'contrib'. Both html2ps and xhtml2ps comes with the GNU General Public License, see the file 'COPYING' for details. <P> <H1>Installation</H1> <P> For certain tasks, such as rendering of inline images and retrieving remote documents, html2ps depends on other program packages. First of all, you should make sure that you have all the necessary software installed on your system. <A HREF="#SW">See below</A> where these packages can be found. <P> Since html2ps is written in Perl, you must of course have Perl installed, version 5 or later is required. <P> If you want to make use of the support for inline images, you must have one of the packages ImageMagick, pbmplus or netpbm installed. If you do not have ImageMagick (or if it is not installed with jpeg support), you can use djpeg from the jpegsrc distribution to handle jpeg images. The recommended image package is ImageMagick together with its Perl module interface PerlMagick. <P> To be able to convert remote documents directly without downloading them first, you must have have some program installed for this purpose. The best is to either use the Perl module library libwww-perl, but you can for example also use wget or lynx for this. <P> Ghostscript is also required to get full functionality (needed to generate DSC PostScript and cross references). <P> If you are on a Unix or Windows system, and have all necessary software installed, you can now execute the installation script 'install' to build a global configuration file, and install all files. On other platforms you will have to create a global configuration file manually, and insert its name into the html2ps script. This is described in next section. <H1>Configuration files</H1> <P> Configuration files are used for layout control, resource information etc. Normally, there should always exist a global configuration file. In this file one typically specify things like: what image conversion packages are available on the system, the default paper size, the default text fonts and sizes, etc. <P> For Unix and Windows systems, the installation script 'install' can be used to automatically build a global configuration file with all necessary definitions, and install all files. The files replaced by the installation are saved. If you for some reason are not satisfied with the new version: execute the script 'backout' to reinstall your earlier version. <P> On other systems, you will have to manually create a global configuration file, and insert the name of this file into the html2ps script (close to the beginning, the line starting with "<CODE>$globrc=</CODE>"). The configuration file should contain a <A HREF="#package"><CODE>package</CODE></A> block, and perhaps <A HREF="#paper"><CODE>paper</CODE></A> and <A HREF="#hyph"><CODE>hyphenation</CODE></A> blocks, described below. <P> Each user can then have a personal configuration file (by default $HOME/.html2psrc) that complements/overrides the definitions made in the global file. It is also possible to specify alternative files on the command line, using the -f option. <H2>File format</H2> <P> A configuration file can include other configuration files. This is done with: <PRE> @import "<VAR>filename</VAR>"; </PRE> <P> The rest of the configuration file consists of zero or more blocks. A block is given by a block name, followed by the block definition, as in: <PRE> BODY { font-size: 12pt; font-family: Helvetica; text-align: justify } </PRE> <P> The block definition, enclosed by curly braces: { }, consists of key-value pairs and/or other blocks. A key-value pair consists of the key name followed by a colon, followed by the value. Blocks and key-value pairs are separated by semicolons. The semicolon may be omitted after a block. <P> Several blocks can share the same definition. The block names are then separated be commas, as in: <PRE> H2, H4, H6 { font-style: italic } </PRE> <P> A comment in a configuration file starts with the characters "<CODE>/*</CODE>" and ends with "<CODE>*/</CODE>": <PRE> @html2ps { seq-number: 1; /* Automatic numbering of headings */ } </PRE> <H3>Notations</H3> <P> Here are some definitions of terms used below: <DL> <DT>Flag: <DD>A value of either 0 (absence, inactive etc) or 1 (presence, active etc). <DT>Absolute size: <DD>A real number optionally followed by one of the following two-letter unit identifiers: cm (centimeters), mm (millimeters), in (inches), pt (points, 1pt = 1/72 inch), pc (picas, 1pc = 12pt). The default unit is centimeters. <DT>Relative size: <DD>A size relative to current fontsize. The default and currently only recognized unit is em. One em equals the size of the current font. The value should be given as a real number, optionally followed by 'em', as in '0.25em'. <DT>Whitespace: <DD>Any one of the characters: space, tab, newline, or carriage return. </DL> <H3>CSS2 blocks</H3> <P> All blocks, except one: the <A HREF="#html2ps"><CODE>@html2ps</CODE></A> block, coincides with a subset of the <A href="http://www.w3.org/TR/REC-CSS2/"> Cascading Style Sheets, level 2 CSS2 Specification</A>. The following default settings for html2ps illustrate just about everything that currently can be used from the CSS2 specification: <PRE> BODY { font-family: Times; font-size: 11pt; text-align: left; background: white; } H1, H2, H3, H4, H5, H6 { font-weight: bold; margin-top: 0.8em; margin-bottom: 0.5em; } H1 { font-size: 19pt } H2 { font-size: 17pt } H3 { font-size: 15pt } H4 { font-size: 13pt } H5 { font-size: 12pt } H6 { font-size: 11pt } P, OL, UL, DL, BLOCKQUOTE, PRE { margin-top: 1em; margin-bottom: 1em; } P { line-height: 1.2em; text-indent: 0; } OL, UL, DD { margin-left: 2em } TT, KBD, PRE { font-family: Courier } PRE { font-size: 9pt } BLOCKQUOTE { margin-left: 1em; margin-right: 1em; } ADDRESS { margin-top: 0.5em; margin-bottom: 0.5em; } TABLE { margin-top: 1.3em; margin-bottom: 1em; } DIV.noprint { display: none } DEL { text-decoration: line-through } A:link, HR { color: black } @page { margin-left: 2.5cm; margin-right: 2.5cm; margin-top: 3cm; margin-bottom: 3cm; } </PRE> <P> <H3><A NAME="html2ps">The program specific block <CODE>@html2ps</CODE></A> </H3><P> This block is used to specify parameters that are specific to html2ps, and not covered by CSS2. The<CODE> @html2ps </CODE> block has several sub-blocks and key-value pairs, these are described in this section. <H4><A NAME="package">The <CODE>package</CODE> block</A> </H4><P> This block is used to specify which <A HREF="#SW">program packages</A> are installed on the system. Typically, this is done in the global configuration file. <DL> <DT> <CODE>PerlMagick</CODE> <DD> A flag specifying whether the Perl module PerlMagick is installed or not. The default is 0. <DT> <CODE>ImageMagick</CODE> <DD> A flag specifying whether the ImageMagick package is installed or not. The default is 0. <DT> <CODE>pbmplus</CODE> <DD>A flag specifying whether the pbmplus package is installed or not. The default is 0. <DT><CODE>netpbm</CODE> <DD> A flag specifying whether the netpbm package is installed or not. The default is 0. <DT><CODE>djpeg</CODE> <DD> A flag specifying whether djpeg is installed or not. The default is 0. <DT><CODE>Ghostscript</CODE> <DD> A flag specifying whether Ghostscript is installed or not. The default is 0. <DT><CODE>TeX</CODE> <DD> A flag specifying whether the TeX package is installed or not. The default is 0. <DT><CODE>dvips</CODE> <DD> A flag specifying whether dvips is installed or not. The default is 0. <DT><CODE>libwww-perl</CODE> <DD> A flag specifying whether the Perl module library libwww-perl is installed or not. The default is 0. <DT><CODE>geturl</CODE> <DD>When neither of the Perl packages for retrieving remote documents are available, it is possible to use some other program like wget or lynx. This value should be set to a command that retrieves a document <EM>with a complete MIME header</EM>, such as "<CODE>wget -s -q -O-</CODE>" or "<CODE>lynx -source -mime_header</CODE>". <DT><CODE>check</CODE> <DD> The name of a program used for syntax checking HTML documents. No default, a good choice is weblint. <DT><CODE>path</CODE> <DD> A colon separated list of directories where the executables from the program packages are. It is only necessary to include directories that are not in the PATH for a typical user. </DL> <H4><A NAME="paper">The <CODE>paper</CODE> block</A> </H4><P>The paper size is defined in this block. The size can either be given as one of the recognized paper types or by giving explicit values for the paper height and width. As of version 1.0 beta2, one can also use the <A href="http://www.w3.org/TR/REC-CSS2/page.html">@page</A> block in CSS2 for the paper size. The paper block is kept for backwards compatibility. Also, one can only specify explicit dimensions in @page, not any paper types by name. <DL> <DT><CODE>type</CODE> <DD> Paper type, possible choices are: A0, A1, A2, A3, A4,...,A10, B0, B1,...,B10, letter, legal, arche, archd, archc, archb, archa, flsa, flse, halfletter, 11x17, and ledger (this set of paper types is taken from Aladdin Ghostscript). The default is A4. <DT><CODE>height</CODE> <DD> An absolute size specifying the paper height. <DT><CODE>width</CODE> <DD> An absolute size specifying the paper width. </DL> <H4><A NAME="OPTION">The <CODE>option</CODE> block</A> </H4><P>This block is used to set default values for the command line options. The key in the key-value pair is the option name, in either its long or short form. <DL> <DT><CODE>twoup </CODE>(on the command line:<CODE> -2 </CODE>or<CODE> --twoup</CODE>) <DD> Two column (2-up) output. The default is one column per page. <DT><CODE>base </CODE>(on the command line:<CODE> -b<VAR> URL</VAR> </CODE>or<CODE> --base<VAR> URL</VAR></CODE>) <DD> Use URL as a base to expand relative references for in-line images. This is useful if you have downloaded a document to a local file. The URL should then be the URL of the original document. <DT><CODE>check </CODE>(on the command line:<CODE> -c </CODE>or<CODE> --check</CODE>) <DD> Check the syntax of the HTML file (using an external syntax checker). The default is to not make a syntax check. <DT> <CODE>toc </CODE>(on the command line:<CODE> -C<VAR> string</VAR> </CODE>or<CODE> --toc<VAR> string</VAR></CODE>) <DD> Generate a table of contents (ToC). The value should be a string consisting of one of the letters 'f', 'h', or 't', optionally combined with the letter 'b': <DL> <DT style="display: compact">b <DD>The ToC will be printed first. This requires that Ghostscript is installed. <DT style="display: compact">f <DD>The ToC will be generated from the links in the converted document. <DT style="display: compact">h <DD>The ToC will be <A HREF="#TOC">generated from headings and titles</A> in the converted documents. Note that if the document author for some strange reason has chosen to use some other means to represent the headings than the HTML elements H1,...,H6, you are out of luck! <DT style="display: compact">t <DD>The ToC will be generated from links having the attribute <CODE>rev=TOC</CODE> in the converted document. </DL> <DT><CODE>debug </CODE>(on the command line:<CODE> -d </CODE>or<CODE> --debug</CODE>) <DD> Generate debugging information. You should always use this option when reporting problems with html2ps. <DT><CODE>DSC </CODE>(on the command line:<CODE> -D </CODE>or<CODE> --DSC</CODE>) <DD> Generate DSC compliant PostScript. This requires Ghostscript and can take quite some time to do. Note that a PostScript file generated with this option cannot be used as input to html2ps for reformatting later. <DT><CODE>encoding </CODE>(on the command line:<CODE> -e<VAR> encoding</VAR> </CODE>or<CODE> --encoding<VAR> encoding</VAR></CODE>) <DD> The document encoding. Currently recognized values are ISO-8859-1, EUC-JP, SHIFT-JIS, and ISO-2022-JP (other EUC-xx encodings may also work). The default is ISO-8859-1. <DT><CODE>rcfile </CODE>(on the command line:<CODE> -f<VAR> file[:file[:...]]</VAR> </CODE>or<CODE> --rcfile<VAR> file[:file[:...]]</VAR></CODE>) <DD> A colon separated list of configuration file names to use instead of the default personal configuration file $HOME/.html2psrc. Definitions made in one file override definitions in previous files (the last file in the list has highest precedence). An empty file name (as in ':file', 'file1::file3', or 'file:') will expand to the default personal file. The environment variable HTML2PSPATH is used to specify the directories where to search for these files. (Note: this is <EM>only</EM> supposed to be used on the command line, not in a configuration file.) <DT><CODE>frame </CODE>(on the command line:<CODE> -F </CODE>or<CODE> --frame</CODE>) <DD> Draw a frame around the text on each page. The default is to not draw a frame. <DT><CODE>grayscale </CODE>(on the command line:<CODE> -g </CODE>or<CODE> --grayscale</CODE>) <DD> Convert colour images to grayscale images. Note that the PostScript file will be smaller when the images are converted to grayscale. The default is to generate colour images. <DT><CODE>help </CODE>(on the command line:<CODE> -h </CODE>or<CODE> --help</CODE>) <DD> Show usage information. <DT><CODE>hyphenate </CODE>(on the command line:<CODE> -H </CODE>or<CODE> --hyphenate</CODE>) <DD> <A HREF="#HYPH">Hyphenate</A> the text. This requires TeX hyphenation pattern files. <DT><CODE>scaleimage </CODE>(on the command line:<CODE> -i<VAR> num</VAR> </CODE>or<CODE> --scaleimage<VAR> num</VAR></CODE>) <DD> Scale in-line images with a factor num. The default is 1. <DT><CODE>cookie </CODE>(on the command line:<CODE> -k<VAR> file</VAR> </CODE>or<CODE> --cookie<VAR> file</VAR></CODE>) <DD> Enable cookie support, using a netscape formatted cookie file (requires libwww-perl). <DT><CODE>language </CODE>(on the command line:<CODE> -l<VAR> lang</VAR> </CODE>or<CODE> --language<VAR> lang</VAR></CODE>) <DD> Specifies the language of the document (overrides an eventual LANG attribute of the BODY element). The language should be given according to <A href="ftp://ftp.nordu.net/rfc/rfc1766.txt">RFC1766</A> and <A href="http://www.w3.org/WAI/ER/IG/ert/iso639.htm">ISO 639</A>. <DT><CODE>landscape </CODE>(on the command line:<CODE> -L </CODE>or<CODE> --landscape</CODE>) <DD> Generate code for printing in landscape mode. The default is portrait mode. <DT><CODE>scalemath </CODE>(on the command line:<CODE> -m<VAR> num</VAR> </CODE>or<CODE> --scalemath<VAR> num</VAR></CODE>) <DD> Scale mathematical formulas with a factor num. The default is 1. <DT><CODE>mainchapter </CODE>(on the command line:<CODE> -M<VAR> num</VAR> </CODE>or<CODE> --mainchapter<VAR> num</VAR></CODE>) <DD> Specifies the start number for automatic numbering of headings (by setting the seq-number parameter), the default is 1. <DT><CODE>number </CODE>(on the command line:<CODE> -n </CODE>or<CODE> --number</CODE>) <DD> Insert page numbers. The default is to not number the pages. <DT><CODE>startno </CODE>(on the command line:<CODE> -N<VAR> num</VAR> </CODE>or<CODE> --startno<VAR> num</VAR></CODE>) <DD> Specifies the starting page number, the default is 1. <DT><CODE>output </CODE>(on the command line:<CODE> -o<VAR> file</VAR> </CODE>or<CODE> --output<VAR> file</VAR></CODE>) <DD> Write the PostScript code to file. The default is to write to standard output. <DT><CODE>original </CODE>(on the command line:<CODE> -O </CODE>or<CODE> --original</CODE>) <DD> Use PostScript original images if they exist. For example, if a document contains an image figure.gif, and an encapsulated PostScript file named figure.ps exists in the same directory, that file will be use instead. This only work for documents read as local files. Note: if the PostScript file is large or contains bitmap images, this must be combined with the -D option. In HTML 4.0 this can be achieved in a much better way with: <PRE> &lt;OBJECT data="figure.ps" type="application/postscript"&gt; &lt;OBJECT data="figure.gif" type="image/gif"&gt; &lt;PRE&gt;[Maybe some ASCII art for text browsers]&lt;/PRE&gt; &lt;/OBJECT&gt; &lt;/OBJECT&gt; </PRE> <DT><CODE>rootdir </CODE>(on the command line:<CODE> -r<VAR> path</VAR> </CODE>or<CODE> --rootdir<VAR> path</VAR></CODE>) <DD> When a document is read from a local file, this value specifies a base directory for resolving relative links starting with "/". Typically, this should be the directory where your web server's home page resides. <DT> <CODE>xref </CODE>(on the command line:<CODE> -R </CODE>or<CODE> --xref</CODE>) <DD> Insert <A HREF="#XREF">cross references</A> at every link to within the set of converted documents. <DT><CODE>scaledoc </CODE>(on the command line:<CODE> -s<VAR> num</VAR> </CODE>or<CODE> --scaledoc<VAR> num</VAR></CODE>) <DD> Scale the entire document with a factor num. The default is 1. <DT><CODE>style </CODE>(on the command line:<CODE> -S<VAR> string</VAR> </CODE>or<CODE> --style<VAR> string</VAR></CODE>) <DD> This option complements/overrides definitions made in the configuration files. The string must follow the configuration file syntax. (Note: this is <EM>only</EM> supposed to be used on the command line, not in a configuration file.) <DT><CODE>titlepage </CODE>(on the command line:<CODE> -t </CODE>or<CODE> --titlepage</CODE>) <DD> Generate a title page. The default is to not generate one. <DT><CODE>text </CODE>(on the command line:<CODE> -T </CODE>or<CODE> --text</CODE>) <DD> Text mode, ignore images. The default is to include the images. <DT><CODE>underline </CODE>(on the command line:<CODE> -u </CODE>or<CODE> --underline</CODE>) <DD> Underline text that constitutes a hypertext link. The default is to not underline. <DT><CODE>colour </CODE>(on the command line:<CODE> -U </CODE>or<CODE> --colour</CODE>) <DD> Produce colour output for text and background, when specified. The default is black text on white background (mnemonic: coloUr ;-). <DT><CODE>version </CODE>(on the command line:<CODE> -v </CODE>or<CODE> --version</CODE>) <DD> Print information about the current version of html2ps. <DT><CODE>web </CODE>(on the command line:<CODE> -W<VAR> string</VAR> </CODE>or<CODE> --web<VAR> string</VAR></CODE>) <DD> Process a web of documents by recursively retrieve and convert documents that are referenced with hyperlinks. When dealing with remote documents it will of course be necessary to impose restrictions, to avoid downloading the entire web... The value should be a string consisting of one of the letters 'a', 'b', 'l', 'r', or 's', optionally combined with a combination of the letters 'p', 'L', and a positive integer: <DL> <DT style="display: compact">a <DD>Follow all links. <DT style="display: compact">b <DD>Follow only links to within the same directory, or below, as the start document. <DT style="display: compact">l <DD>Follow only links specified with "<CODE>&lt;LINK rel=NEXT&gt;</CODE>" in the document. <DT style="display: compact">p <DD>Prompt for each remote document. This mode will automatically be entered after the first 50 documents. <DT style="display: compact">r <DD>Follow only relative links. <DT style="display: compact">s <DD>Follow only links to within the same server as the start document. <DT style="display: compact">L <DD>With this option, the order in which the documents are processed will be: first all top level documents, then the documents linked to from these etc. For example, if the document A has links to B and C, and B has a link to D, the order will be A&rarr;B&rarr;C&rarr;D. By default, each document will be followed by the first document it links to etc; so the default order for the example is A&rarr;B&rarr;D&rarr;C. <DT style="display: compact"># <DD>A positive integer giving the number of recursive levels. The default is 4 (when the option is present). </DL> <DT><CODE>duplex </CODE>(on the command line:<CODE> -x<VAR> num</VAR> </CODE>or<CODE> --duplex<VAR> num</VAR></CODE>) <DD>Generate postscript code for single or double sided printing. No default, valid values are: <DL> <DT style="display: compact">0 <DD>Single sided. <DT style="display: compact">1 <DD>Double sided. <DT style="display: compact">2 <DD>Double sided, opposite page reversed (tumble mode). </DL> </DL> <H4>The <CODE>margin</CODE> block </H4><P> This block is used to specify page margins. The left, right, top and bottom margins, previously defined with this block, should now be defined using the <A href="http://www.w3.org/TR/REC-CSS2/page.html">@page </A> construction from CSS2. <DL> <DT><CODE>middle</CODE> <DD> An absolute size for the distance between the columns when printing two columns per page, default is 2cm. </DL> <H4><A NAME="XREF">The <CODE>xref</CODE> block</A> </H4><P> At every hyperlink (to within the set of converted documents) it is possible to have a cross reference inserted. The <CODE>xref</CODE> block is used to control this function. <DL> <DT><CODE>text</CODE> <DD> This defines the cross reference text to be inserted; the symbol $N will expand to the page number, default is "[p $N]". <DT><CODE>passes</CODE> <DD> The number of passes used to insert the cross references. Normally, only one pass is run. But since the insertion of the page numbers may effect the page breaks, it might for large documents with many links be necessary with more than one pass to get the cross references right. The default is 1. </DL> <H4><A NAME="quote">The <CODE>quote</CODE> block</A> </H4><P> Language specific quotation marks are defined in this block. These quotation marks are used with the HTML 4.01 element Q for short quotations. Quotation marks are predefined for a few languages (English, Swedish, Danish, Norwegian (also Nynorsk and Bokmål), Finnish, Spanish, French, German and Italian). It is possible to define different quotation marks for quotes within quotes. <P> A quotation mark is defined as a string, using the same encoding as the converted document (normally ISO-8859-1), and/or with character entities. Note that quotation mark characters for several languages are not included in ISO-8859-1, and their corresponding character entities were not been defined prior to HTML 4.0. <P> Quotation marks for a language can be defined explicitly in a sub-block of the <CODE>quote</CODE> block. One can also identify the set of quotation marks with another previously defined language, using a key-value pair. The sub-block/key name should equal the language code as defined in ISO 639. The language sub-block can have the following key-values: <DL> <DT><CODE>open</CODE> <DD>The quote opening character(s). <DT><CODE>close</CODE> <DD>The quote closing character(s). If undefined, it will equal <CODE>open</CODE>. <DT><CODE>open2</CODE> <DD>The quote opening character(s) for quotes within quotes. If undefined, it will equal <CODE>open</CODE>. <DT><CODE>close2</CODE> <DD>The quote closing character(s) for quotes within quotes. If undefined, it will equal <CODE>close</CODE>. </DL> <P> Example: English and Spanish use the same set of quotation marks &ndash; at least according to my book on typography. These (already known to html2ps) are defined with: <PRE> quote { en { open: "&amp;ldquo;"; close: "&amp;rdquo;"; open2: "`"; close2: "'"; } es: en; } </PRE> <H4> <A NAME="TOC">The <CODE>toc</CODE> block</A> </H4><P>When a table of contents (ToC) is generated from document headings and titles, the appearance is controlled by this block. <DL> <DT><CODE>heading</CODE> <DD> A string with HTML code specifying a heading used on the first ToC page. <DT><CODE>level</CODE> <DD> The maximum heading level used for building the ToC. The default is 6, which means that all headings will generate ToC entries. <DT><CODE>indent</CODE> <DD> The ToC entries are indented proportional to the corresponding heading level. This value specifies the size of the indentation. The default is 1em. </DL> <H4>The <CODE>titlepage</CODE> block </H4><P> When a title page is generated, its appearance is controlled by this block. <DL> <DT><CODE>content</CODE> <DD> A string with HTML code specifying a heading used on the title page, The default is "<CODE>&lt;DIV align=center&gt; &lt;H1&gt;&lt;BIG&gt;$T&lt;/BIG&gt;&lt;/H1&gt; &lt;H2&gt;$[author]&lt;/H2&gt;&lt;/DIV&gt;</CODE>". <DT><CODE>margin-top</CODE> <DD> The size of the top margin on the title page, The default is 4cm. </DL> <H4>The <CODE>font</CODE> block </H4><P> Currently, html2ps recognizes the fonts: Times, New-Century-Schoolbook, Helvetica, Helvetica-Narrow, Palatino, Avantgarde, Bookman, and Courier. To add a new font (family), choose a name (consisting of letters, digits, hyphens, and underscores) for the font. Then define a sub-block to the <CODE>font</CODE> block, with the same name as the chosen font name. This block can contain two key-value pairs: <DL> <DT><CODE>names</CODE> <DD>A string containing four PostScript font names, separated by whitespace, corresponding to the font styles normal, italic, bold, and bold-italic. If less than four names are given, the first is used for the missing names. Note that PostScript font names are case sensitive. <DT><CODE>files</CODE> <DD>A string of four file names, separated by whitespace, for files containing font definitions for the four font styles as specified above. </DL> <P> Example: A font 'myfont' has its four font styles defined in local files. To use this font in all tables in the converted documents, one can use something like: <PRE> TABLE { font-family: myfont } @html2ps { font { myfont { names: "MyFont-Roman MyFont-Italic MyFont-Bold MyFont-BoldItalic"; files: "/x/y/myfr.pfa /x/y/myfi.pfa /x/y/myfb.pfa /x/y/myfbi.pfa"; } } } </PRE> <H4><A NAME="hyph">The <CODE>hyphenation</CODE> block</A> </H4><P>Hyphenation pattern files for different languages are specified in sub-blocks within this block. The blocks names should equal the language code as defined in ISO 639. These language blocks can contain the following two key-values: <DL> <DT><CODE>file</CODE> <DD>A hyphenation pattern file in TeX format for this language. <DT><CODE>extfile</CODE> <DD>A file containing a list of hyphenation exceptions for this language. The exception file should contain words, separated by whitespaces, with hyphens inserted where hyphenation is allowed, as in: "<CODE>in-fra-struc-ture white-space</CODE>". </DL> <P> For example, for English (with language code 'en') one can have a block like: <PRE> en { file: "/opt/tex/lib/macros/hyphen.tex"; extfile: "/opt/tdb/lib/html2ps/enhyphext"; } </PRE> <P> The <CODE>hyphenation</CODE> block itself can furthermore have these key-values: <DL> <DT><CODE>min</CODE> <DD>A positive integer defining the minimum number of letters a word must contain to make it a candidate for hyphenation. The default is 8. <DT><CODE>start</CODE> <DD>A positive integer defining the minimum number of letters that must precede the hyphen when a word is hyphenated. The default is 4. <DT><CODE>end</CODE> <DD>A positive integer defining the minimum number of letters that must follow the hyphen when a word is hyphenated. The default is 3. </DL> <H4>The <CODE>header</CODE> block </H4><P>This block is used to specify page headers. It is possible to define left, center, and right headers. Different headers for odd and even pages can be specified. Some symbols can be used that will expand to document title, author, date etc. See <A href="#symbols">below</A>. <DL> <DT><CODE>left</CODE> <DD>A left aligned header. If the <CODE>alternate</CODE> flag in this block is set to 1, this will be the right header on even pages. <DT><CODE>center</CODE> <DD>A centered header. <DT><CODE>right</CODE> <DD>A right aligned header. If the <CODE>alternate</CODE> flag in this block is set to 1, this will be the left header on even pages. <DT><CODE>odd-left</CODE> <DD>A left aligned header on odd pages. <DT><CODE>odd-center</CODE> <DD>A centered header on odd pages. <DT><CODE>odd-right</CODE> <DD>A right aligned header on odd pages. <DT><CODE>even-left</CODE> <DD>A left aligned header on even pages. <DT><CODE>even-center</CODE> <DD>A centered header on even pages. <DT><CODE>even-right</CODE> <DD>A right aligned header on even pages. <DT><CODE>font-family</CODE> <DD> The font used for the header, default is Helvetica. <DT><CODE>font-size</CODE> <DD> The font size for the header, default is 8pt. <DT><CODE>font-style</CODE> <DD> The default is "normal". <DT><CODE>font-weight</CODE> <DD> The default is "normal". <DT><CODE>color</CODE> <DD> The header color, default is black. <DT><CODE>alternate</CODE> <DD> A flag indicating whether the headers given by the <CODE>left</CODE> and <CODE>right</CODE> keys should change place on even pages. Typically used for double sided printing. The default is 1. </DL> <H4>The <CODE>footer</CODE> block </H4><P>This block is used to specify page footers. It is possible to define left, center, and right footers. Different footers for odd and even pages can be specified. Some symbols can be used that will expand to document title, author, date etc. See <A href="#symbols">below</A>. <DL> <DT><CODE>left</CODE> <DD>A left aligned footer. If the <CODE>alternate</CODE> flag in this block is set to 1, this will be the right footer on even pages. <DT><CODE>center</CODE> <DD>A centered footer. <DT><CODE>right</CODE> <DD>A right aligned footer. If the <CODE>alternate</CODE> flag in this block is set to 1, this will be the left footer on even pages. <DT><CODE>odd-left</CODE> <DD>A left aligned footer on odd pages. <DT><CODE>odd-center</CODE> <DD>A centered footer on odd pages. <DT><CODE>odd-right</CODE> <DD>A right aligned footer on odd pages. <DT><CODE>even-left</CODE> <DD>A left aligned footer on even pages. <DT><CODE>even-center</CODE> <DD>A centered footer on even pages. <DT><CODE>even-right</CODE> <DD>A right aligned footer on even pages. <DT><CODE>font-family</CODE> <DD> The font used for the footer, default is Helvetica. <DT><CODE>font-size</CODE> <DD> The font size for the footer, default is 8pt. <DT><CODE>font-style</CODE> <DD> The default is "normal". <DT><CODE>font-weight</CODE> <DD> The default is "normal". <DT><CODE>color</CODE> <DD> The footer color, default is black. <DT><CODE>alternate</CODE> <DD> A flag indicating whether the footers given by the <CODE>left</CODE> and <CODE>right</CODE> keys should change place on even pages. Typically used for double sided printing. The default is 1. </DL> <H4>The <CODE>frame</CODE> block </H4><P>The appearance of the optional frame (drawn on each page) is controlled by this block. <DL> <DT><CODE>width</CODE> <DD> The width of the frame, default is 0.6pt. <DT><CODE>margin</CODE> <DD> The size of the frame margin, default is 0.5cm. <DT><CODE>color</CODE> <DD> The colour of the frame, default is black. </DL> <H4>The <CODE>justify</CODE> block </H4><P>This block specifies the maximum amount of extra space inserted between words and letters when text justification is in effect. <DL> <DT><CODE>word</CODE> <DD> Maximum amount of extra space inserted between words. The default is 15pt. <DT><CODE>letter</CODE> <DD> Maximum amount of extra space inserted between letters within words. The default is 0pt. </DL> <H4>The <CODE>draft</CODE> block </H4><P>It is possible to have some text written in a large font diagonally across each page. Typically this is a word, written in a very light colour, indicating that the document is a draft. <DL> <DT><CODE>text</CODE> <DD> The text to be printed, default is "DRAFT". <DT><CODE>print</CODE> <DD> A flag specifying whether the draft text should be printed or not. If unspecified, the draft text is printed when the document head contains <CODE>&lt;META name="Status" content="Draft"&gt;</CODE>. <DT><CODE>dir</CODE> <DD> Specifies print direction, 0=downwards, 1=upwards. <DT><CODE>font-family</CODE> <DD> The default is Helvetica. <DT><CODE>font-style</CODE> <DD> The default is "normal". <DT><CODE>font-weight</CODE> <DD> The default is "bold". <DT><CODE>color</CODE> <DD> The default is "F0F0F0". </DL> <H4>The <CODE>colour</CODE> block </H4><P> The 16 standard colour names from HTML 4.01 (although their use in HTML elements are now deprecated) are recognized by html2ps. Use this block to extend this list of colours. This is done with key-value pairs, where the key is the colour name, and the value is the colour given as a hexadecimal RGB value, for example: "<CODE>brown: A52A2A;</CODE>". <H4>Key-value pairs in the <CODE>@html2ps</CODE> block </H4><DL><DT><CODE>html2psrc</CODE> <DD>The name of the default personal configuration file. The default is $HOME/.html2psrc. <DT><CODE>imgalt</CODE> <DD>Specifies which text should be written as a replacement for in-line images when the IMG element has no ALT attribute. The default is <CODE>"[IMAGE]"</CODE>. <DT><CODE>datefmt</CODE> <DD>The symbol $D can be used in page headers and footers to insert the current date/time; the value of the <CODE>datefmt</CODE> key specifies the format used. The syntax is the same as in the strftime(3) routine. The default is <CODE>"%e %b %Y %R"</CODE>, which gives a date string like " 7 May 2010 13:22". <DT><CODE>locale</CODE> <DD>The locale (language code) used for formating language dependent parts of the date/time in <CODE>datefmt</CODE>. If unspecified, the value is taken from environment variables, see setlocale(3). No default. <DT><CODE>doc-sep</CODE> <DD> A string of HTML code that will be inserted between the documents when more than one are converted. The default is <CODE>"&lt;!--NewPage--&gt;"</CODE>, which will cause a page break. You may use (almost) any HTML code, for example <CODE>"&lt;HR&gt;&lt;HR&gt;"</CODE> or <CODE>"&lt;IMG src=...&gt;"</CODE>. <DT><CODE>ball-radius</CODE> <DD> The radius, given as a relative size, of the balls used in unordered lists. The default is 0.25em. <DT><CODE>numbstyle</CODE> <DD>Page numbering style, 0=arabic, 1=roman. The default is 0. <DT><CODE>showurl</CODE> <DD>When this flag is set to 1, the URL for external links are shown within parentheses after the link. The default is 0. <DT><CODE>seq-number</CODE> <DD>When this flag is set, the headings in the document will be sequentially numbered: H1 headings will be numbered 1, 2,..., H2 headings 1.1, 1.2, etc. The starting number for H1 can be changed using the -M (--mainchapter) option. The default is 0. <DT><CODE>extrapage</CODE> <DD> A flag specifying whether an extra (empty) page should be printed, when necessary, to ensure that the title page, the table of contents, and the document itself will start on odd pages. This is typically desirable for double sided printing. The default is 1. <DT><CODE>break-table</CODE> <DD> A flag specifying if a table should be broken across two pages when it does not fit on the current page, but it does on a page of its own. The default is 0 (avoid breaking tables when possible). <DT><CODE>forms</CODE> <DD> This flag is used to specify whether FORM elements in the document should be processed or ignored. Some forms may be suitable for printing out and be filled out (with a pen), others are not. The default is 1. <DT><CODE>textarea-data</CODE> <DD>When a TEXTAREA element contains prefilled data, the text will be used as labels if this flag is set, otherwise ignored. The default is 0. <DT><CODE>page-break</CODE> <DD>Set this flag to 0 to suppress the normal behavior of generating page breaks from the comment <CODE>&lt;!--NewPage--&gt;</CODE> etc, as <A HREF="#PBR">specified below</A>. The default is 1. <DT><CODE>expand-acronyms</CODE> <DD>A flag specifying whether acronyms, given by the ACRONYM element, should be expanded or not. The default is 0. <DT><CODE>spoof</CODE> <DD>Some web servers return different documents depending on which user agent is used to retrieve the document. You can fool the web server that a certain browser is used, by setting this value to the identification used by the browser, such as "Mozilla/4.0". This only works if you are using one of the Perl packages to retrieve remote documents. <DT><CODE>ssi</CODE> <DD>When this flag is set, some Server Side Includes will be processed when the document is read from a local file. Examples are <CODE>&lt;!--#include file=...&gt;</CODE>, <CODE>&lt;!--#echo var="LAST_MODIFIED"&gt;</CODE>, <CODE>&lt;!--#config timefmt=...&gt;</CODE>. The default is 0. <DT><CODE>prefilled</CODE> <DD>This flag controls whether the content of form elements should be rendered or not. That is, when this flag is set, the content of TEXTAREA elements, and the value of the value attribute of text INPUT elements will be shown. Also, checked radio buttons and checkboxes will be marked. The default is&nbsp;0. </DL> <H4><A name="symbols">Symbols</A></H4> <P> The following symbols can be used on the title page, the page headers/footers, and in the heading for the table of contents: <P>Symbols of the form "<CODE>$[<VAR>name</VAR>]</CODE>" will expand to the value of the <CODE>content</CODE> attribute of <CODE>META</CODE> elements, having either of the attributes "<CODE>name=<VAR>name</VAR></CODE>" or "<CODE>http-equiv=<VAR>name</VAR></CODE>" (case insensitive string matching). For example, when a document containing: <PRE> &lt;META name="expires" content="31 Dec 2011"&gt; </PRE> <P> is converted, using a configuration file with: <PRE> footer { left: "Expires: $[expires]" } </PRE> <P> this left footer will be inserted: <PRE> Expires: 31 Dec 2011 </PRE> <P> In addition, these symbols are defined: <DL> <DT style="display: compact"><CODE>$T</CODE> <DD>Current document title. <DT style="display: compact"><CODE>$A</CODE> <DD>Author of current document, as specified with <CODE>&lt;META name="Author" content="..."&gt;</CODE> in the document head. <DT style="display: compact"><CODE>$U</CODE> <DD>The URL, or file name, of current document. <DT style="display: compact"><CODE>$N</CODE> <DD>Page number. <DT style="display: compact"><CODE>$H</CODE> <DD>Current document heading (level 1-3). <DT style="display: compact"><CODE>$D</CODE> <DD>Current date/time. The format is given by the <CODE>datefmt</CODE> key. </DL> <P> So <CODE>$A</CODE> is equivalent to <CODE>$[author]</CODE>, but kept for backwards compatibility. <P> To avoid symbol expansion, precede the dollar sign with a backslash, as in "<CODE>\$T</CODE>". <H2>Some hints how to use configuration files</H2> <P> I imagine that a typical use of configuration files can be something along the following lines. <P> System specific definitions (e.g. specification of available program packages) and global defaults (paper type etc) are defined in the global configuration file. <P> If there is more than one user of the program on the system, each user can also have a personal configuration file with his/hers own personal preferences. (On a single user system one can use the global configuration file for this purpose as well.) <P> One may also develop a collection of configuration files for typical situations. These files are placed in a directory that is searched by html2ps (the search path is defined with the environment variable HTML2PSPATH). For example, to print a document as slides &ndash; in landscape mode, with large text in Helvetica, and a thick frame &ndash; one can create a configuration file, called 'slides' say, containing: <PRE> @html2ps { option { landscape: 1; frame: 1; } frame { width: 3pt } } BODY { font-family: Helvetica; font-size: 20pt; } H1 { font-size: 35pt } H2 { font-size: 32pt } H3 { font-size: 29pt } H4 { font-size: 26pt } H5 { font-size: 23pt } H6 { font-size: 20pt } PRE { font-size: 18pt } </PRE> <P> Then use the command: <PRE> html2ps -f slides ... </PRE> <P> to convert the document. Note that with this command the file 'slides' is used <EM>instead</EM> of the personal configuration file. If you want both to be used, giving precedence to definitions made in the file 'slides', use the command: <PRE> html2ps -f :slides ... </PRE> <P> (The page breaks between the slides can for example be generated by adding '<CODE>&lt;HR class=PAGE-BREAK&gt;</CODE>' to the HTML document.) <P> For features that are frequently turned on and off, and that cannot be controlled by command line options, it may be a good idea to create small configuration files as "building blocks". For example a file 'A4' for printing on A4 paper (if you have some other default paper type): <PRE> @html2ps { paper { type: A4 } } </PRE> <P> and a file 'hnum' for automatic numbering of headings: <PRE> @html2ps { seq-number: 1 } </PRE> <P> Combining this with the previous example: to convert a document for printing on A4 sized slides with all headings numbered, use the command: <PRE> html2ps -f :slides:A4:hnum ... </PRE> <H1>Internationalization</H1> <P> There is not yet much support for internationalization, as specified in HTML 4.0. A few <A HREF="#ENC">character encodings</A>, other than the old default ISO-8859-1, are supported. The element <A HREF="#quote">Q</A> for short quotations is implemented (quotation marks are chosen based on current language). It is also possible to make language dependent <A HREF="#HYPH">hyphenation</A>, using hyphenation pattern files from the TeX distribution. The <CODE>lang</CODE> attribute (recognized for a few elements) is used to determine the language of the document, or for a particular section. <H2><A NAME="ENC">Document encodings</A></H2> <P> It is possible to convert documents using some other character encodings than the old default ISO-8859-1. Currently the Japanese encodings EUC-JP, SHIFT-JIS, and ISO-2022-JP (7-bit) are recognized. EUC encoded documents in other languages, such as Chinese (EUC-CN), and Korean (EUC-KR) will probably work as well. I have no such font available, so I have not been able to test this myself. <P> You must of course have access to PostScript fonts for these languages and encodings. For Japanese you can use the free <A HREF="ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/">Wadalab fonts</A> and associated <A HREF="ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/tools/">tools</A>. These fonts can be used together with Ghostscript to print on a printer that does not have such fonts. <P> Of the three Japanese encodings, EUC-JP works best with html2ps. The 7-bit encoding ISO-2022-JP, found in several documents on the web, is a bad choice for HTML documents. This is because the encoding uses characters that have a special function in HTML, such as '&lt;'. Often this results in incorrect HTML code, and html2ps as well as browsers will of course have problems rendering these documents. <P> There is not yet any automatic detection of the encoding, this must be explicitly specified with the option -e, or in a configuration file. If you for example would like to convert a document with EUC-JP encoding, you can use a configuration file like: <PRE> BODY { font-family: eucjp } @html2ps { option { encoding: "EUC-JP"; } font { eucjp { names: "Ryumin-Light-EUC-H"; } } } </PRE> <P> The name <CODE>Ryumin-Light-EUC-H</CODE> should be changed into the PostScript font name for the font to be used, here with EUC-JP encoding. The name <CODE>eucjp</CODE> can be changed to something else, as long as it is the same in the <CODE>BODY</CODE> and <CODE>font</CODE> blocks. You may not (yet) use a font having vertical writing mode. <P> The support for Japanese has only recently been added, and so far only been tested by me. Unfortunately, I do not know any Japanese, and cannot verify that what comes out is correct. Also, the line breaking is probably not correctly done. <P> Please let me know if you are aware of any free PostScript fonts for Chinese, Korean, etc. <H2><A NAME="HYPH">Hyphenation</A></H2> <P> The character entity &amp;shy; can be used to explicitly specify possible hyphenation points. <P> It is also possible to get automatic hyphenation of the text. This requires hyphenation pattern files from the TeX distribution. A hyphenation pattern file for English is included with html2ps. Pattern files for other languages are available from CTAN archives, for example <A HREF="http://www.ctan.org/tex-archive/language/hyphenation/">here</A>. <P> The hyphenation patterns for words containing only ASCII characters should work correctly. But it may be problems with other words, since the authors of these hyphenation pattern files use different (but in TeX equivalent) syntax to represent non-ASCII characters. <P> Please note that although TeX hyphenation patterns are used, the algorithm used is not as sophisticated as in TeX. In fact, you should not expect TeX quality in <EM>any</EM> part of this program! <H1>Known bugs</H1> <P> (This is incomplete.) <P> The CELLSPACING attribute of the TABLE element is not implemented as described in the specification; instead the value of the CELLPADDING attribute is increased by half the value of CELLSPACING. <P> Rendering HTML tables well is a non-trivial task. For "real" tables, that is representation of tabular data, html2ps usually generates reasonably good output. When tables are used for layout purposes, the result varies from good to useless. This is because a table cell is never broken across pages. So if a table contains a cell with a lot of content, the entire table may have to be scaled down in size in order to make this cell fit on a single page. Sometimes this may even result in unreadable output. <P> Page breaks are occasionally done in bad places: for example directly after a (long) heading, and before the last line in a paragraph. <H1>Todo</H1> <P> Actually, what <EM>really</EM> needs to be done is a complete rewriting of the code. It started out as a small hack &ndash; originally a sed script &ndash; and has now grown substantially, but it is still a hack... It is quite unlikely that this rewriting will take place, though &ndash; at least not in the near future. <P> Better Support for style sheets. Currently, a small part of CSS2 is supported, but only in the form of personal style sheets (using configuration files); style information within HTML documents is ignored. <P> All new features added have made the script quite large, and significantly slower than earlier versions. I will try to find some way to speed it up somewhat. <P> I am grateful for all suggestions how to improve html2ps. In fact, many of the current features have been implemented after suggestions from other users. <H1>Miscellaneous</H1> <P> <H2>Environment variables</H2> <P> <DL> <DT>HTML2PSPATH <DD>This variable specifies the directories to search for configuration files. It should be a colon separated list of directory names. Use a dot '.' to denote the current directory. An empty directory name (as in ':dir', 'dir1::dir3', or 'dir:') will expand to the directory where the global configuration file is. The default value is '.:', that is: search the current directory first, and then the global one. </DL> <H2><A name="DSC">DSC compliance</A></H2> <P> By default html2ps produces PostScript code that is <EM>not</EM> DSC compliant. The practical implication of this is that it will not be possible to use the code with PostScript filters for n-up printing, reordering of pages, etc. It is also not possible to jump to a certain page directly in previewers such as Ghostview. <P> The advantage with the non-DSC code is that it can be 'reused' by html2ps: you can rebuild an already generated PostScript file using new command line options and configuration files. This is done by running html2ps with the new options, and with the old PostScript file as input. This can save a lot of time and bandwidth when converting remote documents. <P> It is possible to generate DSC compliant PostScript by using the option -D, but this requires that Ghostscript is installed, and it can take quite some time to do. Note: if you are producing PostScript files for others to download, it is <STRONG>strongly</STRONG> recommended that you generate DSC compliant code. <H2>Extensions</H2> <P> A few extensions to HTML 4.01 are recognized by html2ps: <UL> <LI> A <A NAME="PBR">page break</A> can be forced by including any of these in a document: <PRE> &lt;HR class=PAGE-BREAK&gt; &lt;?page-break&gt; &lt;!--NewPage--&gt; </PRE> <LI> If you want html2ps to ignore certain parts of a document, use the following construction: <PRE> &lt;DIV class=NOPRINT&gt; This will not be printed... &lt;/DIV&gt; </PRE> <P> This can be used to avoid getting navigation bars etc in the printout. <LI> The BANNER, FIG, and MATH elements from the expired HTML 3.0 specification are also supported. Note that the support for MATH is far from complete, and requires that TeX and dvips are installed. </UL> <H2>Conversion to PDF</H2> <P> The PostScript code generated by html2ps contains calls to the <CODE>pdfmark</CODE> operator, that are instructions to a PostScript-to-PDF converter (such as version 5.0 or later of Aladdin Ghostscript, or Adobe Acrobat Distiller). These instructions generate hyperlinks in the PDF document, from the hyperlinks in the original HTML documents. A PDF outline entry, or bookmark, is also generated from the HTML headings. <P> By default the links in the PDF document will be represented by a box with a border. You may instead have the link text coloured, by for example specifying '<CODE>A:link { color: red }</CODE>' in a configuration file, and use the option -U when converting. <H2><A NAME="SW">Where to get other software</A></H2> <P> Here follow some addresses where one can obtain software used by html2ps. Several of these programs are available from many other program archives. Also note that not all packages are needed. <UL> <LI><A HREF="http://www.perl.org/">Perl</A> <LI><A HREF="http://www.imagemagick.org">ImageMagick and PerlMagick</A> <LI><A HREF="http://www.funet.fi/pub/graphics/packages/pbmplus/">pbmplus</A> <LI><A HREF="http://www.funet.fi/pub/graphics/packages/pbmplus/">netpbm</A> <LI><A HREF="ftp://ftp.uu.net/graphics/jpeg/">jpegsrc</A> <LI><A HREF="ftp://ftp.cs.tu-berlin.de/pub/net/www/weblint/">weblint</A> <LI><A HREF="http://www.linpro.no/lwp/">libwww-perl</A> <LI><A HREF="http://www.cs.wisc.edu/~ghost/index.html">Ghostscript</A> </UL> <H2>Reporting problems</H2> <P> Please note that html2ps comes with <EM>no</EM> support (this is unpaid work done on my spare time). However, I <EM>am</EM> interested in making the program as useful as possible, so do not hesitate to report any problems. But please carry out the following steps first: <OL> <LI>Check if your problem is listed in the <A href="http://user.it.uu.se/~jan/html2ps-FAQ.html">FAQ</A>. <LI>Check that the HTML documents you are converting have correct syntax &ndash; rendering valid documents is difficult enough, do not expect <EM>anything</EM> from documents with invalid syntax. To check the syntax, there are <A HREF="http://validator.w3.org/">validation services</A> available, and also online syntax checkers such as weblint. <LI>Execute html2ps with the option -d. This writes out debugging information to the terminal, as well as to a file 'html2ps.dbg'. </OL> <P> If you, after inspecting the results from these steps, believe that there is a problem with html2ps; mail the content of the file 'html2ps.dbg' together with a description of the problem to <A HREF="mailto:&#x68;&#x74;&#x6d;&#x6c;&#x32;&#x70;&#x73;&#x2d;&#x62;&#x75;&#x67;&#x73;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65;">&#x68;&#x74;&#x6d;&#x6c;&#x32;&#x70;&#x73;&#x2d;&#x62;&#x75;&#x67;&#x73;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65;</A>. If you fail to produce the file 'html2ps.dbg', instead please include as much details as possible: the version of html2ps, The Perl version, your platform, etc. <P> Please also include the HTML document, or a URL &ndash; preferably containing a minimal example illustrating the problem. <H2>Security</H2> <P> Do not use this software as part of a web application (cgi script etc), unless you are absolutely sure of what you are doing. <H2>Acknowledgments</H2> <P> There are several persons that have been helpful with the development of this program &ndash; by supplying patches, suggesting improvements, etc. I have most certainly forgot a few names; please forgive me if you are missing your name in this list: John Bowe, Neil Bowers, Reinhard Denner, Russell Locke, Thomas Mohr, Craig Oda, Dave Raggett, John Sinues, Larry W. Virden, and Chenxi Wang. My colleagues at the Department of Information Technology have also been a great help by testing the program. <P> <h2>If you like it</h2> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <p> <input type="hidden" name="cmd" value="_s-xclick"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make a donation to &#x6a;&#x61;&#x6e;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65; at https://www.paypal.com"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIG/QYJKoZIhvcNAQcEoIIG7jCCBuoCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBK1Qpyz/qqoDIrOHEhwm5LUj/bcDL38pOUs7y6zTBBAVqTKPEIWSCTMoUyGmfy7vYr6lhS/5AsbH/2b62eFnM6GpdHnH/rtfSaH76nXUj33kbyd68dPEKgHW1fuB23MzvW0iWYV7w4ubrAEwJWlbBqISPExT5b9IkIrnKqIiHGUDELMAkGBSsOAwIaBQAwewYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAgIieSlB4bUxYBYseahiHaaWOm9lFLJdPmSy93Bz28fK5NFMJ5in6EeLBnKd5FRJfojprLV95kyLMP+ad+XW9rkTkwxSgUxNamNxUnKmVVjrer77pK5xc6AbCj1pgzuJxBj+aCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA0MDczMTE3MTMxOFowIwYJKoZIhvcNAQkEMRYEFCrwBRbJfzgbC3nxzgKgo9DHMC/wMA0GCSqGSIb3DQEBAQUABIGAZOlMyH/KxMkHgOh9TsCIYW4ApXm76+cS2MCijktWnevMWdWWvbkolxaCsRmBwsG1WmAhZM8sA5tQ6KFKk6g/Mwx8tSdYM+PMGp04Ve+0qRubGQMH8Ahqv7XOG2MZZ3WAbw1/bidC2HB8XdTHua1+mTtwU0sxV/uHhI6qD6mxYXc=-----END PKCS7----- "> </form> <hr> <ADDRESS> Jan K&auml;rrman<BR> Dept. of Information Technology<BR> Uppsala University<BR> Sweden<BR> <A HREF="mailto:&#x6a;&#x61;&#x6e;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65;">&#x6a;&#x61;&#x6e;&#x40;&#x69;&#x74;&#x2e;&#x75;&#x75;&#x2e;&#x73;&#x65;</A> </ADDRESS> </BODY> </HTML> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/html2ps.1�����������������������������������������������������������������������������0000644�0000162�0017537�00000024166�11370773744�012651� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" @(#)html2ps.1 .\" .TH html2ps 1 " 7 May 2010" "Autogenerated" .UC 4 .SH NAME html2ps \- convert HTML to PostScript .SH SYNOPSIS .B html2ps [ .B \-2cdDFghHLnORtTuUv ] [ .BI \-b " URL" ] [ .BI \-C " string" ] [ .BI \-e " encoding" ] [ .BI \-f " file[:file[:...]]" ] [ .BI \-i " num" ] [ .BI \-k " file" ] [ .BI \-l " lang" ] [ .BI \-m " num" ] [ .BI \-M " num" ] [ .BI \-N " num" ] [ .BI \-o " file" ] [ .BI \-r " path" ] [ .BI \-s " num" ] [ .BI \-S " string" ] [ .BI \-W " string" ] [ .BI \-x " num" ] [ .IR URL|file ] .SH DESCRIPTION The program .B html2ps converts HTML to PostScript. The HTML code can be retrieved from one or more URL:s or local files, specified as parameters on the command line. If no parameter is given, html2ps reads from standard input. .PP Note: To avoid unnecessary network traffic, one can rebuild an already generated PostScript file with new options. This is done by running html2ps with the new options, and with the old PostScript file as input (not applicable for all options). .SH OPTIONS All options have a short (case sensitive), and a long (case insensitive) form. .TP .B -2 --twoup Two column (2-up) output. The default is one column per page. .TP .B \-b \fIURL\fP --base \fIURL\fP Use .I URL as a base to expand relative references for in-line images. This is useful if you have downloaded a document to a local file. The .I URL should then be the .I URL of the original document. .TP .B -c --check Check the syntax of the HTML file (using an external syntax checker). The default is to not make a syntax check. .TP .B \-C \fIstring\fP --toc \fIstring\fP Generate a table of contents (ToC). The value should be a string consisting of one of the letters 'f', 'h', or 't', optionally combined with the letter 'b': .LP .RS .PD 0 .TP .B b The ToC will be printed first. This requires that Ghostscript is installed. .TP .B f The ToC will be generated from the links in the converted document. .TP .B h The ToC will be generated from headings and titles in the converted documents. Note that if the document author for some strange reason has chosen to use some other means to represent the headings than the HTML elements H1,...,H6, you are out of luck! .TP .B t The ToC will be generated from links having the attribute rev=TOC in the converted document. .RE .PD .PP .TP .B -d --debug Generate debugging information. You should always use this option when reporting problems with html2ps. .TP .B -D --DSC Generate DSC compliant PostScript. This requires Ghostscript and can take quite some time to do. Note that a PostScript file generated with this option cannot be used as input to html2ps for reformatting later. .TP .B \-e \fIencoding\fP --encoding \fIencoding\fP The document encoding. Currently recognized values are ISO-8859-1, EUC-JP, SHIFT-JIS, and ISO-2022-JP (other EUC-xx encodings may also work). The default is ISO-8859-1. .TP .B \-f \fIfile[:file[:...]]\fP --rcfile \fIfile[:file[:...]]\fP A colon separated list of configuration file names to use instead of the default personal configuration file $HOME/.html2psrc. Definitions made in one file override definitions in previous files (the last file in the list has highest precedence). An empty file name (as in ':file', 'file1::file3', or 'file:') will expand to the default personal file. The environment variable HTML2PSPATH is used to specify the directories where to search for these files. (Note: this is only supposed to be used on the command line, not in a configuration file.) .TP .B -F --frame Draw a frame around the text on each page. The default is to not draw a frame. .TP .B -g --grayscale Convert colour images to grayscale images. Note that the PostScript file will be smaller when the images are converted to grayscale. The default is to generate colour images. .TP .B -h --help Show usage information. .TP .B -H --hyphenate Hyphenate the text. This requires TeX hyphenation pattern files. .TP .B \-i \fInum\fP --scaleimage \fInum\fP Scale in-line images with a factor .I num . The default is 1. .TP .B \-k \fIfile\fP --cookie \fIfile\fP Enable cookie support, using a netscape formatted cookie .I file (requires libwww-perl). .TP .B \-l \fIlang\fP --language \fIlang\fP Specifies the language of the document (overrides an eventual LANG attribute of the BODY element). The language should be given according to RFC1766 (ftp://ftp.nordu.net/rfc/rfc1766.txt) and ISO 639 (http://www.w3.org/WAI/ER/IG/ert/iso639.htm). .TP .B -L --landscape Generate code for printing in landscape mode. The default is portrait mode. .TP .B \-m \fInum\fP --scalemath \fInum\fP Scale mathematical formulas with a factor .I num . The default is 1. .TP .B \-M \fInum\fP --mainchapter \fInum\fP Specifies the start number for automatic numbering of headings (by setting the seq-number parameter), the default is 1. .TP .B -n --number Insert page numbers. The default is to not number the pages. .TP .B \-N \fInum\fP --startno \fInum\fP Specifies the starting page number, the default is 1. .TP .B \-o \fIfile\fP --output \fIfile\fP Write the PostScript code to .I file. The default is to write to standard output. .TP .B -O --original Use PostScript original images if they exist. For example, if a document contains an image figure.gif, and an encapsulated PostScript file named figure.ps exists in the same directory, that file will be use instead. This only work for documents read as local files. Note: if the PostScript file is large or contains bitmap images, this must be combined with the -D option. In HTML 4.0 this can be achieved in a much better way with: .RS .PD .PP .PD 0 .PP <OBJECT data="figure.ps" type="application/postscript"> .PP <OBJECT data="figure.gif" type="image/gif"> .PP <PRE>[Maybe some ASCII art for text browsers]</PRE> .PP </OBJECT> .PP </OBJECT> .RE .PD .PP .TP .B \-r \fIpath\fP --rootdir \fIpath\fP When a document is read from a local file, this value specifies a base directory for resolving relative links starting with "/". Typically, this should be the directory where your web server's home page resides. .TP .B -R --xref Insert cross references at every link to within the set of converted documents. .TP .B \-s \fInum\fP --scaledoc \fInum\fP Scale the entire document with a factor .I num . The default is 1. .TP .B \-S \fIstring\fP --style \fIstring\fP This option complements/overrides definitions made in the configuration files. The .I string must follow the configuration file syntax. (Note: this is only supposed to be used on the command line, not in a configuration file.) .TP .B -t --titlepage Generate a title page. The default is to not generate one. .TP .B -T --text Text mode, ignore images. The default is to include the images. .TP .B -u --underline Underline text that constitutes a hypertext link. The default is to not underline. .TP .B -U --colour Produce colour output for text and background, when specified. The default is black text on white background (mnemonic: coloUr ;-). .TP .B -v --version Print information about the current version of html2ps. .TP .B \-W \fIstring\fP --web \fIstring\fP Process a web of documents by recursively retrieve and convert documents that are referenced with hyperlinks. When dealing with remote documents it will of course be necessary to impose restrictions, to avoid downloading the entire web... The value should be a string consisting of one of the letters 'a', 'b', 'l', 'r', or 's', optionally combined with a combination of the letters 'p', 'L', and a positive integer: .LP .RS .PD 0 .TP .B a Follow all links. .TP .B b Follow only links to within the same directory, or below, as the start document. .TP .B l Follow only links specified with "<LINK rel=NEXT>" in the document. .TP .B p Prompt for each remote document. This mode will automatically be entered after the first 50 documents. .TP .B r Follow only relative links. .TP .B s Follow only links to within the same server as the start document. .TP .B L With this option, the order in which the documents are processed will be: first all top level documents, then the documents linked to from these etc. For example, if the document A has links to B and C, and B has a link to D, the order will be A-B-C-D. By default, each document will be followed by the first document it links to etc; so the default order for the example is A-B-D-C. .TP .B # A positive integer giving the number of recursive levels. The default is 4 (when the option is present). .RE .PD .PP .TP .B \-x \fInum\fP --duplex \fInum\fP Generate postscript code for single or double sided printing. No default, valid values are: .LP .RS .PD 0 .TP .B 0 Single sided. .TP .B 1 Double sided. .TP .B 2 Double sided, opposite page reversed (tumble mode). .RE .PD .PP .SH BUGS .PP (This is incomplete.) .PP The CELLSPACING attribute of the TABLE element is not implemented as described in the specification; instead the value of the CELLPADDING attribute is increased by half the value of CELLSPACING. .PP Rendering HTML tables well is a non-trivial task. For "real" tables, that is representation of tabular data, html2ps usually generates reasonably good output. When tables are used for layout purposes, the result varies from good to useless. This is because a table cell is never broken across pages. So if a table contains a cell with a lot of content, the entire table may have to be scaled down in size in order to make this cell fit on a single page. Sometimes this may even result in unreadable output. .PP Page breaks are occasionally done in bad places: for example directly after a (long) heading, and before the last line in a paragraph. .SH ENVIRONMENT .TP HTML2PSPATH This variable specifies the directories to search for configuration files. It should be a colon separated list of directory names. Use a dot '.' to denote the current directory. An empty directory name (as in ':dir', 'dir1::dir3', or 'dir:') will expand to the directory where the global configuration file is. The default value is '.:', that is: search the current directory first, and then the global one. .SH FILES .TP $HOME/.html2psrc User configuration file, see html2psrc(5). .SH SEE ALSO html2psrc(5), perl(1), setlocale(3), strftime(3), weblint(1) .SH VERSION This manpage describes html2ps version 1.0 beta7. .SH AVAILABILITY http://user.it.uu.se/~jan/html2ps.html .SH AUTHOR Jan Karrman (jan@it.uu.se) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/html2psrc.5���������������������������������������������������������������������������0000644�0000162�0017537�00000102725�11370773744�013200� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" @(#)html2psrc.5 .\" .TH html2psrc 5 " 7 May 2010" "Autogenerated" "html2ps configuration file format" .SH NAME html2psrc - configuration file format for html2ps(1) .SH DESCRIPTION Configuration files are used for layout control, resource information etc. Normally, there should always exist a global configuration file. In this file one typically specify things like: what image conversion packages are available on the system, the default paper size, the default text fonts and sizes, etc. .PP For Unix and Windows systems, the installation script 'install' can be used to automatically build a global configuration file with all necessary definitions, and install all files. The files replaced by the installation are saved. If you for some reason are not satisfied with the new version: execute the script 'backout' to reinstall your earlier version. .PP On other systems, you will have to manually create a global configuration file, and insert the name of this file into the html2ps script (close to the beginning, the line starting with "$globrc="). The configuration file should contain a package block, and perhaps paper and hyphenation blocks, described below. .PP Each user can then have a personal configuration file (by default $HOME/.html2psrc) that complements/overrides the definitions made in the global file. It is also possible to specify alternative files on the command line, using the -f option. .SH FILE FORMAT .PP A configuration file can include other configuration files. This is done with: .RS .PD .PP .PD 0 .RE .RS .3i .PP @import "\fIfilename\fP"; .RE .PD .PP .PP The rest of the configuration file consists of zero or more blocks. A block is given by a block name, followed by the block definition, as in: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP BODY { .RE .RS .5i .PP font-size: 12pt; .PP font-family: Helvetica; .PP text-align: justify .RE .RS .3i .PP } .RE .PD .PP .PP The block definition, enclosed by curly braces: { }, consists of key-value pairs and/or other blocks. A key-value pair consists of the key name followed by a colon, followed by the value. Blocks and key-value pairs are separated by semicolons. The semicolon may be omitted after a block. .PP Several blocks can share the same definition. The block names are then separated be commas, as in: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP H2, H4, H6 { font-style: italic } .RE .PD .PP .PP A comment in a configuration file starts with the characters "/*" and ends with "*/": .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP @html2ps { .RE .RS .5i .PP seq-number: 1; /* Automatic numbering of headings */ .RE .RS .3i .PP } .RE .PD .PP Notations .PP .PP Here are some definitions of terms used below: .LP .RS .PD 0 .TP .B Flag: A value of either 0 (absence, inactive etc) or 1 (presence, active etc). .TP .B Absolute size: A real number optionally followed by one of the following two-letter unit identifiers: cm (centimeters), mm (millimeters), in (inches), pt (points, 1pt = 1/72 inch), pc (picas, 1pc = 12pt). The default unit is centimeters. .TP .B Relative size: A size relative to current fontsize. The default and currently only recognized unit is em. One em equals the size of the current font. The value should be given as a real number, optionally followed by 'em', as in '0.25em'. .TP .B Whitespace: Any one of the characters: space, tab, newline, or carriage return. .RE .PD .PP CSS2 blocks .PP .PP All blocks, except one: the @html2ps block, coincides with a subset of the Cascading Style Sheets, level 2 CSS2 Specification (http://www.w3.org/TR/REC-CSS2/). The following default settings for html2ps illustrate just about everything that currently can be used from the CSS2 specification: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP BODY { .RE .RS .5i .PP font-family: Times; .PP font-size: 11pt; .PP text-align: left; .PP background: white; .RE .RS .3i .PP } .PD .PP .PD 0 .PP H1, H2, H3, H4, H5, H6 { .RE .RS .5i .PP font-weight: bold; .PP margin-top: 0.8em; .PP margin-bottom: 0.5em; .RE .RS .3i .PP } .PP H1 { font-size: 19pt } .PP H2 { font-size: 17pt } .PP H3 { font-size: 15pt } .PP H4 { font-size: 13pt } .PP H5 { font-size: 12pt } .PP H6 { font-size: 11pt } .PD .PP .PD 0 .PP P, OL, UL, DL, BLOCKQUOTE, PRE { .RE .RS .5i .PP margin-top: 1em; .PP margin-bottom: 1em; .RE .RS .3i .PP } .PD .PP .PD 0 .PP P { .RE .RS .5i .PP line-height: 1.2em; .PP text-indent: 0; .RE .RS .3i .PP } .PD .PP .PD 0 .PP OL, UL, DD { margin-left: 2em } .PD .PP .PD 0 .PP TT, KBD, PRE { font-family: Courier } .PD .PP .PD 0 .PP PRE { font-size: 9pt } .PD .PP .PD 0 .PP BLOCKQUOTE { .RE .RS .5i .PP margin-left: 1em; .PP margin-right: 1em; .RE .RS .3i .PP } .PD .PP .PD 0 .PP ADDRESS { .RE .RS .5i .PP margin-top: 0.5em; .PP margin-bottom: 0.5em; .RE .RS .3i .PP } .PD .PP .PD 0 .PP TABLE { .RE .RS .5i .PP margin-top: 1.3em; .PP margin-bottom: 1em; .RE .RS .3i .PP } .PD .PP .PD 0 .PP DIV.noprint { display: none } .PD .PP .PD 0 .PP DEL { text-decoration: line-through } .PD .PP .PD 0 .PP A:link, HR { color: black } .PD .PP .PD 0 .PP @page { .RE .RS .5i .PP margin-left: 2.5cm; .PP margin-right: 2.5cm; .PP margin-top: 3cm; .PP margin-bottom: 3cm; .RE .RS .3i .PP } .RE .PD .PP .PP The program specific block \fI@html2ps\fP: .PP This block is used to specify parameters that are specific to html2ps, and not covered by CSS2. The @html2ps block has several sub-blocks and key-value pairs, these are described in this section. .TP The \fIpackage\fP block .RS .5i This block is used to specify which program packages are installed on the system. Typically, this is done in the global configuration file. .TP .B PerlMagick A flag specifying whether the Perl module PerlMagick is installed or not. The default is 0. .TP .B ImageMagick A flag specifying whether the ImageMagick package is installed or not. The default is 0. .TP .B pbmplus A flag specifying whether the pbmplus package is installed or not. The default is 0. .TP .B netpbm A flag specifying whether the netpbm package is installed or not. The default is 0. .TP .B djpeg A flag specifying whether djpeg is installed or not. The default is 0. .TP .B Ghostscript A flag specifying whether Ghostscript is installed or not. The default is 0. .TP .B TeX A flag specifying whether the TeX package is installed or not. The default is 0. .TP .B dvips A flag specifying whether dvips is installed or not. The default is 0. .TP .B libwww-perl A flag specifying whether the Perl module library libwww-perl is installed or not. The default is 0. .TP .B geturl When neither of the Perl packages for retrieving remote documents are available, it is possible to use some other program like wget or lynx. This value should be set to a command that retrieves a document with a complete MIME header, such as "wget -s -q -O-" or "lynx -source -mime_header". .TP .B check The name of a program used for syntax checking HTML documents. No default, a good choice is weblint. .TP .B path A colon separated list of directories where the executables from the program packages are. It is only necessary to include directories that are not in the PATH for a typical user. .RE .TP The \fIpaper\fP block .RS .5i The paper size is defined in this block. The size can either be given as one of the recognized paper types or by giving explicit values for the paper height and width. As of version 1.0 beta2, one can also use the @page block in CSS2 for the paper size. The paper block is kept for backwards compatibility. Also, one can only specify explicit dimensions in @page, not any paper types by name. .TP .B type Paper type, possible choices are: A0, A1, A2, A3, A4,...,A10, B0, B1,...,B10, letter, legal, arche, archd, archc, archb, archa, flsa, flse, halfletter, 11x17, and ledger (this set of paper types is taken from Aladdin Ghostscript). The default is A4. .TP .B height An absolute size specifying the paper height. .TP .B width An absolute size specifying the paper width. .RE .TP The \fIoption\fP block .RS .5i This block is used to set default values for the command line options. The key in the key-value pair is the option name, in either its long or short form. .TP .B twoup Two column (2-up) output. The default is one column per page. .TP .B base Use \fIURL\fP as a base to expand relative references for in-line images. This is useful if you have downloaded a document to a local file. The \fIURL\fP should then be the \fIURL\fP of the original document. .TP .B check Check the syntax of the HTML file (using an external syntax checker). The default is to not make a syntax check. .TP .B toc Generate a table of contents (ToC). The value should be a string consisting of one of the letters 'f', 'h', or 't', optionally combined with the letter 'b': .LP .RS .PD 0 .TP .B b The ToC will be printed first. This requires that Ghostscript is installed. .TP .B f The ToC will be generated from the links in the converted document. .TP .B h The ToC will be generated from headings and titles in the converted documents. Note that if the document author for some strange reason has chosen to use some other means to represent the headings than the HTML elements H1,...,H6, you are out of luck! .TP .B t The ToC will be generated from links having the attribute rev=TOC in the converted document. .RE .PD .PP .TP .B debug Generate debugging information. You should always use this option when reporting problems with html2ps. .TP .B DSC Generate DSC compliant PostScript. This requires Ghostscript and can take quite some time to do. Note that a PostScript file generated with this option cannot be used as input to html2ps for reformatting later. .TP .B encoding The document encoding. Currently recognized values are ISO-8859-1, EUC-JP, SHIFT-JIS, and ISO-2022-JP (other EUC-xx encodings may also work). The default is ISO-8859-1. .TP .B rcfile A colon separated list of configuration file names to use instead of the default personal configuration file $HOME/.html2psrc. Definitions made in one file override definitions in previous files (the last file in the list has highest precedence). An empty file name (as in ':file', 'file1::file3', or 'file:') will expand to the default personal file. The environment variable HTML2PSPATH is used to specify the directories where to search for these files. (Note: this is only supposed to be used on the command line, not in a configuration file.) .TP .B frame Draw a frame around the text on each page. The default is to not draw a frame. .TP .B grayscale Convert colour images to grayscale images. Note that the PostScript file will be smaller when the images are converted to grayscale. The default is to generate colour images. .TP .B help Show usage information. .TP .B hyphenate Hyphenate the text. This requires TeX hyphenation pattern files. .TP .B scaleimage Scale in-line images with a factor \fInum\fP. The default is 1. .TP .B cookie Enable cookie support, using a netscape formatted cookie \fIfile\fP (requires libwww-perl). .TP .B language Specifies the language of the document (overrides an eventual LANG attribute of the BODY element). The language should be given according to RFC1766 (ftp://ftp.nordu.net/rfc/rfc1766.txt) and ISO 639 (http://www.w3.org/WAI/ER/IG/ert/iso639.htm). .TP .B landscape Generate code for printing in landscape mode. The default is portrait mode. .TP .B scalemath Scale mathematical formulas with a factor \fInum\fP. The default is 1. .TP .B mainchapter Specifies the start number for automatic numbering of headings (by setting the seq-number parameter), the default is 1. .TP .B number Insert page numbers. The default is to not number the pages. .TP .B startno Specifies the starting page number, the default is 1. .TP .B output Write the PostScript code to \fIfile.\fP The default is to write to standard output. .TP .B original Use PostScript original images if they exist. For example, if a document contains an image figure.gif, and an encapsulated PostScript file named figure.ps exists in the same directory, that file will be use instead. This only work for documents read as local files. Note: if the PostScript file is large or contains bitmap images, this must be combined with the -D option. In HTML 4.0 this can be achieved in a much better way with: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP <OBJECT data="figure.ps" type="application/postscript"> .RE .RS .4i .PP <OBJECT data="figure.gif" type="image/gif"> .RE .RS .5i .PP <PRE>[Maybe some ASCII art for text browsers]</PRE> .RE .RS .4i .PP </OBJECT> .RE .RS .3i .PP </OBJECT> .RE .PD .PP .TP .B rootdir When a document is read from a local file, this value specifies a base directory for resolving relative links starting with "/". Typically, this should be the directory where your web server's home page resides. .TP .B xref Insert cross references at every link to within the set of converted documents. .TP .B scaledoc Scale the entire document with a factor \fInum\fP. The default is 1. .TP .B style This option complements/overrides definitions made in the configuration files. The \fIstring\fP must follow the configuration file syntax. (Note: this is only supposed to be used on the command line, not in a configuration file.) .TP .B titlepage Generate a title page. The default is to not generate one. .TP .B text Text mode, ignore images. The default is to include the images. .TP .B underline Underline text that constitutes a hypertext link. The default is to not underline. .TP .B colour Produce colour output for text and background, when specified. The default is black text on white background (mnemonic: coloUr ;-). .TP .B version Print information about the current version of html2ps. .TP .B web Process a web of documents by recursively retrieve and convert documents that are referenced with hyperlinks. When dealing with remote documents it will of course be necessary to impose restrictions, to avoid downloading the entire web... The value should be a string consisting of one of the letters 'a', 'b', 'l', 'r', or 's', optionally combined with a combination of the letters 'p', 'L', and a positive integer: .LP .RS .PD 0 .TP .B a Follow all links. .TP .B b Follow only links to within the same directory, or below, as the start document. .TP .B l Follow only links specified with "<LINK rel=NEXT>" in the document. .TP .B p Prompt for each remote document. This mode will automatically be entered after the first 50 documents. .TP .B r Follow only relative links. .TP .B s Follow only links to within the same server as the start document. .TP .B L With this option, the order in which the documents are processed will be: first all top level documents, then the documents linked to from these etc. For example, if the document A has links to B and C, and B has a link to D, the order will be A-B-C-D. By default, each document will be followed by the first document it links to etc; so the default order for the example is A-B-D-C. .TP .B # A positive integer giving the number of recursive levels. The default is 4 (when the option is present). .RE .PD .PP .TP .B duplex Generate postscript code for single or double sided printing. No default, valid values are: .LP .RS .PD 0 .TP .B 0 Single sided. .TP .B 1 Double sided. .TP .B 2 Double sided, opposite page reversed (tumble mode). .RE .PD .PP .RE .TP The \fImargin\fP block .RS .5i This block is used to specify page margins. The left, right, top and bottom margins, previously defined with this block, should now be defined using the @page construction from CSS2. .TP .B middle An absolute size for the distance between the columns when printing two columns per page, default is 2cm. .RE .TP The \fIxref\fP block .RS .5i At every hyperlink (to within the set of converted documents) it is possible to have a cross reference inserted. The \fIxref\fP block is used to control this function. .TP .B text This defines the cross reference text to be inserted; the symbol $N will expand to the page number, default is "[p $N]". .TP .B passes The number of passes used to insert the cross references. Normally, only one pass is run. But since the insertion of the page numbers may effect the page breaks, it might for large documents with many links be necessary with more than one pass to get the cross references right. The default is 1. .RE .TP The \fIquote\fP block .RS .5i Language specific quotation marks are defined in this block. These quotation marks are used with the HTML 4.01 element Q for short quotations. Quotation marks are predefined for a few languages (English, Swedish, Danish, Norwegian (also Nynorsk and Bokmål), Finnish, Spanish, French, German and Italian). It is possible to define different quotation marks for quotes within quotes. .PP A quotation mark is defined as a string, using the same encoding as the converted document (normally ISO-8859-1), and/or with character entities. Note that quotation mark characters for several languages are not included in ISO-8859-1, and their corresponding character entities were not been defined prior to HTML 4.0. .PP Quotation marks for a language can be defined explicitly in a sub-block of the quote block. One can also identify the set of quotation marks with another previously defined language, using a key-value pair. The sub-block/key name should equal the language code as defined in ISO 639. The language sub-block can have the following key-values: .LP .RS .PD 0 .TP .B open The quote opening character(s). .TP .B close The quote closing character(s). If undefined, it will equal open. .TP .B open2 The quote opening character(s) for quotes within quotes. If undefined, it will equal open. .TP .B close2 The quote closing character(s) for quotes within quotes. If undefined, it will equal close. .RE .PD .PP .PP Example: English and Spanish use the same set of quotation marks - at least according to my book on typography. These (already known to html2ps) are defined with: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP quote { .RE .RS .5i .PP en { .RE .RS .7i .PP open: "&ldquo;"; .PP close: "&rdquo;"; .PP open2: "`"; .PP close2: "'"; .RE .RS .5i .PP } .PP es: en; .RE .RS .3i .PP } .RE .PD .PP .RE .TP The \fItoc\fP block .RS .5i When a table of contents (ToC) is generated from document headings and titles, the appearance is controlled by this block. .TP .B heading A string with HTML code specifying a heading used on the first ToC page. .TP .B level The maximum heading level used for building the ToC. The default is 6, which means that all headings will generate ToC entries. .TP .B indent The ToC entries are indented proportional to the corresponding heading level. This value specifies the size of the indentation. The default is 1em. .RE .TP The \fItitlepage\fP block .RS .5i When a title page is generated, its appearance is controlled by this block. .TP .B content A string with HTML code specifying a heading used on the title page, The default is "<DIV align=center> <H1><BIG>$T</BIG></H1> <H2>$[author]</H2></DIV>". .TP .B margin-top The size of the top margin on the title page, The default is 4cm. .RE .TP The \fIfont\fP block .RS .5i Currently, html2ps recognizes the fonts: Times, New-Century-Schoolbook, Helvetica, Helvetica-Narrow, Palatino, Avantgarde, Bookman, and Courier. To add a new font (family), choose a name (consisting of letters, digits, hyphens, and underscores) for the font. Then define a sub-block to the font block, with the same name as the chosen font name. This block can contain two key-value pairs: .LP .RS .PD 0 .TP .B names A string containing four PostScript font names, separated by whitespace, corresponding to the font styles normal, italic, bold, and bold-italic. If less than four names are given, the first is used for the missing names. Note that PostScript font names are case sensitive. .TP .B files A string of four file names, separated by whitespace, for files containing font definitions for the four font styles as specified above. .RE .PD .PP .PP Example: A font 'myfont' has its four font styles defined in local files. To use this font in all tables in the converted documents, one can use something like: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP TABLE { font-family: myfont } .PD .PP .PD 0 .PP @html2ps { .RE .RS .5i .PP font { .RE .RS .7i .PP myfont { .RE .RS .9i .PP names: "MyFont-Roman MyFont-Italic MyFont-Bold MyFont-BoldItalic"; .PP files: "/x/y/myfr.pfa /x/y/myfi.pfa /x/y/myfb.pfa /x/y/myfbi.pfa"; .RE .RS .7i .PP } .RE .RS .5i .PP } .RE .RS .3i .PP } .RE .PD .PP .RE .TP The \fIhyphenation\fP block .RS .5i Hyphenation pattern files for different languages are specified in sub-blocks within this block. The blocks names should equal the language code as defined in ISO 639. These language blocks can contain the following two key-values: .LP .RS .PD 0 .TP .B file A hyphenation pattern file in TeX format for this language. .TP .B extfile A file containing a list of hyphenation exceptions for this language. The exception file should contain words, separated by whitespaces, with hyphens inserted where hyphenation is allowed, as in: "in-fra-struc-ture white-space". .RE .PD .PP .PP For example, for English (with language code 'en') one can have a block like: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .7i .PP en { .RE .RS .9i .PP file: "/opt/tex/lib/macros/hyphen.tex"; .PP extfile: "/opt/tdb/lib/html2ps/enhyphext"; .RE .RS .7i .PP } .RE .PD .PP .PP The hyphenation block itself can furthermore have these key-values: .TP .B min A positive integer defining the minimum number of letters a word must contain to make it a candidate for hyphenation. The default is 8. .TP .B start A positive integer defining the minimum number of letters that must precede the hyphen when a word is hyphenated. The default is 4. .TP .B end A positive integer defining the minimum number of letters that must follow the hyphen when a word is hyphenated. The default is 3. .RE .TP The \fIheader\fP block .RS .5i This block is used to specify page headers. It is possible to define left, center, and right headers. Different headers for odd and even pages can be specified. Some symbols can be used that will expand to document title, author, date etc. See below. .TP .B left A left aligned header. If the alternate flag in this block is set to 1, this will be the right header on even pages. .TP .B center A centered header. .TP .B right A right aligned header. If the alternate flag in this block is set to 1, this will be the left header on even pages. .TP .B odd-left A left aligned header on odd pages. .TP .B odd-center A centered header on odd pages. .TP .B odd-right A right aligned header on odd pages. .TP .B even-left A left aligned header on even pages. .TP .B even-center A centered header on even pages. .TP .B even-right A right aligned header on even pages. .TP .B font-family The font used for the header, default is Helvetica. .TP .B font-size The font size for the header, default is 8pt. .TP .B font-style The default is "normal". .TP .B font-weight The default is "normal". .TP .B color The header color, default is black. .TP .B alternate A flag indicating whether the headers given by the left and right keys should change place on even pages. Typically used for double sided printing. The default is 1. .RE .TP The \fIfooter\fP block .RS .5i This block is used to specify page footers. It is possible to define left, center, and right footers. Different footers for odd and even pages can be specified. Some symbols can be used that will expand to document title, author, date etc. See below. .TP .B left A left aligned footer. If the alternate flag in this block is set to 1, this will be the right footer on even pages. .TP .B center A centered footer. .TP .B right A right aligned footer. If the alternate flag in this block is set to 1, this will be the left footer on even pages. .TP .B odd-left A left aligned footer on odd pages. .TP .B odd-center A centered footer on odd pages. .TP .B odd-right A right aligned footer on odd pages. .TP .B even-left A left aligned footer on even pages. .TP .B even-center A centered footer on even pages. .TP .B even-right A right aligned footer on even pages. .TP .B font-family The font used for the footer, default is Helvetica. .TP .B font-size The font size for the footer, default is 8pt. .TP .B font-style The default is "normal". .TP .B font-weight The default is "normal". .TP .B color The footer color, default is black. .TP .B alternate A flag indicating whether the footers given by the left and right keys should change place on even pages. Typically used for double sided printing. The default is 1. .RE .TP The \fIframe\fP block .RS .5i The appearance of the optional frame (drawn on each page) is controlled by this block. .TP .B width The width of the frame, default is 0.6pt. .TP .B margin The size of the frame margin, default is 0.5cm. .TP .B color The colour of the frame, default is black. .RE .TP The \fIjustify\fP block .RS .5i This block specifies the maximum amount of extra space inserted between words and letters when text justification is in effect. .TP .B word Maximum amount of extra space inserted between words. The default is 15pt. .TP .B letter Maximum amount of extra space inserted between letters within words. The default is 0pt. .RE .TP The \fIdraft\fP block .RS .5i It is possible to have some text written in a large font diagonally across each page. Typically this is a word, written in a very light colour, indicating that the document is a draft. .TP .B text The text to be printed, default is "DRAFT". .TP .B print A flag specifying whether the draft text should be printed or not. If unspecified, the draft text is printed when the document head contains <META name="Status" content="Draft">. .TP .B dir Specifies print direction, 0=downwards, 1=upwards. .TP .B font-family The default is Helvetica. .TP .B font-style The default is "normal". .TP .B font-weight The default is "bold". .TP .B color The default is "F0F0F0". .RE .TP The \fIcolour\fP block .RS .5i The 16 standard colour names from HTML 4.01 (although their use in HTML elements are now deprecated) are recognized by html2ps. Use this block to extend this list of colours. This is done with key-value pairs, where the key is the colour name, and the value is the colour given as a hexadecimal RGB value, for example: "brown: A52A2A;". .RE .B Key-value pairs in the @html2ps block .TP .B html2psrc The name of the default personal configuration file. The default is $HOME/.html2psrc. .TP .B imgalt Specifies which text should be written as a replacement for in-line images when the IMG element has no ALT attribute. The default is "[IMAGE]". .TP .B datefmt The symbol $D can be used in page headers and footers to insert the current date/time; the value of the datefmt key specifies the format used. The syntax is the same as in the strftime(3) routine. The default is "%e %b %Y %R", which gives a date string like " 7 May 2010 13:22". .TP .B locale The locale (language code) used for formating language dependent parts of the date/time in datefmt. If unspecified, the value is taken from environment variables, see setlocale(3). No default. .TP .B doc-sep A string of HTML code that will be inserted between the documents when more than one are converted. The default is "<!--NewPage-->", which will cause a page break. You may use (almost) any HTML code, for example "<HR><HR>" or "<IMG src=...>". .TP .B ball-radius The radius, given as a relative size, of the balls used in unordered lists. The default is 0.25em. .TP .B numbstyle Page numbering style, 0=arabic, 1=roman. The default is 0. .TP .B showurl When this flag is set to 1, the URL for external links are shown within parentheses after the link. The default is 0. .TP .B seq-number When this flag is set, the headings in the document will be sequentially numbered: H1 headings will be numbered 1, 2,..., H2 headings 1.1, 1.2, etc. The starting number for H1 can be changed using the -M (--mainchapter) option. The default is 0. .TP .B extrapage A flag specifying whether an extra (empty) page should be printed, when necessary, to ensure that the title page, the table of contents, and the document itself will start on odd pages. This is typically desirable for double sided printing. The default is 1. .TP .B break-table A flag specifying if a table should be broken across two pages when it does not fit on the current page, but it does on a page of its own. The default is 0 (avoid breaking tables when possible). .TP .B forms This flag is used to specify whether FORM elements in the document should be processed or ignored. Some forms may be suitable for printing out and be filled out (with a pen), others are not. The default is 1. .TP .B textarea-data When a TEXTAREA element contains prefilled data, the text will be used as labels if this flag is set, otherwise ignored. The default is 0. .TP .B page-break Set this flag to 0 to suppress the normal behavior of generating page breaks from the comment <!--NewPage--> etc, as specified below. The default is 1. .TP .B expand-acronyms A flag specifying whether acronyms, given by the ACRONYM element, should be expanded or not. The default is 0. .TP .B spoof Some web servers return different documents depending on which user agent is used to retrieve the document. You can fool the web server that a certain browser is used, by setting this value to the identification used by the browser, such as "Mozilla/4.0". This only works if you are using one of the Perl packages to retrieve remote documents. .TP .B ssi When this flag is set, some Server Side Includes will be processed when the document is read from a local file. Examples are <!--#include file=...>, <!--#echo var="LAST_MODIFIED">, <!--#config timefmt=...>. The default is 0. .TP .B prefilled This flag controls whether the content of form elements should be rendered or not. That is, when this flag is set, the content of TEXTAREA elements, and the value of the value attribute of text INPUT elements will be shown. Also, checked radio buttons and checkboxes will be marked. The default is 0. .RE .SH SYMBOLS .PP The following symbols can be used on the title page, the page headers/footers, and in the heading for the table of contents: .PP Symbols of the form "$[\fIname\fP]" will expand to the value of the content attribute of META elements, having either of the attributes "name=\fIname\fP" or "http-equiv=\fIname\fP" (case insensitive string matching). For example, when a document containing: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP <META name="expires" content="31 Dec 2011"> .RE .PD .PP .PP is converted, using a configuration file with: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP footer { left: "Expires: $[expires]" } .RE .PD .PP .PP this left footer will be inserted: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP Expires: 31 Dec 2011 .RE .PD .PP .PP In addition, these symbols are defined: .LP .RS .PD 0 .TP .B $T Current document title. .TP .B $A Author of current document, as specified with <META name="Author" content="..."> in the document head. .TP .B $U The URL, or file name, of current document. .TP .B $N Page number. .TP .B $H Current document heading (level 1-3). .TP .B $D Current date/time. The format is given by the datefmt key. .RE .PD .PP .PP So $A is equivalent to $[author], but kept for backwards compatibility. .PP To avoid symbol expansion, precede the dollar sign with a backslash, as in "\\$T". .SH HINTS .PP I imagine that a typical use of configuration files can be something along the following lines. .PP System specific definitions (e.g. specification of available program packages) and global defaults (paper type etc) are defined in the global configuration file. .PP If there is more than one user of the program on the system, each user can also have a personal configuration file with his/hers own personal preferences. (On a single user system one can use the global configuration file for this purpose as well.) .PP One may also develop a collection of configuration files for typical situations. These files are placed in a directory that is searched by html2ps (the search path is defined with the environment variable HTML2PSPATH). For example, to print a document as slides - in landscape mode, with large text in Helvetica, and a thick frame - one can create a configuration file, called 'slides' say, containing: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP @html2ps { .RE .RS .5i .PP option { .RE .RS .7i .PP landscape: 1; .PP frame: 1; .RE .RS .5i .PP } .PP frame { width: 3pt } .RE .RS .3i .PP } .PP BODY { .RE .RS .5i .PP font-family: Helvetica; .PP font-size: 20pt; .RE .RS .3i .PP } .PP H1 { font-size: 35pt } .PP H2 { font-size: 32pt } .PP H3 { font-size: 29pt } .PP H4 { font-size: 26pt } .PP H5 { font-size: 23pt } .PP H6 { font-size: 20pt } .PP PRE { font-size: 18pt } .RE .PD .PP .PP Then use the command: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP html2ps -f slides ... .RE .PD .PP .PP to convert the document. Note that with this command the file 'slides' is used instead of the personal configuration file. If you want both to be used, giving precedence to definitions made in the file 'slides', use the command: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP html2ps -f :slides ... .RE .PD .PP .PP (The page breaks between the slides can for example be generated by adding '<HR class=PAGE-BREAK>' to the HTML document.) .PP For features that are frequently turned on and off, and that cannot be controlled by command line options, it may be a good idea to create small configuration files as "building blocks". For example a file 'A4' for printing on A4 paper (if you have some other default paper type): .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP @html2ps { paper { type: A4 } } .RE .PD .PP .PP and a file 'hnum' for automatic numbering of headings: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP @html2ps { seq-number: 1 } .RE .PD .PP .PP Combining this with the previous example: to convert a document for printing on A4 sized slides with all headings numbered, use the command: .RS .RE .RS .0i .PD .PP .PD 0 .RE .RS .3i .PP html2ps -f :slides:A4:hnum ... .RE .PD .PP .SH SEE ALSO html2ps(1), setlocale(3), strftime(3) .SH VERSION This manpage describes html2ps version 1.0 beta7. .SH AVAILABILITY http://user.it.uu.se/~jan/html2ps.html .SH AUTHOR Jan Karrman (jan@it.uu.se) �������������������������������������������html2ps-1.0b7/install�������������������������������������������������������������������������������0000755�0000162�0017537�00000033330�11370773744�012563� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������: # Use perl eval 'exec perl -S $0 "$@"' if $running_under_some_shell; $vid=107; use File::Copy; $| = 1; %p = ("ImageMagick" => "mogrify", "pbmplus" => "giftoppm", "netpbm" => "giftopnm", "TeX" => "tex", "Ghostscript" => "gs"); %DOS = ('html2ps.html' => 'html2ps.htm', 'html2psrc.5' => 'html2psr.5'); @reqpath = (); die "I am sorry, html2ps requires Perl 5.\n" if($]<5); if(-e '/dev/null') { $pathsep = ':'; $dirsep = '/'; $sys = 'unix'; $prefix = '/usr/local'; } elsif (-e 'nul') { $pathsep = ';'; $dirsep = '\\'; $sys = 'dos'; $prefix = 'C:\Program\html2ps'; $p{Ghostscript} = 'gswin32c'; $ENV{PATH} .= ';C:\Acrobat'; } else { &getval($goon, "n", "\nThis installation script is for Unix and Windows " ."systems, and yours does not\nseem to be one. Do you want to continue " ."anyway?"); die "\n" if($goon=~/^n/i); } @perl = ("Image${dirsep}Magick.pm", "LWP${dirsep}UserAgent.pm"); print <<EOD; This is the installation script for html2ps. To get full functionality, some external program packages need to be installed. You may wish to install these first (see the enclosed documentation for addresses): * For conversion on inline images, any of the packages ImageMagick, pbmplus or netpbm. * To retrieve remote documents you must have libwww-perl. Alternatively, some program like wget or lynx. * To be able to generate cross references and DSC PostScript, you must have Ghostscript installed. * To be able to convert documents using the MATH element from HTML 3.0, you need both TeX and dvips. This script creates a file describing the local configuration. To make this accurate, you should have your search PATH set to include the directories where the abovementioned packages are. You must also have write access to the directories where the files should be placed. EOD &getval($goon, "y", "\nDo you want to proceed with the installation?"); die "\n" if($goon!~/^y/i); print "\n"; for $req (@perl) { print "Searching for $req: "; X:for $dir (@INC) { if(-f "$dir${dirsep}$req") { $module{$req} = 1; print "found ($dir${dirsep}$req)\n"; last X; } } print "not found\n" if(!$module{$req}); } $pack = ""; if(&exist("ImageMagick",1)) { $pack .= " ImageMagick: 1;\n"; $pack .= " PerlMagick: 1;\n" if($module{"Image${dirsep}Magick.pm"}); } elsif(&exist("netpbm",1)) { $pack .= " netpbm: 1;\n"; } elsif(&exist("pbmplus",1)) { $pack .= " pbmplus: 1;\n"; } print <<EOW if(!$pack); Could not find any image conversion package (pbmplus, netpbm or ImageMagick) in your search path. If you want to be able to have inline images (other than XBM images) included in the PostScript code, you must install one of these packages. If you do indeed have any of these packages installed, you will have to edit the configuration file manually, see the documentation for details. EOW for ("djpeg","TeX","dvips","Ghostscript") { if(&exist($_,1)) { $pack .= " $_: 1;\n"; } } if(&exist("weblint",1)) { $pack .= " check: weblint;\n"; } if($module{"LWP${dirsep}UserAgent.pm"}) { $pack .= " libwww-perl: 1;\n"; } else { if(&exist("lynx",0)) { $lynx = 1; $lynxcmd = "lynx -source -mime_header"; $getdef = $lynxcmd; } if(&exist("wget",0)) { $wget = 1; $ugcmd = "wget -s -q -O-"; $getdef = $ugcmd; } $both = $wget && $lynx? " (for example '$ugcmd' or\n'$lynxcmd')": ""; $none = $wget || $lynx? "": ", or press <return> to convert local files only"; &getval($geturl, $getdef, "\nBy default html2ps uses libwww-perl to retrieve remote documents, " ."I cannot\nfind this on your system. You may instead use some command " ."that can retrieve\ndocuments _with_a_complete_MIME_header_$both\.\n" ."Enter such a command$none"); $geturl = "/bin/true" if(!$geturl); $pack .= " geturl: \"$geturl\";\n"; } if(@reqpath) { $pack .= ' path: "'.join($pathsep, @reqpath).'";'; } chop ($cd = `pwd`); &getval($ans, "y", "\nBy default all files will be installed in subdirectories 'bin', 'lib',\n" ."and 'man' in a common directory. Is this OK?"); $def = $ans=~/^y/i; if($def) { &getval($prefix, "$prefix", "\nEnter the name of this directory"); &fixdir($prefix); while(!&goodprefix) { &getval($prefix, "$prefix", "\nEnter a new directory name"); } &makedir($prefix,0); } if($def) { $bindir = "$prefix${dirsep}bin"; } else { &getval($bindir, "$prefix${dirsep}bin", "\nEnter the directory where the html2ps script should be put"); &fixdir($bindir); ($prefix) = $bindir=~m|(.*)\Q$dirsep\E[^\Q$dirsep\E]+|; } &makedir($bindir,$def); if($def) { $glob = "$prefix${dirsep}lib${dirsep}html2ps"; } else { &getval($glob, "$prefix${dirsep}lib${dirsep}html2ps", "\nEnter the the directory where the global configuration file for\n" ."html2ps should be put"); $glob =~ s|/$||g; &fixdir($glob); } &makedir($glob,$def); $repl = "y"; if(-f "$glob${dirsep}html2psrc") { &getval($repl, "y", "\nA file $glob${dirsep}html2psrc already exists, replace?"); } if($def) { $man1 = "$prefix${dirsep}man${dirsep}man1"; } else { &getval($man1, "$prefix${dirsep}man${dirsep}man1", "\nEnter the directory for the html2ps manual page"); &fixdir($man1); } &makedir($man1,$def); if($def) { $man5 = "$prefix${dirsep}man${dirsep}man5"; } else { &getval($man5, "$prefix${dirsep}man${dirsep}man5", "\nEnter the directory for the manual page describing the configuration\n" ."file format for html2ps"); &fixdir($man5); } &makedir($man5,$def); $ht = "\nTo use the automatic hyphenation feature, hyphenation pattern files\n" ."from the TeX distribution are needed."; $cophy = 1; if($exist{'TeX'}) { $hfile = ""; ($texdir = $dir{'TeX'}) =~ s|/bin$||; SW:for("texmf/tex/generic/hyphen","macros","inputs","lib/macros", "lib/inputs","lib/tex/macros","lib/tex/inputs") { if(-f "$texdir/$_/ushyph1.tex") { $hyph = "$texdir/$_"; $hfile = "$hyph/ushyph1.tex"; last SW; } if(-f "$texdir/$_/hyphen.tex") { $hyph = "$texdir/$_"; $hfile = "$hyph/hyphen.tex"; last SW; } } if($hfile) { &getval($hdef, "y", "$ht I believe that I have found\nthe pattern " ."file for English in your TeX installation:\n\n " ."$hfile\n\nWould you like to use this instead of the " ."file included with html2ps?"); if($hdef=~/^y/i) { $cophy = 0; } else { $hfile = ""; } } else { &getval($hfile, "", "$ht I cannot find the pattern\nfile for English " ."in your TeX installation. (It should be called\n'hyphen.tex', " ."or perhaps 'ushyph1.tex', somewhere in the directory\ntree " ."'$texdir'.)\n\nIf you know where this file is and want to use it " ."instead of the\nfile included with html2ps, enter the full path " ."name for this file,\notherwise press <return>"); while($hfile && !-f $hfile) { &getval($hfile, "", "\nNo such file: $hfile\nEnter new name, or " ."press <return> to use the supplied file"); } $cophy = $hfile !~ /\S/; } if(!$hfile) { if($def) { $hyph = "$prefix${dirsep}lib${dirsep}html2ps"; } else { &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps", "\nOK, I will use the supplied pattern file for English. Enter " ."the directory\nwhere this file should be put"); &fixdir($hyph); } } } else { if($def) { $hyph = "$prefix${dirsep}lib${dirsep}html2ps"; } else { &getval($hyph, "$prefix${dirsep}lib${dirsep}html2ps", "$ht A pattern file for English is\n" ."included with html2ps (see the documentation how to install pattern\n" ."files for other languages). Enter the directory where this file\n" ."should be put"); } } if($cophy) { &makedir($hyph,0); $hfile = "$hyph${dirsep}hyphen.tex"; } if($def) { $html = "$prefix${dirsep}lib${dirsep}html2ps"; } else { &getval($html, "$prefix${dirsep}lib${dirsep}html2ps", "\nEnter a directory where to put the HTML document describing\nhtml2ps"); &fixdir($html); } &makedir($html,$def); $paper = ""; &getval($format, "A4", "\nEnter the default paper type, possible choices are:\nA0, A1, A2, A3, A4," ." A5, A6, A7, A8, A9, A10,\nB0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10,\n" ."letter, legal, arche, archd, archc, archb, archa,\nflsa, flse, halfletter," ." 11x17, ledger, other"); if($format !~ /^other$/i) { $paper .= " type: $format;"; } else { &getval($height, "", "\nDefault paper height i centimeters (1 inch = 2.54 centimeters)"); &getval($width, "", "\nDefault paper width i centimeters"); $paper .= " height: $height;\n"; $paper .= " width: $width;"; } open(RC,">html2psrc") || die "*** Error opening html2psrc\n"; print RC "/* Global configuration file for html2ps */\n\n" ."\@html2ps {\n package {\n$pack\n }\n paper {\n$paper\n }\n" ." hyphenation {\n en {\n file: \"$hfile\";\n }\n }\n}\n"; close RC; undef $/; open(HTML2PS,"html2ps") || die "*** Error opening html2ps\n"; ($code = <HTML2PS>) =~ s|\$globrc=.*|\$globrc='$glob${dirsep}html2psrc';|; $code =~ s/exec \S+/exec $^X/; $code =~ s|\$ug=.*|\$ug='$html${dirsep}html2ps.html';|; close HTML2PS; open(HTML2PS,">html2ps") || die "*** Error opening html2ps\n"; print HTML2PS $code; close HTML2PS; chmod 0755, "html2ps"; $files = <<EOF; .TP $glob/html2psrc Global configuration file. See html2psrc(5). .TP \$HOME/.html2psrc User configuration file. See html2psrc(5). .TP $html/html2ps.html Documentation for html2ps. EOF open(MAN1,"html2ps.1") || die "*** Error opening html2ps.1\n"; ($code = <MAN1>) =~ s|(\.SH FILES)[\w\W]*(\.SH SEE ALSO)|$1\n$files$2|; close MAN1; open(MAN1,">html2ps.1") || die "*** Error opening html2ps.1\n"; print MAN1 $code; close MAN1; $odir = "oldfiles.$vid"; $saved = -f "backout.dat"; print "\n"; &inst($bindir,"html2ps"); if(!$saved && -f "$glob${dirsep}html2psrc") { $backout .= "html2psrc $glob\n"; copy "$glob${dirsep}html2psrc" => $odir or die "*** Cannot write to $odir\n"; } if($repl=~/^y/i) { print "Installing html2psrc in $glob\n"; copy 'html2psrc' => $glob or die "*** Cannot write to $glob\n"; } &inst($man1,"html2ps.1"); &inst($man5,"html2psrc.5"); if($cophy) { print "Installing hyphen.tex in $hyph\n"; copy 'hyphen.tex' => $hyph or die "*** Cannot write to $hyph\n"; } &inst($html,"html2ps.html"); if(!$saved && $backout) { open(BACKOUT,">backout.dat") || die "*** Error opening backout\n"; print BACKOUT "$odir\n$backout"; close BACKOUT; } if(-d $odir) { print "\nIf you are not satisfied with this version of html2ps; you can " ."execute\nthe script 'backout' to reinstall your earlier version.\n"; } if($repl!~/^y/i) { print "\nA new global configuration file 'html2psrc' has been created in " ."the current\ndirectory. You can compare this with your old " ."configuration file to see if\nany changes need to be done.\n"; } print "\nTesting the installation.\n" ."Converting the documentation file 'html2ps.html', using the configuration" ."\nfile 'sample'. The output will be written to 'html2ps.ps'.\n"; chmod 0755, "$bindir${dirsep}html2ps"; print `perl $bindir${dirsep}html2ps -T -f sample -o html2ps.ps $html${dirsep}html2ps.html`; print $?? "Something went wrong...\n": "\nInstallation completed.\nYou may now try to print the file " ."'html2ps.ps' (a users guide on about\n30 pages) in the current " ."directory.\n"; sub exist { local($package,$flag) = @_; $program = $p{$package}? $p{$package}: $package; print "Searching for $package: "; for $dir (split(/\Q$pathsep/,$ENV{PATH})) { if(-f "$dir$dirsep$program" || -f "$dir$dirsep$program.exe") { $exist{$package} = 1; $dir{$package} = $dir; print "found ($dir$dirsep$program)\n"; push(@reqpath,$dir) if(!grep(/^$dir$/,@reqpath) && $flag); $dir = $dir; return 1; } } print "not found\n"; 0; } sub makedir { while(!-d $_[0]) { $cre = "n"; while(!-d $_[0] && !$_[1] && $cre!~/^(y|$)/i) { &getval($cre, "y", "\nDirectory $_[0] does not exist, create?"); &getval($_[0], "", "\nEnter new directory name") if($cre!~/^y/i); die "*** Configuration aborted\n" if($_[0] eq ""); } S: while($_[0]=~/\Q$dirsep\E|$/g) { if($` && !-d $`) { if(mkdir($`, 0755)) { print "Created directory $`\n"; } else { print "*** Error creating directory $`: $!\n"; &getval($_[0], "", "\nEnter new directory name"); die "*** Configuration aborted\n" if($_[0] eq ""); last S; } } } } } sub fixdir { $_[0] = "$cd/$_[0]" if($_[0]!~/^\// && $dirsep eq '/'); while($_[0]=~m|[^/]*/\.\./|) {$_[0] = $`.$'}; $_[0] =~ s|/\./|/|g; } sub getval { $text = $_[1]? "$_[2] [$_[1]]": $_[2]; print "$text: "; ($_[0] = <STDIN>) =~ s/^\s+|[\/\s]+$//g; $_[0] = $_[1] if(!$_[0]); } sub inst { if(!$saved && -f $_[0].$dirsep.$_[1]) { mkdir($odir,0755) || die "*** Error creating $odir\n" if(!-d $odir); $backout .= "$_[1] $_[0]\n"; copy $_[0].$dirsep.$_[1] => $odir or die "*** Cannot write to $odir\n"; } $from = -e $_[1]? $_[1]: $DOS{$_[1]}; print "Installing $from in $_[0]\n"; copy $from => $_[0].$dirsep.$_[1] or die "*** Cannot write to $_[0]\n"; } sub goodprefix { for ($prefix, "$prefix${dirsep}bin", "$prefix${dirsep}lib", "$prefix${dirsep}man") { if (-d $_ && !-w $_) { print "*** Cannot write to directory $_\n"; return 0; } } 1; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/sample��������������������������������������������������������������������������������0000644�0000162�0017537�00000003201�11370773744�012365� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* This is a sample configuration file for html2ps. You may try using this to convert the documentation file that comes with html2ps (html2ps.html). Issue the command: html2ps -f sample -o html2ps.ps html2ps.html This should create a PostScript file html2ps.ps formatted based on the information below. */ @html2ps { header { /* Running page header */ odd-left: $T; /* Document title */ odd-right: $H; /* Current main heading */ even-left: $H; /* Ditto */ even-right: "$[author]"; /* Document author (from <META NAME="Author"...>) */ } footer { /* Running page footer */ center: "- $N -"; /* Page number */ } option { toc: h; /* Generate a table of contents, based on headings */ titlepage: 1; /* Generate a title page */ hyphenate: 1; } titlepage { /* The title page content: document title, author and creation date */ content: "<DIV align=center><H1><BIG>$T</BIG></H1> <H2>$[author]</H2>$[created]"; } showurl: 1; /* Show URL:s for external links */ seq-number: 1; /* Automatic numbering of headings */ } /* Standard style sheet definitions */ P { text-align: justify } H1, H2, H3, H4, H5, H6 { font-family: Helvetica; font-weight: bold } H1 { font-size: 19pt; text-align: center } H3, H5 { font-style: oblique } H2, H3 { font-size: 16pt } H4, H5 { font-size: 13pt } H6 { font-size: 11pt } ADDRESS { text-align: right } @page:left { margin-left: 2cm; margin-right: 3cm; } @page:right { margin-left: 3cm; margin-right: 2cm; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/hyphen.tex����������������������������������������������������������������������������0000644�0000162�0017537�00000066023�11370774453�013207� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% The Plain TeX hyphenation tables [NOT TO BE CHANGED IN ANY WAY!] \patterns{ % just type <return> if you're not using INITEX .ach4 .ad4der .af1t .al3t .am5at .an5c .ang4 .ani5m .ant4 .an3te .anti5s .ar5s .ar4tie .ar4ty .as3c .as1p .as1s .aster5 .atom5 .au1d .av4i .awn4 .ba4g .ba5na .bas4e .ber4 .be5ra .be3sm .be5sto .bri2 .but4ti .cam4pe .can5c .capa5b .car5ol .ca4t .ce4la .ch4 .chill5i .ci2 .cit5r .co3e .co4r .cor5ner .de4moi .de3o .de3ra .de3ri .des4c .dictio5 .do4t .du4c .dumb5 .earth5 .eas3i .eb4 .eer4 .eg2 .el5d .el3em .enam3 .en3g .en3s .eq5ui5t .er4ri .es3 .eu3 .eye5 .fes3 .for5mer .ga2 .ge2 .gen3t4 .ge5og .gi5a .gi4b .go4r .hand5i .han5k .he2 .hero5i .hes3 .het3 .hi3b .hi3er .hon5ey .hon3o .hov5 .id4l .idol3 .im3m .im5pin .in1 .in3ci .ine2 .in2k .in3s .ir5r .is4i .ju3r .la4cy .la4m .lat5er .lath5 .le2 .leg5e .len4 .lep5 .lev1 .li4g .lig5a .li2n .li3o .li4t .mag5a5 .mal5o .man5a .mar5ti .me2 .mer3c .me5ter .mis1 .mist5i .mon3e .mo3ro .mu5ta .muta5b .ni4c .od2 .odd5 .of5te .or5ato .or3c .or1d .or3t .os3 .os4tl .oth3 .out3 .ped5al .pe5te .pe5tit .pi4e .pio5n .pi2t .pre3m .ra4c .ran4t .ratio5na .ree2 .re5mit .res2 .re5stat .ri4g .rit5u .ro4q .ros5t .row5d .ru4d .sci3e .self5 .sell5 .se2n .se5rie .sh2 .si2 .sing4 .st4 .sta5bl .sy2 .ta4 .te4 .ten5an .th2 .ti2 .til4 .tim5o5 .ting4 .tin5k .ton4a .to4p .top5i .tou5s .trib5ut .un1a .un3ce .under5 .un1e .un5k .un5o .un3u .up3 .ure3 .us5a .ven4de .ve5ra .wil5i .ye4 4ab. a5bal a5ban abe2 ab5erd abi5a ab5it5ab ab5lat ab5o5liz 4abr ab5rog ab3ul a4car ac5ard ac5aro a5ceou ac1er a5chet 4a2ci a3cie ac1in a3cio ac5rob act5if ac3ul ac4um a2d ad4din ad5er. 2adi a3dia ad3ica adi4er a3dio a3dit a5diu ad4le ad3ow ad5ran ad4su 4adu a3duc ad5um ae4r aeri4e a2f aff4 a4gab aga4n ag5ell age4o 4ageu ag1i 4ag4l ag1n a2go 3agog ag3oni a5guer ag5ul a4gy a3ha a3he ah4l a3ho ai2 a5ia a3ic. ai5ly a4i4n ain5in ain5o ait5en a1j ak1en al5ab al3ad a4lar 4aldi 2ale al3end a4lenti a5le5o al1i al4ia. ali4e al5lev 4allic 4alm a5log. a4ly. 4alys 5a5lyst 5alyt 3alyz 4ama am5ab am3ag ama5ra am5asc a4matis a4m5ato am5era am3ic am5if am5ily am1in ami4no a2mo a5mon amor5i amp5en a2n an3age 3analy a3nar an3arc anar4i a3nati 4and ande4s an3dis an1dl an4dow a5nee a3nen an5est. a3neu 2ang ang5ie an1gl a4n1ic a3nies an3i3f an4ime a5nimi a5nine an3io a3nip an3ish an3it a3niu an4kli 5anniz ano4 an5ot anoth5 an2sa an4sco an4sn an2sp ans3po an4st an4sur antal4 an4tie 4anto an2tr an4tw an3ua an3ul a5nur 4ao apar4 ap5at ap5ero a3pher 4aphi a4pilla ap5illar ap3in ap3ita a3pitu a2pl apoc5 ap5ola apor5i apos3t aps5es a3pu aque5 2a2r ar3act a5rade ar5adis ar3al a5ramete aran4g ara3p ar4at a5ratio ar5ativ a5rau ar5av4 araw4 arbal4 ar4chan ar5dine ar4dr ar5eas a3ree ar3ent a5ress ar4fi ar4fl ar1i ar5ial ar3ian a3riet ar4im ar5inat ar3io ar2iz ar2mi ar5o5d a5roni a3roo ar2p ar3q arre4 ar4sa ar2sh 4as. as4ab as3ant ashi4 a5sia. a3sib a3sic 5a5si4t ask3i as4l a4soc as5ph as4sh as3ten as1tr asur5a a2ta at3abl at5ac at3alo at5ap ate5c at5ech at3ego at3en. at3era ater5n a5terna at3est at5ev 4ath ath5em a5then at4ho ath5om 4ati. a5tia at5i5b at1ic at3if ation5ar at3itu a4tog a2tom at5omiz a4top a4tos a1tr at5rop at4sk at4tag at5te at4th a2tu at5ua at5ue at3ul at3ura a2ty au4b augh3 au3gu au4l2 aun5d au3r au5sib aut5en au1th a2va av3ag a5van ave4no av3era av5ern av5ery av1i avi4er av3ig av5oc a1vor 3away aw3i aw4ly aws4 ax4ic ax4id ay5al aye4 ays4 azi4er azz5i 5ba. bad5ger ba4ge bal1a ban5dag ban4e ban3i barbi5 bari4a bas4si 1bat ba4z 2b1b b2be b3ber bbi4na 4b1d 4be. beak4 beat3 4be2d be3da be3de be3di be3gi be5gu 1bel be1li be3lo 4be5m be5nig be5nu 4bes4 be3sp be5str 3bet bet5iz be5tr be3tw be3w be5yo 2bf 4b3h bi2b bi4d 3bie bi5en bi4er 2b3if 1bil bi3liz bina5r4 bin4d bi5net bi3ogr bi5ou bi2t 3bi3tio bi3tr 3bit5ua b5itz b1j bk4 b2l2 blath5 b4le. blen4 5blesp b3lis b4lo blun4t 4b1m 4b3n bne5g 3bod bod3i bo4e bol3ic bom4bi bon4a bon5at 3boo 5bor. 4b1ora bor5d 5bore 5bori 5bos4 b5ota both5 bo4to bound3 4bp 4brit broth3 2b5s2 bsor4 2bt bt4l b4to b3tr buf4fer bu4ga bu3li bumi4 bu4n bunt4i bu3re bus5ie buss4e 5bust 4buta 3butio b5uto b1v 4b5w 5by. bys4 1ca cab3in ca1bl cach4 ca5den 4cag4 2c5ah ca3lat cal4la call5in 4calo can5d can4e can4ic can5is can3iz can4ty cany4 ca5per car5om cast5er cas5tig 4casy ca4th 4cativ cav5al c3c ccha5 cci4a ccompa5 ccon4 ccou3t 2ce. 4ced. 4ceden 3cei 5cel. 3cell 1cen 3cenc 2cen4e 4ceni 3cent 3cep ce5ram 4cesa 3cessi ces5si5b ces5t cet4 c5e4ta cew4 2ch 4ch. 4ch3ab 5chanic ch5a5nis che2 cheap3 4ched che5lo 3chemi ch5ene ch3er. ch3ers 4ch1in 5chine. ch5iness 5chini 5chio 3chit chi2z 3cho2 ch4ti 1ci 3cia ci2a5b cia5r ci5c 4cier 5cific. 4cii ci4la 3cili 2cim 2cin c4ina 3cinat cin3em c1ing c5ing. 5cino cion4 4cipe ci3ph 4cipic 4cista 4cisti 2c1it cit3iz 5ciz ck1 ck3i 1c4l4 4clar c5laratio 5clare cle4m 4clic clim4 cly4 c5n 1co co5ag coe2 2cog co4gr coi4 co3inc col5i 5colo col3or com5er con4a c4one con3g con5t co3pa cop3ic co4pl 4corb coro3n cos4e cov1 cove4 cow5a coz5e co5zi c1q cras5t 5crat. 5cratic cre3at 5cred 4c3reta cre4v cri2 cri5f c4rin cris4 5criti cro4pl crop5o cros4e cru4d 4c3s2 2c1t cta4b ct5ang c5tant c2te c3ter c4ticu ctim3i ctu4r c4tw cud5 c4uf c4ui cu5ity 5culi cul4tis 3cultu cu2ma c3ume cu4mi 3cun cu3pi cu5py cur5a4b cu5ria 1cus cuss4i 3c4ut cu4tie 4c5utiv 4cutr 1cy cze4 1d2a 5da. 2d3a4b dach4 4daf 2dag da2m2 dan3g dard5 dark5 4dary 3dat 4dativ 4dato 5dav4 dav5e 5day d1b d5c d1d4 2de. deaf5 deb5it de4bon decan4 de4cil de5com 2d1ed 4dee. de5if deli4e del5i5q de5lo d4em 5dem. 3demic dem5ic. de5mil de4mons demor5 1den de4nar de3no denti5f de3nu de1p de3pa depi4 de2pu d3eq d4erh 5derm dern5iz der5s des2 d2es. de1sc de2s5o des3ti de3str de4su de1t de2to de1v dev3il 4dey 4d1f d4ga d3ge4t dg1i d2gy d1h2 5di. 1d4i3a dia5b di4cam d4ice 3dict 3did 5di3en d1if di3ge di4lato d1in 1dina 3dine. 5dini di5niz 1dio dio5g di4pl dir2 di1re dirt5i dis1 5disi d4is3t d2iti 1di1v d1j d5k2 4d5la 3dle. 3dled 3dles. 4dless 2d3lo 4d5lu 2dly d1m 4d1n4 1do 3do. do5de 5doe 2d5of d4og do4la doli4 do5lor dom5iz do3nat doni4 doo3d dop4p d4or 3dos 4d5out do4v 3dox d1p 1dr drag5on 4drai dre4 drea5r 5dren dri4b dril4 dro4p 4drow 5drupli 4dry 2d1s2 ds4p d4sw d4sy d2th 1du d1u1a du2c d1uca duc5er 4duct. 4ducts du5el du4g d3ule dum4be du4n 4dup du4pe d1v d1w d2y 5dyn dy4se dys5p e1a4b e3act ead1 ead5ie ea4ge ea5ger ea4l eal5er eal3ou eam3er e5and ear3a ear4c ear5es ear4ic ear4il ear5k ear2t eart3e ea5sp e3ass east3 ea2t eat5en eath3i e5atif e4a3tu ea2v eav3en eav5i eav5o 2e1b e4bel. e4bels e4ben e4bit e3br e4cad ecan5c ecca5 e1ce ec5essa ec2i e4cib ec5ificat ec5ifie ec5ify ec3im eci4t e5cite e4clam e4clus e2col e4comm e4compe e4conc e2cor ec3ora eco5ro e1cr e4crem ec4tan ec4te e1cu e4cul ec3ula 2e2da 4ed3d e4d1er ede4s 4edi e3dia ed3ib ed3ica ed3im ed1it edi5z 4edo e4dol edon2 e4dri e4dul ed5ulo ee2c eed3i ee2f eel3i ee4ly ee2m ee4na ee4p1 ee2s4 eest4 ee4ty e5ex e1f e4f3ere 1eff e4fic 5efici efil4 e3fine ef5i5nite 3efit efor5es e4fuse. 4egal eger4 eg5ib eg4ic eg5ing e5git5 eg5n e4go. e4gos eg1ul e5gur 5egy e1h4 eher4 ei2 e5ic ei5d eig2 ei5gl e3imb e3inf e1ing e5inst eir4d eit3e ei3th e5ity e1j e4jud ej5udi eki4n ek4la e1la e4la. e4lac elan4d el5ativ e4law elaxa4 e3lea el5ebra 5elec e4led el3ega e5len e4l1er e1les el2f el2i e3libe e4l5ic. el3ica e3lier el5igib e5lim e4l3ing e3lio e2lis el5ish e3liv3 4ella el4lab ello4 e5loc el5og el3op. el2sh el4ta e5lud el5ug e4mac e4mag e5man em5ana em5b e1me e2mel e4met em3ica emi4e em5igra em1in2 em5ine em3i3ni e4mis em5ish e5miss em3iz 5emniz emo4g emoni5o em3pi e4mul em5ula emu3n e3my en5amo e4nant ench4er en3dic e5nea e5nee en3em en5ero en5esi en5est en3etr e3new en5ics e5nie e5nil e3nio en3ish en3it e5niu 5eniz 4enn 4eno eno4g e4nos en3ov en4sw ent5age 4enthes en3ua en5uf e3ny. 4en3z e5of eo2g e4oi4 e3ol eop3ar e1or eo3re eo5rol eos4 e4ot eo4to e5out e5ow e2pa e3pai ep5anc e5pel e3pent ep5etitio ephe4 e4pli e1po e4prec ep5reca e4pred ep3reh e3pro e4prob ep4sh ep5ti5b e4put ep5uta e1q equi3l e4q3ui3s er1a era4b 4erand er3ar 4erati. 2erb er4bl er3ch er4che 2ere. e3real ere5co ere3in er5el. er3emo er5ena er5ence 4erene er3ent ere4q er5ess er3est eret4 er1h er1i e1ria4 5erick e3rien eri4er er3ine e1rio 4erit er4iu eri4v e4riva er3m4 er4nis 4ernit 5erniz er3no 2ero er5ob e5roc ero4r er1ou er1s er3set ert3er 4ertl er3tw 4eru eru4t 5erwau e1s4a e4sage. e4sages es2c e2sca es5can e3scr es5cu e1s2e e2sec es5ecr es5enc e4sert. e4serts e4serva 4esh e3sha esh5en e1si e2sic e2sid es5iden es5igna e2s5im es4i4n esis4te esi4u e5skin es4mi e2sol es3olu e2son es5ona e1sp es3per es5pira es4pre 2ess es4si4b estan4 es3tig es5tim 4es2to e3ston 2estr e5stro estruc5 e2sur es5urr es4w eta4b eten4d e3teo ethod3 et1ic e5tide etin4 eti4no e5tir e5titio et5itiv 4etn et5ona e3tra e3tre et3ric et5rif et3rog et5ros et3ua et5ym et5z 4eu e5un e3up eu3ro eus4 eute4 euti5l eu5tr eva2p5 e2vas ev5ast e5vea ev3ell evel3o e5veng even4i ev1er e5verb e1vi ev3id evi4l e4vin evi4v e5voc e5vu e1wa e4wag e5wee e3wh ewil5 ew3ing e3wit 1exp 5eyc 5eye. eys4 1fa fa3bl fab3r fa4ce 4fag fain4 fall5e 4fa4ma fam5is 5far far5th fa3ta fa3the 4fato fault5 4f5b 4fd 4fe. feas4 feath3 fe4b 4feca 5fect 2fed fe3li fe4mo fen2d fend5e fer1 5ferr fev4 4f1f f4fes f4fie f5fin. f2f5is f4fly f2fy 4fh 1fi fi3a 2f3ic. 4f3ical f3ican 4ficate f3icen fi3cer fic4i 5ficia 5ficie 4fics fi3cu fi5del fight5 fil5i fill5in 4fily 2fin 5fina fin2d5 fi2ne f1in3g fin4n fis4ti f4l2 f5less flin4 flo3re f2ly5 4fm 4fn 1fo 5fon fon4de fon4t fo2r fo5rat for5ay fore5t for4i fort5a fos5 4f5p fra4t f5rea fres5c fri2 fril4 frol5 2f3s 2ft f4to f2ty 3fu fu5el 4fug fu4min fu5ne fu3ri fusi4 fus4s 4futa 1fy 1ga gaf4 5gal. 3gali ga3lo 2gam ga5met g5amo gan5is ga3niz gani5za 4gano gar5n4 gass4 gath3 4gativ 4gaz g3b gd4 2ge. 2ged geez4 gel4in ge5lis ge5liz 4gely 1gen ge4nat ge5niz 4geno 4geny 1geo ge3om g4ery 5gesi geth5 4geto ge4ty ge4v 4g1g2 g2ge g3ger gglu5 ggo4 gh3in gh5out gh4to 5gi. 1gi4a gia5r g1ic 5gicia g4ico gien5 5gies. gil4 g3imen 3g4in. gin5ge 5g4ins 5gio 3gir gir4l g3isl gi4u 5giv 3giz gl2 gla4 glad5i 5glas 1gle gli4b g3lig 3glo glo3r g1m g4my gn4a g4na. gnet4t g1ni g2nin g4nio g1no g4non 1go 3go. gob5 5goe 3g4o4g go3is gon2 4g3o3na gondo5 go3ni 5goo go5riz gor5ou 5gos. gov1 g3p 1gr 4grada g4rai gran2 5graph. g5rapher 5graphic 4graphy 4gray gre4n 4gress. 4grit g4ro gruf4 gs2 g5ste gth3 gu4a 3guard 2gue 5gui5t 3gun 3gus 4gu4t g3w 1gy 2g5y3n gy5ra h3ab4l hach4 hae4m hae4t h5agu ha3la hala3m ha4m han4ci han4cy 5hand. han4g hang5er hang5o h5a5niz han4k han4te hap3l hap5t ha3ran ha5ras har2d hard3e har4le harp5en har5ter has5s haun4 5haz haz3a h1b 1head 3hear he4can h5ecat h4ed he5do5 he3l4i hel4lis hel4ly h5elo hem4p he2n hena4 hen5at heo5r hep5 h4era hera3p her4ba here5a h3ern h5erou h3ery h1es he2s5p he4t het4ed heu4 h1f h1h hi5an hi4co high5 h4il2 himer4 h4ina hion4e hi4p hir4l hi3ro hir4p hir4r his3el his4s hith5er hi2v 4hk 4h1l4 hlan4 h2lo hlo3ri 4h1m hmet4 2h1n h5odiz h5ods ho4g hoge4 hol5ar 3hol4e ho4ma home3 hon4a ho5ny 3hood hoon4 hor5at ho5ris hort3e ho5ru hos4e ho5sen hos1p 1hous house3 hov5el 4h5p 4hr4 hree5 hro5niz hro3po 4h1s2 h4sh h4tar ht1en ht5es h4ty hu4g hu4min hun5ke hun4t hus3t4 hu4t h1w h4wart hy3pe hy3ph hy2s 2i1a i2al iam4 iam5ete i2an 4ianc ian3i 4ian4t ia5pe iass4 i4ativ ia4tric i4atu ibe4 ib3era ib5ert ib5ia ib3in ib5it. ib5ite i1bl ib3li i5bo i1br i2b5ri i5bun 4icam 5icap 4icar i4car. i4cara icas5 i4cay iccu4 4iceo 4ich 2ici i5cid ic5ina i2cip ic3ipa i4cly i2c5oc 4i1cr 5icra i4cry ic4te ictu2 ic4t3ua ic3ula ic4um ic5uo i3cur 2id i4dai id5anc id5d ide3al ide4s i2di id5ian idi4ar i5die id3io idi5ou id1it id5iu i3dle i4dom id3ow i4dr i2du id5uo 2ie4 ied4e 5ie5ga ield3 ien5a4 ien4e i5enn i3enti i1er. i3esc i1est i3et 4if. if5ero iff5en if4fr 4ific. i3fie i3fl 4ift 2ig iga5b ig3era ight3i 4igi i3gib ig3il ig3in ig3it i4g4l i2go ig3or ig5ot i5gre igu5i ig1ur i3h 4i5i4 i3j 4ik i1la il3a4b i4lade i2l5am ila5ra i3leg il1er ilev4 il5f il1i il3ia il2ib il3io il4ist 2ilit il2iz ill5ab 4iln il3oq il4ty il5ur il3v i4mag im3age ima5ry imenta5r 4imet im1i im5ida imi5le i5mini 4imit im4ni i3mon i2mu im3ula 2in. i4n3au 4inav incel4 in3cer 4ind in5dling 2ine i3nee iner4ar i5ness 4inga 4inge in5gen 4ingi in5gling 4ingo 4ingu 2ini i5ni. i4nia in3io in1is i5nite. 5initio in3ity 4ink 4inl 2inn 2i1no i4no4c ino4s i4not 2ins in3se insur5a 2int. 2in4th in1u i5nus 4iny 2io 4io. ioge4 io2gr i1ol io4m ion3at ion4ery ion3i io5ph ior3i i4os io5th i5oti io4to i4our 2ip ipe4 iphras4 ip3i ip4ic ip4re4 ip3ul i3qua iq5uef iq3uid iq3ui3t 4ir i1ra ira4b i4rac ird5e ire4de i4ref i4rel4 i4res ir5gi ir1i iri5de ir4is iri3tu 5i5r2iz ir4min iro4g 5iron. ir5ul 2is. is5ag is3ar isas5 2is1c is3ch 4ise is3er 3isf is5han is3hon ish5op is3ib isi4d i5sis is5itiv 4is4k islan4 4isms i2so iso5mer is1p is2pi is4py 4is1s is4sal issen4 is4ses is4ta. is1te is1ti ist4ly 4istral i2su is5us 4ita. ita4bi i4tag 4ita5m i3tan i3tat 2ite it3era i5teri it4es 2ith i1ti 4itia 4i2tic it3ica 5i5tick it3ig it5ill i2tim 2itio 4itis i4tism i2t5o5m 4iton i4tram it5ry 4itt it3uat i5tud it3ul 4itz. i1u 2iv iv3ell iv3en. i4v3er. i4vers. iv5il. iv5io iv1it i5vore iv3o3ro i4v3ot 4i5w ix4o 4iy 4izar izi4 5izont 5ja jac4q ja4p 1je jer5s 4jestie 4jesty jew3 jo4p 5judg 3ka. k3ab k5ag kais4 kal4 k1b k2ed 1kee ke4g ke5li k3en4d k1er kes4 k3est. ke4ty k3f kh4 k1i 5ki. 5k2ic k4ill kilo5 k4im k4in. kin4de k5iness kin4g ki4p kis4 k5ish kk4 k1l 4kley 4kly k1m k5nes 1k2no ko5r kosh4 k3ou kro5n 4k1s2 k4sc ks4l k4sy k5t k1w lab3ic l4abo laci4 l4ade la3dy lag4n lam3o 3land lan4dl lan5et lan4te lar4g lar3i las4e la5tan 4lateli 4lativ 4lav la4v4a 2l1b lbin4 4l1c2 lce4 l3ci 2ld l2de ld4ere ld4eri ldi4 ld5is l3dr l4dri le2a le4bi left5 5leg. 5legg le4mat lem5atic 4len. 3lenc 5lene. 1lent le3ph le4pr lera5b ler4e 3lerg 3l4eri l4ero les2 le5sco 5lesq 3less 5less. l3eva lev4er. lev4era lev4ers 3ley 4leye 2lf l5fr 4l1g4 l5ga lgar3 l4ges lgo3 2l3h li4ag li2am liar5iz li4as li4ato li5bi 5licio li4cor 4lics 4lict. l4icu l3icy l3ida lid5er 3lidi lif3er l4iff li4fl 5ligate 3ligh li4gra 3lik 4l4i4l lim4bl lim3i li4mo l4im4p l4ina 1l4ine lin3ea lin3i link5er li5og 4l4iq lis4p l1it l2it. 5litica l5i5tics liv3er l1iz 4lj lka3 l3kal lka4t l1l l4law l2le l5lea l3lec l3leg l3lel l3le4n l3le4t ll2i l2lin4 l5lina ll4o lloqui5 ll5out l5low 2lm l5met lm3ing l4mod lmon4 2l1n2 3lo. lob5al lo4ci 4lof 3logic l5ogo 3logu lom3er 5long lon4i l3o3niz lood5 5lope. lop3i l3opm lora4 lo4rato lo5rie lor5ou 5los. los5et 5losophiz 5losophy los4t lo4ta loun5d 2lout 4lov 2lp lpa5b l3pha l5phi lp5ing l3pit l4pl l5pr 4l1r 2l1s2 l4sc l2se l4sie 4lt lt5ag ltane5 l1te lten4 ltera4 lth3i l5ties. ltis4 l1tr ltu2 ltur3a lu5a lu3br luch4 lu3ci lu3en luf4 lu5id lu4ma 5lumi l5umn. 5lumnia lu3o luo3r 4lup luss4 lus3te 1lut l5ven l5vet4 2l1w 1ly 4lya 4lyb ly5me ly3no 2lys4 l5yse 1ma 2mab ma2ca ma5chine ma4cl mag5in 5magn 2mah maid5 4mald ma3lig ma5lin mal4li mal4ty 5mania man5is man3iz 4map ma5rine. ma5riz mar4ly mar3v ma5sce mas4e mas1t 5mate math3 ma3tis 4matiza 4m1b mba4t5 m5bil m4b3ing mbi4v 4m5c 4me. 2med 4med. 5media me3die m5e5dy me2g mel5on mel4t me2m mem1o3 1men men4a men5ac men4de 4mene men4i mens4 mensu5 3ment men4te me5on m5ersa 2mes 3mesti me4ta met3al me1te me5thi m4etr 5metric me5trie me3try me4v 4m1f 2mh 5mi. mi3a mid4a mid4g mig4 3milia m5i5lie m4ill min4a 3mind m5inee m4ingl min5gli m5ingly min4t m4inu miot4 m2is mis4er. mis5l mis4ti m5istry 4mith m2iz 4mk 4m1l m1m mma5ry 4m1n mn4a m4nin mn4o 1mo 4mocr 5mocratiz mo2d1 mo4go mois2 moi5se 4mok mo5lest mo3me mon5et mon5ge moni3a mon4ism mon4ist mo3niz monol4 mo3ny. mo2r 4mora. mos2 mo5sey mo3sp moth3 m5ouf 3mous mo2v 4m1p mpara5 mpa5rab mpar5i m3pet mphas4 m2pi mpi4a mp5ies m4p1in m5pir mp5is mpo3ri mpos5ite m4pous mpov5 mp4tr m2py 4m3r 4m1s2 m4sh m5si 4mt 1mu mula5r4 5mult multi3 3mum mun2 4mup mu4u 4mw 1na 2n1a2b n4abu 4nac. na4ca n5act nag5er. nak4 na4li na5lia 4nalt na5mit n2an nanci4 nan4it nank4 nar3c 4nare nar3i nar4l n5arm n4as nas4c nas5ti n2at na3tal nato5miz n2au nau3se 3naut nav4e 4n1b4 ncar5 n4ces. n3cha n5cheo n5chil n3chis nc1in nc4it ncour5a n1cr n1cu n4dai n5dan n1de nd5est. ndi4b n5d2if n1dit n3diz n5duc ndu4r nd2we 2ne. n3ear ne2b neb3u ne2c 5neck 2ned ne4gat neg5ativ 5nege ne4la nel5iz ne5mi ne4mo 1nen 4nene 3neo ne4po ne2q n1er nera5b n4erar n2ere n4er5i ner4r 1nes 2nes. 4nesp 2nest 4nesw 3netic ne4v n5eve ne4w n3f n4gab n3gel nge4n4e n5gere n3geri ng5ha n3gib ng1in n5git n4gla ngov4 ng5sh n1gu n4gum n2gy 4n1h4 nha4 nhab3 nhe4 3n4ia ni3an ni4ap ni3ba ni4bl ni4d ni5di ni4er ni2fi ni5ficat n5igr nik4 n1im ni3miz n1in 5nine. nin4g ni4o 5nis. nis4ta n2it n4ith 3nitio n3itor ni3tr n1j 4nk2 n5kero n3ket nk3in n1kl 4n1l n5m nme4 nmet4 4n1n2 nne4 nni3al nni4v nob4l no3ble n5ocl 4n3o2d 3noe 4nog noge4 nois5i no5l4i 5nologis 3nomic n5o5miz no4mo no3my no4n non4ag non5i n5oniz 4nop 5nop5o5li nor5ab no4rary 4nosc nos4e nos5t no5ta 1nou 3noun nov3el3 nowl3 n1p4 npi4 npre4c n1q n1r nru4 2n1s2 ns5ab nsati4 ns4c n2se n4s3es nsid1 nsig4 n2sl ns3m n4soc ns4pe n5spi nsta5bl n1t nta4b nter3s nt2i n5tib nti4er nti2f n3tine n4t3ing nti4p ntrol5li nt4s ntu3me nu1a nu4d nu5en nuf4fe n3uin 3nu3it n4um nu1me n5umi 3nu4n n3uo nu3tr n1v2 n1w4 nym4 nyp4 4nz n3za 4oa oad3 o5a5les oard3 oas4e oast5e oat5i ob3a3b o5bar obe4l o1bi o2bin ob5ing o3br ob3ul o1ce och4 o3chet ocif3 o4cil o4clam o4cod oc3rac oc5ratiz ocre3 5ocrit octor5a oc3ula o5cure od5ded od3ic odi3o o2do4 odor3 od5uct. od5ucts o4el o5eng o3er oe4ta o3ev o2fi of5ite ofit4t o2g5a5r og5ativ o4gato o1ge o5gene o5geo o4ger o3gie 1o1gis og3it o4gl o5g2ly 3ogniz o4gro ogu5i 1ogy 2ogyn o1h2 ohab5 oi2 oic3es oi3der oiff4 oig4 oi5let o3ing oint5er o5ism oi5son oist5en oi3ter o5j 2ok o3ken ok5ie o1la o4lan olass4 ol2d old1e ol3er o3lesc o3let ol4fi ol2i o3lia o3lice ol5id. o3li4f o5lil ol3ing o5lio o5lis. ol3ish o5lite o5litio o5liv olli4e ol5ogiz olo4r ol5pl ol2t ol3ub ol3ume ol3un o5lus ol2v o2ly om5ah oma5l om5atiz om2be om4bl o2me om3ena om5erse o4met om5etry o3mia om3ic. om3ica o5mid om1in o5mini 5ommend omo4ge o4mon om3pi ompro5 o2n on1a on4ac o3nan on1c 3oncil 2ond on5do o3nen on5est on4gu on1ic o3nio on1is o5niu on3key on4odi on3omy on3s onspi4 onspir5a onsu4 onten4 on3t4i ontif5 on5um onva5 oo2 ood5e ood5i oo4k oop3i o3ord oost5 o2pa ope5d op1er 3opera 4operag 2oph o5phan o5pher op3ing o3pit o5pon o4posi o1pr op1u opy5 o1q o1ra o5ra. o4r3ag or5aliz or5ange ore5a o5real or3ei ore5sh or5est. orew4 or4gu 4o5ria or3ica o5ril or1in o1rio or3ity o3riu or2mi orn2e o5rof or3oug or5pe 3orrh or4se ors5en orst4 or3thi or3thy or4ty o5rum o1ry os3al os2c os4ce o3scop 4oscopi o5scr os4i4e os5itiv os3ito os3ity osi4u os4l o2so os4pa os4po os2ta o5stati os5til os5tit o4tan otele4g ot3er. ot5ers o4tes 4oth oth5esi oth3i4 ot3ic. ot5ica o3tice o3tif o3tis oto5s ou2 ou3bl ouch5i ou5et ou4l ounc5er oun2d ou5v ov4en over4ne over3s ov4ert o3vis oviti4 o5v4ol ow3der ow3el ow5est ow1i own5i o4wo oy1a 1pa pa4ca pa4ce pac4t p4ad 5pagan p3agat p4ai pain4 p4al pan4a pan3el pan4ty pa3ny pa1p pa4pu para5bl par5age par5di 3pare par5el p4a4ri par4is pa2te pa5ter 5pathic pa5thy pa4tric pav4 3pay 4p1b pd4 4pe. 3pe4a pear4l pe2c 2p2ed 3pede 3pedi pedia4 ped4ic p4ee pee4d pek4 pe4la peli4e pe4nan p4enc pen4th pe5on p4era. pera5bl p4erag p4eri peri5st per4mal perme5 p4ern per3o per3ti pe5ru per1v pe2t pe5ten pe5tiz 4pf 4pg 4ph. phar5i phe3no ph4er ph4es. ph1ic 5phie ph5ing 5phisti 3phiz ph2l 3phob 3phone 5phoni pho4r 4phs ph3t 5phu 1phy pi3a pian4 pi4cie pi4cy p4id p5ida pi3de 5pidi 3piec pi3en pi4grap pi3lo pi2n p4in. pind4 p4ino 3pi1o pion4 p3ith pi5tha pi2tu 2p3k2 1p2l2 3plan plas5t pli3a pli5er 4plig pli4n ploi4 plu4m plum4b 4p1m 2p3n po4c 5pod. po5em po3et5 5po4g poin2 5point poly5t po4ni po4p 1p4or po4ry 1pos pos1s p4ot po4ta 5poun 4p1p ppa5ra p2pe p4ped p5pel p3pen p3per p3pet ppo5site pr2 pray4e 5preci pre5co pre3em pref5ac pre4la pre3r p3rese 3press pre5ten pre3v 5pri4e prin4t3 pri4s pris3o p3roca prof5it pro3l pros3e pro1t 2p1s2 p2se ps4h p4sib 2p1t pt5a4b p2te p2th pti3m ptu4r p4tw pub3 pue4 puf4 pul3c pu4m pu2n pur4r 5pus pu2t 5pute put3er pu3tr put4ted put4tin p3w qu2 qua5v 2que. 3quer 3quet 2rab ra3bi rach4e r5acl raf5fi raf4t r2ai ra4lo ram3et r2ami rane5o ran4ge r4ani ra5no rap3er 3raphy rar5c rare4 rar5ef 4raril r2as ration4 rau4t ra5vai rav3el ra5zie r1b r4bab r4bag rbi2 rbi4f r2bin r5bine rb5ing. rb4o r1c r2ce rcen4 r3cha rch4er r4ci4b rc4it rcum3 r4dal rd2i rdi4a rdi4er rdin4 rd3ing 2re. re1al re3an re5arr 5reav re4aw r5ebrat rec5oll rec5ompe re4cre 2r2ed re1de re3dis red5it re4fac re2fe re5fer. re3fi re4fy reg3is re5it re1li re5lu r4en4ta ren4te re1o re5pin re4posi re1pu r1er4 r4eri rero4 re5ru r4es. re4spi ress5ib res2t re5stal re3str re4ter re4ti4z re3tri reu2 re5uti rev2 re4val rev3el r5ev5er. re5vers re5vert re5vil rev5olu re4wh r1f rfu4 r4fy rg2 rg3er r3get r3gic rgi4n rg3ing r5gis r5git r1gl rgo4n r3gu rh4 4rh. 4rhal ri3a ria4b ri4ag r4ib rib3a ric5as r4ice 4rici 5ricid ri4cie r4ico rid5er ri3enc ri3ent ri1er ri5et rig5an 5rigi ril3iz 5riman rim5i 3rimo rim4pe r2ina 5rina. rin4d rin4e rin4g ri1o 5riph riph5e ri2pl rip5lic r4iq r2is r4is. ris4c r3ish ris4p ri3ta3b r5ited. rit5er. rit5ers rit3ic ri2tu rit5ur riv5el riv3et riv3i r3j r3ket rk4le rk4lin r1l rle4 r2led r4lig r4lis rl5ish r3lo4 r1m rma5c r2me r3men rm5ers rm3ing r4ming. r4mio r3mit r4my r4nar r3nel r4ner r5net r3ney r5nic r1nis4 r3nit r3niv rno4 r4nou r3nu rob3l r2oc ro3cr ro4e ro1fe ro5fil rok2 ro5ker 5role. rom5ete rom4i rom4p ron4al ron4e ro5n4is ron4ta 1room 5root ro3pel rop3ic ror3i ro5ro ros5per ros4s ro4the ro4ty ro4va rov5el rox5 r1p r4pea r5pent rp5er. r3pet rp4h4 rp3ing r3po r1r4 rre4c rre4f r4reo rre4st rri4o rri4v rron4 rros4 rrys4 4rs2 r1sa rsa5ti rs4c r2se r3sec rse4cr rs5er. rs3es rse5v2 r1sh r5sha r1si r4si4b rson3 r1sp r5sw rtach4 r4tag r3teb rten4d rte5o r1ti rt5ib rti4d r4tier r3tig rtil3i rtil4l r4tily r4tist r4tiv r3tri rtroph4 rt4sh ru3a ru3e4l ru3en ru4gl ru3in rum3pl ru2n runk5 run4ty r5usc ruti5n rv4e rvel4i r3ven rv5er. r5vest r3vey r3vic rvi4v r3vo r1w ry4c 5rynge ry3t sa2 2s1ab 5sack sac3ri s3act 5sai salar4 sal4m sa5lo sal4t 3sanc san4de s1ap sa5ta 5sa3tio sat3u sau4 sa5vor 5saw 4s5b scan4t5 sca4p scav5 s4ced 4scei s4ces sch2 s4cho 3s4cie 5scin4d scle5 s4cli scof4 4scopy scour5a s1cu 4s5d 4se. se4a seas4 sea5w se2c3o 3sect 4s4ed se4d4e s5edl se2g seg3r 5sei se1le 5self 5selv 4seme se4mol sen5at 4senc sen4d s5ened sen5g s5enin 4sentd 4sentl sep3a3 4s1er. s4erl ser4o 4servo s1e4s se5sh ses5t 5se5um 5sev sev3en sew4i 5sex 4s3f 2s3g s2h 2sh. sh1er 5shev sh1in sh3io 3ship shiv5 sho4 sh5old shon3 shor4 short5 4shw si1b s5icc 3side. 5sides 5sidi si5diz 4signa sil4e 4sily 2s1in s2ina 5sine. s3ing 1sio 5sion sion5a si2r sir5a 1sis 3sitio 5siu 1siv 5siz sk2 4ske s3ket sk5ine sk5ing s1l2 s3lat s2le slith5 2s1m s3ma small3 sman3 smel4 s5men 5smith smol5d4 s1n4 1so so4ce soft3 so4lab sol3d2 so3lic 5solv 3som 3s4on. sona4 son4g s4op 5sophic s5ophiz s5ophy sor5c sor5d 4sov so5vi 2spa 5spai spa4n spen4d 2s5peo 2sper s2phe 3spher spho5 spil4 sp5ing 4spio s4ply s4pon spor4 4spot squal4l s1r 2ss s1sa ssas3 s2s5c s3sel s5seng s4ses. s5set s1si s4sie ssi4er ss5ily s4sl ss4li s4sn sspend4 ss2t ssur5a ss5w 2st. s2tag s2tal stam4i 5stand s4ta4p 5stat. s4ted stern5i s5tero ste2w stew5a s3the st2i s4ti. s5tia s1tic 5stick s4tie s3tif st3ing 5stir s1tle 5stock stom3a 5stone s4top 3store st4r s4trad 5stratu s4tray s4trid 4stry 4st3w s2ty 1su su1al su4b3 su2g3 su5is suit3 s4ul su2m sum3i su2n su2r 4sv sw2 4swo s4y 4syc 3syl syn5o sy5rin 1ta 3ta. 2tab ta5bles 5taboliz 4taci ta5do 4taf4 tai5lo ta2l ta5la tal5en tal3i 4talk tal4lis ta5log ta5mo tan4de tanta3 ta5per ta5pl tar4a 4tarc 4tare ta3riz tas4e ta5sy 4tatic ta4tur taun4 tav4 2taw tax4is 2t1b 4tc t4ch tch5et 4t1d 4te. tead4i 4teat tece4 5tect 2t1ed te5di 1tee teg4 te5ger te5gi 3tel. teli4 5tels te2ma2 tem3at 3tenan 3tenc 3tend 4tenes 1tent ten4tag 1teo te4p te5pe ter3c 5ter3d 1teri ter5ies ter3is teri5za 5ternit ter5v 4tes. 4tess t3ess. teth5e 3teu 3tex 4tey 2t1f 4t1g 2th. than4 th2e 4thea th3eas the5at the3is 3thet th5ic. th5ica 4thil 5think 4thl th5ode 5thodic 4thoo thor5it tho5riz 2ths 1tia ti4ab ti4ato 2ti2b 4tick t4ico t4ic1u 5tidi 3tien tif2 ti5fy 2tig 5tigu till5in 1tim 4timp tim5ul 2t1in t2ina 3tine. 3tini 1tio ti5oc tion5ee 5tiq ti3sa 3tise tis4m ti5so tis4p 5tistica ti3tl ti4u 1tiv tiv4a 1tiz ti3za ti3zen 2tl t5la tlan4 3tle. 3tled 3tles. t5let. t5lo 4t1m tme4 2t1n2 1to to3b to5crat 4todo 2tof to2gr to5ic to2ma tom4b to3my ton4ali to3nat 4tono 4tony to2ra to3rie tor5iz tos2 5tour 4tout to3war 4t1p 1tra tra3b tra5ch traci4 trac4it trac4te tras4 tra5ven trav5es5 tre5f tre4m trem5i 5tria tri5ces 5tricia 4trics 2trim tri4v tro5mi tron5i 4trony tro5phe tro3sp tro3v tru5i trus4 4t1s2 t4sc tsh4 t4sw 4t3t2 t4tes t5to ttu4 1tu tu1a tu3ar tu4bi tud2 4tue 4tuf4 5tu3i 3tum tu4nis 2t3up. 3ture 5turi tur3is tur5o tu5ry 3tus 4tv tw4 4t1wa twis4 4two 1ty 4tya 2tyl type3 ty5ph 4tz tz4e 4uab uac4 ua5na uan4i uar5ant uar2d uar3i uar3t u1at uav4 ub4e u4bel u3ber u4bero u1b4i u4b5ing u3ble. u3ca uci4b uc4it ucle3 u3cr u3cu u4cy ud5d ud3er ud5est udev4 u1dic ud3ied ud3ies ud5is u5dit u4don ud4si u4du u4ene uens4 uen4te uer4il 3ufa u3fl ugh3en ug5in 2ui2 uil5iz ui4n u1ing uir4m uita4 uiv3 uiv4er. u5j 4uk u1la ula5b u5lati ulch4 5ulche ul3der ul4e u1len ul4gi ul2i u5lia ul3ing ul5ish ul4lar ul4li4b ul4lis 4ul3m u1l4o 4uls uls5es ul1ti ultra3 4ultu u3lu ul5ul ul5v um5ab um4bi um4bly u1mi u4m3ing umor5o um2p unat4 u2ne un4er u1ni un4im u2nin un5ish uni3v un3s4 un4sw unt3ab un4ter. un4tes unu4 un5y un5z u4ors u5os u1ou u1pe uper5s u5pia up3ing u3pl up3p upport5 upt5ib uptu4 u1ra 4ura. u4rag u4ras ur4be urc4 ur1d ure5at ur4fer ur4fr u3rif uri4fic ur1in u3rio u1rit ur3iz ur2l url5ing. ur4no uros4 ur4pe ur4pi urs5er ur5tes ur3the urti4 ur4tie u3ru 2us u5sad u5san us4ap usc2 us3ci use5a u5sia u3sic us4lin us1p us5sl us5tere us1tr u2su usur4 uta4b u3tat 4ute. 4utel 4uten uten4i 4u1t2i uti5liz u3tine ut3ing ution5a u4tis 5u5tiz u4t1l ut5of uto5g uto5matic u5ton u4tou uts4 u3u uu4m u1v2 uxu3 uz4e 1va 5va. 2v1a4b vac5il vac3u vag4 va4ge va5lie val5o val1u va5mo va5niz va5pi var5ied 3vat 4ve. 4ved veg3 v3el. vel3li ve4lo v4ely ven3om v5enue v4erd 5vere. v4erel v3eren ver5enc v4eres ver3ie vermi4n 3verse ver3th v4e2s 4ves. ves4te ve4te vet3er ve4ty vi5ali 5vian 5vide. 5vided 4v3iden 5vides 5vidi v3if vi5gn vik4 2vil 5vilit v3i3liz v1in 4vi4na v2inc vin5d 4ving vio3l v3io4r vi1ou vi4p vi5ro vis3it vi3so vi3su 4viti vit3r 4vity 3viv 5vo. voi4 3vok vo4la v5ole 5volt 3volv vom5i vor5ab vori4 vo4ry vo4ta 4votee 4vv4 v4y w5abl 2wac wa5ger wag5o wait5 w5al. wam4 war4t was4t wa1te wa5ver w1b wea5rie weath3 wed4n weet3 wee5v wel4l w1er west3 w3ev whi4 wi2 wil2 will5in win4de win4g wir4 3wise with3 wiz5 w4k wl4es wl3in w4no 1wo2 wom1 wo5ven w5p wra4 wri4 writa4 w3sh ws4l ws4pe w5s4t 4wt wy4 x1a xac5e x4ago xam3 x4ap xas5 x3c2 x1e xe4cuto x2ed xer4i xe5ro x1h xhi2 xhil5 xhu4 x3i xi5a xi5c xi5di x4ime xi5miz x3o x4ob x3p xpan4d xpecto5 xpe3d x1t2 x3ti x1u xu3a xx4 y5ac 3yar4 y5at y1b y1c y2ce yc5er y3ch ych4e ycom4 ycot4 y1d y5ee y1er y4erf yes4 ye4t y5gi 4y3h y1i y3la ylla5bl y3lo y5lu ymbol5 yme4 ympa3 yn3chr yn5d yn5g yn5ic 5ynx y1o4 yo5d y4o5g yom4 yo5net y4ons y4os y4ped yper5 yp3i y3po y4poc yp2ta y5pu yra5m yr5ia y3ro yr4r ys4c y3s2e ys3ica ys3io 3ysis y4so yss4 ys1t ys3ta ysur4 y3thin yt3ic y1w za1 z5a2b zar2 4zb 2ze ze4n ze4p z1er ze3ro zet4 2z1i z4il z4is 5zl 4zm 1zo zo4m zo5ol zte4 4z1z2 z4zy } \hyphenation{ % Do NOT make any alterations to this list! --- DEK as-so-ciate as-so-ciates dec-li-na-tion oblig-a-tory phil-an-thropic present presents project projects reci-procity re-cog-ni-zance ref-or-ma-tion ret-ri-bu-tion ta-ble } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/README��������������������������������������������������������������������������������0000644�0000162�0017537�00000004211�11370777670�012045� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������The Perl script html2ps converts HTML to PostScript. You must have Perl 5 installed to be able to use html2ps. Files included in the html2ps distribution: html2ps - The Perl script. html2ps.html - An HTML document describing html2ps. html2ps.1 - A manual page describing the command. html2psrc.5 - A manual page describing the configuration file format. install - An installation script for Unix and Windows. backout - A script to revert to the previous version of html2ps. sample - A sample configuration file. hyphen.tex - A hyphenation pattern file for English (from TeX). contrib/xhtml2ps - A directory containing a GUI frontend for html2ps. COPYING - GNU General Public License. README - This file. Brief history: 941212 0.1 - First public release - text-only documents. 950407 0.2 - Inline images. 970609 1.0b - Support for most of HTML 3.2, configuration files introduced. 970809 1.0b1 - Bug fixes. Some HTML 4.0 support, e.g. OBJECT, INS, DEL, and ACRONYM. 000727 1.0b2 - Mostly bug fixes. A title page can be generated. The symbol set is extended to include information from META elements. Installation script modified for Windows support. 000815 1.0b3 - Bug fixes. Some support for Server Side Includes. Form element contents can be rendered. Support for netscape cookies. 050225 1.0b4 Various bug fixes. 051211 1.0b5 Bug fixes. Added -M option. 091021 1.0b6 "Security" fix. Changed behavior for SSI, to avoid having arbitrary readable files disclosed on a web server that uses html2ps in a web application (cgi script etc), allowing HTML files to be uploaded for conversion. Setting up a service like this is begging for trouble in my opinion. (Is /bin/cat also a vulnerability, since one can use it in a web app, allowing uploading arbitrary parameters to it?) 100507 1.0b7 Fixed a bug introduced by the previous bug fix... Jan Kärrman jan@it.uu.se ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/contrib/������������������������������������������������������������������������������0000755�0000162�0017537�00000000000�11370774501�012615� 5����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/contrib/xhtml2ps/���������������������������������������������������������������������0000755�0000162�0017537�00000000000�11370774501�014376� 5����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/contrib/xhtml2ps/LICENSE��������������������������������������������������������������0000644�0000162�0017537�00000043062�11370774501�015410� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundations software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each authors protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyones free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Programs source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the programs name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w. This is free software, and you are welcome to redistribute it under certain conditions; type `show c for details. The hypothetical commands `show w and `show c should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w and `show c; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/contrib/xhtml2ps/README���������������������������������������������������������������0000644�0000162�0017537�00000002274�11370774501�015263� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� X-html2ps A GUI frontend for html2ps, a HTML-to-PostScript converter Version 1.3 Copyright 1997-2000, Jean-Philippe Argaud TABLE OF CONTENTS I. Introduction II. Installation III. Requirements I. INTRODUCTION X-html2ps is freely-available GUI frontend for html2ps, a HTML-to-PostScript converter made available by Jan Karrman (e-mail: jan@tdb.uu.se). html2ps is available at the WWW location "http://www.tdb.uu.se/~jan/html2ps.html". X-html2ps is covered by the GNU General Public License insuring that it will remain in the capable hands of the internet community. Please read the LICENSE file for more information. II. INSTALLATION UNIX o Nothing or: o edit "xhtml2ps" shell script if necessary to change the initial command line to the location of the "wish" binary o Put "xhtml2ps" in your path o Make sure your display is set, that "html2ps" is already in path and type "xhtml2ps". III. REQUIREMENTS Tcl7.6 and Tk4.2 or later. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������html2ps-1.0b7/contrib/xhtml2ps/xhtml2ps�������������������������������������������������������������0000755�0000162�0017537�00000245431�11370774501�016116� 0����������������������������������������������������������������������������������������������������ustar �jan�����������������������������it���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/wish ################################################################################ # # X-html2ps - A GUI frontend for html2ps (*), a HTML-to-PostScript converter. # # Copyright (C) 1997-2000 Jean-Philippe Argaud. # jp.argaud@iname.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ################################################################################ # (*) Copyright (C) 1995-2000 Jan Karrman, e-mail: jan@tdb.uu.se. # # (WWW location : http://www.tdb.uu.se/~jan/html2ps.html) # # (**) This program was done, for some parts, using Visual Tcl v1.10, a # # great and useful "Application Development Environment For Tcl/Tk" # # (WWW location : http://www.neuron.com/stewart/vtcl/) # ################################################################################ # xhtml2ps - Size : 84761 octets, Released : July 29, 2000 # # Without this line, sum -r : 07487 83 # ################################################################################ ################################################################################ # This file contains four parts : # 1. the file selection box definition # 2. the printing box definition # 3. the configuration and useful commands # 4. the GUI procedures # # The part 1 can be reused independantly, part 2 need only part 1, part 3 need # part 1 and 2, the 4th part is the GUI definition using the three previous. # ################################################################################ # ################################################################################ # 1. FILE SELECTION BOX ################################################################################ # # Usage : FS_Box <default language> <default file name> <default filter> # The defaults are optionnal. The output is the complete filename # chosen, or nothing if Canceled. The language is the one chosen # for the messages, default being English. # Example : set file [FS_Box FR $guess_file $filter] # ############################################################################## # proc FS_Box {{language "EN"} {default ""} {filter "*"}} { global fsdata filename # # Initial default values # ---------------------- set fsdata(language) $language set fsdata(default) $default set fsdata(filename) [file tail $default] set fsdata(dirname) [pwd] set fsdata(filter) $filter set fsdata(hidden) 0 # FS_SetMsgs # # Bindings of default key actions # ------------------------------- bind Entry <ButtonRelease-2> {} bind Entry <Control-k> " %W delete 0 end " bind Entry <Left> " FS_EntryCursor %W -1 " bind Entry <Right> " FS_EntryCursor %W 1 " bind Entry <2> { %W insert insert "[FS_GetXSelect]" } bind Listbox <1> {} # # Launching the GUI # ----------------- FS_GUI # } # ############################################################################## # proc FS_GUI {} { global fsdata filename # set w .fsl # # Global window definition # ------------------------ catch {destroy $w} toplevel $w -class Toplevel wm title $w "$fsdata(ms:wintitle)" wm iconname $w "$fsdata(ms:wintitle)" wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # # Listbox to select the directory and file # ---------------------------------------- frame $w.l -borderwidth 2 pack [frame $w.l.d -borderwidth 0]\ -side left -expand 1 -fill both pack [label $w.l.d.label -relief flat -borderwidth 2 \ -text "$fsdata(ms:directories) :" -anchor nw] \ -side top -expand 0 -fill both pack [listbox $w.l.d.dirs -relief sunken -borderwidth 2 \ -yscrollcommand "$w.l.d.scrolldir set" -setgrid 1] \ -side left -expand 1 -fill both pack [scrollbar $w.l.d.scrolldir -relief sunken \ -command "$w.l.d.dirs yview" -width 10] \ -side left -after $w.l.d.dirs -fill y # pack [frame $w.l.f -borderwidth 0]\ -side left -expand 1 -fill both pack [label $w.l.f.label -relief flat -borderwidth 2 \ -text "$fsdata(ms:files) :" -anchor nw] \ -side top -expand 0 -fill both pack [listbox $w.l.f.files -relief sunken -borderwidth 2 \ -yscrollcommand "$w.l.f.scrollfile set" -setgrid 1] \ -side right -expand 1 -fill both pack [scrollbar $w.l.f.scrollfile -relief sunken \ -command "$w.l.f.files yview" -width 10] \ -side right -before $w.l.f.files -fill y pack $w.l -side top -fill both -expand 1 -padx 3 -pady 5 # # Directory name entry zone definition # ------------------------------------ frame $w.d -borderwidth 2 -relief groove pack [label $w.d.dirtext -text "$fsdata(ms:directory) : "] \ -side left -fill x -padx 1m -pady 2m pack [entry $w.d.dirname -width 40 -relief sunken \ -bd 2 -textvariable fsdata(dirname) ] \ -side left -fill x -padx 1m -pady 2m -expand 1 pack $w.d -side top -fill both -padx 5 -pady 5 # # Filters # ------- frame $w.i -borderwidth 2 -relief groove pack [checkbutton $w.i.hidden -text "$fsdata(ms:hiddenfil)" \ -variable fsdata(hidden) -command FS_ChangeDir] \ -side left -fill x -padx 1m -pady 2m pack [label $w.i.lpatt -text "$fsdata(ms:filter) : "] \ -side right -fill x -padx 1m -pady 2m pack [entry $w.i.filter -width 10 -relief sunken \ -bd 2 -textvariable fsdata(filter)] \ -side right -fill x -padx 1m -pady 2m -before $w.i.lpatt pack $w.i -side top -fill both -padx 5 -pady 1 # # Buttons # ------- set f $w.butt frame $f -borderwidth 2 pack $f -side bottom -anchor w -expand 0 -fill x -padx 1m -pady 1m # pack [button $f.ok -width 10 -text "$fsdata(ms:ok)" \ -command " FS_GetFile "] \ -anchor center -expand 0 -fill none -side left -padx 1m pack [button $f.can -width 10 -text "$fsdata(ms:cancel)" \ -command "set filename \"$fsdata(default)\" ; FS_Exit "] \ -anchor center -expand 0 -fill none -side left -padx 1m # # Bindings of defaults key actions # -------------------------------- bind $w.d.dirname <Return> " FS_ChangeDir " bind $w.l.d.dirs <1> " FS_GetSelection %W @%x,%y " bind $w.l.f.files <1> " FS_GetSelection %W @%x,%y " bind $w.l.d.dirs <Double-Button-1> " FS_GetDir %W @%x,%y " bind $w.l.f.files <Double-Button-1> " FS_GetFile " bind $w.i.filter <Return> " FS_ChangeDir " # # Set default focus # ----------------- set w .fsl wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 ] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 ] wm geom $w +$x+$y wm deiconify $w set fsdata(oldFocus) [focus] set fsdata(oldGrab) [grab current $w] if {$fsdata(oldGrab) != ""} { set fsdata(grabStatus) [grab status $fsdata(oldGrab)] } grab $w focus $w # FS_ChangeDir # tkwait variable filename return $filename } # ############################################################################## # proc FS_EntryCursor {w dir} { set x [$w index insert] set x [expr $x + $dir] $w icursor $x } # ############################################################################## # proc FS_GetXSelect { } { set s "" catch {set s [selection get STRING]} return "$s" } # ############################################################################## # proc FS_ChangeDir { } { global fsdata # cd $fsdata(dirname) set w .fsl.l $w.d.dirs delete 0 end $w.f.files delete 0 end if {$fsdata(hidden)} { if {[catch {set allfiles [glob * .?*]}]} {return} } else { $w.d.dirs insert end ".." if {[catch {set allfiles [glob *]}]} {return} } foreach i [lsort $allfiles] { if { [file isdirectory $i] } { $w.d.dirs insert end $i } else { if {[string match $fsdata(filter) $i]} {$w.f.files insert end $i} } } } # ############################################################################## # proc FS_GetSelection {win pos} { global fsdata # $win selection clear active $win selection set [$win index $pos] # if {[string match $win ".fsl.l.f.files"]} { set f [.fsl.l.f.files curselection] set fsdata(filename) [.fsl.l.f.files get $f] } } # ############################################################################## # proc FS_GetDir {win pos} { global fsdata # $win selection clear active $win selection set [$win index $pos] # set f [.fsl.l.d.dirs curselection] set d [.fsl.l.d.dirs get $f] cd $d set fsdata(dirname) [pwd] # FS_ChangeDir } # ############################################################################## # proc FS_GetFile {} { global fsdata filename # set s $fsdata(dirname) set l [string length $s] if {$l > 0} {set s ${s}/} # set dirfile "$s$fsdata(filename)" if {[file exists $dirfile]} { set filename "$s$fsdata(filename)" FS_Exit } else { set filename "" } # } # ############################################################################## # proc FS_Exit {} { global fsdata # catch {focus $fsdata(oldFocus)} destroy .fsl if {$fsdata(oldGrab) != ""} { if {$fsdata(grabStatus) == "global"} { grab -global $fsdata(oldGrab) } else { grab $fsdata(oldGrab) } } } # ############################################################################## # proc FS_SetMsgs {} { global fsdata # # Check the choice # ---------------- switch $fsdata(language) { EN {} FR {} DE {} default { set fsdata(language) "EN" } } # # Set messages # ------------ switch $fsdata(language) { EN { array set fsdata { ms:wintitle "File Selection Box" ms:directories "Directories" ms:directory "Directory" ms:files "Files" ms:hiddenfil "View hidden files" ms:filter "Filter" ms:ok "OK" ms:cancel "Cancel" } } FR { array set fsdata { ms:wintitle "Boite de Sélection de Fichiers" ms:directories "Répertoires" ms:directory "Répertoire" ms:files "Fichiers" ms:hiddenfil "Voir les fichiers cachés" ms:filter "Filtre" ms:ok "OK" ms:cancel "Annuler" } } DE { array set fsdata { ms:wintitle "Dateiauswahl" ms:directories "Verzeichnisse" ms:directory "Verzeichnis" ms:files "Dateien" ms:hiddenfil "Versteckte Dateien anzeigen" ms:filter "Filter" ms:ok "OK" ms:cancel "Abbruch" } } } # } ################################################################################ # END OF FILE SELECTION BOX ################################################################################ # # ################################################################################ # 2. PRINTING BOX ################################################################################ # # Usage : PR_Box <language> <printing cmd> <file printing cmd> <file name> # The defaults are optionnal. The output is "yes" if the printing # is succesful, or "no" if Canceled. The language is the one chosen # for the messages, default being English. # Usage : set file [PR_Box] # # Rmq : this package requires the "fsbox" Tcl/Tk package # ############################################################################## # proc PR_Box {{language "EN"} \ {printcmd "lp"} \ {filepcmd "exec cp"} \ {filename ""}} { global prdata # # Initial default values # ---------------------- set prdata(language) $language set prdata(command) $printcmd set prdata(filepcmd) $filepcmd set prdata(filename) $filename array set prdata { butwidth 10 labwidth 20 printed 0 dest "PRTR" printfile "print.ps" } # PR_SetMsgs # # Bindings of defaults key actions # -------------------------------- bind Entry <ButtonRelease-2> {} bind Entry <Control-k> " %W delete 0 end " bind Entry <Left> " PR_EntryCursor %W -1 " bind Entry <Right> " PR_EntryCursor %W 1 " bind Entry <2> { %W insert insert "[PR_GetXSelect]" } # # Launching the GUI # ----------------- PR_GUI # } # ############################################################################## # proc PR_GUI {} { global prdata # set w .prn set width $prdata(butwidth) set wl $prdata(labwidth) # # Global window definition # ------------------------ catch {destroy $w} toplevel $w -class Toplevel wm title $w "$prdata(ms:wintitle)" wm iconname $w "$prdata(ms:wintitle)" wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # set f $w.top frame $f -borderwidth 2 -relief groove pack $f -side top -anchor w -expand 0 -fill x -padx 1m -pady 1m # # Printing output # --------------- set f $w.top.dest frame $f -borderwidth 2 pack $f -side top -anchor w -expand 0 -fill x -padx 1m -pady 1m # pack [label $f.lab1 -anchor e -text "$prdata(ms:printto) : " -width 25] \ -anchor center -expand 0 -fill none -side left pack [radiobutton $f.rad1 -text $prdata(ms:printer) \ -variable prdata(dest) -value "PRTR"] \ -anchor center -expand 0 -fill none -side left pack [radiobutton $f.rad2 -text $prdata(ms:file) \ -variable prdata(dest) -value "FILE"] \ -anchor center -expand 0 -fill none -side left # # Printing options # ---------------- set f $w.top.opt1 frame $f -borderwidth 2 pack $f -side top -anchor w -expand 0 -fill x -padx 1m -pady 1m # pack [label $f.lab1 -anchor e -text "$prdata(ms:command) : " -width 25] \ -anchor center -expand 0 -fill none -side left pack [entry $f.ent1 -textvariable prdata(command) -width 15] \ -anchor center -expand 0 -fill none -side left # set f $w.top.opt2 frame $f -borderwidth 2 pack $f -side top -anchor w -expand 0 -fill x -padx 1m -pady 1m # pack [label $f.lab2 -anchor e -text "$prdata(ms:file) : " -width 25] \ -anchor center -expand 0 -fill none -side left pack [entry $f.ent2 -textvariable prdata(printfile) -width 40] \ -anchor center -expand 1 -fill x -side left pack [button $f.but2 -padx 5 -pady 4 -borderwidth 1 -text "..." \ -command {set prdata(printfile) [FS_Box $prdata(language) $prdata(printfile) "*.ps"]}] \ -anchor center -expand 0 -fill none -side left # # Button definition # ----------------- set f $w.butt frame $f -borderwidth 2 pack $f -side bottom -anchor w -expand 0 -fill x -padx 1m -pady 1m # pack [button $f.prn -width $width -text "OK" \ -command { set prdata(printed) 1 ; PR_Exit } ] \ -anchor center -expand 0 -fill none -side left -padx 1m pack [button $f.can -width $width -text $prdata(ms:cancel) \ -command { set prdata(printed) 0 ; PR_Exit }] \ -anchor center -expand 0 -fill none -side left -padx 1m # # Set default focus # ----------------- wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 ] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 ] wm geom $w +$x+$y wm deiconify $w set prdata(oldFocus) [focus] set prdata(oldGrab) [grab current $w] if {$prdata(oldGrab) != ""} { set prdata(grabStatus) [grab status $prdata(oldGrab)] } grab $w focus $w # tkwait variable prdata(printed) return $prdata(printed) } # ############################################################################## # proc PR_EntryCursor {w dir} { set x [$w index insert] set x [expr $x + $dir] $w icursor $x } # ############################################################################## # proc PR_GetXSelect { } { set s "" catch {set s [selection get STRING]} return "$s" } # ############################################################################## # proc PR_Exit {} { global prdata # catch {focus $prdata(oldFocus)} destroy .prn if {$prdata(oldGrab) != ""} { if {$prdata(grabStatus) == "global"} { grab -global $prdata(oldGrab) } else { grab $prdata(oldGrab) } } # if {$prdata(printed)} { switch $prdata(dest) { PRTR {set r [eval exec $prdata(command) $prdata(filename)]} FILE {eval $prdata(filepcmd) $prdata(filename) $prdata(printfile) set r "$prdata(ms:prtofile) $prdata(printfile)"} } PR_MBox -icon info -type ok -message $r } } # ############################################################################## # proc PR_MBox { args } { global prdata ChoosenButton # # Initial default values # ---------------------- set w .msb set textfont "-adobe-helvetica-bold-r-normal--*-120-*" set specs { {-icon "" "" "info"} {-message "" "" "" } {-title "" "" " " } {-type "" "" "ok" } } array set options { ok { -width 6 -text OK -command "set ChoosenButton ok" } yes { -width 6 -text $prdata(yes) -command "set ChoosenButton yes" } no { -width 6 -text $prdata(no) -command "set ChoosenButton no" } cancel { -width 6 -text $prdata(cancel) -command "set ChoosenButton cancel" } } # # Initial configuration # --------------------- upvar #0 $w data tclParseConfigSpec $w $specs "" $args # if {[lsearch {info warning error question} $data(-icon)] == -1} { error "Invalid icon \"$data(-icon)\", must be \ error, info, question or warning" } # case $data(-type) { ok { set messagebuttons "ok" } okcancel { set messagebuttons "ok cancel" } yesno { set messagebuttons "yes no" } yesnocancel { set messagebuttons "yes no cancel" } default { error "Invalid type \"$data(-type)\", must be \ ok, okcancel, yesno, yesnocancel"} } # # Global window definition # ------------------------ catch {destroy $w} toplevel $w -class Dialog wm title $w $data(-title) wm iconname $w Dialog wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # option add *Dialog.msg.wrapLength 3i widgetDefault # # Text message area # ----------------- frame $w.top -borderwidth 1 -relief groove pack $w.top -side top -fill both -expand 1 # if {$data(-icon) != ""} { label $w.bitmap -bitmap $data(-icon) pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } pack [label $w.msg -justify left -text $data(-message) -font $textfont] \ -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m # # Buttons area # ------------ frame $w.bot -borderwidth 1 -relief groove pack $w.bot -side bottom -fill both # foreach name $messagebuttons { eval button $w.$name $options($name) pack $w.$name -in $w.bot -side left -expand 1 -padx 1m -pady 1m -ipadx 3m } # # Launching the GUI # ----------------- wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w focus $w tkwait variable ChoosenButton catch {focus $oldFocus} destroy $w if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } # return $ChoosenButton } # ############################################################################## # proc PR_SetMsgs {} { global prdata # # Check the choice # ---------------- switch $prdata(language) { EN {} FR {} DE {} default { set prdata(language) "EN" } } # # Set messages # ------------ switch $prdata(language) { EN { array set prdata { ms:file "File" ms:printer "Printer" ms:printing "Printing" ms:printto "Print to" ms:command "Printing command" ms:prtofile "The printing has been done in the file" ms:yes "Yes" ms:no "No" ms:cancel "Cancel" } } FR { array set prdata { ms:file "Fichier" ms:printer "Imprimante" ms:printing "Impression de" ms:printto "Imprimer vers" ms:command "Commande d'impression" ms:prtofile "L'impression a été effectuée dans le fichier" ms:yes "Oui" ms:no "Non" ms:cancel "Annuler" } } DE { array set prdata { ms:file "Datei" ms:printer "Drucker" ms:printing "Druckt" ms:printto "drucken auf" ms:command "Druckbefehl" ms:prtofile "Der Ausdruck in die Datei ist beendet" ms:yes "Ja" ms:no "Nein" ms:cancel "Abbruch" } } } # set prdata(ms:wintitle) "$prdata(ms:printing) [file tail $prdata(filename)]" # } ################################################################################ # END OF PRINTING BOX ################################################################################ # # ################################################################################ # 3. CONFIGURATION AND USEFUL COMMANDS ################################################################################ # ############################################################################## # proc UT_Config {} { global stusr global env argv tk_version tcl_platform # # Initial definitions # ------------------- array set stusr { application "X-html2ps" shortname "xhtml2ps" version "1.3" author "Jean-Philippe ARGAUD" email "jp.argaud@iname.com" delimiter " " butwidth 10 widthlabel 20 widthentry 30 foreground "#000000" background "#d9d9d9" debug 0 language EN } # # Command line arguments # ---------------------- set stusr(filename) [lindex [split $argv] 0] # # # Platform specific ressources # ---------------------------- if {[string compare $tcl_platform(platform) windows] == 0} { array set stusr { textfont "-*-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" boldfont "-*-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" lightfont "-*-helvetica-medium-o-normal--*-120-*-*-*-*-*-*" listfont "-*-courier-medium-r-normal--*-120-*-*-*-*-*-*" titlefont "-*-times-medium-i-normal--*-240-*-*-*-*-*-*" } set stusr(user) "winuser" set stusr(rcfile) "xhtml2ps.ini" } else { array set stusr { textfont "-adobe-helvetica-medium-r-normal--*-120-*" boldfont "-adobe-helvetica-bold-r-normal--*-120-*" lightfont "-adobe-helvetica-medium-o-normal--*-120-*" listfont "-adobe-courier-medium-r-normal--*-120-*" titlefont "-adobe-times-medium-i-normal--*-240-*" } set stusr(user) "$env(USER)" set stusr(rcfile) "$env(HOME)/.xhtml2psrc" } # # Default options # --------------- option add *font $stusr(textfont) widgetDefault option add *Button.font $stusr(boldfont) widgetDefault option add *Label.font $stusr(boldfont) widgetDefault option add *Entry.font $stusr(listfont) widgetDefault option add *Listbox.font $stusr(listfont) widgetDefault option add *Menu.tearOff 0 option add *Menu.background #aeaeae # set tcl_precision 17 set stusr(tclversion) [info tclversion] set stusr(tkversion) $tk_version set stusr(platform) $tcl_platform(platform) set stusr(scrw) [winfo screenwidth .] set stusr(scrh) [winfo screenheight .] # bind all <Control-o> { set stusr(filename) [ FS_Box $stusr(language) $stusr(filename) "*.html" ] } bind all <Control-w> { set stusr(filename) "" } bind all <Control-q> { UT_SaveRessources ; exit } bind all <Control-t> { UT_Convert } bind all <Control-g> { UT_ViewPS } bind all <Control-p> { UT_Print } bind all <Control-c> { UT_Checking } bind all <Control-a> { UT_About } bind all <Control-h> { UT_Manual } # # Define required user preferences fields to save # ----------------------------------------------- set stusr(userpref) "language viewer checker printcmd suppoptns titlepage infodsc tocexist" # # Set the defaults html2ps/xhtml2ps options # ----------------------------------------- array set stusr { command "html2ps" checker "weblint -x Netscape" viewer "ghostview -magstep -2 -a4" printcmd "lp" filepcmd "exec cp" orientation " " colonnes " " titlepage "-t" numpages "-n" infodbg " " frame " " greyscale " " tocexist "-C" tocbegin "b" tocorig "h" textonly " " textcolor " " linkunder " " scaledoc "1.0" scaleimg "1.0" scalemat "1.0" imgorig " " suppoptns " " infodsc " " fonts " " fontsize "11pt" } } # ############################################################################## # Setting application messages #----------------------------------------------------------------------------- # proc UT_SetMsgs {{language "EN"}} { global stusr # # Check the choice # ---------------- switch $stusr(language) { EN {} FR {} DE {} default { set stusr(language) "EN" } } # # Set messages # ------------ set stusr(availang) "EN FR DE" # switch $stusr(language) { EN { array set stusr { ms:date "July 2000" ms:file "File" ms:new "New" ms:open "Open" ms:close "Close" ms:save "Save" ms:saveas "Save as" ms:preview "Preview" ms:print "Print" ms:quit "Quit" ms:edit "Edit" ms:undo "Undo" ms:copy "Copy" ms:cut "Cut" ms:paste "Paste" ms:search "Search" ms:research "Search again" ms:replace "Replace" ms:delete "Delete" ms:erase "Erase" ms:add "Add" ms:modify "Modify" ms:operations "Operations" ms:convertps "Convert to Postscript" ms:viewps "View Postscript" ms:printps "Print Postscript" ms:checking "Check HTML" ms:prefs "Preferences" ms:languages "Language choice:" ms:extcmd "External commands:" ms:suppoptns "Html2ps other options:" ms:psviewer "Postscript viewer:" ms:htmlchecker "HTML checker:" ms:printcmd "Printing command:" ms:options "Options" ms:fonts "Fonts" ms:info "Informations" ms:help "Help" ms:about "About" ms:manual "Html2ps manual" ms:copyright "Copyright" ms:yes "Yes" ms:no "No" ms:ok "OK" ms:cancel "Cancel" ms:exit "Exit" ms:directory "Directory" ms:filter "Filter" ms:hiddenfil "View hidden files" ms:clear "Clear" ms:continue "Continue" ms:fr "French" ms:en "English" ms:de "German" ms:appearance "Appearance:" ms:aspect "Aspect:" ms:portrait "Portrait" ms:landscape "Landscape" ms:columns "Number of columns:" ms:titlepage "Title page:" ms:pagesnbr "Page numbers:" ms:greyscale "Images in greyscale:" ms:border "Border frame:" ms:textonly "Text only:" ms:colortext "Text in colors:" ms:underlink "Links underlined:" ms:contents "Table of contents:" ms:included "... included at the:" ms:beginning "beginning" ms:theend "end" ms:build "... and built from:" ms:fromstyles "HTML elements H#" ms:fromlinks "the links" ms:frommarks "the marks" ms:fonts "Document font:" ms:times "Times" ms:helvetica "Helvetica" ms:courier "Courier" ms:fontsize "Font size:" ms:scales "Scale factors for:" ms:scaledoc "the document:" ms:scaleimg "the images:" ms:scalemat "the equations:" ms:advanced "Advanced options:" ms:infodsc "DSC compliant Postscript" ms:imgorig "Original Postscript images" ms:infodbg "Debug informations" ms:checkhtml "Checking done,\nthe HTML file is correct." ms:abouttext "Generic Tk/Tcl interface for html2ps 1.0b2,\n\ an HTML to Postscript translator from Jan Karrman\n\ (http://www.tdb.uu.se/~jan/html2ps.html)\n\n" } } FR { array set stusr { ms:date "Juillet 2000" ms:file "Fichier" ms:new "Nouveau" ms:open "Ouvrir" ms:close "Fermer" ms:save "Enregistrer" ms:saveas "Enregistrer sous" ms:preview "Visualiser" ms:print "Imprimer" ms:quit "Quitter" ms:edit "Editer" ms:undo "Annuler" ms:copy "Copier" ms:cut "Couper" ms:paste "Coller" ms:search "Chercher" ms:research "Chercher encore" ms:replace "Remplacer" ms:delete "Détruire" ms:erase "Effacer" ms:add "Ajouter" ms:modify "Modifier" ms:operations "Opérations" ms:convertps "Convertir en Postscript" ms:viewps "Visualisation Postscript" ms:printps "Impression Postscript" ms:checking "Vérification HTML" ms:prefs "Préférences" ms:languages "Choix de la langue :" ms:extcmd "Commandes externes :" ms:suppoptns "Autres options pour html2ps :" ms:psviewer "Visualiseur Postscript :" ms:htmlchecker "Vérificateur HTML :" ms:printcmd "Commande d'impression :" ms:options "Options" ms:fonts "Polices" ms:info "Informations" ms:help "Aide" ms:about "A propos" ms:manual "Manuel html2ps" ms:copyright "Copyright" ms:yes "Oui" ms:no "Non" ms:ok "OK" ms:cancel "Annuler" ms:exit "Sortie" ms:directory "Répertoire" ms:filter "Filtre" ms:hiddenfil "Voir les fichiers cachés" ms:clear "Effacer" ms:continue "Continuer" ms:fr "Francais" ms:en "Anglais" ms:de "Allemand" ms:appearance "Présentation :" ms:aspect "Orientation :" ms:portrait "Portrait" ms:landscape "Paysage" ms:columns "Nombre de colonnes :" ms:titlepage "Page de titre :" ms:pagesnbr "Numéros de pages :" ms:greyscale "Images en niveaux de gris :" ms:border "Encadrement :" ms:textonly "Texte uniquement :" ms:colortext "Texte en couleurs :" ms:underlink "Liens soulignés :" ms:contents "Table des matières :" ms:included "... incluse :" ms:beginning "au début" ms:theend "à la fin" ms:build "... et construite :" ms:fromstyles "d'après les styles H#" ms:fromlinks "d'après les liens" ms:frommarks "d'après les marques" ms:fonts "Police du document :" ms:times "Times" ms:helvetica "Helvetica" ms:courier "Courier" ms:fontsize "Taille de police :" ms:scales "Echelles d'agrandissement :" ms:scaledoc "du document :" ms:scaleimg "des images :" ms:scalemat "des équations :" ms:advanced "Options avancées :" ms:infodsc "Postscript compatible DSC" ms:imgorig "Images Postscript originales" ms:infodbg "Informations de debug" ms:checkhtml "Vérification effectuée,\nle fichier HTML est correct." ms:abouttext "Interface Tk/Tcl pour html2ps 1.0b2,\n\ un convertisseur de HTML en Postscript fait par Jan Karrman\n\ (http://www.tdb.uu.se/~jan/html2ps.html)\n\n" } } DE { array set stusr { ms:date "Juli 2000" ms:file "Datei" ms:new "Neu" ms:open "Öffnen" ms:close "Schließen" ms:save "Speichern" ms:saveas "Speichern als" ms:preview "Vorschau" ms:print "Drucken" ms:quit "Beenden" ms:edit "Bearbeiten" ms:undo "Rückgängig" ms:copy "Kopieren" ms:cut "Ausschneiden" ms:paste "Einfügen" ms:search "Suchen" ms:research "Suchen wiederholen" ms:replace "Ersetzen" ms:delete "Löschen" ms:erase "Radieren" ms:add "Hinzufügen" ms:modify "Ändern" ms:operations "Aktionen" ms:convertps "In Postscript Konvertieren" ms:viewps "Vorschau Postscript" ms:printps "Drucke Postscript" ms:checking "Überprüfe HTML" ms:prefs "Einstellungen" ms:languages "Sprachauswahl :" ms:extcmd "Externe Befehle :" ms:suppoptns "Weitere Optionen für hml2ps :" ms:psviewer "Postscript-Betrachter :" ms:htmlchecker "HTML Prüfprogramm :" ms:printcmd "Druckbefehl :" ms:options "Optionen" ms:fonts "Schriften" ms:info "Informationen" ms:help "Hilfe" ms:about "Über" ms:manual "Hilfe zu html2ps (manpage)" ms:copyright "Copyright" ms:yes "Ja" ms:no "Nein" ms:ok "OK" ms:cancel "Abbruch" ms:exit "Beenden" ms:directory "Verzeichnis" ms:filter "Filter" ms:hiddenfil "Zeige versteckte Dateien" ms:clear "Löschen" ms:continue "Weiter" ms:fr "Französisch" ms:en "Englisch" ms:de "Deutsch" ms:appearance "Darstellung :" ms:aspect "Ausrichtung :" ms:portrait "Hochformat" ms:landscape "Querformat" ms:columns "Spaltenanzahl :" ms:titlepage "Titel Seite :" ms:pagesnbr "Seitenzahl :" ms:greyscale "Bilder in Graustufen :" ms:border "Rahmen :" ms:textonly "Nur Text :" ms:colortext "Text in Farbe :" ms:underlink "Links unterstrichen :" ms:contents "Inhaltsverzeichnis :" ms:included "... eingefügt am:" ms:beginning "Anfang" ms:theend "Ende" ms:build "... und erzeugt aus :" ms:fromstyles "HTML-Element H#" ms:fromlinks "den Links" ms:frommarks "den Marks" ms:fonts "Font für das Dokument:" ms:times "Times" ms:helvetica "Helvetica" ms:courier "Courier" ms:fontsize "Groß:" ms:scales "Maßstab für :" ms:scaledoc "das Dokument :" ms:scaleimg "die Bilder :" ms:scalemat "die Formeln :" ms:advanced "Erweiterte Einstellungen :" ms:infodsc "Postscript verträglich mit DSC" ms:imgorig "Original Postscript Bilder" ms:infodbg "Debug Informationen" ms:checkhtml "Überprüfung beendet,\ndie Datei ist in Ordnung." ms:abouttext "Allgemeine Tk/Tcl-Oberfläche für html2ps 1.0b2,\n\ ein HTML zu Postscript Konverter von Jan Karrman\n\ (http://www.tdb.uu.se/~jan/html2ps.html)\n\n" } } } # } # ############################################################################## # Show the About comment #----------------------------------------------------------------------------- # proc UT_About {} { global stusr # set w .msgwin if [catch {toplevel $w}] { raise $w } else { wm title $w "About" wm iconname $w "About" pack [label $w.msg1 -text "$stusr(application) $stusr(version)"\ -font $stusr(titlefont)]\ -side top -padx 1m -pady 1m -ipadx 3m pack [label $w.msg2 -text \ "$stusr(ms:abouttext) \ $stusr(author) - $stusr(email) - $stusr(ms:date)"]\ -side top -padx 1m -pady 1m -ipadx 3m pack [button $w.ok -text OK -width 10 -command { destroy .msgwin }]\ -side top -padx 1m -pady 1m -ipadx 3m } } # ############################################################################## # Show the man page #----------------------------------------------------------------------------- # proc UT_Manual {} { # .main configure -cursor watch update idletasks # set running [open "| man html2ps |& cat" r] set Output "" while {[gets $running msg] >= 0} { regsub -all "_" $msg "" msg regsub -all "." $msg "" msg append Output " $msg\n" } catch { close $running } # UT_ViewMsg $Output # .main configure -cursor {} # } # ############################################################################## # Show the checking result page #----------------------------------------------------------------------------- # proc UT_Checking {} { global stusr # .main configure -cursor watch update idletasks if (![string compare $stusr(filename) ""]) { .main configure -cursor {} return } # set running [open "| $stusr(checker) $stusr(filename) |& cat" r+] set Output "" flush $running while {[gets $running msg] >= 0} { append Output " $msg\n" } catch { close $running } # set l [string length $Output] if {$l <= 0} { UT_MBox -icon info -type ok -message $stusr(ms:checkhtml) } else { UT_ViewMsg $Output } # .main configure -cursor {} } # ############################################################################## # Show the postscript result page #----------------------------------------------------------------------------- # proc UT_ViewPS {} { global stusr # if (![string compare $stusr(filename) ""]) { return } # set fichier [file tail $stusr(filename)] set fichier [file rootname $fichier] # eval exec "$stusr(viewer) $fichier.ps &" # } # ############################################################################## # Launch the conversion #----------------------------------------------------------------------------- # proc UT_Convert {} { global stusr # .main configure -cursor watch update idletasks if (![string compare $stusr(filename) ""]) { .main configure -cursor {} return } # UT_Command # set running [open "| $stusr(convert) |& cat" r+] set Output "" flush $running while {[gets $running msg] >= 0} { append Output " $msg\n" } catch { close $running } # if (![string compare $Output " \n"]) { UT_ViewMsg $Output } # .main configure -cursor {} # } # ############################################################################## # Build the global command #----------------------------------------------------------------------------- # proc UT_Command {} { global stusr # set fichier [file tail $stusr(filename)] set fichier [file rootname $fichier] # set stusr(convert) \ "$stusr(command) $stusr(orientation) $stusr(colonnes) $stusr(numpages) \ $stusr(infodbg) $stusr(frame) $stusr(greyscale) $stusr(textonly) \ $stusr(imgorig) $stusr(textcolor) $stusr(linkunder) $stusr(infodsc) \ $stusr(titlepage) $stusr(suppoptns) \ -s $stusr(scaledoc) -i $stusr(scaleimg) -m $stusr(scalemat)" if (![string compare $stusr(tocexist) "-C"]) { append stusr(convert) " $stusr(tocexist) $stusr(tocbegin)$stusr(tocorig)" } if ([string compare $stusr(fonts) " "]) { append stusr(convert) " -S \"BODY{font-family: $stusr(fonts);font-size: $stusr(fontsize)}\"" } append stusr(convert) " -o $fichier.ps $stusr(filename)" # # puts "$stusr(convert)" } # ############################################################################## # Show a text in a separate window #----------------------------------------------------------------------------- # proc UT_ViewMsg { message } { # set width 10 set w .msgwin if [catch {toplevel $w}] { raise $w } else { wm title $w "MiniBrowser" wm iconname $w "MiniBrowser" wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # frame $w.frame -borderwidth 2 pack $w.frame -side top -fill both -expand 1 # # Text zone and scrollbar definition # ---------------------------------- frame $w.frame.t -borderwidth 2 -relief groove pack [text $w.frame.t.text -width 80 -height 30 -relief flat \ -font fixed -wrap word -padx 5 -pady 5 \ -yscrollcommand "$w.frame.t.scroll set" ] \ -side left -fill both -expand 1 pack [scrollbar $w.frame.t.scroll -relief sunken -width 3m \ -command "$w.frame.t.text yview" ] \ -side left -fill y pack $w.frame.t -side top -fill both -expand 1 -padx 5 -pady 5 # # Button definition # ----------------- frame $w.frame.b -borderwidth 2 pack [button $w.frame.b.close -width $width -text Ok \ -command "destroy $w" ] \ -side top -fill x -expand 1 pack $w.frame.b -side bottom -fill both -padx 5 -pady 5 } # # Editing properties # ------------------ set w $w.frame.t.text $w configure -state normal $w delete 1.0 end # Get the file to see $w insert 1.0 $message $w configure -state disabled # Move the view to file beginning $w yview -pickplace 1.0 } # ############################################################################## # Print a PS file #----------------------------------------------------------------------------- # proc UT_Print { } { global stusr # if {! ( [string compare $stusr(filename) "" ] == 0 \ || [string compare $stusr(filename) " "] == 0) } { # set psfile [file rootname $stusr(filename)] set psfile "$psfile.ps" if {! [file exists $psfile]} { UT_Convert } set ans [PR_Box $stusr(language) $stusr(printcmd) $stusr(filepcmd) $psfile ] # } } # ############################################################################## # User preferences #----------------------------------------------------------------------------- # proc UT_UserPrefs { } { global stusr # # Global window definition # ------------------------ set w .usb set textfont $stusr(textfont) catch {destroy $w} toplevel $w -class Dialog wm title $w $stusr(ms:prefs) wm iconname $w Dialog wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # # Preferences area # ---------------- frame $w.pref -borderwidth 1 -relief flat pack $w.pref -side top -fill both -expand 1 # frame $w.lng -borderwidth 2 -relief groove pack $w.lng -in $w.pref -side left -fill both -expand 1 # pack [label $w.lng.lab -text $stusr(ms:languages) ] \ -in $w.lng -side top -anchor w -padx 1m -pady 1m -ipadx 3m foreach country $stusr(availang) { set name [string tolower $country] eval radiobutton $w.$name -font $textfont -text $stusr(ms:$name) \ -variable stusr(language) -value $country pack $w.$name -in $w.lng -side top -anchor w -padx 1m -pady 1m -ipadx 3m } # frame $w.ext -borderwidth 2 -relief groove pack $w.ext -in $w.pref -side right -fill both -expand 1 # pack [label $w.ext.lab1 -text $stusr(ms:extcmd) ] \ -in $w.ext -side top -anchor w -padx 1m -pady 1m -ipadx 3m # frame $w.ext1 -borderwidth 1 -relief flat pack $w.ext1 -in $w.ext -side top -fill both -expand 1 pack [label $w.ext1.lab -font $textfont -text $stusr(ms:psviewer) ] \ -in $w.ext1 -side left -anchor w -padx 1m -pady 1m -ipadx 3m pack [entry $w.ext1.ent -font $textfont -textvariable stusr(viewer) ] \ -in $w.ext1 -side right -anchor w -padx 1m -pady 1m -ipadx 3m # frame $w.ext2 -borderwidth 1 -relief flat pack $w.ext2 -in $w.ext -side top -fill both -expand 1 pack [label $w.ext2.lab -font $textfont -text $stusr(ms:htmlchecker) ] \ -in $w.ext2 -side left -anchor w -padx 1m -pady 1m -ipadx 3m pack [entry $w.ext2.ent -font $textfont -textvariable stusr(checker) ] \ -in $w.ext2 -side right -anchor w -padx 1m -pady 1m -ipadx 3m # frame $w.ext3 -borderwidth 1 -relief flat pack $w.ext3 -in $w.ext -side top -fill both -expand 1 pack [label $w.ext3.lab -font $textfont -text $stusr(ms:printcmd) ] \ -in $w.ext3 -side left -anchor w -padx 1m -pady 1m -ipadx 3m pack [entry $w.ext3.ent -font $textfont -textvariable stusr(printcmd) ] \ -in $w.ext3 -side right -anchor w -padx 1m -pady 1m -ipadx 3m # frame $w.ext4 -borderwidth 1 -relief flat pack $w.ext4 -in $w.ext -side top -fill both -expand 1 pack [label $w.ext4.lab -font $textfont -text $stusr(ms:suppoptns) ] \ -in $w.ext4 -side left -anchor w -padx 1m -pady 1m -ipadx 3m pack [entry $w.ext4.ent -font $textfont -textvariable stusr(suppoptns) ] \ -in $w.ext4 -side right -anchor w -padx 1m -pady 1m -ipadx 3m # # ------------ frame $w.bot -borderwidth 1 -relief flat pack $w.bot -side bottom -fill both # pack [button $w.ok -width 6 -text $stusr(ms:ok) \ -command { UT_SetMsgs $stusr(language) destroy .main Window show .main UT_SaveRessources set result 1 } ] \ -in $w.bot -side left -expand 1 -padx 1m -pady 1m -ipadx 3m pack [button $w.cancel -width 6 -text $stusr(ms:cancel) \ -command { set result 0 } ] \ -in $w.bot -side left -expand 1 -padx 1m -pady 1m -ipadx 3m # # Launching the GUI # ----------------- wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w focus $w tkwait variable result catch {focus $oldFocus} destroy $w if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } } # ############################################################################## # Save user ressource file # ---------------------------------------------------------------------------- proc UT_SaveRessources {} { global stusr # set fid [open $stusr(rcfile) w] # # Write general comments # ---------------------- puts $fid "# User ressource configuration file for $stusr(application) $stusr(version)" puts $fid "# $stusr(author) - $stusr(email) - $stusr(ms:date)" puts $fid "#" puts $fid "# ATTENTION : this file is automatically generated by the" puts $fid "# application. All modification of this file will have a" puts $fid "# direct effect on the default values in the application." puts $fid "#" puts $fid "# A field declaration have the following form :" puts $fid "# <name> = <value>" puts $fid "# The spaces are of no importance on the whole line." puts $fid "" # # Write all the required fields # ----------------------------- foreach field $stusr(userpref) { puts $fid "$field = $stusr($field)" } catch "close $fid" } # ############################################################################## # Load user ressource file # ---------------------------------------------------------------------------- proc UT_LoadRessources {} { global stusr # # Open the rc file if it exists # ----------------------------- if [file readable $stusr(rcfile)] { set fid [open $stusr(rcfile) r] while { [gets $fid line] >= 0 } { # Ignore empty and comment lines beginning with # if { $line != "" && [regexp {^#} $line] == 0 } { regsub -all {\ *=} $line {=} line regsub -all {=\ *} $line {=} line # Test if the line contains "=" if [regexp {(.*)=(.*)} $line total field value] { if { $value == "" } { set value " " } if [info exists stusr($field) ] { set stusr($field) $value } } } set line "" } catch "close $fid" } } # ############################################################################## # proc UT_MBox { args } { global stusr ChoosenButton # # Initial default values # ---------------------- set w .msb set textfont $stusr(textfont) set specs { {-icon "" "" "info"} {-message "" "" "" } {-title "" "" " " } {-type "" "" "ok" } } array set options { ok { -width 6 -text $stusr(ms:ok) -command "set ChoosenButton ok" } yes { -width 6 -text $stusr(ms:yes) -command "set ChoosenButton yes" } no { -width 6 -text $stusr(ms:no) -command "set ChoosenButton no" } cancel { -width 6 -text $stusr(ms:cancel) -command "set ChoosenButton cancel" } } # # Initial configuration # --------------------- upvar #0 $w data tclParseConfigSpec $w $specs "" $args # if {[lsearch {info warning error question} $data(-icon)] == -1} { error "Invalid icon \"$data(-icon)\", must be \ error, info, question or warning" } # case $data(-type) { ok { set messagebuttons "ok" } okcancel { set messagebuttons "ok cancel" } yesno { set messagebuttons "yes no" } yesnocancel { set messagebuttons "yes no cancel" } default { error "Invalid type \"$data(-type)\", must be \ ok, okcancel, yesno, yesnocancel"} } # # Global window definition # ------------------------ catch {destroy $w} toplevel $w -class Dialog wm title $w $data(-title) wm iconname $w Dialog wm minsize $w 1 1 wm protocol $w WM_DELETE_WINDOW { } # option add *Dialog.msg.wrapLength 3i widgetDefault # # Text message area # ----------------- frame $w.top -borderwidth 1 -relief groove pack $w.top -side top -fill both -expand 1 # if {$data(-icon) != ""} { label $w.bitmap -bitmap $data(-icon) pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } pack [label $w.msg -justify left -text $data(-message) -font $textfont] \ -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m # # Buttons area # ------------ frame $w.bot -borderwidth 1 -relief groove pack $w.bot -side bottom -fill both # foreach name $messagebuttons { eval button $w.$name $options($name) pack $w.$name -in $w.bot -side left -expand 1 -padx 1m -pady 1m -ipadx 3m } # # Launching the GUI # ----------------- wm withdraw $w update idletasks set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - [winfo vrootx [winfo parent $w]]] set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]] wm geom $w +$x+$y wm deiconify $w set oldFocus [focus] set oldGrab [grab current $w] if {$oldGrab != ""} { set grabStatus [grab status $oldGrab] } grab $w focus $w tkwait variable ChoosenButton catch {focus $oldFocus} destroy $w if {$oldGrab != ""} { if {$grabStatus == "global"} { grab -global $oldGrab } else { grab $oldGrab } } return $ChoosenButton } # ############################################################################## # Global configuration launching # ------------------------------ # global stusr # UT_Config # UT_LoadRessources # UT_SetMsgs $stusr(language) # # ################################################################################ # END OF CONFIGURATION AND USEFUL COMMANDS ################################################################################ # # ############################################################################## # 4. GUI PROCEDURES ############################################################################## # VTCL generated code, and modified # ############################################################################## # proc Window {args} { global vTcl set cmd [lindex $args 0] set name [lindex $args 1] set newname [lindex $args 2] set rest [lrange $args 3 end] if {$name == "" || $cmd == ""} {return} if {$newname == ""} { set newname $name } set exists [winfo exists $newname] switch $cmd { show { if {$exists == "1" && $name != "."} {wm deiconify $name; return} if {[info procs vTclWindow(pre)$name] != ""} { eval "vTclWindow(pre)$name $newname $rest" } if {[info procs vTclWindow$name] != ""} { eval "vTclWindow$name $newname $rest" } if {[info procs vTclWindow(post)$name] != ""} { eval "vTclWindow(post)$name $newname $rest" } } hide { if $exists {wm withdraw $newname; return} } iconify { if $exists {wm iconify $newname; return} } destroy { if $exists {destroy $newname; return} } } } ################################# # VTCL GENERATED GUI PROCEDURES # proc vTclWindow. {base} { if {$base == ""} { set base . } ################### # CREATING WIDGETS ################### wm focusmodel $base passive wm geometry $base 200x200+0+0 wm maxsize $base 1137 870 wm minsize $base 1 1 wm overrideredirect $base 0 wm resizable $base 1 1 wm withdraw $base wm title $base "vt.tcl" ################### # SETTING GEOMETRY ################### } proc vTclWindow.main {base} { global stusr if {$base == ""} { set base .main } if {[winfo exists $base]} { wm deiconify $base; return } ################### # CREATING WIDGETS ################### toplevel $base -class Toplevel wm focusmodel $base passive ## wm geometry $base 682x387+373+265 ## wm maxsize $base 1137 870 wm minsize $base 1 1 wm overrideredirect $base 0 wm resizable $base 1 1 wm deiconify $base wm title $base "$stusr(application)" frame $base.fra22 \ -background #aeaeae -borderwidth 2 -height 33 -width 125 menubutton $base.fra22.men18 \ -background #aeaeae -font -adobe-helvetica-bold-r-normal--*-120-* \ -menu .main.fra22.men18.01 -padx 11 -pady 4 -text $stusr(ms:file) menu $base.fra22.men18.01 \ -background #aeaeae -cursor {} \ -font -adobe-helvetica-medium-r-normal--*-120-* -tearoff 0 $base.fra22.men18.01 add command \ -accelerator { Ctrl+O} \ -command { set stusr(filename) [ FS_Box $stusr(language) $stusr(filename) "*.html" ] } \ -label $stusr(ms:open) -state active $base.fra22.men18.01 add command \ -accelerator { Ctrl+W} \ -command {set stusr(filename) ""} \ -label $stusr(ms:close) $base.fra22.men18.01 add separator $base.fra22.men18.01 add command \ -accelerator { Ctrl+Q} -command { UT_SaveRessources ; exit } \ -label $stusr(ms:quit) bind $base.fra22.men18.01 <Key-Control_L> { .main.fra22.men18.01 invoke 1 } menubutton $base.fra22.men17 \ -background #aeaeae -font -adobe-helvetica-bold-r-normal--*-120-* \ -menu .main.fra22.men17.01 -padx 11 -pady 4 -text $stusr(ms:operations) menu $base.fra22.men17.01 \ -background #aeaeae -cursor {} \ -font -adobe-helvetica-medium-r-normal--*-120-* -tearoff 0 $base.fra22.men17.01 add command \ -accelerator { Ctrl+T} -command UT_Convert \ -label $stusr(ms:convertps) -state active $base.fra22.men17.01 add command \ -accelerator { Ctrl+G} -command UT_ViewPS \ -label $stusr(ms:viewps) $base.fra22.men17.01 add command \ -accelerator { Ctrl+P} -command UT_Print \ -label $stusr(ms:printps) $base.fra22.men17.01 add command \ -accelerator { Ctrl+C} -command UT_Checking \ -label $stusr(ms:checking) $base.fra22.men17.01 add command \ -command UT_UserPrefs -label $stusr(ms:prefs) bind $base.fra22.men17.01 <Key-Control_L> { .main.fra22.men17.01 invoke 1 } menubutton $base.fra22.men28 \ -background #aeaeae -font -adobe-helvetica-bold-r-normal--*-120-* \ -menu .main.fra22.men28.m -padx 11 -pady 4 -text $stusr(ms:help) menu $base.fra22.men28.m \ -background #aeaeae -cursor {} \ -font -adobe-helvetica-medium-r-normal--*-120-* -tearoff 0 $base.fra22.men28.m add command \ -accelerator { Ctrl+A} -command { UT_About } \ -label $stusr(ms:about) $base.fra22.men28.m add command \ -accelerator { Ctrl+H} -command { UT_Manual } \ -label $stusr(ms:manual) bind $base.fra22.men28.m <Key-Control_L> { .main.fra22.men28.m invoke 1 } label $base.fra22.lab26 \ -background #aeaeae -borderwidth 1 \ -font -Adobe-Times-Medium-I-Normal--*-240-*-*-*-*-*-* \ -text "$stusr(application) $stusr(version)" menu $base.fra22.men19 \ -background #aeaeae -cursor {} \ -font -adobe-helvetica-medium-r-normal--*-120-* -tearoff 0 frame $base.fra23 \ -borderwidth 2 -height 42 -relief groove -width 125 entry $base.fra23.ent27 \ -font -adobe-courier-medium-r-normal--*-120-* \ -textvariable stusr(filename) frame $base.fra17 \ -borderwidth 2 -height 353 -relief groove -width 117 frame $base.fra17.01 \ -borderwidth 2 -height 75 -relief groove -width 125 label $base.fra17.01.02 \ -borderwidth 1 -font -adobe-helvetica-bold-r-normal--*-120-* \ -text $stusr(ms:appearance) frame $base.fra17.01.03 \ -borderwidth 2 -height 75 -width 125 frame $base.fra17.01.03.04 \ -height 75 -width 125 label $base.fra17.01.03.04.05 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:aspect) label $base.fra17.01.03.04.06 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:columns) label $base.fra17.01.03.04.07 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:titlepage) label $base.fra17.01.03.04.08 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:pagesnbr) label $base.fra17.01.03.04.lab31 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:greyscale) label $base.fra17.01.03.04.lab32 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:border) label $base.fra17.01.03.04.lab33 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:textonly) label $base.fra17.01.03.04.lab34 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:colortext) label $base.fra17.01.03.04.lab35 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:underlink) frame $base.fra17.01.03.011 \ -height 75 -width 125 frame $base.fra17.01.03.011.012 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.012.013 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:portrait) \ -value { } -variable stusr(orientation) radiobutton $base.fra17.01.03.011.012.014 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:landscape) \ -value -L -variable stusr(orientation) frame $base.fra17.01.03.011.015 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.015.016 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 -text 1 \ -value { } -variable stusr(colonnes) radiobutton $base.fra17.01.03.011.015.017 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 -text 2 \ -value -2 -variable stusr(colonnes) frame $base.fra17.01.03.011.016 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.016.016 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -t -variable stusr(titlepage) radiobutton $base.fra17.01.03.011.016.017 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(titlepage) frame $base.fra17.01.03.011.018 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.018.019 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -n -variable stusr(numpages) radiobutton $base.fra17.01.03.011.018.020 \ -command {set stusr(tocexist) " "} \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(numpages) frame $base.fra17.01.03.011.024 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.024.025 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -g -variable stusr(greyscale) radiobutton $base.fra17.01.03.011.024.026 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(greyscale) frame $base.fra17.01.03.011.fra36 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.fra36.01 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -F -variable stusr(frame) radiobutton $base.fra17.01.03.011.fra36.02 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(frame) frame $base.fra17.01.03.011.fra37 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.fra37.01 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -T -variable stusr(textonly) radiobutton $base.fra17.01.03.011.fra37.02 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(textonly) frame $base.fra17.01.03.011.fra38 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.fra38.01 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -U -variable stusr(textcolor) radiobutton $base.fra17.01.03.011.fra38.02 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(textcolor) frame $base.fra17.01.03.011.fra39 \ -height 75 -width 125 radiobutton $base.fra17.01.03.011.fra39.01 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:yes) \ -value -u -variable stusr(linkunder) radiobutton $base.fra17.01.03.011.fra39.02 \ -font -adobe-helvetica-medium-r-normal--*-120-* -pady 5 \ -text $stusr(ms:no) \ -value { } -variable stusr(linkunder) frame $base.fra17.036 \ -borderwidth 2 -height 75 -relief groove -width 125 label $base.fra17.036.037 \ -borderwidth 1 -font -adobe-helvetica-bold-r-normal--*-120-* \ -foreground #000000 -text $stusr(ms:contents) frame $base.fra17.036.038 \ -borderwidth 2 -height 75 -width 125 radiobutton $base.fra17.036.038.039 \ -command {set stusr(numpages) "-n"} \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:yes) -value -C \ -variable stusr(tocexist) radiobutton $base.fra17.036.038.040 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:no) -value { } \ -variable stusr(tocexist) label $base.fra17.036.041 \ -borderwidth 1 -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:included) frame $base.fra17.036.042 \ -borderwidth 2 -height 75 -width 125 radiobutton $base.fra17.036.042.043 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:beginning) \ -value b -variable stusr(tocbegin) radiobutton $base.fra17.036.042.044 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:theend) \ -value { } -variable stusr(tocbegin) label $base.fra17.036.045 \ -borderwidth 1 -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:build) frame $base.fra17.036.046 \ -borderwidth 2 -height 75 -width 125 radiobutton $base.fra17.036.046.047 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:fromstyles) -value h -variable stusr(tocorig) radiobutton $base.fra17.036.046.048 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:fromlinks) -value f -variable stusr(tocorig) radiobutton $base.fra17.036.046.049 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:frommarks) -value t -variable stusr(tocorig) frame $base.fra17.036.fra58 \ -borderwidth 2 -height 75 -width 125 label $base.fra17.036.fra58.lab59 \ -borderwidth 1 -font -adobe-helvetica-bold-r-normal--*-120-* \ -text $stusr(ms:fonts) radiobutton $base.fra17.036.fra58.che60 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:times) -value Times -variable stusr(fonts) radiobutton $base.fra17.036.fra58.che61 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:helvetica) -value Helvetica -variable stusr(fonts) radiobutton $base.fra17.036.fra58.che62 \ -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:courier) -value Courier -variable stusr(fonts) frame $base.fra17.036.fra58.che63 label $base.fra17.036.fra58.che64 \ -borderwidth 2 -font -adobe-helvetica-medium-r-normal--*-120-* \ -text $stusr(ms:fontsize) menubutton $base.fra17.036.fra58.che65 \ -font -adobe-helvetica-medium-r-normal--*-120-* -relief sunken \ -menu $base.fra17.036.fra58.che65.m -width 5 -text $stusr(fontsize) menu $base.fra17.036.fra58.che65.m \ -cursor {} -font -adobe-helvetica-medium-r-normal--*-120-* -tearoff 0 $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 6pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 6pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 8pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 8pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 9pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 9pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 10pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 10pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 11pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 11pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 12pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 12pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 13pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 13pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 14pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 14pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 16pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 16pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 18pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 18pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 20pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 20pt $base.fra17.036.fra58.che65.m add command \ -command { set stusr(fontsize) 24pt ; .main.fra17.036.fra58.che65 config -text $stusr(fontsize) } -label 24pt frame $base.fra17.fra40 \ -borderwidth 2 -height 75 -relief groove -width 125 frame $base.fra17.fra40.fra54 \ -borderwidth 2 -height 75 -width 177 label $base.fra17.fra40.fra54.lab55 \ -borderwidth 1 -font -adobe-helvetica-bold-r-normal--*-120-* \ -text $stusr(ms:scales) frame $base.fra17.fra40.fra54.fra56 \ -borderwidth 2 -height 75 -width 125 label $base.fra17.fra40.fra54.fra56.01 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:scaledoc) label $base.fra17.fra40.fra54.fra56.02 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:scaleimg) label $base.fra17.fra40.fra54.fra56.03 \ -borderwidth 4 -font -adobe-helvetica-medium-r-normal--*-120-* \ -pady 4 -text $stusr(ms:scalemat) frame $base.fra17.fra40.fra54.fra57 \ -borderwidth 2 -height 75 -width 125 entry $base.fra17.fra40.fra54.fra57.01 \ -font -adobe-courier-medium-r-normal--*-120-* \ -textvariable stusr(scaledoc) -width 5 entry $base.fra17.fra40.fra54.fra57.02 \ -font -adobe-courier-medium-r-normal--*-120-* \ -textvariable stusr(scaleimg) -width 5 entry $base.fra17.fra40.fra54.fra57.03 \ -font -adobe-courier-medium-r-normal--*-120-* \ -textvariable stusr(scalemat) -width 5 frame $base.fra17.fra40.fra58 \ -borderwidth 2 -height 75 -width 125 label $base.fra17.fra40.fra58.lab59 \ -borderwidth 1 -font -adobe-helvetica-bold-r-normal--*-120-* \ -text $stusr(ms:advanced) checkbutton $base.fra17.fra40.fra58.che60 \ -font -adobe-helvetica-medium-r-normal--*-120-* -offvalue { } \ -onvalue -D -text $stusr(ms:infodsc) -variable stusr(infodsc) checkbutton $base.fra17.fra40.fra58.che61 \ -font -adobe-helvetica-medium-r-normal--*-120-* -offvalue { } \ -onvalue -O -text $stusr(ms:imgorig) -variable stusr(imgorig) checkbutton $base.fra17.fra40.fra58.che62 \ -font -adobe-helvetica-medium-r-normal--*-120-* -offvalue { } \ -onvalue -d -text $stusr(ms:infodbg) -variable stusr(infodbg) ################### # SETTING GEOMETRY ################### pack $base.fra22 \ -in .main -anchor n -expand 0 -fill x -padx 4 -pady 4 -side top pack $base.fra22.men18 \ -in .main.fra22 -anchor center -expand 0 -fill none -side left pack $base.fra22.men17 \ -in .main.fra22 -anchor center -expand 0 -fill none -side left pack $base.fra22.men28 \ -in .main.fra22 -anchor center -expand 0 -fill none -side right # pack $base.fra22.lab26 \ # -in .main.fra22 -anchor center -expand 0 -fill none -side top pack $base.fra23 \ -in .main -anchor n -expand 0 -fill x -padx 4 -pady 4 -side top pack $base.fra23.ent27 \ -in .main.fra23 -anchor center -expand 1 -fill x -side left pack $base.fra17 \ -in .main -anchor nw -expand 0 -fill none -padx 4 -pady 4 -side top pack $base.fra17.01 \ -in .main.fra17 -anchor center -expand 0 -fill y -side left pack $base.fra17.01.02 \ -in .main.fra17.01 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03 \ -in .main.fra17.01 -anchor center -expand 0 -fill none -side top pack $base.fra17.01.03.04 \ -in .main.fra17.01.03 -anchor nw -expand 0 -fill none -side left pack $base.fra17.01.03.04.05 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.06 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.07 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.08 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.lab31 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.lab32 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.lab33 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.lab34 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.04.lab35 \ -in .main.fra17.01.03.04 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011 \ -in .main.fra17.01.03 -anchor center -expand 0 -fill none -side top pack $base.fra17.01.03.011.012 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.012.013 \ -in .main.fra17.01.03.011.012 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.012.014 \ -in .main.fra17.01.03.011.012 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.015 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.015.016 \ -in .main.fra17.01.03.011.015 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.015.017 \ -in .main.fra17.01.03.011.015 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.016 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.016.016 \ -in .main.fra17.01.03.011.016 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.016.017 \ -in .main.fra17.01.03.011.016 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.018 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.018.019 \ -in .main.fra17.01.03.011.018 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.018.020 \ -in .main.fra17.01.03.011.018 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.024 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.024.025 \ -in .main.fra17.01.03.011.024 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.024.026 \ -in .main.fra17.01.03.011.024 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.fra36 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.fra36.01 \ -in .main.fra17.01.03.011.fra36 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.fra36.02 \ -in .main.fra17.01.03.011.fra36 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.fra37 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.fra37.01 \ -in .main.fra17.01.03.011.fra37 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.fra37.02 \ -in .main.fra17.01.03.011.fra37 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.fra38 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.fra38.01 \ -in .main.fra17.01.03.011.fra38 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.fra38.02 \ -in .main.fra17.01.03.011.fra38 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.01.03.011.fra39 \ -in .main.fra17.01.03.011 -anchor nw -expand 0 -fill none -side top pack $base.fra17.01.03.011.fra39.01 \ -in .main.fra17.01.03.011.fra39 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.01.03.011.fra39.02 \ -in .main.fra17.01.03.011.fra39 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.036 \ -in .main.fra17 -anchor center -expand 0 -fill y -side left pack $base.fra17.036.037 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.038 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.038.039 \ -in .main.fra17.036.038 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.036.038.040 \ -in .main.fra17.036.038 -anchor center -expand 0 -fill none -side top pack $base.fra17.036.041 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.042 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.042.043 \ -in .main.fra17.036.042 -anchor center -expand 0 -fill none \ -side left pack $base.fra17.036.042.044 \ -in .main.fra17.036.042 -anchor center -expand 0 -fill none -side top pack $base.fra17.036.045 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.046 \ -in .main.fra17.036 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.046.047 \ -in .main.fra17.036.046 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.046.048 \ -in .main.fra17.036.046 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.046.049 \ -in .main.fra17.036.046 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.fra58 \ -in .main.fra17.036 -anchor nw -expand 0 -fill x -side bottom pack $base.fra17.036.fra58.lab59 \ -in .main.fra17.036.fra58 -anchor w -expand 0 -fill none \ -side top pack $base.fra17.036.fra58.che60 \ -in .main.fra17.036.fra58 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.fra58.che61 \ -in .main.fra17.036.fra58 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.fra58.che62 \ -in .main.fra17.036.fra58 -anchor nw -expand 0 -fill none -side top pack $base.fra17.036.fra58.che63 \ -in $base.fra17.036.fra58 -anchor nw -expand 0 -fill x -side bottom pack $base.fra17.036.fra58.che64 \ -in $base.fra17.036.fra58.che63 -anchor w -expand 0 -fill none -side left pack $base.fra17.036.fra58.che65 \ -in $base.fra17.036.fra58.che63 -anchor e -expand 0 -fill none -side right pack $base.fra17.fra40 \ -in .main.fra17 -anchor center -expand 0 -fill y -side left pack $base.fra17.fra40.fra54 \ -in .main.fra17.fra40 -anchor nw -expand 0 -fill x -side top pack $base.fra17.fra40.fra54.lab55 \ -in .main.fra17.fra40.fra54 -anchor nw -expand 0 -fill none -side top pack $base.fra17.fra40.fra54.fra56 \ -in .main.fra17.fra40.fra54 -anchor nw -expand 0 -fill none \ -side left pack $base.fra17.fra40.fra54.fra56.01 \ -in .main.fra17.fra40.fra54.fra56 -anchor nw -expand 0 -fill none \ -side top pack $base.fra17.fra40.fra54.fra56.02 \ -in .main.fra17.fra40.fra54.fra56 -anchor nw -expand 0 -fill none \ -side top pack $base.fra17.fra40.fra54.fra56.03 \ -in .main.fra17.fra40.fra54.fra56 -anchor nw -expand 0 -fill none \ -side top pack $base.fra17.fra40.fra54.fra57 \ -in .main.fra17.fra40.fra54 -anchor center -expand 0 -fill none \ -side top pack $base.fra17.fra40.fra54.fra57.01 \ -in .main.fra17.fra40.fra54.fra57 -anchor center -expand 0 -fill none \ -pady 4 -side top pack $base.fra17.fra40.fra54.fra57.02 \ -in .main.fra17.fra40.fra54.fra57 -anchor center -expand 0 -fill none \ -pady 4 -side top pack $base.fra17.fra40.fra54.fra57.03 \ -in .main.fra17.fra40.fra54.fra57 -anchor center -expand 0 -fill none \ -pady 4 -side top pack $base.fra17.fra40.fra58 \ -in .main.fra17.fra40 -anchor nw -expand 0 -fill x -side bottom pack $base.fra17.fra40.fra58.lab59 \ -in .main.fra17.fra40.fra58 -anchor w -expand 0 -fill none \ -side top pack $base.fra17.fra40.fra58.che60 \ -in .main.fra17.fra40.fra58 -anchor nw -expand 0 -fill none -side top pack $base.fra17.fra40.fra58.che61 \ -in .main.fra17.fra40.fra58 -anchor nw -expand 0 -fill none -side top pack $base.fra17.fra40.fra58.che62 \ -in .main.fra17.fra40.fra58 -anchor nw -expand 0 -fill none -side top } Window show . Window show .main ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������