(Sorry for the long delay!) I think that defining a paragraph style for Latex is the right answer to avoid indentation. In case you haven't yet done that, here's a hack: use `(elem #:style "noindent")` as the first element of of the paragraph. That works because it generates `\noindent` in the output.
To get the section number to use for an exercise number, generate a `delayed-element` and in the resolver callback use `part-collected-info` to extract the number assigned to the enclosing part. At Thu, 23 Apr 2015 03:57:21 -0700 (PDT), Alexey Cherkaev wrote: > 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. -- 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.

