Hi Ben Greenman Unsyntaxed elemtag and elemref work well in code:comment. I did this as follows: #lang scribble/manual @require[scribble/example]
@(define my-eval (make-base-eval)) Beginning. @examples[#:eval my-eval (code:comment #,(elemtag "plus2" "")) (define (plus2 n) (+ 2 n)) (plus2 0) (plus2 1) ] Intermission. @examples[#:eval my-eval (code:comment #,(list "See " (elemref "plus2" "previous example") " for the definition of plus2.")) (define (plus4 n) (plus2 (plus2 n))) (plus4 0) ] Conclusion. Thanks again for your help. Jos Koot _____ From: Jos Koot [mailto:jos.k...@gmail.com] Sent: domingo, 24 de septiembre de 2017 13:01 To: 'Ben Greenman' Cc: 'Racket Users'; 'Jos Koot' Subject: RE: [racket-users] repeated code in interactions of scribble Thanks very much. A nice and clear answer. May be I can insert tagged elements and elemrefs in code:comment escaping with #, in order to provide links to definitions in previous examples. I'll try that later. Thanks again, Jos _____ From: Ben Greenman [mailto:benjaminlgreen...@gmail.com] Sent: domingo, 24 de septiembre de 2017 6:45 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] repeated code in interactions of scribble You can re-use helper functions by running the different example blocks with the same evaluator (example below). I don't know how to hyperlink one interaction to another. - - - #lang scribble/manual @require[scribble/example] @(define my-eval (make-base-eval)) Beginning. @examples[#:eval my-eval (define (plus2 n) (+ 2 n)) (plus2 0) (plus2 1) ] Intermission. @examples[#:eval my-eval (define (plus4 n) (plus2 (plus2 n))) (plus4 0) ] Conclusion. -- 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.