Re: [racket-users] Scribble text included out of order

2019-08-05 Thread Sam Tobin-Hochstadt
What's happening here is that Scribble is designed around sections as
the primary document organization, and it treats everything in
"testmain.scrbl" as being in the initial section, and then adds an
additional section for "testsect.scrbl". If you put `@section{}` on a
line before "bar bar" the you'll see the output in the order you
expect.

Scribble documents have to be organized in terms of sections, although
that doesn't mean that you have to see the section headings in the
resulting document. Scribble provides properties for hiding these
things. Here's a pair of files that should produce the output you
want: https://gist.github.com/samth/1b0fdec97be2f8622fff54de70a1cdef

Sam

On Fri, Aug 2, 2019 at 3:41 PM Hendrik Boom  wrote:
>
> On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote:
> > On 8/1/19 7:25 AM, Hendrik Boom wrote:
>
> >
> > > (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.
>
> So I made a small case that exhibits this.  Presumably I'm doing
> something wrong if no one else has this problem.
>
> Main file testmain.scrbl:
>
> #lang scribble/base
>
> foo
> foo
>
> @include-section["testsect.scrbl"]
>
>
> bar bar
>
>
> Section testsect.scrbl:
>
> #lang scribble/base
>
> onion
> soup
>
>
> The command to run scribble:
>
> scribble testmain.scrbl
>
>
> The resulting testmain.html file read in firefox and cut and pasted
> into this email:
>
> foo foo
>
> bar bar
> 1
>
> onion soup
>
>
> Of course there's also a sidebar -- a table of contents with ???
> instead of titles, because I didn't have any titles.
>
> It's quite clear that the included section comes after *all* the text
> in the main file, instead of being interspersed where the
> @include-section occurred.
>
> -- 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/20190802194102.hu6t3rrthydmpkb4%40topoi.pooq.com.

-- 
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/CAK%3DHD%2Bbe-GtFKqxu_SzdJfFr5FRpdJxt8oQRq-hc7Xv9xKVykQ%40mail.gmail.com.


Re: [racket-users] Scribble text included out of order

2019-08-04 Thread Simon Schlee
I have not completely read this thread in detail, but to me it seems like 
it could be useful to you, to experiment with pollen and custom tags and 
try to capture more semantic meaning with those tags.
I think you would have an easier time creating templates that layout the 
code exactly like you want, it might be some more work to transition but 
you would have more control over how things are rendered.
Have you already checked-out/considered using pollen?

-- 
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/db3a50bc-573f-400a-a792-87f688f36c7f%40googlegroups.com.


Re: [racket-users] Scribble text included out of order

2019-08-03 Thread Hendrik Boom
In case it's relevant, the version of Racket and Scribble I'm using is 
racket-7.4.0.1-x86_64-linux-precise.sh
downloaded about a week ago, after the large file handling resource 
usage had been fixed.

And I've attached the actual html file that was generated.  Hope it 
survives list submission. 

-- hendrik

On Fri, Aug 02, 2019 at 03:41:02PM -0400, Hendrik Boom wrote:
> On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote:
> > On 8/1/19 7:25 AM, Hendrik Boom wrote:
> 
> > 
> > > (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.
> 
> So I made a small case that exhibits this.  Presumably I'm doing 
> something wrong if no one else has this problem.
> 
> Main file testmain.scrbl:
> 
> #lang scribble/base
> 
> foo
> foo
> 
> @include-section["testsect.scrbl"]
> 
> 
> bar bar
> 
> 
> Section testsect.scrbl:
> 
> #lang scribble/base
> 
> onion
> soup
> 
> 
> The command to run scribble:
> 
> scribble testmain.scrbl
> 
> 
> The resulting testmain.html file read in firefox and cut and pasted 
> into this email:
> 
> foo foo
> 
> bar bar
> 1 
> 
> onion soup
> 
> 
> Of course there's also a sidebar -- a table of contents with ??? 
> instead of titles, because I didn't have any titles.
> 
> It's quite clear that the included section comes after *all* the text 
> in the main file, instead of being interspersed where the 
> @include-section occurred.
> 
> -- 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/20190802194102.hu6t3rrthydmpkb4%40topoi.pooq.com.

-- 
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/20190803132237.2uani7y7bgwinnol%40topoi.pooq.com.

►???1 ??1 ???foo
foobar bar1 onion
soup 

[racket-users] Scribble text included out of order

2019-08-02 Thread Hendrik Boom
On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote:
> On 8/1/19 7:25 AM, Hendrik Boom wrote:

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

So I made a small case that exhibits this.  Presumably I'm doing 
something wrong if no one else has this problem.

Main file testmain.scrbl:

#lang scribble/base

foo
foo

@include-section["testsect.scrbl"]


bar bar


Section testsect.scrbl:

#lang scribble/base

onion
soup


The command to run scribble:

scribble testmain.scrbl


The resulting testmain.html file read in firefox and cut and pasted 
into this email:

foo foo

bar bar
1 

onion soup


Of course there's also a sidebar -- a table of contents with ??? 
instead of titles, because I didn't have any titles.

It's quite clear that the included section comes after *all* the text 
in the main file, instead of being interspersed where the 
@include-section occurred.

-- 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/20190802194102.hu6t3rrthydmpkb4%40topoi.pooq.com.