.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SDF 1" .TH SDF 1 "2023-08-02" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" sdf \- SDF Conversion Utility .SH "PURPOSE" .IX Header "PURPOSE" \&\fIsdf\fR converts \fI\s-1SDF\s0\fR files to other document formats. .SH "USAGE" .IX Header "USAGE" .Vb 10 \& usage : sdf [+alias] [\-h[help]] [\-o[out_ext]] \& [\-l[log_ext]] [\-O[out_dir]] [\-2 format] \& [\-D variable,..] [\-n split_level] \& [\-f flag,..] [\-I include_path,..] \& [\-p[prefilter]] [\-a parameters] [\-P[plang]] \& [\-N[line_numbers]] [\-g[get_report]] \& [\-r report] [\-L locale] [\-k look] \& [\-s style] [\-S page_size] [\-c config] \& [\-u uses,..] [\-H head_level] [\-K head_look] \& [\-d driver] [\-y post_filter] \& [\-z post_process,..] [\-t target] \& [\-v[verbose]] [\-T trace_levels,..] \& [\-w width] [\-Y library_path,..] \& sdf_file ... \&purpose: convert an sdf file to another format \&version: 2.001 (SDF 2.001) .Ve .PP The options are: .PP .Vb 10 \& Option Description \& \-h display help on options \& \-o output file extension \& \-l log file extension \& \-O output to input file\*(Aqs (or explicit) directory \& \-2 the output format you want \& \-D define variables \& \-n heading level to autosplit into topics \& \-f define flags (i.e. DOC_* variables) \& \-I search path for include files, templates, etc. \& \-p pre\-filter input file from each argument \& \-a parameters for the pre\-filter \& \-P pre\-filter as a programming language \& \-N number lines in pretty\-printed source code \& \-g pre\-filter using sdfget with the report specified \& \-r report to run on the SDF to transform it before formatting \& \-L locale \& \-k look library \& \-s style of document \& \-S page size for paper documents \& \-c configuration library \& \-u modules to use \& \-H initial heading level \& \-K heading look (H, A or P) \& \-d format driver \- default is expand \& \-y filter to post\-filter the output with \& \-z list of post processing actions to do \& \-t logical target format \& \-v verbose mode \& \-T debugging trace levels \& \-w width for text\-based outputs \& \-Y search path for libraries .Ve .PP The aliases are: .PP .Vb 10 \& Alias Description \& mc generate a MIMS chapter \& ms generate a MIMS spec \& mt generate a MIMS topic \& sdf2doc_fm generate Frame binary format via FrameMaker \& sdf2dvi_sgml generate DVI format via SGML \& sdf2fvo_fm generate FrameViewer format via FrameMaker \& sdf2hlp_mif generate Windows Help input files via MIF \& sdf2html_ generate a HTML document \& sdf2html_dir generate an SDF directory in HTML \& sdf2html_fm generate a HTML document via FrameMaker \& sdf2html_topicsgenerate HTML topics \& sdf2htx_ generate MIMS HTX format \& sdf2info_sgmlgenerate GNU info format via SGML \& sdf2latex_ generate LaTeX \& sdf2latex_podgenerate LaTeX format via POD \& sdf2latex_sgmlgenerate LaTeX format via SGML \& sdf2lyx_sgml generate a LyX file via SGML \& sdf2man_pod generate Man page format via POD \& sdf2mf6_ generate MIMS F6 help format \& sdf2mif_ generate Frame MIF format \& sdf2pdf_html generate PDF via HTML \& sdf2pdf_mif generate PostScript and PDF via FrameMaker \& sdf2pod_ generate POD format \& sdf2ps_fm generate PostScript via FrameMaker \& sdf2ps_fmbookgenerate PostScript via a FrameMaker book \& sdf2ps_html generate PostScript via HTML \& sdf2ps_pod generate PostScript via POD \& sdf2ps_sgml generate PostScript via SGML \& sdf2rtf_fm generate RTF format via FrameMaker \& sdf2rtf_mif generate RTF format via MIF \& sdf2rtf_sgml generate RTF format via SGML format \& sdf2sdf_expandgenerate expanded SDF \& sdf2sdf_raw generate raw SDF \& sdf2sgml_ generate SGML format \& sdf2txt_ generate plain text format \& sdf2txt_fm generate plain text format via FrameMaker \& sdf2txt_pod generate plain text format via POD .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \-h option provides help. If it is specified without a parameter, a brief description of each option is displayed. To display the attributes for an option, specify the option letter as a parameter. .PP By default, generated output goes to standard output. To direct output to a file per input file, use the \-o option to specify an extension for output files. If the \-o option is specified without a parameter, an extension of \fIout\fR is assumed. .PP Likewise, error messages go to standard error by default. Use the \-l option to create a log file per input file. If the \-l option is specified without a parameter, an extension of \fIlog\fR is assumed. .PP By default, generated output and log files are created in the current directory. Use the \-O option to specify an explicit output directory. If the \-O option is specified without a parameter, the input file's directory is used. .PP The \-2 option is a convenient way of specifying the alias (collection of options) which generates the output you want. e.g. .PP .Vb 1 \& sdf \-2html abc .Ve .PP is equivalent to: .PP .Vb 1 \& sdf +sdf2html abc .Ve .PP The \-D option is used to define variables. These are typically used for controlling conditional text and substituting text which changes. The format used is: .PP .Vb 1 \& \-Dvariable1=value1,variable2=value2 .Ve .PP A flag is a shorthand way of specifying variables in the \s-1DOC\s0 family. i.e. \-ftoc=3 is equivalent to \-DDOC_TOC=3. The format of the \-f option is: .PP .Vb 1 \& \-fflag1=value1,flag2=value2 .Ve .PP If a variable or flag is specified without a value, 1 is assumed. .PP To generate \fI\s-1HTML\s0\fR topics, the command is: .PP .Vb 1 \& sdf \-2topics abc .Ve .PP By default, this will create sub-topics for each heading already in a separate file. It will also \fIautosplit\fR level 1 headings into sub-topics. The \-n option can be used to control which level headings are split at: .IP "\(bu" 4 1 autosplits on level 1 headings (the default) .IP "\(bu" 4 2 autosplits on level 2 headings .IP "\(bu" 4 3 autosplits on level 3 headings .IP "\(bu" 4 0 disables autosplitting. .PP Include files are searched for in the current directory, then in the directories given by the \-I option, then in the default library directory. .PP By default, \fIsdf\fR is configured to \fIprefilter\fR files with certain extensions. For example: .PP .Vb 1 \& sdf mytable.tbl .Ve .PP is equivalent to executing \fIsdf\fR on a file which only contains: .PP .Vb 1 \& !include "mytable.pl"; table .Ve .PP The \-p option can be used to explicitly prefilter files or to override the default prefilter used. If a parameter is not provided, the prefilter is assumed to be \fItable\fR. .PP The \-a option can be used to specify parameters for the prefilter. For example: .PP .Vb 1 \& sdf \-aformat=\*(Aq15,75,10\*(Aq mytable.tbl .Ve .PP The \-P option prefilters the input files as programming languages. The parameter is the language to use. If none is provided, the extension is assumed to be the language name. For example: .PP .Vb 1 \& sdf \-P myapp.c .Ve .PP is equivalent to executing \fIsdf\fR on a file which only contains: .PP .Vb 1 \& !include "myapp.c"; example; wide; lang=\*(Aqc\*(Aq .Ve .PP The \-N option adds line numbers at the frequency given. The default frequency is 1. i.e. every line. .PP The \-g option prefilters the input files by executing \fIsdfget\fR using the default report (default.sdg). To change the report used, specify the report name as the parameter. If the report name doesn't include an extension, sdg is assumed. .PP \&\fBNote: \fR\fIsdfget\fR searches for reports in the current directory, then in the \fIstdlib\fR directory within \s-1SDF\s0's library directory. .PP The \-r option runs the nominated \s-1SDR\s0 report on each input before formatting. In other words, \s-1SDR\s0 reports provide a mechanism for: .IP "\(bu" 4 analysing the \s-1SDF\s0 just before it would be formatted, and .IP "\(bu" 4 replacing that \s-1SDF\s0 with the output of the report (also \s-1SDF\s0) so that the final output is a nicely formatted report. .PP For example, the \fIsdf_dir\fR report generates a directory (tree) of the components (files) included in an \s-1SDF\s0 document. Reports are stored in \&\fIsdr\fR files and are searched for using the usual rules. .PP The \-L option can be used to specify a \fIlocale\fR. The default locale name is specified in \fIsdf.ini\fR. Locale naming follows \s-1POSIX\s0 conventions (i.e. language_country), so the locale name for American english is \fIen_us\fR. The information for each locale is stored in the \&\fIlocale\fR directory, so you'll need to have to look in there to see what locales are available. (As the default locale can be set in \&\fIsdf.ini\fR, this isn't as ugly as it first sounds.) .PP \&\fBNote: \fRAt the moment, a locale file simply contains a list of language specific strings. Ultimately, it should be extended to support localisation of date and time formats. .PP The \-k option is used to specify a \fIlook\fR. The default look library is specified in \fIsdf.ini\fR. .PP The \-s option can be used to specify a document \fIstyle\fR. Typical values are: .IP "\(bu" 4 \&\fIdocument\fR \- a technical document .IP "\(bu" 4 \&\fImemo\fR \- a memo .IP "\(bu" 4 \&\fIfax\fR \- a facsimile .IP "\(bu" 4 \&\fIminutes\fR \- minutes of a meeting. .PP The \-S option is used to specify the page size. Values supported include: .PP .Vb 10 \& 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 .Ve .PP Additional page sizes can be configured in \fIsdf.ini\fR. To specify a rotated version of a named page size, append an \fIR\fR. For example, A4R implies a width of 29.7cm and a height of 21cm. A custom page size can also be specified using the format: .PP .Vb 1 \& {{width}}x{{height}} .Ve .PP where \fIwidth\fR and \fIheight\fR are the respective sizes in points. .PP The \-c option is used to specify a configuration library. .PP A list of modules to use can be specified via the \-u option. .PP The initial heading level to start on can be specified via the \-H option. This is useful if you want to preview how a topic will be displayed without regenerating the complete document. If a topic begins with a level 1 heading (e.g. H1) and you wish to format it as a document (i.e. the level 1 text becomes the \s-1DOC_NAME\s0 for \&\fIbuild_title\fR), use the \-H option with a value of 0. .PP The look of headings can also be adjusted. By default, H\-style headings are numbered, A\-style headings are lettered and P\-style headings are plain. To force a particular style for all headings, the \&\-K option can be used. Sensible parameter values are H, A and P although other values may work depending on what paragraph styles are configured at your site. .PP The \-d option is used to specify the format driver. Values supported include: .IP "\(bu" 4 \&\fIexpand\fR \- format as expanded text (the default) .IP "\(bu" 4 \&\fImif\fR \- Maker Interchange Format .IP "\(bu" 4 \&\fIpod\fR \- Plain Old Documentation (as used by \fIPerl\fR). .PP Additional drivers can be configured in \fIsdf.ini\fR. .PP The \-y option can to used to specify a post-filter. .PP The \-z option can be used to specify a list of post-processing actions you want to execute on each output file after it is generated. The actions supported include: .IP "\(bu" 4 \&\fIps\fR \- generate PostScript .IP "\(bu" 4 \&\fIdoc\fR \- generate a Frame (binary) file .IP "\(bu" 4 \&\fIfvo\fR \- generate a Frame View-Only file .IP "\(bu" 4 \&\fItxt\fR \- generate a text file .IP "\(bu" 4 \&\fIrtf\fR \- generate an \s-1RTF\s0 file .IP "\(bu" 4 \&\fIclean\fR \- delete the output file (must be last). .PP Additional actions can be configured in \fIsdf.ini\fR. By convention, the generated files are given the same names as the action keywords. .PP The \-t option is used to specify the logical target format. If none is specified, the default is the first post processing action, if any. Otherwise, the default is the format driver name. .PP The \-v option enables verbose mode. This is useful for debugging problems related to post processing. In particular, post processing actions containing the pattern \fIclean\fR are skipped in verbose mode. You can also switch off the post processing messages by using a verbose value of \-1. Values higher than 1 switch on additional trace messages as follows: .IP "\(bu" 4 2 \- show how names of files and libraries are resolved .Sp 3 \- show the directories searched for libraries .Sp 4 \- show the directories searched for modules .Sp 5 \- show the directories searched for normal files. .PP The \-T option can be used to switch on debug tracing. The parameter is a comma-separated list of name-value pairs where each name is a \&\fItracing group\fR and each value is the level of tracing for that group. To get the trace output provided by the \-v option, one can use the \fIuser\fR group like this: .PP .Vb 1 \& sdf \-Tuser=2 ... .Ve .PP This is slightly different from the \-v option in that intermediate files are not implicitly kept. Additional tracing groups will be added over time (probably one per output driver). .PP The \-w option is used to specify the width for text-based outputs. .PP The \-z, \-D, \-f and \-I options are list options. i.e. multiple values can be separated by commas and/or the options can be supplied multiple times. .SH "EXAMPLES" .IX Header "EXAMPLES" Convert \fImydoc.sdf\fR to a technical document in mif format, output is \&\fImydoc.mif\fR: .PP .Vb 1 \& sdf \-2mif mydoc.sdf .Ve .PP Convert \fImydoc.sdf\fR to online documentation in \fIFrameViewer\fR format, output is \fImydoc.fvo\fR: .PP .Vb 1 \& sdf \-2fvo mydoc.sdf .Ve .PP Convert \fImydoc.sdf\fR to online documentation in \s-1HTML,\s0 output is \&\fImydoc.html\fR: .PP .Vb 1 \& sdf \-2html mydoc.sdf .Ve .PP The following command will build the reference documentation for a \s-1SDF\s0 module in \s-1HTML:\s0 .PP .Vb 1 \& sdf \-2html abc.sdm .Ve .SH "LIMITATIONS AND FUTURE DIRECTIONS" .IX Header "LIMITATIONS AND FUTURE DIRECTIONS" Many of the default post processing (\-z) actions only works on \fIUnix\fR as \fIFrameMaker\fR for \fIWindows\fR does not support batch conversion. .PP Topics mode has several limitations: .IP "\(bu" 4 only documents in the current directory can be converted .IP "\(bu" 4 all sub-topics must also be in the current directory.