ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: pstrics module again
Date: Mon, 25 Nov 2013 15:25:10 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.03.1311251519270.780@hzvpu.rqh> (raw)
In-Reply-To: <5293A2C0.3060904@FU-Berlin.DE>

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
___________________________________________________________________________________


  reply	other threads:[~2013-11-25 20:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 18:05 DesdeChaves
2013-11-25 18:55 ` Aditya Mahajan
2013-11-25 19:19   ` Herbert Voss
2013-11-25 20:25     ` Aditya Mahajan [this message]
2013-11-25 20:28       ` Herbert Voss
2013-11-25 22:24         ` DesdeChaves
2013-11-25 23:08           ` DesdeChaves
2013-11-25 23:45             ` Aditya Mahajan
2013-11-25 23:53               ` Aditya Mahajan
2013-11-26  8:21             ` Herbert Voss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.03.1311251519270.780@hzvpu.rqh \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).