Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-18 Thread Eli Barzilay
On Thu, Sep 17, 2015 at 2:29 PM, Ben Lerner wrote: > Yes, in that case. I meant more the following: > > #lang at-exp racket > '@stuff{ > Hello@; John > > World > } > > which currently produces '(stuff "Hello" "\n" " " "World"). This sounds like it could be a more surprising be

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-18 Thread Eli Barzilay
On Thu, Sep 17, 2015 at 11:30 AM, Matthew Flatt wrote: > > I imagine that Eli adopted that feature of @-expressions from TeX. Yes -- and it's also similar to a few other comment behaviors, like m4's `dnl`. But it sounds like it would be good to qualify the "similar to % in tex" comment in the do

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Butterick
> If a comment can swallow everything up to a single newline, could it > swallow everything up to the first non-whitespace character after the > current line? (This is what TeX's % does.) Doesn't it already? #lang at-exp racket '@stuff{ Hello@; John World } '(stuff "HelloWorld") See a

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Ben Lerner
Yes, in that case.  I meant more the following: #lang at-exp racket '@stuff{ Hello@; John   World } which currently produces '(stuff "Hello" "\n" "  " "World"). On 9/17/2015 2:28 PM, Matthew Butterick wrote:

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Ben Lerner
If a comment can swallow everything up to a single newline, could it swallow everything up to the first non-whitespace character after the current line? (This is what TeX's % does.) So you wouldn't have to change scribble/decode at all, just the @-reader. Effectively, the only added constrain

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Flatt
Having a line comment swallow a newline is helpful when you want to break up something in the source without a break in the output, as in Hello@; World => "HelloWorld" I imagine that Eli adopted that feature of @-expressions from TeX. At Thu, 17 Sep 2015 10:59:51 -0400, "Alexander D. Knauth" w

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Alexander D. Knauth
I forgot to include the list: > On Sep 17, 2015, at 10:57 AM, Alexander D. Knauth > wrote: > > Is there any reason why > #lang at-exp racket > '@stuff{ > Hello @; John > > World > } > Shouldn't produce > '(stuff "Hello " "\n" "\n" "World") > Instead of > '(stuff "Hello " "\n" "World") > ? > In

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Flatt
Scribble can't be changed to match LaTeX without changing @-expression reader at a fairly fundamental way, and I'm skeptical of the change. Scribble's input is handled in three steps: @-expression parsing to produce a syntax object (i.e., enriched S-expression), Racket expansion and evaluation of

[racket-users] Scribble: line comment swallows paragraph break

2015-09-16 Thread Benjamin Greenman
Scribble and LaTeX disagree on these documents. Should Scribble be changed to match LaTeX? Scribble: #lang scribble/manual Hello @; John World Output is: "Hello World" ;; --- LaTeX \documentclass{article} \begin{document} Hello % John World \end{document} Output is: "Hello World" -- You r