From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74157 Path: news.gmane.org!not-for-mail From: Janne Junnila Newsgroups: gmane.comp.tex.context Subject: Re: Gnuplot and the dollar sign Date: Sat, 28 Jan 2012 13:27:23 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327771450 9254 80.91.229.3 (28 Jan 2012 17:24:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2012 17:24:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 28 18:24:10 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrC0W-0004Ur-Oq for gctc-ntg-context-518@m.gmane.org; Sat, 28 Jan 2012 18:24:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4090FCB212; Sat, 28 Jan 2012 12:27:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i0DZ8Bo0CStV; Sat, 28 Jan 2012 12:27:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 64D1ACB20A; Sat, 28 Jan 2012 12:27:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 458D6CB20A for ; Sat, 28 Jan 2012 12:27:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vLgfxGlulpcP for ; Sat, 28 Jan 2012 12:27:25 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 1ECA4CB208 for ; Sat, 28 Jan 2012 12:27:25 +0100 (CET) Original-Received: from mail-gy0-f169.google.com (mail-gy0-f169.google.com [209.85.160.169]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0SBRNm6021983 for ; Sat, 28 Jan 2012 12:27:24 +0100 Original-Received: by ghrr14 with SMTP id r14so1435704ghr.14 for ; Sat, 28 Jan 2012 03:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=KKV1u/Ouz8W2i/2+C+fScQy7S4/GnK8u82LS3wlK+fQ=; b=bL7Qf5C+6RIfs579RG4yfj2qTtZDCsDHjPlQs93JdJ/Ru/Ag+4dJ2U3HxZGkwavc33 tGrNPlMIBKfgq2PIMJD2SVVRtDY7L+R8axCf6BqlnyVc+0ThhgXcf9crP4gaik5Diw+0 4s3E1/IkM8jushYZR5DZx9MgbIOG6nmTkYXJk= Original-Received: by 10.236.187.67 with SMTP id x43mr15776298yhm.94.1327750043307; Sat, 28 Jan 2012 03:27:23 -0800 (PST) Original-Received: by 10.236.153.136 with HTTP; Sat, 28 Jan 2012 03:27:23 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.160.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eGqXroTh - fecab2f69987 - 20120128 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:74157 Archived-At: Thank you for your reply! I was actually able to find a workaround for my problem at least in this case. Digging through the gnuplot documentation revealed that instead of using $n to refer to the column n in a data file one can also use column(n). The ConTeXt parser accepts this of course. Janne Junnila On Sat, Jan 28, 2012 at 12:23 PM, Mojca Miklavec wrote: > On Sat, Jan 28, 2012 at 09:16, Janne Junnila wrote: >> Hi! >> >> I'm having trouble while trying to make the following work: >> >> \usemodule[gnuplot] >> >> \startGNUPLOTscript[distr_simple_1] >> >> plot "2_simple_1.out" using >> (0.01*floor($1/0.01)):(0.870456/100000/0.01) smooth frequency with >> boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) >> \stopGNUPLOTscript >> >> \useGNUPLOTgraphic[distr_simple_1] >> >> The problem seems to be that the single dollar sign gets interpreted >> as the start of a math environment. > > On one hand that is the intended default behaviour. It is very handy > to be able to use > > plot (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) title '$\left(\cos(2x) > \cdot \sin(0.5x)\right+1) e^{-0.4x}$' > > to get nice result. On the other hand I'm not exactly sure how to > reliably print whatever gets passed to ConTeXt. The only option that > comes to my mind is some modification of > =A0 =A0\sometxt{\starttyping floor($1/0.01) \stoptyping} > where \starttyping would generate a single line. But one would need a > special option for that. (The command \type{...} would not be reliable > enough: in MKII it stops working at the second underscore and it is a > problem if one has curly braces in text.) > >> I tried to look through the source >> code to see how I could tell context to bypass checking for certain >> characters, but I couldn't figure it out. > > Currently the only option is to provide an explicit title. But if > there's a request to support literal output and if somebody can help > me figure out how exactly I should output the given text into > metapost, so that it will be reliably printed out literally. > > Mojca > _________________________________________________________________________= __________ > 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-co= ntext > webpage =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: http://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________