[racket] Expressing attrributes in scribble/html?

From: Greg Hendershott (greghendershott at gmail.com)
Date: Sun Nov 10 21:06:55 EST 2013

>From peeking at the source[1] it looks like you supply them in square
brackets with the attribute names ending in a colon. For instance
this:

#lang scribble/html
@a[href: "http://www.racket-lang.org"
   title: "Racket the Ultimate"]{Racket}

evaluates to this:

<a href="http://www.racket-lang.org" title="Racket the Ultimate">Racket</a>

[1]: https://github.com/plt/racket/blob/master/pkgs/scribble-pkgs/scribble-lib/scribble/html/xml.rkt


On Sun, Nov 10, 2013 at 6:27 PM, Daniel Prager
<daniel.a.prager at gmail.com> wrote:
> Eli gave a couple of example of generating html in the as-yet undocumented,
> but neat-looking #lang scribble/html on stackoverflow:
> http://stackoverflow.com/questions/9253126/generate-html-in-racket
>
> These examples are attribute free.  E.g.
>
>
> #lang scribble/html
> @(define name "foo")
> @html{@head{@title{@name}}
>       @body{@h1{@name}}}
>
>
> How do I encode an attribute?
>
> E.g. ? -> <a href='foo.html'>bar</a>
>
>
> Thanks
>
> Dan
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>

Posted on the users mailing list.