# [racket] Scribble experience

 From: Jens Axel Søgaard (jensaxel at soegaard.net) Date: Mon Jan 10 04:38:55 EST 2011 Previous message: [racket] Couldn't find a step matching that criterion Next message: [racket] Scribble experience Messages sorted by: [date] [thread] [subject] [author]

Hi All,

I am in the process of writing a small geometry book using Scribble.
So far I am pleased with the results.

The html version is available here:

http://jensaxel.dk/1x/geometribogen/

The html version uses MathJax to display the mathematical equations.

The figures were produced by asymptote, which is a small language
inspired by MetaPost. It was quite easy to write a Scribble command
@asymptote that first calls asymptote in the background and then inserts
the resulting image(s).

Overall Scribble has been pleasant to use. However there are some
small issues when the goal is to produce both pretty formatted html
and pdf documents from the same source.

Some of these problems occur due to the different resolutions of
paper and screen. An example:

The cover image is a large png, which must be scaled down in the html version:
@[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */["../billeder/Forside-Arkimedes.png" #:scale 0.50]}

In the pdf version the 50% scaling makes the image very small. So here
@[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */["../billeder/Forside-Arkimedes.png"]}
works better.

Another small issue (for me): Since Asymptote is used to produce the
geometric figures, I can produce both a pdf and a png version of each image.