Hi,

I am trying to create something similar to LaTeX's \newtheorem command. Very 
simple implementation (still incomplete) for an "Exercise" block:

#lang racket
(require scribble/manual)

(provide exercise)

(define exercise-counter 0)

(define (exercise cont)
  (set! exercise-counter (add1 exercise-counter))
  (para
   (bold "Exercise ")
   (bold (number->string exercise-counter))
   (bold ". ")
   cont))

The problem I have when I generate PDF is that the paragraph with "Exercise" is 
indented as a normal paragraph. Is it possible to suppress it directly from 
Scribble or do I need to go and define a paragraph style for LaTeX backend?

Some extra questions:

- Maybe I am doing something that someone has already done. Are there, by any 
chance, implementations of extended set of LaTeX commands?
- Is there a better way to implement a counter? Ideally, I would want to reset 
the counter when section number changes. I would also like to prepend this 
counter with the section counter.

Cheers, Alexey

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to