[racket] Scribble: Different output for LaTeX and HTML backends

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Dec 7 11:04:55 EST 2010

In the HTML output, can I do more than just choose a new CSS style?
(If yes, can you point to the proper place in the manual?)

I know how to change the styles in the CSS file, but for the embedding code
below, I need to output HTML too.

Ideally, I'd like to write something a la:

where <scribble1> and <scribble2> are place holders for standard
Scribble syntax.

@html/pdf{ @italic{HTML}}{ @bold{PDF} }
would generate the word HTML in italic in the HTML output, and
the word PDF in bold the pdf document.

Given the html/pdf primitive, it would be straigthforward to generate
conditional outputs.

/Jens Axel

2010/12/7 Robby Findler <robby at eecs.northwestern.edu>:
> You can just set up a new command and give it different
> implementations in a style.tex and for the HTML output. There is a
> section on this in the docs I believe.
> Robby
> On Tuesday, December 7, 2010, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
>> Hi All,
>> I have a YouTube video, that I'd like to embed in the HTML output using the
>> following code:
>> <iframe title="YouTube video player" class="youtube-player"
>> type="text/html" width="480" height="390"
>> src="http://www.youtube.com/embed/J3WIPS3Uh_A?rel=0"
>> frameborder="0"></iframe>
>> In the PDF version, I'd like to use:
>> @hyperlink["Mathematical Proofs: The Cosine Rule <http://www.youtube.com/watch?v=J3WIPS3Uh_A>"]{Proof for the
>> cosine relation in an acute trinagle}
>> How can I detect whether pdf or html is being generated?
>> Is there a parameter I can use?
>> --
>> Jens Axel Søgaard
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://lists.racket-lang.org/listinfo/users
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Jens Axel Søgaard

Posted on the users mailing list.