> On Sep 24, 2015, at 7:51 AM, Marc Kaufmann <marc.kaufman...@gmail.com> wrote:
> 
> Ah, I actually had tried that and was about to send you the error code for 
> bad syntax. But then I realised that it complained about me defining $ as the 
> equivalent of math-inline, which of course clashes with #\$.

Oh. 
Well, if you can change the #\$ to a different character, say #\^, then you can 
use ^[\begin{equation*}] instead, to avoid clashes.

> So now it works.
> 
> Btw, what does #\$ do? Is it a package? And does the order of the #lang 
> raw-string ... matter?

It's an option that allows you to change the character that it uses to start a 
raw string, and yes the order does matter.
You have to put the base language before the character, and since it takes a 
module language as a base, not a #lang language, you can't for instance do 
`#lang raw-string at-exp racket #\$`, but you can do `#lang at-exp raw-string 
racket #\$`, because at-exp is more flexible than raw-string.
It might be possible to make raw-string accept an arbitrary #lang language, but 
I don't know how.

> Thanks for the solutions,
> Marc
> 
> On Thu, Sep 24, 2015 at 7:34 AM, Alex Knauth <alexan...@knauth.org 
> <mailto:alexan...@knauth.org>> wrote:
> 
>> On Sep 24, 2015, at 6:41 AM, Marc Kaufmann <marc.kaufman...@gmail.com 
>> <mailto:marc.kaufman...@gmail.com>> wrote:
>> 
>> Thanks Alex,
>> 
>> To avoid dealing with escapes like that, you could use the raw-string 
>> package, which lets you do this:
>> raco pkg install raw-string
>> 
>> #lang raw-string/raw-string racket/base #\$
>> 
>> 
>> When I add the package via raco and change the #lang line as you suggest, I 
>> get the following error when running scribble:
>> 
>> ---
>> marc$ scribble --prefix scribble-prefix.tex --pdf effort-tracking.scrbl 
>> standard-module-name-resolver: collection not found
>>   collection: "raw-string/raw-string/lang"
>>   in collection directories:
>>    /home/marc/.racket/5.3.6/pkgs/installed/raw-string
>>    /home/marc/.racket/5.3.6/pkgs/installed/base
>>    /home/marc/.racket/5.3.6/collects
>>    /usr/share/racket/collects
> 
> 
>> The raw-string package is actually under 
>> ~/.racket/5.3.6/pkgs/installed/raw-string, so I am not sure what's going on. 
> 
> It might have been installed as `#lang raw-string` then, does that work?
> 
> It might be an issue with older versions of racket interpreting it as a 
> multi-collection package instead of a single-collection package.
> 
> 
>> You could also use at-exp for that, but raw-string is simpler.
>> 
>> 
>> How does the at-exp work? Or do you mean at-exp with raw-string?
> 
> No, I mean at-exp by itself with racket/base:
> 
> #lang at-exp racket/base
> 
> (require scribble/base
>          scribble/core)
> 
> (provide equation*)
> 
> (define (mymath start end . strs)
>   (make-element (make-style "relax" '(exact-chars)) `(,start ,@strs ,end)))
> 
> (define (equation* . strs)
>   (apply mymath @~a|{\begin{equation*}}| @~a|{\end{equation*}}| strs))
> 
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to