Class TTexDocGenerator
Unit
Declaration
type TTexDocGenerator = class(TDocGenerator)
Description
LaTeX documentation generator.
Extends TDocGenerator and overwrites many of its methods to generate output in LaTex format.
Source: source/component/PasDoc_GenLatex.pas (line 42).
Hierarchy
- TObject
- TPersistent
- TComponent
- TDocGenerator
- TTexDocGenerator
Overview
Methods
| Protected | function ConvertString(const s: string): string; override; |
| Protected | function ConvertChar(c: char): String; override; |
| Protected | procedure WriteUnit(const HL: integer; const U: TPasUnit); override; |
| Protected | function LatexString(const S: string): string; override; |
| Protected | function CodeString(const s: string): string; override; |
| Protected | function CreateLink(const Item: TBaseItem): string; override; |
| Protected | procedure WriteStartOfCode; override; |
| Protected | procedure WriteEndOfCode; override; |
| Protected | function Paragraph: string; override; |
| Protected | function ShortDash: string; override; |
| Protected | function LineBreak: string; override; |
| Protected | function URLLink(const URL: string): string; override; |
| Protected | function URLLink(const URL, LinkDisplay: string): string; override; |
| Protected | procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override; |
| Protected | function FormatKeyWord(AString: string): string; override; |
| Protected | function FormatCompilerComment(AString: string): string; override; |
| Protected | function FormatComment(AString: string): string; override; |
| Protected | function FormatAnchor(const Anchor: string): string; override; |
| Protected | function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; override; |
| Protected | function FormatBold(const Text: string): string; override; |
| Protected | function FormatItalic(const Text: string): string; override; |
| Protected | function FormatWarning(const Text: string): string; override; |
| Protected | function FormatNote(const Text: string): string; override; |
| Protected | function FormatPreformatted(const Text: string): string; override; |
| Protected | function FormatImage(FileNames: TStringList): string; override; |
| Protected | function FormatList(ListData: TListData): string; override; |
| Protected | function FormatTable(Table: TTableData): string; override; |
| Public | function FormatPascalCode(const Line: string): string; override; |
| Public | function GetFileExtension: string; override; |
| Public | procedure WriteDocumentation; override; |
| Public | constructor Create(AOwner: TComponent); override; |
| Public | destructor Destroy; override; |
| Public | function EscapeURL(const AString: string): string; virtual; |
| Public | function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override; |
Properties
| Published | property Latex2rtf: boolean read FLatex2rtf write FLatex2rtf default false; |
| Published | property LatexHead: TStrings read FLatexHead write SetLatexHead; |
Description
Methods
| Protected | function ConvertString(const s: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.ConvertString. Converts for each character in S, thus assembling a String that is returned and can be written to the documentation file. The @ character should not be converted, this will be done later on. | |
| Protected | function ConvertChar(c: char): String; override; |
|
Called by ConvertString to convert a character. Will convert special characters to their html escape sequence -> test | |
| Protected | procedure WriteUnit(const HL: integer; const U: TPasUnit); override; |
|
This item has no description. Showing description inherited from TDocGenerator.WriteUnit. Abstract method that writes all documentation for a single unit U to output, starting at heading level HL. Implementation must be provided by descendant objects and is dependent on output format. | |
| Protected | function LatexString(const S: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.LatexString. Process LaTeX content, like provided by the @latex tag. The default implementation is this class simply discards it, i.e. returns always ''. Generators that know what to do with raw LaTeX markup can override this with simple "Result := S". | |
| Protected | function CodeString(const s: string): string; override; |
|
Makes a String look like a coded String, i.e. '\begin{ttfamily}TheString\end{ttfamily}' in LaTeX. } | |
| Protected | function CreateLink(const Item: TBaseItem): string; override; |
|
Returns a link to an anchor within a document. LaTeX simply concatenates the strings with either a "-" or "." character between them. | |
| Protected | procedure WriteStartOfCode; override; |
|
This item has no description. | |
| Protected | procedure WriteEndOfCode; override; |
|
This item has no description. | |
| Protected | function Paragraph: string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.Paragraph. This is paragraph marker in output documentation. Default implementation in this class simply returns ' ' (one space). | |
| Protected | function ShortDash: string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.ShortDash. See TTagManager.ShortDash. Default implementation in this class returns '-'. | |
| Protected | function LineBreak: string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.LineBreak. Markup that forces line break in given output format (e.g. '<br>' in html or '\\' in LaTeX). It is used on In this class it returns '', because it's valid for an output generator to simply ignore | |
| Protected | function URLLink(const URL: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.URLLink. Markup to display URL in a description. E.g. HTML generator will want to wrap this in <a href="...">...</a>. Note that passed here URL is not processed by ConvertString (because sometimes it could be undesirable). If you want you can process URL with ConvertString when overriding this method. Default implementation in this class simply returns ConvertString(URL). This is good if your documentation format does not support anything like URL links. | |
| Protected | function URLLink(const URL, LinkDisplay: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.URLLink. Text which will be shown for an URL tag. URL is a link to a website or e-mail address. LinkDisplay is an optional parameter which will be used as the display name of the URL. | |
| Protected | procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override; |
|
This item has no description. Showing description inherited from TDocGenerator.WriteExternalCore. This is called from WriteExternal when ExternalItem.Title and ShortTitle are already set, message about generating appropriate item is printed etc. This should write ExternalItem, including ExternalItem.DetailedDescription, ExternalItem.Authors, ExternalItem.Created, ExternalItem.LastMod. | |
| Protected | function FormatKeyWord(AString: string): string; override; |
|
| |
| Protected | function FormatCompilerComment(AString: string): string; override; |
|
| |
| Protected | function FormatComment(AString: string): string; override; |
|
| |
| Protected | function FormatAnchor(const Anchor: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatAnchor. Writes a link-anchor. | |
| Protected | function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.MakeItemLink. Return a link to item Item which will be displayed as LinkCaption. Returned string may be directly inserted inside output documentation. LinkCaption will be always converted using ConvertString before writing, so don't worry about doing this yourself when calling this method. LinkContext may be used in some descendants to present the link differently, see TLinkContext for it's meaning. If some output format doesn't support this feature, it can return simply ConvertString(LinkCaption). This is the default implementation of this method in this class. | |
| Protected | function FormatBold(const Text: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatBold. Return Text formatted using bold font. Given Text is already in the final output format (with characters converted using ConvertString, @-tags expanded etc.). Implementation of this method in this class simply returns | |
| Protected | function FormatItalic(const Text: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatItalic. Return Text formatted using italic font. Analogous to FormatBold. | |
| Protected | function FormatWarning(const Text: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatWarning. Return Text using bold font by calling FormatBold(Text). | |
| Protected | function FormatNote(const Text: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatNote. Return Text using italic font by calling FormatItalic(Text). | |
| Protected | function FormatPreformatted(const Text: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatPreformatted. Return Text preserving spaces and line breaks. Note that Text passed here is not yet converted with ConvertString. The implementation of this method in this class just returns ConvertString(Text). | |
| Protected | function FormatImage(FileNames: TStringList): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatImage. Return markup to show an image. FileNames is a list of possible filenames of the image. FileNames always contains at least one item (i.e. FileNames.Count >= 1), never contains empty lines (i.e. Trim(FileNames[I]) <> ''), and contains only absolute filenames. E.g. HTML generator will want to choose the best format for HTML, then somehow copy the image from FileNames[Chosen] and wrap this in <img src="...">. Implementation of this method in this class simply shows | |
| Protected | function FormatList(ListData: TListData): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatList. Format a list from given ListData. | |
| Protected | function FormatTable(Table: TTableData): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatTable. Return appropriate content for given Table. It's guaranteed that the Table passed here will have at least one row and in each row there will be at least one cell, so you don't have to check it within descendants. | |
| Public | function FormatPascalCode(const Line: string): string; override; |
|
| |
| Public | function GetFileExtension: string; override; |
|
Returns Latex file extension ".tex". | |
| Public | procedure WriteDocumentation; override; |
|
The method that does everything — writes documentation for all units and creates overview files. | |
| Public | constructor Create(AOwner: TComponent); override; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | function EscapeURL(const AString: string): string; virtual; |
|
This item has no description. | |
| Public | function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override; |
|
This item has no description. Showing description inherited from TDocGenerator.FormatSection. Writes a section heading and a link-anchor. | |
Properties
| Published | property Latex2rtf: boolean read FLatex2rtf write FLatex2rtf default false; |
|
Indicate if the output must be simplified for latex2rtf | |
| Published | property LatexHead: TStrings read FLatexHead write SetLatexHead; |
|
The strings in | |
Generated by PasDoc 0.17.0.snapshot.