On 8/1/19 7:25 AM, Hendrik Boom wrote:

Well, my novel draft made it through Scribble, but not intact.


(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?

You need to define @snip as a macro, rather than as a function, so that it can eliminate the syntax that does the require:

|(define-syntax (ship stx) (syntax-case stx () [(snip . forms) (if (getenv "SHOW-SNIP") #'(begin . forms) #'(begin))])) |

Use this with bracket arguments, as in |@snip[@include-section{blah}]|

(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.

Is there some way to force immediate rather than deferred inclusion?
Text that is intended to frame a section, before and after, no
longer does.  The only way around this seems to be to put the after-text
into the section itself, which is *not* the structure I want.

How are you invoking scribble? If you’re using the |-html| argument (rather than |-htmls|) or |-pdf|, I think it should be producing a single file in the manner you expect, /unless/ you have sectioning commands in the included file, in which case I’m not sure what it does.

Of course one ot the uses I have for this is for author-only text that
talks bout problems with the section, rather than being contained in
teh section itself.  But I can imagine it being useful in text intended
for the reader as well.

Wrapping text around sections makes a real difference if each section is
compiled to its own HTML page.

(3) This one isn't a real problem, but is an annoyance, since I can
instead make major changes to the source files and make them work.

When the scribble source file is already formatted in the style normally
used in English books, with a few spaces (in my case 5) starting every
paragraph and no blank line separating them, the division into
paragraphs is completely ignored and everything is run together into one
paragraph.  Is this actually intended?  Yes, I agree it seems to be
according to spec, because there aren't any blank lines between
paragraphs, just intentation on the first line, but is this actually
useful for any purpose?

Since the majority of uses of Scribble seem to have been formatted-for-web technical documentation, where the formatting is non-indented paragraphs separated by blank lines, and since Racket’s syntax isn’t typically whitespace sensitive, I think this probably just made sense at the time, but you’d have to ask Matthew for more info there…

-- hendrik

​

--
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/3b749de8-d684-b8c7-a31d-45103641ed92%40ccs.neu.edu.

Reply via email to