9 LATEX customization of ProgDoc

Some of the options available for the '\sourcebegin' and the '\sourceinput' command (see section 3 on page [*]) can be set globally by redefining LATEX commands. Additional commands can be used to adjust the appearance of the generated output even further. Following a list of the available commands:

\pdFontSize The font size used for printing source listings. The default is 8pt. This command is the global counterpart of the fontsize option of '\sourcebegin' and '\sourceinput'.
\pdLineSep The line separation used for printing source listings. The default is 2.5ex. This command is the global counterpart of the linesep option of '\sourcebegin' and '\sourceinput'.
\pdBaseFont The font family which is used to print source listings. The default is '\ttdefault'.This command is the global counterpart of the fontname option of ' \sourcebegin' and '\sourceinput'.
\pdFontEnc The encoding of the font family chosen with \pdBaseFont or with the fontname option of the ' \sourcebegin' or '\sourceinput' commands. The default is OT1. This command is the global counterpart of the fontenc option of '\sourcebegin' and '\sourceinput'.
\pdCommentFont The font shape used for highlighting comments in the source listing. The default setting is ' \itshape'.
\pdKeywordFont The font shape used to highlight the key words of a programming language. The default is ' \bfseries'.
\pdPreprFont The font shape used to highlight preprocessor commands in C or C++. The default is ' \bfseries\itshape'.
\pdStringFont The font used to highlight string constants in source listings. The default setting is '\slshape'.
\ProgDoc Command to print the ProgDoc logo.
\pdULdepth This is a length command which controls the depth of the line under a listing caption. ProgDoc uses the ulem.sty package for underlining which does a pretty good job in guessing a reasonable value for this purpose. However it may sometimes be necessary to manually fine tune it, depending on the used font. The length may be set with the \setlength command. Resetting \pdULdepth to 0pt reactivates the initial ulem.sty algorithm. (This tutorial for example uses \setlength{ \pdULdepth}{ 2.5pt}.)
\pdPre6
DEPRECATED
This and the following three length commands correspond to the longtable commands \LTpre, \LTpost, \LTleft and \LTright respectively. For more information see the documentation of the longtable package [longtable]. \pdPre sets the amount of space before a listing. The default is \bigskipamount.
\pdPost6
DEPRECATED
\pdPost sets the amount of space after a listing. The default is 0cm.
\pdRight6
DEPRECATED
The margin at the right side of the listing. The default is \fill.
\pdLeft6
DEPRECATED
\pdLeft sets the amount of space at the left side of a listing. Usually the listing is left justified or centered (see also section 3, The \sourceinput command). But because listings are typeset inside a longtable environment, they aren't indented for example inside list environments. In that case it can be useful to set \pdLeft to \leftmargin. If the listing will be insight a nested list environment, you can use \renewcommand{ \pdLeft}{ x\leftmargin} where x is the nesting level. The default is 0cm.
All these commands can be redefined. If you want to typeset string constants in italic, you could insert the following line in the preamble of your '.pd' file: ' \renewcommand{ \pdStringFont}{ \slshape}'.

The words used to built up the header of each listing can be set by the user according to his preferences (though this is intended mainly to permit a certain kind of localization). They are defined in 'progdoc.sty' as follows:

\ListingName The name used to name listings. The default is ``Listing''.
\LineName The name of a line. The default setting is ``Line''.
\toName The word for ``to'' in ``Line xxx to yyy''. Defaults to ``to''.
\ReferenceName The sentence ``Referenced in''.
\PageName The words ``on page''.
\ListingContinue A word to indicate that the current listing is a continuation from a previous page. Defaults to ``continued''.
\NextPage6
DEPRECATED
This should be a small symbol to indicate that a listing is not finished, but will be continued on the next page. The default setting is '\ding{ 229}' which is the '229' symbol.

You could customize these entries for the german language by inserting the following lines into the preamble of your '.pd' file:

\def\LineName{Zeile}
\def\toName{bis}
\def\ReferenceName{Referenziert in}
\def\PageName{auf Seite}
\def\ListingContinue{Fortsetzung}



Footnotes

...\pdPre6
...
Because ProgDoc internally used the longtable environment in older versions to render the program listing, some of the longtable options have been made available to ProgDoc users. As new versions of ProgDoc don't use longtable anymore, this options have no effect. (See the useLongtable option of the \sourceinput command on page 1 for a compatibility option to enable the old style mode which uses the longtable environment).
Volker Simonis 2003-03-05