Recent Changes
Recent Changes · Search:

Configuring links: How to change the default URL link format settings

The format of links to external Web pages is preset. What control do I have over how URL links are printed?

1903 Sun Typewriter

All URL links are configured through format variables, which an administrator can change site-wide, per group or per page. For example, some print conventions specify that a URL should be printed in a typewriter font. There are 3 URL format variable settings used when the format is PDF:

    $UrlLinkFmt = 
        "<tbook:url name='\$LinkUrl'>\$LinkText</tbook:url>";

    $UrlLinkTextFmt = 
        "<tbook:visual markup='sl'>\$LinkText</tbook:visual>".

    $UrlLinkFootnoteFmt = 
        "<tbook:url name='\$PageUrl'>\$LinkText</tbook:url>";

By default, a bare URL prints inline and a URL with link text prints the bare URL as a footnote. Long URL addresses are automatically split across lines on suitable break characters. The PDF links are clickable.

To print Web addresses in a typewriter font, instead of the text font, add the following code to local/config.php after loading the Wikipublisher extensions:

if ( $format=='pdf' ) {

    $UrlLinkFmt = 
        "<tbook:url name='\$LinkUrl'>".
        "<tbook:visual markup='tt'>\$LinkText</tbook:visual>".

     $UrlLinkFootnoteFmt = 
        "<tbook:url name='\$PageUrl'>".
        "<tbook:visual markup='tt'>\$LinkText</tbook:visual>".


To use a sans-serif (gothic) font instead, change “tt” to “sf” in the visual tag’s markup attribute.

Category: navigation aid

« 00027 · Edit Form · 00029 »

Page last modified on 18 April 2008 at 03:02 PM