Re: Want to show URLs in printed version

2009-04-22 Thread Guenter Milde
On 2009-04-21, Drew Kime wrote:

>>  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.

...

> So you're confirming that it's *not* possible to do "pretty" links for
> electronic documents, but add something in the preamble that will
> render th e link after the title?

No. Only the we on this list don't know of a way. Maybe the LaTeX
experts at comp.text.tex have a solution.

Günter



Re: Want to show URLs in printed version

2009-04-21 Thread Drew Kime
On Tue, Apr 21, 2009 at 10:36 PM, BH  wrote:

> On Tue, Apr 21, 2009 at 5:52 PM, Drew Kime  wrote:
> > Yes, that's exactly what I was looking for. But it sounds like I'd need
> to
> > manually add the "if - else" code before every URL. If that's the case,
> I'm
> > more comfortable writing macros in vim, so I'll handle it in the lyx code
> > directly, not through the GUI. Thanks for the help.
> >
> > Drew
> >
>
> Perhaps you should take a look at the Branch feature: section 6.8 of
> the User's Guide.
>
> Bennett
>
Bennett, that's even better. Gives much better flexibility and control when
doing one version for print and one version for electronic. I always
wondered what Branches were for.

Drew


Re: Want to show URLs in printed version

2009-04-21 Thread BH
On Tue, Apr 21, 2009 at 5:52 PM, Drew Kime  wrote:
> On Tue, Apr 21, 2009 at 4:40 PM, Florian Rubach wrote:
>
>>
>> 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
>>
> Yes, that's exactly what I was looking for. But it sounds like I'd need to
> manually add the "if - else" code before every URL. If that's the case, I'm
> more comfortable writing macros in vim, so I'll handle it in the lyx code
> directly, not through the GUI. Thanks for the help.
>
> Drew
>

Perhaps you should take a look at the Branch feature: section 6.8 of
the User's Guide.

Bennett


Re: Want to show URLs in printed version

2009-04-21 Thread Drew Kime
On Tue, Apr 21, 2009 at 4:40 PM, Florian Rubach wrote:

>
> 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
>
Yes, that's exactly what I was looking for. But it sounds like I'd need to
manually add the "if - else" code before every URL. If that's the case, I'm
more comfortable writing macros in vim, so I'll handle it in the lyx code
directly, not through the GUI. Thanks for the help.

Drew


Re: Want to show URLs in printed version

2009-04-21 Thread Florian Rubach


Drew Kime schrieb:

On Tue, Apr 21, 2009 at 1:53 PM, Uwe Stöhr  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


Re: Want to show URLs in printed version

2009-04-21 Thread Drew Kime
On Tue, Apr 21, 2009 at 4:12 PM, Uwe Stöhr  wrote:

> Drew Kime schrieb:
>
>  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.
>>
>
> Then write the name in front of the link like I did in the Bibliography of
> the LyX UserGuide.
>
> regards Uwe
>
So you're confirming that it's *not* possible to do "pretty" links for
electronic documents, but add something in the preamble that will render the
link after the title?

Drew


Re: Want to show URLs in printed version

2009-04-21 Thread Uwe Stöhr

Drew Kime schrieb:


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.


Then write the name in front of the link like I did in the Bibliography of the 
LyX UserGuide.

regards Uwe


Re: Want to show URLs in printed version

2009-04-21 Thread Drew Kime
On Tue, Apr 21, 2009 at 1:53 PM, Uwe Stöhr  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


Re: Want to show URLs in printed version

2009-04-21 Thread Uwe Stöhr

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


newfile1.lyx
Description: application/lyx


Want to show URLs in printed version

2009-04-21 Thread Drew Kime
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.

I've solved this in the past by simply having the title as standard text,
and using a URL inset next to it. This works fine for the printed version,
but as a result also shows the URL text in the electronic version.

Is it possible to add an option -- I'm guessing it would be a hyperref
option -- that will cause the URL text to be displayed?

Thanks in advance for any help.

Drew