Documentation for the AscToRTF conversion utility

This documentation can be downloaded as part of the documentation set in .zip format.


Prev | Next | Contents


8 Using in-line tags

In-line tags allow you to place special codes in your source text to achieve effects that couldn't be done by converting plain text alone. As such they greatly enhance AscToRTF's ability to be used as a RTF generating tool, especially in batch conversion or automated environments where manual correction of the results would be time consuming.

8.1 Format of inline tags

In-line tags evolved as an extension of the preprocessor tags introduced in earlier versions or AscToHTM. As the name implies, in-line tags may be placed "in line" with the source tag, giving greater flexibility for their use.

In-line tags are signified by the start and end delimiters "[[" and "]]", for example :-

[[GOTO Format of inline tags]]

will generate a hyperlink that will take you to the section titled "Format of inline tags" (i.e. this section :-).

The whole tag must be contained within a single line of the source file, that is there cannot be any newline characters in the middle of a tag. You can have as many tags as you like on any given line, but they may not be nested.

In-line tags are a relatively new introduction into AscToHTM and as such a Tag Manual has yet to be written. In the meantime a summary of some of the in-line tags available is given in 8.2.


8.2 Summary of in-line tags

This is a brief overview of some of the more useful in-line tags. A fuller description of using in-line tags will be produced when a Tag Manual is written.


8.2.1 BR

Following the HTML tag of the same name this inserts a line break.


8.2.2 COLOUR <value>

Not yet implemented in RTF

[[COLOUR <value>]]

Change text colour. If <value> is omitted, text reverts to black.


8.2.3 CONTENTS_LIST

Not yet fully implemented in RTF

[[CONTENTS_LIST <number levels> <Style>]]

Inserts a contents list with the specified number of heading levels (1=chapter, 2=main sections...)

A <style> value of "1" gives a traditional list, whilst "2" generates a navigation bar (best used with level set to 1)

This may also be set as a directive $_$_CONTENTS_LIST (see 7.3.2).


8.2.4 FONT

Not yet implemented in RTF

[[FONT 0,<list of fonts>,<font size>]]

Changes the current font. When supplying a list of fonts it is a good idea to ensure you include a font commonly available.


8.2.5 GOTO

[[GOTO <Section title>]]

Inserts a hyperlink to the named section title within the current document. For example

[GOTO Use the preprocessor]

becomes

Using the preprocessor


8.2.6 HYPERLINK

[[HYPERLINK URL,"<url>","<display text>"]] or

[[HYPERLINK LINK,"<link name>","<display text>"]]



Inserts a hyperlink. When "URL" is requested, you should supply the URL to be linked to, and the display text, both in quotes.

When "LINK" is requested, a hyperlink to a named LINKPOINT will be added, and you should supply the LINKPOINT name and the hyperlink display text, both in quotes.

For example

[[HYPERLINK URL,"http://www.jafsoft.com/","JafSoft Limited"]] and
[[HYPERLINK LINK,"Definitions","section on definitions"]]

becomes

JafSoft Limited and
section on definitions


8.2.7 LINKPOINT

[[LINKPOINT "<link name>"]]

Inserts a named bookmark into the RTF. This bookmark can then be used in any HYPERLINK tags (see above 8.2.6).


8.2.8 NB or SPACES

[[NB <Number of spaces>]]
[[SPACES <Number of spaces>]]



Inserts the specified number of spaces, or non-breaking spaces.

Since both tags are currently implemented using &nbsp; there is currently no difference between the two.

This is more necessary in HTML where multiple spaces are ignored.


8.2.9 SUPER and SUB

[[SUPER <superscript text>]] and [[SUB <subscript text>]]

Places the supplied text in superscript or subscripts


8.2.10 TEXT

[[TEXT <protected text>]]

Protects text from various AscToRTF conversions. For example a section number line any URL like :-

section 3.1 and http://www.jafsoft.com/

would normally be turned into hyperlinks like this:-

section 3.1 and http://www.jafsoft.com/


8.2.11 TIMESTAMP

Inserts a timestamp (currently a date) indicating when the RTF file was converted from text. For example :-

This file was last converted on [[Timestamp]]

becomes

This file was last converted on 16-Aug-2001



Prev | Next | Contents


Valid HTML 4.0! Converted from a single text file by AscToHTM
© 1997-2000 JafSoft Limited
Converted by AscToHTM