# $Id$ # # >>Title:: SDF Configuration # # >>Copyright:: # Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com). # You may distribute under the terms specified in the LICENSE file. # # >>History:: # ----------------------------------------------------------------------- # Date Who Change # 29-Feb-96 ianc SDF 2.000 # ----------------------------------------------------------------------- # [Product] version=2.001 # # Update the variables below to reflect your configuration. # The variables are: # # * SDF_DOSHOME - the dos directory in which SDF is installed # * DEFAULT_LOOK - the default look library to use # * DEFAULT_LOCALE - the default locale/xx.sdl file to use # * HTML_EXT - the extension used for jumps to generated HTML files. # # Note: SDF_DOSHOME is only needed when generating HPJ files # on Unix for later compilation on DOS. # [Variables] SDF_DOSHOME=C:\SDF DEFAULT_LOOK=simple DEFAULT_LOCALE=en_au #HTML_EXT=htm # FrameMaker configuration things [Frame] fm_batch=fmbatch -i fm_ext=fm5 # # Update the mappings below to reflect your configuration. # See the alias declarations below for meaningful values. # Generally speaking, a value of xxx_yyy means format xxx via yyy. # Likewise, a value of xxx_ means format xxx directly. # [FormatMappings] _dir =html_dir book =ps_fmbook doc =doc_fm dvi =dvi_sgml expand =sdf_expand fvo =fvo_fm hlp =hlp_mif html =html_ htx =htx_ info =info_sgml latex =latex_sgml lyx =lyx_sgml man =man_pod mf6 =mf6_ mif =mif_ pdf =pdf_mif pod =pod_ ps =ps_fm raw =sdf_raw rtf =rtf_fm sgml =sgml_ topics =html_topics txt =txt_ # # To automatically convert figure formats, add an entry to the table below. # The fields are: # # * {{Context}} - the driver for which this conversion applies # * {{To}} - the destination figure format # * {{From}} - the original figure format # * {{Action}} - the command to use to do the conversion. # # Useful variables in the action are: # # * $source - the name of the source file # * $dest - the name of the destination file # * $base - the base component (no directory or extension) of the filename. # # Rules do not chain, so defining rules for A->B and B->C do not # imply that A will be converted to C. # [Conversions] Context To From Action html gif eps ps2gif -crop $source html gif ps ps2gif -crop $source html gif prn prn2ps -ops $source; ps2gif -crop $base.ps; rm $base.ps ps eps ps ps2epsi $source $dest ps eps prn prn2ps -ops $source; ps2epsi $base.ps $dest; rm $base.ps # # To add a new pre-filter, add an entry to the table below. # The fields are: # # * {{Name}} - the filter name # * {{Aliases}} - comma-separated list of alternate names, if any. # # As the default prefilter is taken from the file extension, # file extensions are often listed as aliases. # [PreFilters] Name Aliases table tbl template sdt module sdm pod pm,PL # # To add a new page size, add an entry to the table below. # The fields are: # # * {{Name}} - the logical name # * {{Width}} - width of page # * {{Height}} - height of page # * {{Comment}} - arbitary explanatory text. # # A rotated version is automatically added for each page size. # Rotated sizes are named with an appended R, so naming sizes # with a trailing R below is not recommended. # The default units are points (pt). # [PageSizes] Name Width Height Comment global 21.0cm 11.0in will fit on either A4 or letter A3 29.7cm 42.0cm A4 21.0cm 29.7cm A5 14.8cm 21.0cm B4 25.7cm 36.4cm B5 17.6cm 25.0cm letter 8.5in 11.0in legal 8.5in 14.0in tabloid 11.0in 17.0in # # To add a new format driver, add an entry to the table below. # The fields are: # # * {{Name}} - the driver name # * {{Library}} - the library containing the subroutine(s) # * {{Subroutine}} - the subroutine name # [Drivers] Name Library Subroutine expand sdf/toexpand.pl ExpandFormat raw sdf/toraw.pl RawFormat mif sdf/tomif.pl MifFormat html sdf/tohtml.pl HtmlFormat pod sdf/topod.pl PodFormat txt sdf/totxt.pl TxtFormat sgml sdf/tosgml.pl SgmlFormat latex sdf/tolatex.pl LatexFormat # # Post processing actions are configured below. # Each action maps a symbolic name to a set of commands to execute. # Commands should be called via the Perl subroutines below: # # * {{SdfBatch}} - execute sdfbatch with the options specified # * {{SdfHtmldoc}} - convert arg1 to arg2 via the HTMLDOC program # * {{SdfDelete}} - delete the file specified if it exists # * {{SdfExecute}} - execute the system command specified. # # Within the commands, the following Perl symbols can be used: # # * {{$long}} - the directory and base component of the filename # * {{$short}} - the base component of the filename # * {{$out_ext}} - the output extension used (i.e. the -o option) # * {{%var}} - the associative array of variables. # # AVOID using $short as it assumes the current directory is the # output directory. Use $long instead. # # Note: If HTML is generated via fm2html, then an existing # mif file confuses it. Therefore, we need to delete the mif # file (if it exists) as part of the html action. # [PostProcessing] update = &SdfBatch("-u"); &SdfBookClean("doc.backup") ps = &SdfDelete("$long.$out_ext.ps"); &SdfBatch("-pfile -PA4") pdf = &SdfSystem("distill -quiet $long.ps") clean = &SdfDelete("$long.$out_ext"); &SdfBookClean("doc") doc = &SdfBatch("-sdoc -Sd") fvo = &SdfBatch("-sfvo -Sl") txt = &SdfBatch("-stxt -Sa") html = &SdfDelete("$long.mif"); &SdfBatch("-shtml"); &SdfDelete("$long.mif"); &SdfDelete("$long.html.backup") fmrtf = &SdfBatch("-smif -Sm"); &SdfSystem("miftortf < $long.mif > $long.rtf"); &SdfDelete("$long.mif") fmwp = &SdfBatch("-smif -Sm"); &SdfSystem("miftowp < $long.mif > $long.wp") #rtf = &SdfBatch("-smif -Sm"); &SdfSystem("mif2rtf -o $long.rtf $long.mif") #hlp = &SdfBatch("-smif -Sm"); &SdfSystem("mif2rtf -m help -o $long.rtf $long.mif") rtf = &SdfSystem("mif2rtf -o $long.rtf $long.$out_ext") hlp = &SdfSystem("mif2rtf -m help -o $long.rtf $long.$out_ext") rename = rename("$long.$out_ext", "${long}_$out_ext.html") pod2man = &SdfSystem("pod2man --lax --release='$project ' --center='$product ' --section=$section $long.$out_ext") pod2latex = &SdfSystem("pod2latex $long.$out_ext") pod2text = &SdfSystem("pod2text $long.$out_ext") pod2ps = &SdfSystem("pod2ps -o $long.ps -t '$title' $long.$out_ext") sgml2latex = &SdfSystem("sgml2latex $long.$out_ext") sgml2ps = &SdfSystem("sgml2latex -o ps $long.$out_ext") sgml2dvi = &SdfSystem("sgml2latex -o dvi $long.$out_ext") sgml2info = &SdfSystem("sgml2info $long.$out_ext") sgml2lyx = &SdfSystem("sgml2lyx $long.$out_ext") sgml2rtf = &SdfSystem("sgml2rtf $long.$out_ext") html2ps = &SdfHtmldoc("$long.$out_ext", "$long.ps") html2pdf = &SdfDelete("$long.pdf"); &SdfHtmldoc("$long.$out_ext", "$long.pdf") # # Aliases are configured below. # Aliases are a convenient way of specifying several options at once. # To specify an alias, use the + character. For example: # # = sdf +sdf2mif myfile.sdf # # Aliases should be named using the convention sdf2xxx_yyy where # xxx is the final format and yyy is the intermediate format, if any. # If there is no intermediate format, use the convention xxx_. # Aliases should be declared in alphabetical order to make it # easier to manage them. # [Alias sdf2doc_fm:generate Frame binary format via FrameMaker] driver=mif out_ext=out post_process=doc,clean [Alias sdf2dvi_sgml:generate DVI format via SGML] driver=sgml out_ext=out post_process=sgml2dvi,clean [Alias sdf2fvo_fm:generate FrameViewer format via FrameMaker] driver=mif out_ext=out post_process=fvo,clean [Alias sdf2hlp_mif:generate Windows Help input files via MIF] driver=mif out_ext=out post_process=hlp,clean [Alias sdf2html_:generate a HTML document] driver=html out_ext=html [Alias sdf2html_dir:generate an SDF directory in HTML] driver=html out_ext=dir report=sdf_dir post_process=rename [Alias sdf2html_fm:generate a HTML document via FrameMaker] driver=mif out_ext=out post_process=html,clean [Alias sdf2html_topics:generate HTML topics] driver=html out_ext=html split_level=1 variable=HTML_TOPICS_MODE [Alias sdf2htx_:generate MIMS HTX format] driver=txt post_filter=htx out_ext=htx config=mincom/mims variable=TXT_HDG_UL_OFF,MIMS_HTX,MIMS_ROOT=../ [Alias sdf2info_sgml:generate GNU info format via SGML] driver=sgml out_ext=out post_process=sgml2info,clean [Alias sdf2latex_pod:generate LaTeX format via POD] driver=pod out_ext=out post_process=pod2latex,clean [Alias sdf2latex_sgml:generate LaTeX format via SGML] driver=sgml out_ext=out #post_process=sgml2latex,clean post_process=sgml2latex [Alias sdf2lyx_sgml:generate a LyX file via SGML] driver=sgml out_ext=out post_process=sgml2lyx,clean [Alias sdf2man_pod:generate Man page format via POD] driver=pod out_ext=out post_process=pod2man,clean verbose=-1 [Alias sdf2mf6_:generate MIMS F6 help format] driver=txt post_filter=mf6 out_ext=mf6 variable=TXT_HDG_UL_OFF,MIMS_HELP [Alias sdf2mif_:generate Frame MIF format] driver=mif out_ext=mif [Alias sdf2pdf_mif:generate PostScript and PDF via FrameMaker] driver=mif out_ext=out post_process=ps,clean,pdf [Alias sdf2pdf_html:generate PDF via HTML] driver=html out_ext=out post_process=html2pdf,clean variable=HTMLDOC,DOC_PAGED [Alias sdf2pod_:generate POD format] driver=pod out_ext=pod [Alias sdf2ps_fm:generate PostScript via FrameMaker] driver=mif out_ext=out post_process=ps,clean [Alias sdf2ps_fmbook:generate PostScript via a FrameMaker book] driver=mif out_ext=out post_process=update,ps,clean variable=MIF_BOOK_MODE [Alias sdf2ps_pod:generate PostScript via POD] driver=pod out_ext=out post_process=pod2ps,clean [Alias sdf2ps_sgml:generate PostScript via SGML] driver=sgml out_ext=out post_process=sgml2ps,clean [Alias sdf2ps_html:generate PostScript via HTML] driver=html out_ext=out post_process=html2ps,clean variable=HTMLDOC,DOC_PAGED [Alias sdf2rtf_fm:generate RTF format via FrameMaker] driver=mif out_ext=out target=rtf post_process=fmrtf,clean [Alias sdf2rtf_mif:generate RTF format via MIF] driver=mif out_ext=out post_process=rtf,clean [Alias sdf2rtf_sgml:generate RTF format via SGML format] driver=sgml out_ext=out post_process=sgml2rtf,clean [Alias sdf2sdf_expand:generate expanded SDF] driver=expand [Alias sdf2sdf_raw:generate raw SDF] driver=raw out_ext=raw [Alias sdf2sgml_:generate SGML format] driver=sgml out_ext=sgml [Alias sdf2txt_:generate plain text format] driver=txt out_ext=txt [Alias sdf2txt_fm:generate plain text format via FrameMaker] driver=mif out_ext=out post_process=txt,clean flag=sidehead:2 [Alias sdf2txt_pod:generate plain text format via POD] driver=pod out_ext=out post_process=pod2text,clean verbose=-1 [Alias sdf2latex_:generate LaTeX] driver=latex out_ext=tex # Company-specific aliases go here ... [Alias mt:generate a MIMS topic] config=mincom/mims variable=MIMS_ROOT=../ look=infomap style=manual head_level=2 [Alias mc:generate a MIMS chapter] config=mincom/mims variable=MIMS_ROOT=../ look=infomap style=manual [Alias ms:generate a MIMS spec] config=mincom/mims variable=MIMS_ROOT=../