On Fri, Aug 2, 2019 at 12:22 PM Hendrik Boom <hend...@topoi.pooq.com> wrote:
>
> On Fri, Aug 02, 2019 at 10:46:26AM -0400, Benjamin Yeung wrote:
> >
> > On Thu, Aug 1, 2019 at 7:25 AM Hendrik Boom <hend...@topoi.pooq.com> wrote:
> > >
> > > (1) Some of the @ commands I use are intended to cause conditional
> > > inclusion of their contents, dependong on a command-line arameter (which
> > > haven't yet implemented in scribble.  This is so I can keep my athor's
> > > notes about the text in the text itself, read them while looking at
> > > drafts, but have them removed for the final reader's copy.
> > >
> > > I've tested this by defining one of these operations (@snip) to delete
> > > all its contents all of the time, and that works.  (Command line
> > > dependence will come later).
> > >
> > > But it is not possible to snip out entire sections.  In particular,
> > >    @snip{
> > >       @include-section{"author-only-section.scrbl"}
> > >    }
> > > fails, complaining that there's a nested require.
> > >
> > > Is there some way around this?
> > >
> >
> > "Wrap" the "author-only-section.scrbl" material in a little bit of 
> > packaging:
> >
> > #lang scribble/base
> > @(provide author-only-section)
> >
> > @(define author-only-section
> >     @section{ @; Or a different structure/block as appropriate
> > This is the content of the author-only-section.
> > })
>
> Would this mean that the author-only-section could not itself have
> other @include-sections within it, being nested within a define?  A
> minor flaw in my case, because I don't actually do that.  And I could
> use the same mechanism if I needed to.

Yes, that's one of the drawbacks of this way of addressing your issue.
Another is that if you change this from a section to a subsection (or
otherwise change the depth), you need to be careful about modifying
the optional file accordingly.

I hope this accomplishes what you need!

Benjamin Yeung

-- 
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/CAL%2BBSUL6iQ%3D0SeSTgUNqMYfG_fb1KZA0eDJSWSdXrFbjqfur-w%40mail.gmail.com.

Reply via email to