Usually you start PlainDoc documents with a preamble that controls formatting template and provides metadata like revision control and authorship information. All these tags are optional and have reasonable defaults. (In the following, the two starting angle brakets are spearated by space to prevent interpretation. In your own document you would omit the space.)
#./pd2tex # -*-pd-*-
Document Title
##############
< <class: article_or_book!options!language!header_title!after_page!moreopt>>
< <cvsid: $Id: sampo-plaindoc.pd,v 1.32 2009-11-10 22:44:17 sampo Exp $>>
< <version: 1.0-05>>
< <author: doc author>>
< <credit: Credit title
John Public, Acme Corporation
Joe Doe, Sample, Inc. >>
< <history:0: revision history title
08:: 17.5.2004, Sampo Kellomäki (sampo@symlabs.com)
* changed this
* edited that
09:: 20.8.2004, Sampo Kellomäki (sampo@symlabs.com)
* more edits
>>
< <abstract: ...>>
The first line that starts with the hash character is an optional comment that identifies the file as PlainDoc file. If you have emacs pd-mode installed, it will automatically be switched on.
The class tag takes as an argument a string which can be divided into up to 6 parts separated by exclamation marks. The first part is the LaTeX document class name.
The second part is for optional arguments to LaTeX document class. This is typically used to specify paper size and point size of main font.
The third part are optional arguments to pass to LaTeX babel package that deals with language specifics. Usually you would pass the ISO language code (e.g. "pt" for portuguese). The default is english.
The fourth part is an optional string to be included in footer or header of your document. Usually it would be abbreviated identification of the document, or perhaps your name. The exact way how this gets used will depend on the format template.
The fifth part is also optional. Some format templates display it after page number, thus permitting you to create effects like "page 5 of 37".
The sixth parameter, which is optional, can supply additional options. Currently defined options include
Turns on line numbering (at least in tex/pdf output)
In absence of class tag, the default document class is article.
Intended to hold revision control identifier, usually used for CVS Id tag.
Allows version of the document to be formally declared. Typically this is the externally visible version designation and most of the time this has nothing to do with cvsid.
Indicates document author, and often email, too. The author information is used to generate the title page. There is no special formatting for author information, but if you include an email address, you may want to put it in parentheses rather than the customary angle brackets to avoid confusion about where the tag ends.
Indicates other (minor) authors or people who should be given credit for the work. The string on the tag line will be used as title of the credits section. All subsequent lines describe the worthy contributors, one per line. It is customary to separate the company name by a comma.
Change log of the document. The string on the tag line specifies the title of the change log and rest of the tag is formatted as description list with bulleted sub lists. Usually the description title (the part before double colon (::)) is the revision number of the document. This is followed, on the same line, by date and editor, separated by a comma. All subsequent lines should be formatted as single level bulleted list, one list item per line (i.e. wrapping lines does not work). The bulleted items must be indented by exactly four spaces because it is a sublist of the description list (see list below).
You may have a change log in CVS. If you want to use that, I suggest you write a perl script that extracts it from cvs and formats it according to the conventions of the history tag and then just use the file inclusion facility to bring it in. I.e. we do not support this very well yet, patches welcome.
Used for short description about the document, usually abstract of a scientific paper. No special formatting requirements.
See also moretexpreamble, texpreamble, dbxpreamble, additionalarticleinfodbx, and htmlpreamble.