Class TTexDocGenerator

Unit

Declaration

type TTexDocGenerator = class(TDocGenerator)

Description

generates latex documentation

Extends TDocGenerator and overwrites many of its methods to generate output in LaTex format.

Hierarchy

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 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 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;
 
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;
 
Protected function LatexString(const S: string): string; override;
 
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;
 
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 procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override;
 
Protected function FormatKeyWord(AString: string): string; override;

FormatKeyWord is called from within FormatPascalCode to return AString in a bold font.

Protected function FormatCompilerComment(AString: string): string; override;

FormatCompilerComment is called from within FormatPascalCode to return AString in italics.

Protected function FormatComment(AString: string): string; override;

FormatComment is called from within FormatPascalCode to return AString in italics.

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 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;

FormatPascalCode is intended to format Line as if it were Object Pascal code in Delphi or Lazarus. However, unlike Lazarus and Delphi, colored text is not used because printing colored text tends to be much more expensive than printing all black text.

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;
 
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;

Indicate if the output must be simplified for latex2rtf

Published property LatexHead: TStrings read FLatexHead write SetLatexHead;

The strings in LatexHead are inserted directly into the preamble of the LaTeX document. Therefore they must be valid LaTeX code.


Generated by PasDoc 0.15.0.