Home Tips & Tricks Use standardized source files General questions
 The guide of UDO
 Working with UDO
 Tips & Tricks

Write your own commands

UDO doesn't support every command of the destination formats. If you need a special command you can add it by using definitions with parameters. You only need some knowledge about the destination format.

The following example shows how to write commands for changing the font size for LaTeX, HTML, Windows Help and RTF:

!code [iso]
!docinfo [program] Changing the font size
!docinfo [author] Dirk Hagedorn
!docinfo [date] August 19th 1996

!ifdest [tex]
!define tiny  {\tiny{(!1)}}
!define large {\large{(!1)}}
!define Large {\Large{(!1)}}
!define LARGE {\LARGE{(!1)}}
!define huge  {\huge{(!1)}}
!define Huge  {\Huge{(!1)}}
!endif

!ifdest [win,rtf]
!define tiny  {\fs14 (!1)}
!define large {\fs28 (!1)}
!define Large {\fs36 (!1)}
!define LARGE {\fs44 (!1)}
!define huge  {\fs50 (!1)}
!define Huge  {\fs60 (!1)}
!endif

!ifndest [tex,win,rtf]
!macro  tiny  (!1)
!macro  large (!1)
!macro  Large (!1)
!macro  LARGE (!1)
!macro  huge  (!1)
!macro  Huge  (!1)
!endif

!begin_document
!maketitle
!tableofcontents

!node Test

(!tiny [tiny]),
normal,
(!large [large]),
(!Large [Large]),
(!LARGE [LARGE]),
(!huge [huge]) and
(!Huge [Huge]).

!end_document

Copyright © www.udo-open-source.org
Last updated on November 5, 2006

Home Tips & Tricks Use standardized source files General questions