|
NAMEpp2sdf - translates PerlPoint to SDFVERSIONThis manual describes version 0.12.DESCRIPTIONThis is a demonstration application of the PerlPoint package. It translates PerlPoint into SDF.SDF is, of course, no presentation format by itself. Nevertheless it is useful as a target format because sdf can produce various other formats. Presentation formats are fine but often one wants to provide additional handouts, notes or a printed version. pp2sdf opens a simple way to do this. SYNOPSISpp2sdf [<options>] <PerlPoint sources>OptionsAll options can be abbreviated uniqly.
Using different levels may cause unexpected results. Several levels are combined by addition. # activate lexer and parser traces -trace 6 Option filesOptions may be loaded from files where they are stored exactly as you write them in the command line, but may be spread to several lines and extended by comment lines which start with a "#" character. To mark an option file in the commandline, simply enter its (path and) name prededed by a "@" character, for examplepp2sdf @myOptions ppfile where the file myOptions could look like # suppress infos -noinfo Option files may be nested. To avoid endless recursion, every option file is resolved only the first time it is detected. # this is an option file which # refers to another option file -noinfo @moreOptions The script also takes care of default option files which means that usual options can be stored in files named ".pp2sdf". If such a file is placed in the directory where the script itself resides, options in the file are read in automatically by all pp2sdf calls. These are global settings. If you place such a file in your home directory, it is read automatically as well but only if pp2sdf is called under your account, so this is for personal preferences. A personal default option file overwrites global settings, and all default options are overwritten by options passed to the script call. SUPPORTED TAGSAll supported tags are declared by PerlPoint::Tags::SDF. Please see there for a complete list.pp2sdf supports foreign tags like PAGEREF and SECTIONREF initially introduced by "pp2html". Support means that they are handled, but possibly different to the original handling:
EMBEDDING TARGET CODEThere may be things you want to see in the target document but find no way to express them in PerlPoint. Well, PerlPoint lets you embed target code very easily directly into the PerlPoint script. Nevertheless, it is recommended to use native PerlPoint wherever possible ;-).Please note that embedded target code intended for certain translators like pp2sdf may be ignored if the PerlPoint document is processed by other translators. pp2html, for example, accepts embedded HTML but ignores embedded SDF. Embedding SDFJust use the \EMBED and \END_EMBED tags to place native SDF if really necessary:This is \I<PerlPoint> with embedded \EMBED{lang=sdf}{{B:SDF}}\END_EMBED. \EMBED{lang=sdf} H2: An SDF chapter Note: An SDF note. \END_EMBED You may as well include complete SDF files by \INCLUDE. \INLUDE{type=sdf file="snippet.sdf"} Embedding HTMLis as easy as embedding SDF directly. It is, of course, only useful if you plan to transform your presentation to an HTML page via SDF. You can embed complete HTML sections:\EMBED{lang=html} <h1>An HTML chapter</h1> <p> This was written in <i>HTML</i>. \END_EMBED This way pp2sdf will produce SDF inline blocks like this: !block inline <h1>An HTML chapter</h1> <p> This was written in <i>HTML</i>. !endblock Further proceeding is up to sdf, so please refer to the SDF manuals for details. Alternatively, you may choose to embed HTML directly into a PerlPoint paragraph: This is \I<PerlPoint> with embedded \EMBED{lang=html}<b>HTML</b>\END_EMBED. This will be translated into an SDF inline phrase: This is {{I:PerlPoint}} with embedded {{INLINE:<b>HTML</b>}}. Please note that for unknown reasons SDF processes POD tags in inlined phrases (even if it was not intended to use POD). In the example above, this causes a wrong result because an "L" tag is assumed. This is currently a feature of sdf, not pp2sdf. HTML code can be embedded by complete files as well, of course: \INLUDE{type=html file="snippet.html"} Embedding other languagespp2sdf will ignore any other embedded or included target language than SDF and HTML.HYPERLINKSEach headline is implicitly made an anchor named like the headline itself. For example,=Headline level 1 is converted into H1[id=q(Headline level 1)]Headline level 1 , making it easy to set links to certain headlines which is usually done by using the "PAGEREF", "SECTIONREF" and "XREF" tags. Anchors can be set explicitly as well. Please have a look at the description of the \A tag. PREDECLARED VARIABLESpp2sdf predeclares several variables which can be used like any user defined PerlPoint variable.
FILESENVIRONMENT
NOTESThe generated SDF is not handcraftedAs pp2sdf is a generator. It produces another kind of SDF than a human would write because its target is to make a file which can be processed by sdf without problems. Nevertheless, in most cases it should be simple to manually modify the results if necessary.Paragraph stylesSDF markes paragraphs types by special prefixes followed by a colon, like inNote: Think twice. Now, authors of a PerlPoint document may start a text paragraph the same way, by a word and a colon, without thinking of SDF. If this would be plainly translated SDF could be confused (it may take words as paragraph style markers which were not intended to be this, or mention an unknown paragraph style and return an error code). That is why all text paragraphs in the generated SDF document are preceded by a backslash, except if they begin with "Note" or "Sign" because in these cases the special SDF formatting makes sense. Backslash prefixes are avoided as well if the paragraph starts with an SDF tag or inlined HTML. SDF does only support six headline levelsWhile the headline level in PerlPoint is unlimited in depth, that is not the case in SDF. The sdf translator will warn you if such a headline level is detected.SDF phrases are not disabledSDF recognizes POD tags like I, B and C. If a string looks like such a tag, sdf tries to evaluate it the tag way. This should be suppressed.Foreign PerlPoint tags might cause confusionPerlPoint allows to process a document by all of its converters. Nevertheless, possibly several foreign tags might produce unexpected results.Multiline tags in examples are handled correctlyWhile PerlPoint allows you to open a tag in a line and close it in a subsequent line even in examples, SDF requests a tag to be closed at the opening line. This means it is correct PerlPoint to writeMy tag \I<encloses line breaks>. but it needs to be transformed into the quiet differently structured E: My tag {{I:encloses}} E: {{I:line breaks}}. which is automatically arranged by \pp2sdf for the PerlPoint tags \B, \C, \E, \I and \U. (These are the supported tags with bodies. \L, because of its special transformation, does not need to be handled this way.) FILESpp2sdf activates the PerlPoint parser cache to accelerate repeated translations. Because of this the usual PerlPoint parser cache files will be written next the parsed sources (as ".<source file name>.ppcache" in the source directory).SEE ALSOPerlPoint::Tags::SDFPerlPoint::Parser PerlPoint::Backend AUTHORCopyright (c) Jochen Stenzel (perl@jochen-stenzel.de), 2000-2002. All rights reserved.This script is free software, you can redistribute it and/or modify it under the terms of the Artistic License distributed with Perl version 5.003 or (at your option) any later version. Please refer to the Artistic License that came with your Perl distribution for more details. The Artistic License should have been included in your distribution of Perl. It resides in the file named "Artistic" at the top-level of the Perl source tree (where Perl was downloaded/unpacked - ask your system administrator if you dont know where this is). Alternatively, the current version of the Artistic License distributed with Perl can be viewed on-line on the World-Wide Web (WWW) from the following URL: http://www.perl.com/perl/misc/Artistic.html. DISCLAIMERThis software is distributed in the hope that it will be useful, but is provided "AS IS" WITHOUT WARRANTY OF ANY KIND, either expressed or implied, INCLUDING, without limitation, the implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.The ENTIRE RISK as to the quality and performance of the software IS WITH YOU (the holder of the software). Should the software prove defective, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT WILL ANY COPYRIGHT HOLDER OR ANY OTHER PARTY WHO MAY CREATE, MODIFY, OR DISTRIBUTE THE SOFTWARE BE LIABLE OR RESPONSIBLE TO YOU OR TO ANY OTHER ENTITY FOR ANY KIND OF DAMAGES (no matter how awful - not even if they arise from known or unknown flaws in the software). Please refer to the Artistic License that came with your Perl distribution for more details.
Visit the GSP FreeBSD Man Page Interface. |