Re: [racket-users] Question about how to number equations under scribble-math module

2017-03-07 Thread Hendrik Boom
On Tue, Mar 07, 2017 at 10:24:09AM -0800, E. Cómer wrote:
> On Friday, March 3, 2017 at 9:00:49 AM UTC-8, Matthew Flatt wrote:
> 
> > There's not currently a direct way to do what you want, as far as I
> > know. There's a relevant library in `scriblib/private/counter`, which
> > is used to implement the counters for `scriblib/footnote` and
> > `scriblib/figure`. As "private" in the module name suggests, however,
> > it was never turned into something intended for public use.
> > 
> > You might want to look at that for ideas, or even use it despite the
> > fact that it's private and subject to change, or (best of all) help
> > create a public and documented version of the library.
> > 
> 
> Thank you very much for the reference of the library 
> 'scriblib/private/counter'. I will explore its use in the context of equation 
> numbering, and after that, it would be great to participate in a team for the 
> creation of a public and documented version.
> 
> This particular capability of Scribble [numbering equations], would increase 
> very much its usability for mathematical writings (e.g. lecture notes), and 
> I'm looking forward for the evolution of Scribble in that direction.

Especially if the equation numbers are links to the equations.  For 
PDF's we'd need to have pdf links, and a pdf reader that understands a 
back button.

-- hendrik

-- 
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.


Re: [racket-users] Can raco distribute produce a single executable?

2017-03-07 Thread Ethan Estrada
On Sat, Feb 25, 2017 at 9:57 PM, lu  wrote:
>   --enable-shared create shared libraries (ok, but not recommended)
>   --enable-dynlib same as --enable-shared

I haven't personally compiled Racket before, but these seem to be the
flags you are looking for. It seems the default behavior is to compile
a statically linked executable. For whatever reason, the distributed
Windows compile seems to be done using shared libraries instead. I
haven't used Racket on Windows, so I can't say for sure. I'm planning
to install it on my windows partition when I boot into it next time.
I'll let you know if for some reason it is statically linked (although
I highly doubt it).

--
Ethan Estrada

-- 
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.


Re: [racket-users] Question about how to number equations under scribble-math module

2017-03-07 Thread E . Cómer
On Friday, March 3, 2017 at 9:00:49 AM UTC-8, Matthew Flatt wrote:

> There's not currently a direct way to do what you want, as far as I
> know. There's a relevant library in `scriblib/private/counter`, which
> is used to implement the counters for `scriblib/footnote` and
> `scriblib/figure`. As "private" in the module name suggests, however,
> it was never turned into something intended for public use.
> 
> You might want to look at that for ideas, or even use it despite the
> fact that it's private and subject to change, or (best of all) help
> create a public and documented version of the library.
> 

Thank you very much for the reference of the library 
'scriblib/private/counter'. I will explore its use in the context of equation 
numbering, and after that, it would be great to participate in a team for the 
creation of a public and documented version.

This particular capability of Scribble [numbering equations], would increase 
very much its usability for mathematical writings (e.g. lecture notes), and I'm 
looking forward for the evolution of Scribble in that direction.

Thanks again, and congratulations for all your fine work and beautiful 
documents.

Sincerely, EC.

-- 
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.


Re: [racket-users] Redefine how Racket prints

2017-03-07 Thread Matthew Flatt
You can change `print` for a specific port with `port-print-handler`.
There's also the `global-port-print-handler` parameter, but setting
that changes `print` only for ports that uses the default printer.

The blue-versus-purple distinction in DrRacket is built into the output
port that DrRacket supplies a `current-output-port`. That port has a
print handler that works with the destination editor to show `print`
output in blue, while other output to the port is shown in purple. I
don't think it's possible to change the way `print` works and still
have it in blue, but others (especially Robby) might know otherwise,

At Mon, 6 Mar 2017 20:48:17 -0800 (PST), Vasily Rybakov wrote:
> I want to change how Racket prints some values both in REPL and when using 
> (print), (println), e.t.c.
> 
> Suppose that I want change like this (gives as simple example):
> 
> (define (print~ datum [out (current-output-port)] [quote-depth 0])
>   (if (number? datum)
>   (print `',datum out 1)
>   (print datum out quote-depth)))
> 
> So Racket will print all numbers with preceeding quote.
> This definition is in separate file and is exported like this:
> 
> (provide (rename-out [print~ print]))
> 
> So in other files it is seen as (print) function.
> 
> Problems/questions:
> 
> 1. Although it redefines (print), it does not affect (println) and other 
> print 
> functions.
> Is there a way to re-define print and make Racket use it for other printing 
> functions (because I suspect that their definitions are based on (print))?
> Or I should redefine all printing functions?
> 
> 2. When I try to make REPL use this function for printing I hook it like this:
> 
> (current-print (lambda (val)
>  (if (void? val)
>  (void)
>  (begin 
>(print val)
>(newline)
> 
> Here (print) is modifyed print from example imported with the name of 
> standart 
> function.
> 
> It seems to work, but it prints output to REPL in purple color, while by 
> default it prints in the same colours as inputed values, so it easier to 
> differentiate between REPL output and output generated by explicit use of 
> (print).
> 
> Did I hook my custom print function wrong? Did I used wrong type of function? 
> Is there a way to fix this?
> 
> -- 
> 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.

-- 
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.