Re: [racket-users] Scribble: unnumbered and unindexed sections
Besides `#:style 'unnumbered` as William says, to avoid the duplicate key warnings, you more or less have to cons up a new name --- but it doesn't have to be a visibly distinct section name. You can either * use `#:tag "HandinX"` with a different "X" for each "Handin Instructions" section, or * use `#:tag-prefix "X"` with a different "X" for each of the N sections. If you go the latter route, you'll also need to use `#:tag-prefix` in a cross-reference to a subsection (if you have any besides "Handin Instructions") in one of the N sections. At Sun, 4 Sep 2016 11:50:21 -0700 (PDT), Shriram Krishnamurthi wrote: > Is there a way to have unnumbered and unindexed section? (Yes, these are > different issues.) > > It would be helpful to have unnumbered sections, à la \[sub]section* in LaTeX. > > It would be especially helpful to have unindexed sections. The real nuisance > I'm trying to avoid is, say I have N sections that each have a subsection > named "Handin Instructions". Then I get a bunch of Scribble warnings due to > the duplicate section name. Since I have no desire to link to these sections, > I don't need them indexed at all. And this way I don't have to cons up new > names for each of them (though I do of course have that option…). > > Thanks. > > -- > 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. -- 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: unnumbered and unindexed sections
Would this do what you want? #lang scribble/base @section{a} @subsubsub*section{a} @subsubsub*section{a} @subsubsub*section{a} @section{b} @seclink["a" "section a"] @subsubsub*section{b} @subsubsub*section{b} @subsubsub*section{b} @section{b} @subsubsub*section{b} @subsubsub*section{b} @subsubsub*section{b} Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Shriram Krishnamurthi Sent: domingo, 04 de septiembre de 2016 20:50 To: Racket Users Subject: [racket-users] Scribble: unnumbered and unindexed sections Is there a way to have unnumbered and unindexed section? (Yes, these are different issues.) It would be helpful to have unnumbered sections, à la \[sub]section* in LaTeX. It would be especially helpful to have unindexed sections. The real nuisance I'm trying to avoid is, say I have N sections that each have a subsection named "Handin Instructions". Then I get a bunch of Scribble warnings due to the duplicate section name. Since I have no desire to link to these sections, I don't need them indexed at all. And this way I don't have to cons up new names for each of them (though I do of course have that option…). Thanks. -- 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. -- 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] Re: lambda and the equivalent define / "defun"
if anyone stumbles on this later this is also discussed in Kent Dybvig's TSPL4 http://www.scheme.com/tspl4/start.html#./start:h6 from section 2.6: For example, the definitions of cadr and list might be written as follows. (define (cadr x) (car (cdr x))) (define (list . x) x) -- 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: unnumbered and unindexed sections
On Sun, Sep 04, 2016 at 11:50:21AM -0700, Shriram Krishnamurthi wrote: > Is there a way to have unnumbered and unindexed section? (Yes, these are > different issues.) > > It would be helpful to have unnumbered sections, à la \[sub]section* in LaTeX. You can use `@section[#:style 'unnumbered]` for this. See `raco doc part` for some of the relevant style names. I'm not sure, but one of them ('hidden ?) may help with unindexed. -- William J. Bowman -- 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. signature.asc Description: PGP signature
Re: [racket-users] Re: lambda and the equivalent define / "defun"
merci & danker - I had just done same-parity exercise using this but did not see the equivalence -- 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] Re: lambda and the equivalent define / "defun"
I hope these examples are enough to help with your problem: ;-- #lang racket (define (negative . s) (map - s)) (negative 1 2 3 -4) ; ==> '(-1 -2 -3 4) (define (multiply-by n . s) (map (lambda (x) (* n x)) s)) (multiply-by 5 1 2 3) ; ==> '(5 10 15) (define (count . s) (length s)) (count 1 2 3 1 2 3) ; ==> 6 ;-- Gustavo On Sun, Sep 4, 2016 at 2:36 PM, Sanjeev Sharmawrote: > two "x" 's also work > > (define list (lambda x x)) > > -- > 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. -- 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: unnumbered and unindexed sections
Is there a way to have unnumbered and unindexed section? (Yes, these are different issues.) It would be helpful to have unnumbered sections, à la \[sub]section* in LaTeX. It would be especially helpful to have unindexed sections. The real nuisance I'm trying to avoid is, say I have N sections that each have a subsection named "Handin Instructions". Then I get a bunch of Scribble warnings due to the duplicate section name. Since I have no desire to link to these sections, I don't need them indexed at all. And this way I don't have to cons up new names for each of them (though I do of course have that option…). Thanks. -- 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] Re: lambda and the equivalent define / "defun"
two "x" 's also work (define list (lambda x x)) -- 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] lambda and the equivalent define / "defun"
is there a define syntax equivalent to this lambda (define list (lambda x x x)) (list 1 2 3 4 5 "a") ;returns ;'(1 2 3 4 5 "a") I wanted to write subsets from SICP without passing the parameter as a list, and a simiar version of average (define nil '()) (define (subsets s) (if (null? s) (list nil) (let ((rest (subsets (cdr s (append rest (map (lambda (x) (append (list (car s)) x)) rest) (subsets (list 1 2 3)) ; complete using the format of the simplified list lambda (define ss (lambda s (if (null? s) (list nil) (let ((rest (subsets (cdr s (append rest (map (lambda (x) (append (list (car s)) x)) rest)) (ss 1 2 3) -- 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.