On Fri, Aug 02, 2019 at 10:07:05PM +0200, Jens Axel Søgaard wrote:
> 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.

Which makes it all the more puzzling why the included text appears to 
float to the end.  See the small test case I posted earlier in this 
thread.

-- hendrik

> 
> /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/20190803035812.smicokmtdr2r737n%40topoi.pooq.com.

Reply via email to