ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Google Chart URL
@ 2011-04-19  1:05 Reviczky, Adam
  2011-04-19  4:16 ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Reviczky, Adam @ 2011-04-19  1:05 UTC (permalink / raw)
  To: ntg-context

> \asciimode can be overkill because it makes also “%” a normal character, better you define a command which change the catcodes.
> 
> \def\googlechart
>   {\begingroup
>    \setcatcodetable\vrbcatcodes
>    \dodoubleempty\dogooglechart}
> 
> \def\dogooglechart[#1][#2]%
>   {\endgroup
>    \externalfigure[#1][method=png,#2]}
> 
> \starttext
> \googlechart[https://chart.googleapis.com/chart?cht=p3&chs=250x100&chd=t:60,40&chl=Hello|World]
> \stoptext
> 
> Wolfgang

Thanks, that looks really nice, but somehow it doesn't work with my url:
http://chart.apis.google.com/chart?chs=350x220&cht=p3&chd=s:G99p&chdl=2|1|1|6|2|0|52|52|2|2|1|1|2|2|2|2|2|1|1|2|2|1|1|1|2|1|1&chdlp=b&chp=0.1&chl=fsharp|gettext|gettext-base|Others%20%2824%29&chma=95,95&chtt=Launchpad+Statistics+for+%7Ereviczky+-+ppa&chts=676767,13.5

and I can't really figure out why ...

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Google Chart URL
@ 2011-04-19  6:40 Reviczky, Adam
  0 siblings, 0 replies; 11+ messages in thread
From: Reviczky, Adam @ 2011-04-19  6:40 UTC (permalink / raw)
  To: ntg-context

> Do you have “\enabledirectives[schemes.cleanmethod=md5]” in your preamble?
Silly me, I've forgot that.

Thanks again for your help!

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Google Chart URL
@ 2011-04-16 19:28 Reviczky, Adam
  2011-04-16 19:49 ` Aditya Mahajan
  0 siblings, 1 reply; 11+ messages in thread
From: Reviczky, Adam @ 2011-04-16 19:28 UTC (permalink / raw)
  To: ntg-context

Hmm

I still have some problems with this. How would it look like for this URL?
I've tried asciimode and \letterbar + \letterpercent, but no luck.

http://chart.apis.google.com/chart?chs=350x220&cht=p3&chd=s:G99p&chdl=2|1|1|6|2|0|52|52|2|2|1|1|2|2|2|2|2|1|1|2|2|1|1|1|2|1|1&chdlp=b&chp=0.1&chl=fsharp|gettext|gettext-base|Others%20%2824%29&chma=95,95&chtt=Launchpad+Statistics+for+%7Ereviczky+-+ppa&chts=676767,13.5

Thanks
Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Google Chart URL
@ 2011-04-16 19:12 Reviczky, Adam
  0 siblings, 0 replies; 11+ messages in thread
From: Reviczky, Adam @ 2011-04-16 19:12 UTC (permalink / raw)
  To: ntg-context

> \starttext
> \externalfigure[https://chart.googleapis.com/chart?cht=p3&chs=250x100&chd=t:60,40&chl=Hello\letterbar World][method=png,scale=4000]
> \stoptext
> 
> Wolfgang

Thank you very much.

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Google Chart URL
@ 2011-04-16 18:31 Reviczky, Adam
  2011-04-16 19:01 ` Wolfgang Schuster
  2011-04-18 15:19 ` mathew
  0 siblings, 2 replies; 11+ messages in thread
From: Reviczky, Adam @ 2011-04-16 18:31 UTC (permalink / raw)
  To: ntg-context

Hi

I have problems with special characters in URL's.
What I wanted at first place, is embedding a google chart image, so I've tried this:

\starttext
\externalfigure[{https://chart.googleapis.com/chart?cht=p3&chs=250x100&chd=t:60,40&chl=Hello|World}]
\stoptext

which fails with:
! Undefined control sequence.
system          > tex > error on line 3 in file test.tex: Undefined control sequence ...

as far as I can tell it's the "|" symbol where it has problems.

I came across this thread:
http://www.mail-archive.com/ntg-context@ntg.nl/msg25806.html
but no solution there either.

Then I've tried to move from externalfigure to useURL, but the same problem exists.
For obvious reasons I don't want to use url shorteners, as with this kind of URL I can manipulate the resulting image inside the tex source.

Any thoughts or solutions?

Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-19  6:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19  1:05 Google Chart URL Reviczky, Adam
2011-04-19  4:16 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2011-04-19  6:40 Reviczky, Adam
2011-04-16 19:28 Reviczky, Adam
2011-04-16 19:49 ` Aditya Mahajan
2011-04-18 15:30   ` Wolfgang Schuster
2011-04-16 19:12 Reviczky, Adam
2011-04-16 18:31 Reviczky, Adam
2011-04-16 19:01 ` Wolfgang Schuster
2011-04-16 19:23   ` Aditya Mahajan
2011-04-18 15:19 ` mathew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).