I made some progress. I think Crimson's inner workings only allow for
three $PAIR variables to be defined. Commenting out $PAIR2=[] and
replacing it with $PAIR2=`' in stata.spc will make Crimson match the
`' pair just fine.
So it looks like one would have to make a choice. The odds of
forgetting an apostrophe in "`tempfile`i''" being better than those of
forgetting a bracket in matrix[`i',`j'], I think using up $PAIR2 for
`' instead of [] would be sensible. Still, I wish the limitation
didn't exist.
Has anybody tested Crimson against some alternative and picked the latter?
Gabi
On Tue, Aug 19, 2008 at 11:40 AM, Gabi Huiber <[email protected]> wrote:
> Hello everybody,
>
> Those of you who have integrated Crimson with Stata (possibly
> following Mr. Huebler's excellent instructions here:
> http://huebler.blogspot.com/2008/04/stata.html) may have already done
> this:
>
> Crimson's Stata specification file (stata.spc) goes like this:
>
> # STATA LANGUAGE SPECIFICATION FILE FOR CRIMSON EDITOR
> # Stata 8
> # Created By Jean Ries
> # [email protected]
> # 03Sep2004
>
> $CASESENSITIVE=YES
> $DELIMITERS=~`!@#$%^&*()-+=|\{}[]:;",.<>/?
> $VARIABLEPREFIX=$
> $QUOTATIONMARK1="
> $LINECOMMENT=//
> $LINECOMMENTONFIRSTPOSITION=*
> $BLOCKCOMMENTON=/*
> $BLOCKCOMMENTOFF=*/
> $PAIRS1=()
> $PAIRS2=[]
> $PAIRS3={}
>
> I thought it would be nice if in addition to the parentheses, brackets
> and braces Crimson also matched the (left single quote - apostrophe)
> pair. So I thought that a stata.spc file that looked like this might
> do it:
>
> $CASESENSITIVE=YES
> #$DELIMITERS=~`!@#$%^&*()-+=|\{}[]:;",.<>/?
> #$VARIABLEPREFIX=$
> $DELIMITERS=~`'!@#$%^&*()-+=|\{}[]:;",.<>/?
> $VARIABLEPREFIX=`$
> $QUOTATIONMARK1="
> $LINECOMMENT=//
> $LINECOMMENTONFIRSTPOSITION=*
> $BLOCKCOMMENTON=/*
> $BLOCKCOMMENTOFF=*/
> $PAIRS1=()
> $PAIRS2=[]
> $PAIRS3={}
> $PAIRS4=`'
>
> You have to declare the elements in $PAIRS as delimiters beforehand,
> and the apostrophe was not on the original list. Then I thought I'd
> add ` to the $VARIABLEPREFIX too.
>
> But none of that mattered. My stata.spc file won't match `'. Any ideas
> why that might be?
>
> Thank you,
>
> Gabi
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/