Den tor. 1. aug. 2019 kl. 13.25 skrev Hendrik Boom <hend...@topoi.pooq.com>:
> (2) When I use include-section from the main file, the actual text in > the main file appears first, and the included files are all saved up ane > emitted after the text in the main file. I expected the sections to be > included where the include-section command was instead of being saved to > the end. > Here is a typical example of how include-section is intended to be used: https://github.com/racket/scribble/blob/master/scribble-doc/scribblings/scribble/internals.scrbl The "main" file doesn't do anything, but use include other sections. So a "solution" is to move the text you have in your main file into a separate file. And because I was curious, I looked up the defintion of include-section: (define-syntax (include-section stx) (syntax-case stx () [(_ mod) (with-syntax ([doc-from-mod (datum->syntax #'mod 'doc)]) (unless (module-path? (syntax->datum #'mod)) (raise-syntax-error #f "not a module path" stx #'mod)) #'(begin (require (only-in mod [doc-from-mod doc])) doc))])) So it does nothing but requiring the scribble file (which is a module exporting doc-from-mod). It's renamed on import (because we might need to include several documents). Then it is simply inserted into the document at the place include-section is used. /Jens Axel -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CABefVgzTcXRy-fzdVMeDpyuUEn3qX6BP3T6keprpD_Sc8oBhYQ%40mail.gmail.com.