* 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-19 1:05 Reviczky, Adam
@ 2011-04-19 4:16 ` Wolfgang Schuster
0 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2011-04-19 4:16 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 19.04.2011 um 03:05 schrieb Reviczky, Adam:
> 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 ...
Do you have “\enabledirectives[schemes.cleanmethod=md5]” in your preamble?
Here is a complete example which works for me:
\enabledirectives[schemes.cleanmethod=md5]
\def\googlechart
{\begingroup
\setcatcodetable\vrbcatcodes
\dodoubleempty\dogooglechart}
\def\dogooglechart[#1][#2]%
{\endgroup
\externalfigure[#1][method=png,#2]}
\starttext
\googlechart[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][factor=max]
\stoptext
Wolfgang
___________________________________________________________________________________
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 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-16 19:49 ` Aditya Mahajan
@ 2011-04-18 15:30 ` Wolfgang Schuster
0 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2011-04-18 15:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 16.04.2011 um 21:49 schrieb Aditya Mahajan:
> On Sat, 16 Apr 2011, Reviczky, Adam wrote:
>
>> 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
>
> \enabletrackers [resolvers.schemes]
> \enabledirectives[schemes.cleanmethod=md5]
> \asciimode
\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
___________________________________________________________________________________
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 18:31 Reviczky, Adam
2011-04-16 19:01 ` Wolfgang Schuster
@ 2011-04-18 15:19 ` mathew
1 sibling, 0 replies; 11+ messages in thread
From: mathew @ 2011-04-18 15:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, Apr 16, 2011 at 13:31, Reviczky, Adam <adam.reviczky@kcl.ac.uk> wrote:
> ! 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.
The | symbol is not allowed unescaped in URLs. As per RFC 3986 section
2.2, the reserved delimiters are:
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
and as per section 2.3, the unreserved characters are:
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Everything else needs to be %-encoded. If your browser isn't doing so,
you'll need to do it manually.
mathew
--
<URL:http://www.pobox.com/~meta/>
___________________________________________________________________________________
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
2011-04-18 15:30 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2011-04-16 19:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 16 Apr 2011, Reviczky, Adam wrote:
> 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
\enabletrackers [resolvers.schemes]
\enabledirectives[schemes.cleanmethod=md5]
\asciimode
\starttext
% Single line
\externalfigure[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\letterpercent
20\letterpercent 2824\letterpercent
29&chma=95,95&chtt=Launchpad+Statistics+for+\letterpercent
7Ereviczky+-+ppa&chts=676767,13.5][method=png,scale=5000]
\stoptext
See
http://archive.contextgarden.net/message/20110123.205431.42f006d4.en.html
for details.
I had also added support for downloading external files in the filter
module
http://randomdeterminism.wordpress.com/2010/08/12/using-filters-outside-the-box/
but later decided to make a separate module for it (not yet released). I
can send you some files offlist if you are interested.
Adita
___________________________________________________________________________________
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:01 ` Wolfgang Schuster
@ 2011-04-16 19:23 ` Aditya Mahajan
0 siblings, 0 replies; 11+ messages in thread
From: Aditya Mahajan @ 2011-04-16 19:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 16 Apr 2011, Wolfgang Schuster wrote:
>
> Am 16.04.2011 um 20:31 schrieb Reviczky, Adam:
>
>> 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.
>
> \starttext
> \externalfigure[https://chart.googleapis.com/chart?cht=p3&chs=250x100&chd=t:60,40&chl=Hello\letterbar World][method=png,scale=4000]
> \stoptext
Or better
\asciimode
\starttext
\externalfigure[https://chart.googleapis.com/chart?cht=p3&chs=250x100&chd=t:60,40&chl=Hello|World][method=png]
\stoptext
Aditya
___________________________________________________________________________________
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
* Re: Google Chart URL
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
1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-04-16 19:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 16.04.2011 um 20:31 schrieb Reviczky, Adam:
> 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.
\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
___________________________________________________________________________________
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 6:40 Google Chart URL Reviczky, Adam
-- strict thread matches above, loose matches on Subject: below --
2011-04-19 1:05 Reviczky, Adam
2011-04-19 4:16 ` Wolfgang Schuster
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).