From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85455 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: pstrics module again Date: Mon, 25 Nov 2013 15:25:10 -0500 (EST) Message-ID: References: <5293A2C0.3060904@FU-Berlin.DE> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1385411115 32342 80.91.229.3 (25 Nov 2013 20:25:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Nov 2013 20:25:15 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 25 21:25:22 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vl2if-0003UH-Gl for gctc-ntg-context-518@m.gmane.org; Mon, 25 Nov 2013 21:25:21 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AC3641020E; Mon, 25 Nov 2013 21:25:20 +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 w4Cq1qDh8+gJ; Mon, 25 Nov 2013 21:25:18 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C377910200; Mon, 25 Nov 2013 21:25:18 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CCE5610200 for ; Mon, 25 Nov 2013 21:25:17 +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 jd3LepdJR4Ez for ; Mon, 25 Nov 2013 21:25:16 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 90DD7101EF for ; Mon, 25 Nov 2013 21:25:16 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAPKX5Tr029782 for ; Mon, 25 Nov 2013 21:33:06 +0100 Original-Received: FROM Decentralized.ECE.McGill.CA (Decentralized.ECE.McGill.CA [132.206.69.142]) By hellskitchen.mr.itd.umich.edu ID 5293B228.A2317.8884 ; Authuser adityam; 25 Nov 2013 15:25:12 EST In-Reply-To: <5293A2C0.3060904@FU-Berlin.DE> User-Agent: Alpine 2.03 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01KRUx5br - a55c161c4217 - 20131125 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85455 Archived-At: On Mon, 25 Nov 2013, Herbert Voss wrote: > Am 25.11.2013 19:55, schrieb Aditya Mahajan: > >> This is what I did. >> >> 1. Compile the file. You get an error that some pstrick file is missing. >> Locate that file in the texlive directory and copy it to the current >> directory. >> >> 2. Repeat until you get an error that \ifx! is not a valid control >> sequence. >> >> 3. Run `grep ifx! *.tex` and change all the "\ifx!#1" to "\ifx !#1". > > why does ConTeXt needs the space before the ! ?? ConTeXt has two catcode regimes: the "standard" catcode regime and the "unprotected" catcode regime. In the "unprotected" catcode regime, !, _, and @ are also letters. This is done so that one can use csnames such as \c!width, \!!plusone, etc. (Similar to \makeatletter in LaTeX). I haven't looked at the actual code, but I am guessing that at some place, the following code is being called: \unprotect \input pstricks \protect and therefore when ConTeXt sees \ifx!#1 it thinks that \ifx! is a csname. Adding a space after \ifx avoids that. As I said in my previous message, this is easy to fix at ConTeXt end defining an appropriate catcode regime before inputing pstricks. So, the pstricks package does not need to be changed, but the ConTeXt code that is calling the package needs to be adapted. 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 ___________________________________________________________________________________