Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the RTF syntax for a hyperlink?

HTML is to <a href="x">y</a> as RTF is to _______?

like image 430
C. Dragon 76 Avatar asked May 17 '10 15:05

C. Dragon 76


People also ask

Can RTF have hyperlinks?

The ODS RTF output destination in the SAS® System opens up a world of formatting and stylistic enhancements for your output. Furthermore, it allows you to use hyperlinks to navigate both within a document and to external files.

What does RTF mean in HTML?

Rich Text Format (RTF) is a file format that lets you exchange text files between different word processors in different operating systems (OSes).

What is RTF format?

RTF stands for Rich Text Format and is a universal document file format and is easily read by many of the word-processing packages. It is particularly useful to those using a different word-processing package from those used on campus.


3 Answers

The equivalent of the following HTML:

<a href="https://www.google.com">Google</a> 

for an RTF file is:

{\field{\*\fldinst HYPERLINK "http://www.google.com/"}{\fldrslt Google}} 

which results in a link:

Google

but without additional style information, will appear unformatted:

Google

like image 139
MikeyBunny Avatar answered Oct 12 '22 10:10

MikeyBunny


This will show the hyperlink in the usual blue, with underline:

{\colortbl ;\red0\green0\blue238;} {\field{\*\fldinst HYPERLINK "URL"}{\fldrslt{\ul\cf1Text to display}}} 
like image 24
Oliver Bock Avatar answered Oct 12 '22 10:10

Oliver Bock


The last article works fine. I even took it further to display multiple links (and replaced \par to \line tags in order to stay in the same paragraph).

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22
{\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt{\ul\cf1This is a Google URL}}}\f0\fs22\line
{\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt{\ul\cf1This is a Second URL}}}\f0\fs22\line
}
like image 40
Vlad P. Avatar answered Oct 12 '22 11:10

Vlad P.