Home The syntax of UDO Images Miscellaneous

Hypertext commands


Labels

Using the command !label you can set labels inside the source file. An example:

!label example

When converting to the hypertext formats Windows Help, HTML, ST-Guide and Pure C Help UDO inserts references inside the text to this label automatically. You can search for these labels inside the search dialog of Windows Help.

When you set the upper label you can jump from every position where the word "example" is used to the position where you used the label.

Here a list how UDO converts a label for the hypertext formats:

HTML: <a name="example"</a>
LaTeX: \label{example}
Linuxdoc-SGML: <label id="example">
Pure-C-Help: sensitive("example") inside the header
ST-Guide: @symbol ar example
Turbo-Vision: .topic example inside the header
WinHelp: #{\footnote # example}

Please note: You shouldn't use special chars like commas, semicolons, quotes or apostrophes inside the label text because some formats have problems with these special characters. Please try to avoid them. In most cases you can avoid them if you really want.

Links

Sometimes you maybe want to set a link to other parts of the current document or to other documents. To make it possible for you to insert links UDO offers you the placeholders called (!link...), (!xlink...) and (!plink...).

Please note: If you want to use a "(" or a "]" inside a link you have to quote it with an exclamation mark:

Wrong: (!link [Brackets])] [Link])
Right: (!link [Brackets!]!)] [Link])
                       ----

Internal links

Using the (!link...) command you can insert links to parts of the current document. You can link to chapters, sections, subsections, labels and aliases. The following list shows you how to use the link command and how UDO converts it:

UDO:       (!link [a word] [the link])
HTML:      <a href="file.htm#the link">a word</a>
LaTeX:     a word (see \ref{the link})
ST-Guide:  @{"a word" link "the link"}
WinHelp:   {\uldb a word}{\v the_link}
Turbo:     {a word:the_link}
else:      a word (see "the link")

The following example shows how to insert a link to my contact addresses:

If you want to register UDO,
please send (!link [me] [Contact addresses])
an email.

... will be displayed this way:

If you want to register UDO, please send me an email.

Please note:

  1. You may use up to (!MAXLINKS) inside a paragraph. If you will use more links UDO will print an error message.
     
  2. When converting to hypertext formats UDO checks if the link destination exists. If it doesn't exits UDO prints an error message. When converting to the other formats UDO doesn't check if the link destination exists!
     
  3. LaTeX only allows it to link to aliases and labels.
     

Internal links with images

Especially for Windows Help and HTML there's existing the (!ilink...) ("image link") commands. It is a mixture of the (!img...) and (!link...) command that allows one to display "hyperimages". If you click an image you will jump to another part of the current document.

UDO:      (!ilink [img] [text] [link])
WinHelp:  {\uldb \{bmc img.bmp\}}{\v link}
HTML:     <a href="link"><img src="img.gif" alt="text"></a>
else:     like (!link [text] [link])

Please note:

  1. UDO won't check if the images exist.
     
  2. By default UDO uses `.gif' as the suffix for images when converting to HTML. You can use the command !html_img_suffix to change the suffix.
     
  3. You may use up to (!MAXLINKS) inside a paragraph. If you will use more links UDO will print an error message.
     

Internal links to pages

Especially for LaTeX there's existing the (!plink...) ("page link") command:

UDO:    (!plink [link commands] [Links])
LaTeX:  link commands (see page \pageref{Links})
else:   link commands

The following example shows how to insert a page like to the page that contains my contact addresses:

If you want to register UDO,
please send (!plink [me] [Contact addresses])
an email.

... will be displayed this way:

If you want to register UDO, please send me an email.

Please note:

  1. You can only insert page links to labels and aliases, not to chapters when converting to LaTeX.
     
  2. You may use up to (!MAXLINKS) inside a paragraph. If you will use more links UDO will print an error message.
     

External links

With the (!xlink...) ("external link") command you can insert links to (parts of) other documents, net sites or hypertexts. The difference to the upper command: UDO doesn't adjust special chars of the link destination. The tilde isn't a non-breaking space in the link destination, too.

UDO:       (!xlink [UDO] [*:\udo.hyp])
ST-Guide:  @{"UDO" link "*:\udo.hyp"}

UDO:       (!xlink [Atari] [http://www.atari.com])
HTML:      <A HREF="http://www.atari.com">Atari</A>

UDO:       (!xlink [UDO] [Titel@d:/winhelp/udo.hlp])
WinHelp:   {\uldb UDO}{\v Titel@d:/winhelp/udo.hlp}

else:     UDO (or Atari)

How to use external links inside an HTML file is descriped in the following example:

""(!xlink [Yahoo] [http://www.yahoo.com])!..""
(!nl)
""(!xlink [Web.De] [http://web.de])!..""

... will be displayed this way:

"Yahoo..."
"Web.De..."

Please note:

  1. You have to use existing topic names for Windows Help. A topic name must contain only numbers and characters form the alphabet. All other characters will be converted by UDO.
     
  2. You should use `*:\' at the beginning of an external link for the ST-Guide to tell it to look for the hypertext in all directories you defined with PATHS in your ST-GUIDE.INF.
     
  3. Using the switch called !no_xlinks [...] you can suppress the conversion of external links. This is useful if you wrote a source file especially for HTML and you want to make a version for Windows Help or ST-Guide, where the external file wouldn't make no sense.
     

Home The syntax of UDO Images Miscellaneous