# Jan Arne Fagertun <Jan.A.Fagertun@@energy.sintef.no> (Bourne shell script)
#
-
-#
-# TODO: should allow to set a central pk cache directory from the command line.
-# TODO: should allow to switch off pk cache.
-#
-
#
# Note: gettext work best if we use ' for docstrings and "
# for gettextable strings.
'pagenumber' : [1],
'textheight' : [],
'linewidth' : [],
- 'orientation' : []
+ 'orientation' : [],
+ 'unit' : ['pt'],
}
extra_fields = extra_init.keys ()
include_path = ['.']
lily_p = 1
paper_p = 1
-cache_pks_p = 1
-
-PK_PATTERN='feta.*\.[0-9]+pk'
output_name = ''
targets = {
kpse = os.popen ('kpsexpand \$TEXMF').read()
kpse = re.sub('[ \t\n]+$','', kpse)
+type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read ()
environment = {
## todo: prevent multiple addition.
'TEXMF' : "{%s,%s}" % (datadir, kpse) ,
- 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
+ 'GS_FONTPATH' : type1_paths,
'GS_LIB' : datadir + '/ps',
}
if extra['orientation']:
orientation = extra['orientation'][0]
- # set sane geometry width (a4-width) for linewidth = -1.
+ unit = extra['unit'][-1]
+ # set sane geometry width (a4-width) for linewidth = -1.
maxlw = max (extra['linewidth'] + [-1])
if maxlw < 0:
# who the hell is 597 ?
linewidth = '597pt'
else:
- linewidth = maxlw
- s = s + '\geometry{width=%smm%s,headheight=2mm,footskip=2mm,%s}\n' % (linewidth, textheight, orientation)
+ linewidth = '%d%s' % (maxlw, unit)
+ s = s + '\geometry{width=%s%s,headheight=2mm,footskip=2mm,%s}\n' % (linewidth, textheight, orientation)
if extra['latexoptions']:
s = s + '\geometry{twosideshift=4mm}\n'
setup_environment ()
tmpdir = setup_temp ()
- if cache_pks_p :
- os.chdir (outdir)
- cp_to_dir (PK_PATTERN, tmpdir)
# to be sure, add tmpdir *in front* of inclusion path.
#os.environ['TEXINPUTS'] = tmpdir + ':' + os.environ['TEXINPUTS']
elif verbose_p:
warning (_ ("can't find file: `%s'") % outname)
- if cache_pks_p:
- cp_to_dir (PK_PATTERN, outdir)
-
os.chdir (original_dir)
cleanup_temp ()