Re: [pollen] Writing in raw X-expressions

2019-04-06 Thread Matthew Butterick

> On Apr 6, 2019, at 4:00 PM, Daniel Sockwell  wrote:
> 
> I have a quick question: is it possible to use Pollen to write x-expressions 
> directly? That is, can I directly write
> 
>'(root "I want to attend " (em "RacketCon " (strong "this") " year") ".")
> 
> instead of
> 
>#lang pollen
>I want to attend ◊em{RacketCon ◊strong{this} year}.


Yes, you can insert Racket-style expressions instead of Pollen-style 
expressions. [1]

The `root` wrapper is always added by Pollen, but you can use the splicing 
operator `@` to accomplish the same thing. Therefore this:

#lang pollen/markup
◊(@ "I want to attend " (em "RacketCon " (strong "this") " year") ".")

is the same as this:

#lang pollen/markup
I want to attend ◊em{RacketCon ◊strong{this} year}.

Or mix the styles:

#lang pollen/markup

◊(@ "I want to attend " (em "RacketCon " (strong "this") " year") ".")
I want to attend ◊em{RacketCon ◊strong{this} year}.


[1] 
https://docs.racket-lang.org/pollen/pollen-command-syntax.html#%28part._the-two-command-styles%29
 


-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pollen] Writing in raw X-expressions

2019-04-06 Thread Daniel Sockwell
I just discovered Pollen and am very much enjoying reading the docs/am excited 
to dive in.

I have a quick question: is it possible to use Pollen to write x-expressions 
directly?  That is, can I directly write

'(root "I want to attend " (em "RacketCon " (strong "this") " year") ".")

instead of

#lang pollen
I want to attend ◊em{RacketCon ◊strong{this} year}.

I realize that I might be partly missing the point—this is almost asking if I 
can use Pollen without using Pollen.  However, there are a number of times when 
the direct x-expression seems like it would be clearer (at least for my site).  
That is, there are a number of times that I would rather put text in my code 
than code in my text.  Does Pollen allow me to do so?

Thanks in advance!
Daniel



-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.