mbutterick / pollen-users

please use https://forums.matthewbutterick.com/c/typesetting/ instead
https://forums.matthewbutterick.com/c/typesetting/
52 stars 0 forks source link

How does Pollen relate to Scribble? #12

Open kskyten opened 4 years ago

kskyten commented 4 years ago

The documentation says that:

Pollen is a publishing system built on top of Scribble and Racket.

I'm a bit unclear on what this means. Does it mean Pollen is built on top of Scribble the language (i.e the syntax), but not Scribble the library (with all the tag definitions and output formats)? I prefer the syntax and flexibility of Pollen, but I would still like to be able to use the features of the Scribble library. Is it possible to use Pollen syntax for writing Scribble documents to re-use these features? What are the limitations of Scribble that motivated the development of Pollen as a separate library instead of just being an alternative syntax for writing Scribble documents?

mbutterick commented 4 years ago

I prefer the syntax and flexibility of Pollen, but I would still like to be able to use the features of the Scribble library

Maybe I lack imagination, but I think most “features of the Scrirbble library” are tied into Scribble’s document and rendering model. Therefore, once you sign up for those, you’re basically using Scribble.

You could do something idiosyncratic like use Pollen as a preprocessor to make Scribble sources. But I don’t see the point of this, since you can accomplish the same automation from within Scribble.

Is it possible to use Pollen syntax for writing Scribble documents to re-use these features?

You can set up a Scribble environment that uses the character. Beyond that, Pollen syntax is the same as Scribble syntax.

What are the limitations of Scribble that motivated the development of Pollen as a separate library instead of just being an alternative syntax for writing Scribble documents?

See Scribble vs. Pollen.

kskyten commented 4 years ago

Thanks for the clarification.

You can set up a Scribble environment that uses the ◊ character. Beyond that, Pollen syntax is the same as Scribble syntax,

This is exactly what I was looking for. How do I do this? I want to use the same syntax in all my documents, but use the Scribble document and rendering model when suitable.

mbutterick commented 4 years ago

That would be a good question for the Racket mailing list.

hendrikboom3 commented 4 years ago

Do I understand correctly that Pollen works with the source text expressed as x-expressions; whereas Scribble first converts everything to objects?

Both of them start with the same at-reader? Though Pollen uses lozenges instead of ats?

mbutterick commented 4 years ago

Do I understand correctly that Pollen works with the source text expressed as x-expressions; whereas Scribble first converts everything to objects?

Roughly, yes. But the underlying reason for this is important too: Pollen wants to be a more hackable system than Scribble. Using X-expressions as the medium of exchange supports this goal.

Both of them start with the same at-reader? Though Pollen uses lozenges instead of ats?

Yes, Pollen uses the Scribble reader, but with instead of @ as the command character (for good reason).