MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Attaching a notebook to a message

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129349] Re: Attaching a notebook to a message
  • From: Helen Read <readhpr at gmail.com>
  • Date: Mon, 7 Jan 2013 00:37:14 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kc8k33$b1p$1@smc.vnet.net>

That actually works. I'm not sure we should be doing this routinely, 
though. In most instances I think it's better to post as text, so that 
people can read and comment inline.

Still, it's a cool idea.

Helen Read
University of Vermont

On 1/5/2013 2:17 AM, David Bailey wrote:
> I suddenly realised that there is (probably) a way to attach a notebook
> to a message here! The trick is to compress the expression which is the
> notebook:
>
> Compress[NotebookGet[nb]]
>
> For example:
>
> "1:eJzVUslOwzAQdSlQtgouHLggIwS0YhGtqooTEruQgEoNggPikBQHLBw7xI5aOHHmyF8\
> hxI/wFXicUNKUpYgTl5c3M2/\
> Gs2TGEXV3ACEkhzQcCUUcIa7dDHj6NRxQqT6sLcKY2wdWPrb2AhH627ayI3c7JZtMsSY1s\
> TybMSxtz2cE8/ghaxQioSNDR1HFyEeVesiIHI8LbF3Z/JIcU49IAgpoCL4I4YXy4+\
> sGQlMF+P6506hATsOmaBmxcQxCQ6KpfW5/MtkCckQ0AdlZl3ige42JaN+\
> 30e6HrJvgq4eyHWKIzhpcNFg2eG5w3uCSwVaCV2INtLzP/VD99hT3T9PmFPcPc+\
> YUvew1F08FI/w8UjTG4r9LjXcN0lqoelttJl4tQi9mnUZd8wlvk1SREU1OKb8QTYveEf5+\
> lmcNDd1ZSp1vqw/t4JJymfoZOyw5rMlGqIRnK9qgY5lkORDQdbA6VJ+\
> MuBsIrnb4xQkJJBXcqmjf2soqdkWAD2kjEFK4CkddSVyoVpYdqoq4UGso4ZAAV5dwebVUK\
> qZKT8BJ1C0j28SlnCpdWlqwDW3bIVMr3HkDs7QGzA=="
>
> Since Compress only uses printable ASCII characters, hopefully if you
> paste the above string into a notebook and perform:
>
> string//Uncompress//NotebookPut
>
> Of course, it is also possible to paste the raw output from NotebookGet,
> but that will be considerably more voluminous. Also a compressed string
> that becomes corrupted will be utterly destroyed, so it is probably
> safer than using the raw BoxForm expression.
>
> NB: The 9.0 bug that messes up cell merges, also affects NotebookGet, so
> I would suggest you use 8.0.4 for this trick until 9.1 comes out.
>
> This is really a test to discover if this survives the posting process!
>
> David Bailey
> http://www.dbaileyconsultancy.co.uk
>


-- 
HPR



  • Prev by Date: Re: Attaching a notebook to a message
  • Next by Date: Re: Precision
  • Previous by thread: Re: Attaching a notebook to a message
  • Next by thread: Re: Attaching a notebook to a message