# Re: Want to show URLs in printed version


Drew Kime schrieb:

On Tue, Apr 21, 2009 at 1:53 PM, Uwe Stöhr <uwesto...@web.de> wrote:


Drew Kime schrieb:

I've seen lots of questions about how to make clickable hyperlinks, but

I'm
trying to go the opposite direction. I'm using the Hyperlink inset in 1.6
and it is correctly creating the hyperlink in the PDF. But I need the
option
to output a PDF which has both the title text and the URL displayed so
that
it can be printed.


The hyperlink dialog provides you to enter a special name for the URL. If
you leave it empty, the link is then also the name, see attached.

regards Uwe


Thanks for the reply, but that's not what I'm trying to do. I *want* the
special name in the electronic version. Pseudocode example: "Please visit
[my blog|http://blogname.com] for more details." In the electronic versions,
I want the current behavior, where "my blog" is displayed, highlighted as a
link to "http://blogname.com";. But I'd like to be able to create a version
for print that would show the special name *and* the URL, since you
obviously can't click on a book.

Drew




If I get you right, you want two different outputs, number one for printing with both title and URL and number two as electronic version with just the clickable title and nothing more.
There is a workaround for that... It's not quite beautiful, but it works.

You have to make a distinction between your two cases "printed" and "pdf". For that, you can define your own latex-command, say \myprintversion, by \def\myprintversion{} in Latex-Code. In front of every hyperlink, you can check whether \myprintversion is defined or not and use that to decide what output to generate. To stick with your example, you could write \ifdefined\myprintversion (in Latex-Code), then add the hyperlink in the way you want it in the printversion. After that in Latex-Code \else, then add the hyperlink in the way you want it in the electronic version. To finalize the if-clause, you need to add the statement \fi in Latex-Code. Now all you have to do to switch between print-version and electronic version is to keep the definition of \myprintversion or delete/comment it.

If you need an example-file, I'll send you one.
Regards,

Florian