RE: [racket-users] scribble/eval interaction hyperlinks locally bound variables

2016-10-27 Thread Jos Koot
Hi Matthias,
Thanks. I'll look into your suggestion.
For the moment, when I see an unwanted link,
I change the name of the local variable
to one not found in the help desk for any module I import. 
Thanks again, Jos

-Original Message-
From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] 
Sent: jueves, 27 de octubre de 2016 16:46
To: Jos Koot
Cc: Racket Users
Subject: Re: [racket-users] scribble/eval interaction hyperlinks locally bound 
variables


> On Oct 27, 2016, at 5:34 AM, Jos Koot <jos.k...@gmail.com> wrote:
> 
> Consider:
> #lang scribble/manual 
> @(require (for-label racket) scribble/eval)) 
> @interaction[(let ((add1 sub1)) (add1 1))]
> In the produced HTML file the locally bound variable 'add1' 
> is linked (in blue) to the docs of Racket's procedure 'add1'. 
> The same problem with @racket[...]
> I can avoid this by using (for-label (except-in racket add1)) 
> but then the link also disappears in 
> @interaction[(add1 3)].
> This is a silly simplified example, of course, 
> but the problem is the probable chance that one uses a local variable 
> or otherwise shaddows a variable with the same name 
> as an imported variable whose existence one is not aware of.
> Is there a way to avoid hyperlinking of 
> locally bound or otherwise shaddowed variables 
> with the same names as imported variables?
> Thanks, Jos



You could define local things so that they also introduce an anchor and then 
references to the local name get linked. (I failed to
think about this when I wrote HtDP/2e but some of us thought ahead and some of 
our papers use such setups.) 

- Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] scribble/eval interaction hyperlinks locally bound variables

2016-10-27 Thread Matthias Felleisen

> On Oct 27, 2016, at 5:34 AM, Jos Koot  wrote:
> 
> Consider:
> #lang scribble/manual 
> @(require (for-label racket) scribble/eval)) 
> @interaction[(let ((add1 sub1)) (add1 1))]
> In the produced HTML file the locally bound variable 'add1' 
> is linked (in blue) to the docs of Racket's procedure 'add1'. 
> The same problem with @racket[...]
> I can avoid this by using (for-label (except-in racket add1)) 
> but then the link also disappears in 
> @interaction[(add1 3)].
> This is a silly simplified example, of course, 
> but the problem is the probable chance that one uses a local variable 
> or otherwise shaddows a variable with the same name 
> as an imported variable whose existence one is not aware of.
> Is there a way to avoid hyperlinking of 
> locally bound or otherwise shaddowed variables 
> with the same names as imported variables?
> Thanks, Jos



You could define local things so that they also introduce an anchor and then 
references to the local name get linked. (I failed to think about this when I 
wrote HtDP/2e but some of us thought ahead and some of our papers use such 
setups.) 

— Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] scribble/eval interaction hyperlinks locally bound variables

2016-10-27 Thread Jos Koot
Consider:

#lang scribble/manual
@(require (for-label racket) scribble/eval))
@interaction[(let ((add1 sub1)) (add1 1))]

In the produced HTML file the locally bound variable 'add1'
is linked (in blue) to the docs of Racket's procedure 'add1'.
The same problem with @racket[...]

I can avoid this by using (for-label (except-in racket add1))
but then the link also disappears in
@interaction[(add1 3)].

This is a silly simplified example, of course,
but the problem is the probable chance that one uses a local variable
or otherwise shaddows a variable with the same name
as an imported variable whose existence one is not aware of.

Is there a way to avoid hyperlinking of
locally bound or otherwise shaddowed variables
with the same names as imported variables?

Thanks, Jos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.