Re: [pollen] Google Groups replacement needed

2019-08-13 Thread Matthew Butterick
Though I appreciate the candor of the warning "Here be dragons!", it tends to deter further scrutiny, much like actual dragons. > On 13 Aug 19, at 10:00 AM, Matthew Singletary > wrote: > > It might be worth investigating SourceHut (https://sr.ht / > https://sourcehut.org/

[pollen] New `pollen-users` repo for Pollen discussions

2019-08-13 Thread Matthew Butterick
I’ve set up a new repo to use as the successor for this Google Group: https://github.com/mbutterick/pollen-users We'll post the threads in the Issues section and see how that goes. If you have a GitHub account, then you know how it works. If you

Re: [pollen] Custom pre-processing before pollen does its stuff

2019-07-24 Thread Matthew Butterick
Without deterring any enthusiasm, be aware that this kind of thing (= using ordinary characters like * _ / as formatting delimiters) is trickier to get right than it looks. Usually, formatting codes can be nested recusrively, therefore regular expressions won't work on their own. If you plan on

Re: [pollen] Confused about omitted-path

2019-07-23 Thread Matthew Butterick
Pollen source files, including preproc and pagetree files, test #true for `omitted-path?`, because they shouldn't be published.) So now I'm wondering if the behavior you want is permanently in tension with this (long established) default behavior. > On Jul 16, 2019, at 6:09 PM, Matthew Butter

Re: [pollen] Caching failed when doing setup on a subfolder?

2019-07-07 Thread Matthew Butterick
I think there are two problems intersecting: 1) v7.3 seems to have changed something in the way data serialization works, which breaks Pollen's disk caches. That's not supposed to happen, but I guess it did. Anyhow try `raco pollen reset`. 2) I was being sloppy in how I handled paths in the

Re: [pollen] Caching failed when doing setup on a subfolder?

2019-07-07 Thread Matthew Butterick
When I follow your example, the test files end up with literal "\n\n" in them: #lang racket\n\n #lang pollen\n\n◊h1{Hello} Which causes the setup to fail. > On Jul 7, 2019, at 6:05 PM, Joel Dueck wrote: > > Today in prep for the upcoming week I’ve updated to Racket 7.3 and the latest >

Re: [pollen] Re: Infinite loops?

2019-06-28 Thread Matthew Butterick
Should -p take an argument to limit the max number of parallel jobs? > On Jun 28, 2019, at 11:47 AM, Shrutarshi Basu wrote: > > After some more experimentation, it seems like the problem goes away if I > drop the -p flag. So `raco pollen render -s .` works just fine. My hypothesis > is that

Re: [pollen] parallel rendering fixes

2019-06-27 Thread Matthew Butterick
gt; Basu > > On Thu, Jun 27, 2019 at 6:01 PM Matthew Butterick <mailto:m...@mbtype.com>> wrote: > I just use `raco pollen render -p` rather than plain `raco pollen render` in > my Makefile, for the top directory in the project. > > I'd guess this is more efficient tha

Re: [pollen] parallel rendering fixes

2019-06-27 Thread Matthew Butterick
I just use `raco pollen render -p` rather than plain `raco pollen render` in my Makefile, for the top directory in the project. I'd guess this is more efficient than `make -j x` because all the files are inventoried and then doled out to each processor as fast as they can be rendered. But try

[pollen] Re: parallel rendering fixes

2019-06-26 Thread Matthew Butterick
Armed with more knowledge, I have reinstated parallel rendering. `raco pollen setup` is also faster. On Thursday, June 13, 2019 at 8:01:15 PM UTC-7, Matthew Butterick wrote: > > I'm afraid the parallel-processing problem is going to require more > scrutiny about how it can be do

[pollen] Re: parallel rendering fixes

2019-06-13 Thread Matthew Butterick
I'm afraid the parallel-processing problem is going to require more scrutiny about how it can be done safely. For the time being I've disabled parallel processing (you can still ask for `raco pollen render -p`, but it won't be parallel). > On Jun 13, 2019, at 7:33 PM, Matthew Butterick wr

[pollen] better meta values?

2019-05-29 Thread Matthew Butterick
tl;dr 1) Would it be useful to allow meta values to be expressions, not merely datums? 2) Is anyone using identifiers or lists as meta values? Mostly my impression is that they're usually strings, numbers, or booleans (whose meaning wouldn't change with this upgrade). I was thinking that it

Re: [pollen] A few questions about pollen capabilities

2019-05-27 Thread Matthew Butterick
> On May 27, 2019, at 5:24 PM, Joel McCracken wrote: > > The point is I was hoping to avoid having to rebuild the entire links table > every time I process another file. Here's a perhaps simpler way to do it that you could customize further. The Pollen sources define metas for each target

Re: [pollen] Citation system update

2019-05-27 Thread Matthew Butterick
Looks cool! You should turn this into an installable Racket package with docs & tests, perhaps? I'm sure others would benefit from your suffering. > On May 27, 2019, at 12:06 PM, sanc...@gmail.com wrote: > > Joel and I each shared our approaches to footnotes a while back >

Re: [pollen] A few questions about pollen capabilities

2019-05-27 Thread Matthew Butterick
> On May 27, 2019, at 3:20 PM, Joel McCracken wrote: > > I suppose I might be able to do that, but I don't think it will solve my > overall problem. `pollen.rkt` gets loaded/computed repeatedly, once per page, > so it would lose context between pages. I would then have to re-compute it, >

Re: [pollen] Newbie Question about Rendering from Author Mode

2019-05-17 Thread Matthew Butterick
Looks like you put an incorrect "pp" extension on those source files. The first one needs to be named "downtown.html.pmd" and the other "uptown.html.pm". > On May 17, 2019, at 10:52 AM, Eugene Wallingford wrote: > > I am new to Pollen and just working through the Quick Tour. Everything

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Matthew Butterick
You can also `(require "a-pollen-file.html.pm")` just like any Racket module. Every Pollen source exports `doc`, which is an S-expression representing the content of the document. > On May 10, 2019, at 8:12 AM, Joel McCracken wrote: > > The thing that worries me the most is the `racket

Re: [pollen] new Quad demo

2019-04-30 Thread Matthew Butterick
> On Apr 27, 2019, at 4:05 PM, dueckofe...@gmail.com wrote: > > From what I understand Quad/Quadwriter at this stage seems sort of analagous > to TeX, which is kind of a low-level typesetting language that lets you plunk > down individual text blocks on a page. (I have never tried learning TeX

[pollen] new Quad demo

2019-04-27 Thread Matthew Butterick
I've restored Quad to a state where it can be installed and demoed. Docs are here [1] and will continue to be expanded. Quad is my Racket software for programmatically generating PDFs from markup, similar to how LaTeX works. It has been slow going because producing reasonable PDFs meant

Re: [pollen] Parallelism?

2019-04-26 Thread Matthew Butterick
After some more fiddling, I think the problem was that the `current-poly-target` was not being communicated to the parallel rendering places, so they were just regenerating HTML when you asked for PDF. I just pushed a fix that addresses this. I don't have LaTeX on my machine right now, but let

Re: [pollen] Unquoted values in HTML tags

2019-04-24 Thread Matthew Butterick
> On Apr 24, 2019, at 11:00 AM, afol...@gmail.com wrote: > How do I pass in multi-character strings that will be "unquoted" in the > resulting HTML output? Do I have to write my own decode function for this? In HTML, how is the meaning of an unquoted attribute value different from that of a

Re: [pollen] Parallelism?

2019-04-23 Thread Matthew Butterick
<http://beautifulracket.com/> render: `raco pollen setup` then `raco pollen render` = 285s `raco pollen setup` then `raco pollen render -p` = 190s > On Apr 23, 2019, at 11:10 AM, Matthew Butterick wrote: > > OK, I've pushed a parallel-rendering routine which you can access

Re: [pollen] Parallelism?

2019-04-23 Thread Matthew Butterick
OK, I've pushed a parallel-rendering routine which you can access by passing the `-p` or `--parallel` flag to any invocation of `raco pollen render`. (I will leave it undocumented for now until it has proven itself). If you just do `raco pollen render -p` instead of `raco pollen render`, as I

Re: [pollen] Parallelism?

2019-04-22 Thread Matthew Butterick
Separately, I pushed a fix that makes the preheat operation go faster generally, so try that and see if it helps. > On Apr 22, 2019, at 11:26 AM, Joel Dueck wrote: > > My CPU was maxed out during `raco pollen setup` and I could see it churning > through them roughly four at a time, so that

Re: [pollen] Semantic markup in generated X-expression?

2019-04-12 Thread Matthew Butterick
OK, then suppose you store the attributes in the X-expressions for the purposes of your internal Pollen processing. You can always strip out those private attributes before the `doc` is injected into the HTML template. Does that work? You're right that the X-expression closely models HTML

Re: [pollen] Semantic markup in generated X-expression?

2019-04-12 Thread Matthew Butterick
You could preserve the semantic information inside a `class` attribute, or custom attribute. These would also be reachable through CSS selectors, if you're into that. > On Apr 12, 2019, at 7:51 AM, Daniel Sockwell wrote: > > In general, my intuition is that the semantics should be preserved

Re: [pollen] Creating a meta from a .rkt file

2019-04-10 Thread Matthew Butterick
> On Apr 10, 2019, at 11:33 AM, Daniel Sockwell wrote: > > I guess what I'm asking, though, is whether it's possible to use > `define-meta` in a non-pollen file (i.e., in a racket file). No, because `define-meta` depends on special cooperation with the `#lang pollen` reader (= the thing

Re: [pollen] Creating a meta from a .rkt file

2019-04-10 Thread Matthew Butterick
Values on the right-hand side of `define-meta` can't be expressions or variables imported from elsewhere. They can only be raw datums. This is a deliberate limitation that goes back early in Pollen history, when folks decided they wanted to be able to extract metas (quickly) without evaluating

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

Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Matthew Butterick
> On Mar 28, 2019, at 6:23 AM, Ifeoluwapo Eleyinafe > wrote: > I think I can pull from metas using 'here-path but I don't know how to > access metas from pollen.rkt. I can do so from the template file but then I > won't be able to use the data in my tag

Re: [pollen] Enthusiastic thank you and beginner question about metas

2019-03-28 Thread Matthew Butterick
> On Mar 28, 2019, at 12:42 AM, Zach Mandeville > wrote: > > And below this I wanted a function to turn ◊author into that details element > by referencing ◊author text against that 'scuttlebutts' meta...but, I can't > get it to work. The closest I got is this: FWIW though you call

Re: [pollen] Moving to Pollen from WordPress

2019-03-23 Thread Matthew Butterick
1) Converting individual HTML pages is sometimes more straightforward than unraveling the mysteries of the XML export. 2) See the `pollen/unstable/convert` module for possibly useful helper functions. https://docs.racket-lang.org/pollen/Convert.html?q=pollen%2Funstable%2Fconvert

Re: [pollen] Getting the first N words: speed comparison

2019-03-21 Thread Matthew Butterick
As a Racket rule of thumb, I find that most efforts toward "custom-built loops" end in defeat, because the Racket macro expander and JIT compiler are aware of better optimizations. If I were writing another book on Racket, it would be High-Performance Racket, which I know more about than I used

Re: [pollen] Re: ◊(select …) function returns nothing, always.

2019-03-15 Thread Matthew Butterick
I recommend sorting this out in the REPL, and then moving back to the template. For instance, it should be possible to preview the result like so (where `doc` is imported from "your-source.poly.pm"): #lang racket (require pollen/core "your-source.poly.pm") (select 'line-image doc) Though as

Re: [pollen] Question about Pollen markup

2019-03-13 Thread Matthew Butterick
it elements (λ (e) > (equal? e "\n")])) > > On Sunday, March 10, 2019 at 8:22:40 PM UTC-5, Matthew Butterick wrote: > The curly-brace syntax is almost always preferable. Keep in mind that the > linebreaks are separated into their own elements (For more on this behavior &g

Re: [pollen] Highlighted blocks of code in pre tags wrapped in by decode-paragraphs

2019-03-11 Thread Matthew Butterick
> On Mar 11, 2019, at 2:48 AM, Evžen Wybitul wrote: > > The `decode-pagaraphs` incorrectly wraps blocks of code in tags into > paragraphs. I'm using pygments, so within the the code is split into > various s, which I think is causing the problem. Simply seting > as block-tag didn't fix

Re: [pollen] Question about Pollen markup

2019-03-10 Thread Matthew Butterick
The curly-brace syntax is almost always preferable. Keep in mind that the linebreaks are separated into their own elements (For more on this behavior see [1].) So this markup: ◊ol{The remaining forty-nine stalks ◊(comment "" ",") two piles. another item another item } Produces this list of

Re: [pollen] Highlight code blocks are indenting too much

2019-03-10 Thread Matthew Butterick
When I tried your example, I got the right result. But there is a known issue with the Scribble indenter (which Pollen uses) changing the indentation within curly braces, which it shouldn't. [1] Thus, your example persuades me that it's better policy for Pollen to leave whatever indenting is

Re: [pollen] Navigation issue with Pollen templates

2019-03-01 Thread Matthew Butterick
> On Mar 1, 2019, at 11:08 AM, Brendan Stromberger > wrote: > > build-path: contract violation > expected: (or/c path-for-some-system? path-string? 'up 'same) > given: 'body/2_understanding_the_lines.poly.pm > argument position: 2nd > other arguments...: ># My error, the last line

Re: [pollen] Navigation issue with Pollen templates

2019-02-28 Thread Matthew Butterick
> On Feb 28, 2019, at 4:28 PM, Matthew Butterick wrote: > > But I would put the code inside a function in "pollen.rkt". In that case you > can pass `metas` as an argument, or use the `current-metas` parameter. (Of course in that case the `require` could go

Re: [pollen] Navigation issue with Pollen templates

2019-02-28 Thread Matthew Butterick
> On Feb 28, 2019, at 3:17 PM, Brendan Stromberger > wrote: > > In my template, I have `◊(define here (path->pagenode (->output-path > (hash-ref metas 'here-path` > > This renders out to a pagenode that looks something like > "body/3_the_trigrams.html" > > When I send this pagenode

Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Matthew Butterick
Sometimes there's a misapprehension among new users that Pollen represents a monolithic "take it or leave it" system. (Not a surprise, because many page-making systems are like that.) Pollen tries to make simple projects easy (by providing non-astonishing default behavior) while not inhibiting

Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Matthew Butterick
> On Feb 28, 2019, at 9:09 AM, Brendan Stromberger > wrote: > > Side question but related: is `doc` a magical export from ptree files? How do > I know what is being exported from any given Pollen file (*.ptree, *.p, *.pm)? `doc` and `metas` are exported from every Pollen source file.

Re: [pollen] Navigation issue with Pollen templates

2019-02-28 Thread Matthew Butterick
> On Feb 28, 2019, at 6:42 AM, Brendan Stromberger > wrote: > > I can't seem to get next/previous navigation working. When I use `◊(previous > here)` and `◊(next here)` > for my nav links, they evaluate to blank strings. `◊|here|` correctly > evaluates (as far as I can tell) to the current

[pollen] dropping support for Rackets earlier than verison 6.3

2019-02-27 Thread Matthew Butterick
Short version: Pollen will soon be dropping support for Rackets earlier than 6.3. If this is bothersome for some reason, now is the time to say so. Long version: To date, Pollen (and associated libraries, like `txexpr` and `sugar` and `hypheneate`) have supported Racket 6.0 or later. This

Re: [pollen] Library for rendering Pollen to JSON?

2019-02-27 Thread Matthew Butterick
> On Feb 26, 2019, at 6:53 AM, Brendan Stromberger > wrote: > > Has anyone written a library to generalize (at least to some extent) the > process of rendering a Pollen document to JSON? When you say "Pollen document" I take it you mean an X-expression (because a rendered source file could

Re: [pollen] Simple question about nested custom tags

2019-02-25 Thread Matthew Butterick
> On Feb 25, 2019, at 3:43 PM, Brendan Stromberger > wrote: > > I've got a simple Pollen question for anyone that is familiar. > > ◊; digram-row would map to an , and digram-row-item to an , > > (define (digram . elements) > (case (current-poly-target) > [(txt) elements] > [else

Re: [pollen] Source files in multiple directories and generating an index

2019-02-19 Thread Matthew Butterick
(FWIW I cannot reproduce your bug with 1.5.2028.835) > On Feb 19, 2019, at 4:02 PM, Matthew Butterick wrote: > > The revision with the bugfix is 1.5.2028.835. > > >> On Feb 19, 2019, at 4:01 PM, Evžen Wybitul > <mailto:wybitul.ev...@gmail.com>> wrote: >&

Re: [pollen] Re: Source files in multiple directories and generating an index

2019-02-19 Thread Matthew Butterick
The revision with the bugfix is 1.5.2028.835. > On Feb 19, 2019, at 4:01 PM, Evžen Wybitul wrote: > > It says 1.5.1987.839 > > Dne středa 20. února 2019 1:00:33 UTC+1 Matthew Butterick napsal(a): > What is your `raco pollen version`? -- You received this message because

Re: [pollen] Re: Source files in multiple directories and generating an index

2019-02-19 Thread Matthew Butterick
What is your `raco pollen version`? > On Feb 19, 2019, at 3:56 PM, Evžen Wybitul wrote: > > Even with the new fix the relative paths don't work. I'm getting the > following error: > > find-relative-path: contract violation > expected: (and/c path-for-some-system? simple-form?) > given:

Re: [pollen] Combining multiple input pages into single output.

2019-02-14 Thread Matthew Butterick
refix-in nextChapter: fileName)) ; > ◊nextChapter:doc > ) > fileList) > > > I know this is probably terrible cringeworthy code but I don't know racket so > well. Any help would be greatly appreciated. Thank you. > > On Sunday, September 24, 2017 at 3:53:34 PM UTC-4, Mat

Re: [pollen] Source files in multiple directories and generating an index

2019-01-21 Thread Matthew Butterick
> On Jan 20, 2019, at 11:33 PM, Evžen Wybitul wrote: > > And it works, partially. However, when I call `(next here)` on order to do > page navigation, the value for file1 is `analysis/file2.html`, but I'd need > it to be only `file2.html`. Of course, I could just strip the `[...]/` part >

Re: [pollen] Source files in multiple directories and generating an index

2019-01-20 Thread Matthew Butterick
> On Jan 20, 2019, at 12:03 PM, Evžen Wybitul wrote: > > 1. I can't find out how to keep the "notes" from different subjects in > different folders. The problem is I'm unable to dynamically build the > "master-index" of such files. What have you tried that didn't work? It seems

Re: [pollen] local-require local files in a template

2018-12-19 Thread Matthew Butterick
The template is merely an accessory for a source file being rendered. Everything in the template (including relative path strings) will be evaluated as if it were in the source file already. AFAICT this is consistent with how we usually expect relative path strings to behave. You hint that

Re: [pollen] How to make a tag do nothing for specific output formats

2018-12-08 Thread Matthew Butterick
> On Dec 8, 2018, at 5:15 AM, Fletcher Hardison wrote: > > I've been doing something like: > > (define (my-tag . xs) >(case (current-poly-target) >[(ltx) do something] >[else xs])) > > Is there a better way to pass elements through without doing anything to > them. I'm

Re: [pollen] Pygments doesn't work

2018-09-26 Thread Matthew Butterick
> On Sep 25, 2018, at 11:49 PM, Evžen Wybitul wrote: > > I followed the tutorial from the official Pollen docs > and tried to make > Pygments work. I have installed Pygments with both pip and easy_install, and > have `pygmentize`

Re: [pollen] Automatic non-breaking space inserter in Russian

2018-08-21 Thread Matthew Butterick
> On Aug 21, 2018, at 9:12 AM, Natanael de Kross wrote: > > I mean there is so much going on and I know so little. Last month it's like a > whole new world got opened to me. My to-learn list is huge enough already and > my head is going to explode. But I can't say that I don't enjoy the

Re: [pollen] Rewriting URLs in Pollen server

2018-05-04 Thread Matthew Butterick
Perhaps, though a feature that claims to be "compatible" comes with a lot of housekeeping and maintenance. Why couldn't the URL rewriting happen in the tag function, rather than at the Pollen level? For instance, you would write ◊clean-apache-link["ooh/la/la.html"]{my link text} And use an

Re: [pollen] Templates interlinked within templates interlinked

2018-03-15 Thread Matthew Butterick
> On Mar 15, 2018, at 6:00 AM, Joel Dueck wrote: > > I was pretty happy to learn about the web-server/templates package, which > allows you to include the contents of a template file and have it dropped > into the lexical context of the calling site. I’ve often wanted

Re: [pollen] ‘raco pollen start’ and ‘raco pollen render --recursive’ inconsistent with respect to ‘current-project-root’

2018-03-07 Thread Matthew Butterick
OK, I just pushed an update with a `--subdir` switch that behaves this way. > On Mar 7, 2018, at 3:32 AM, 'Leandro Facchinetti' via Pollen > wrote: > > Hi, > > Consider the following Pollen project: > > ;; a.txt.pp > #lang pollen > ◊(current-project-root) > >

Re: [pollen] ‘raco pollen start’ and ‘raco pollen render --recursive’ inconsistent with respect to ‘current-project-root’

2018-03-07 Thread Matthew Butterick
> On Mar 7, 2018, at 8:01 AM, 'Leandro Facchinetti' via Pollen > wrote: > > I believe the directory containing ‘pollen.rkt’ is the “real home directory.” > Is this conception problematic? Yes. Consider a project structured like this at the top level: a.html.pm

Re: [pollen] ‘raco pollen start’ and ‘raco pollen render --recursive’ inconsistent with respect to ‘current-project-root’

2018-03-07 Thread Matthew Butterick
This sounds wrong. And yet: is it? `current-project-root` is documented as the "the directory where you launched raco pollen start". (I'm not saying that pedantically — I often read the Pollen docs to find out things I've forgotten ;) The idea of `raco pollen render --recursive` is that

Re: [pollen] ‘raco pollen publish’ shouldn’t publish templates

2018-03-02 Thread Matthew Butterick
I agree. But templates can have any name. ("template.html" is just the default convention.) So automatic filtering could be finicky. I think the best policy is to use the `omitted-path?` setting in pollen/setup. I just failed to do so in this instance ;) > On Mar 2, 2018, at 11:42 AM,

Re: [pollen] What are the differences between Scribble and Pollen?

2018-03-02 Thread Matthew Butterick
> On Mar 2, 2018, at 7:03 AM, Joel McCracken wrote: > > But, I have been wondering, how do Pollen and Scribble differ? Its not clear > to me if I should actually start with Pollen, or evaluate both libraries. It's a question of control & flexibility. Scribble is

[pollen] importing one Pollen source into another

2018-02-19 Thread Matthew Butterick
I pushed an update today that prevents importing one Pollen source into another without changing the name of the imported `doc` and `metas`. If this is bothersome please let me know whether I should reconsider (ideally with an example that shows a practical use) This wasn't behavior that was

Re: [pollen] Error rendering value from cache

2018-02-15 Thread Matthew Butterick
Hard to say exactly without seeing the code. Judging from the error msg: > output: don't know how to render value: '#hasheq((here-path . > "/Users/basus/src/basus/publications/index.html.pm ") > (title . "Publications")) It looks like you're trying to drop the whole

Re: [pollen] Printing hyperlinks as links in some output targets, as footnotes in others, and as endnotes/separate document in still others

2018-02-13 Thread Matthew Butterick
Pollen delegates the nitty-gritty of generating layout to other tools. So the workflow is 1) find a tool that will make the layout you want 2) write a program that commands the tool to make this layout 3) generate this program with Pollen. Today — hopefully not forever — the best option for

Re: [pollen] Why is render-from-source-or-output-path function quicker than get-source and then render?

2018-02-10 Thread Matthew Butterick
> On Feb 9, 2018, at 10:18 PM, Junsong Li wrote: > > I think I might have hit a bug in racket serve/servlet. The actual blocking > point is the pollen get-source. It runs only half way through for certain js > files (it detects markup, markdown, and are blocked before

Re: [pollen] Pollen Footnotes

2018-01-24 Thread Matthew Butterick
> On Jan 24, 2018, at 8:30 PM, Matthew Butterick <m...@mbtype.com> wrote: > > FWIW this is the same as `(length (member name fn-names))` if you avoid > putting duplicates in `fn-names` to begin with. `member` returns the tail of > the list beginning with the matching

Re: [pollen] Re: Pollen project server does not invalidate compile cache when files required by pollen.rkt change. Any lighter option than turning off the compile caches?

2018-01-20 Thread Matthew Butterick
I've been persuaded this is a good idea & therefore implemented it. You can now track extra dependencies with the new setup value `compile-cache-watchlist`. On Friday, May 5, 2017 at 10:01:07 PM UTC-4, Matthew Butterick wrote: > > On May 5, 2017, at 6:48 PM, Shannon Severance &l

[pollen] Yet another Pollen project: mbtype.com

2018-01-12 Thread Matthew Butterick
https://mbtype.com Whereas Practical Typography and Beautiful Racket were almost entirely static web pages, this is the first project where I used Pollen with scripts running on a Racket web server (many good ideas came from Jesse Alama's book Server: Racket [1]) The pages aren't generated

Re: [pollen] Using expressions to define metas

2017-12-30 Thread Matthew Butterick
> On Dec 30, 2017, at 1:23 PM, Joel Dueck wrote: > > I would have expected define-meta to take the result of the expression rather > than quoting it. Is there a way to define a meta in terms of an expression > result? > > I don’t have a use for this right now, just

Re: [pollen] Citations

2017-12-19 Thread Matthew Butterick
> On Dec 19, 2017, at 8:13 AM, jakedrake.r...@gmail.com wrote: > > AFAICT, the main advantage of Pollen over Scribble is that Pollen is more > extensible so that a user could customize the latex template and easily add > new tag functions. Is that indeed the case? You can add tags to Scribble

Re: [pollen] Citations

2017-12-19 Thread Matthew Butterick
> On Dec 19, 2017, at 4:22 AM, J Lorieau wrote: > > 1. I'd like to test out the functionality for bibtex citation rendering in > Scribble, but the API from Racket is somewhat opaque and difficult to > use--this is largely due to my inexperience with racket and lisps.

[pollen] Re: Typesetting Racket code with Pollen

2017-12-15 Thread Matthew Butterick
Neither. The code is tagged with Pygments. The terms that end up in the `k` and `nb` classes are Racket identifiers. These are passed through a function that generates a link to the docs, derived from the `docs` function here. [1] Then a few housekeeping details to make everything look right.

Re: [pollen] Licensing for Pollen projects

2017-12-07 Thread Matthew Butterick
> On Dec 7, 2017, at 3:26 PM, Joel Dueck wrote: > > For any serious work, though, I am wondering how this approach would really > shake out. When “the book is a program”, is it ever a) useful or b) legally > meaningful to license the prose and the code separately when

Re: [pollen] pollen for slide-show presentations

2017-12-06 Thread Matthew Butterick
1 Nov 2017 10:45:51 -0800 > Matthew Butterick <m...@mbtype.com > wrote: > > > I should be a little clearer: it seems to me that a theme in your > > questions across the years has been "is Pollen a turnkey solution for > > X". My answer to this kind

Re: [pollen] cached-doc questions

2017-12-03 Thread Matthew Butterick
> On Dec 2, 2017, at 10:39 PM, Joel Dueck wrote: > The get-* functions will accept a pagenode or a path/string, but the cached-* > functions will only accept a path/string > The get-* functions take an argument pointing at the output filename (when > using a pagenode),

[pollen] `pollen/markup` now filters out void values

2017-11-26 Thread Matthew Butterick
I pushed an update yesterday that changes `pollen/markup` to ignore void values, the same way `pollen/pre` and `pollen/markdown` do. So this file: #lang pollen/markup ◊(cond) Which used to parse this way: '(root <#void>) Will henceforth do this: '(root) I don't know why I had it the other

Re: [pollen] How to print time/call for a racket function?

2017-11-21 Thread Matthew Butterick
> On Nov 21, 2017, at 1:23 PM, Karim Chellaoui wrote: > > I'm still new to Pollen so excuse me if I missed the information but I'm > getting quite lost in the documentation... > My goal is to write a date as version number, for today I would like it to be > "20171121" for

Re: [pollen] How to insert CDATA?

2017-11-20 Thread Matthew Butterick
> On Nov 20, 2017, at 12:39 PM, a.bezle...@gmail.com wrote: > > Unfortunately in this case the result for > > ◊(->html > ◊ac:link{ > ◊ri:attachment[#:ri:filename "atlassian_logo.gif"]{ > ◊ac:plain-text-link-body{◊as-cdata{Text with <> ) > > is >

Re: [pollen] How to insert CDATA?

2017-11-20 Thread Matthew Butterick
> On Nov 19, 2017, at 10:49 PM, a.bezle...@gmail.com wrote: > > I need to export in "confluence storage format" - > https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html#ConfluenceStorageFormat-Links > >

Re: [pollen] How to insert CDATA?

2017-11-19 Thread Matthew Butterick
BTW the `->html` function, consistent with the HTML spec, will automatically treat `script` and `style` blocks as CDATA, so if that's what you're aiming for, no special sorcery needed. > On Nov 19, 2017, at 3:36 PM, Matthew Butterick <m...@mbtype.com> wrote: > > Seems l

Re: [pollen] How to insert CDATA?

2017-11-19 Thread Matthew Butterick
Seems like it should work. Not sure why it isn't. I'll look into it. > On Nov 19, 2017, at 1:10 PM, a.bezle...@gmail.com wrote: > > > > My plan_b.html.pm > > #lang pollen > ◊as-cdata{567} > > > My pollen.rkt > > #lang racket/base > (require pollen/tag) > (require

Re: [pollen] pollen for slide-show presentations

2017-11-11 Thread Matthew Butterick
> On Nov 11, 2017, at 9:47 AM, Saša Janiška wrote: > >> Though now, I think you will be happier with anything but Pollen. > > OK, thank you for clear input. I should be a little clearer: it seems to me that a theme in your questions across the years has been "is Pollen a

Re: [pollen] pollen for slide-show presentations

2017-11-11 Thread Matthew Butterick
> On Nov 10, 2017, at 11:58 PM, Saša Janiška wrote: > > > What do you think whether Pollen is the right tool for the job? > > Let me add that besides slide presentation, I'd like to have same source > document to create handouts etc. IIRC we had this discussion in Feb

Re: [pollen] pollen for slide-show presentations

2017-11-09 Thread Matthew Butterick
> On Nov 9, 2017, at 6:43 AM, Gour wrote: > > Has anyone thought about using Pollen for creating slide-show > presentation like Racket's slideshow presentations? > > One concern, besides creating slide-show itself is how one could select which > font(s) to use and/or being

[pollen] Pollen update: better caching / faster renders

2017-11-05 Thread Matthew Butterick
Pollen will now cache output files on disk, in addition to the `doc` and `metas` from each Pollen source. This means that during renders, Pollen can skip the step where it combines doc & metas with the template (which is expensive). The idea is that after the project has been rendered once,

[pollen] invitations for thoughts about the Pollen / LaTeX nexus

2017-10-05 Thread Matthew Butterick
I know that more than a few Pollen users (Pollenizers?) use it as a front end to LaTeX. I don't use LaTeX in any deep way so I've not really considered the Pollen–LaTeX interaction deeply. OTOH it seems like: 1) There is a small set of recurring problems that arise with LaTeX, that could

[pollen] Re: Seeking Advice re: Pollen

2017-10-05 Thread Matthew Butterick
> On Oct 5, 2017, at 9:55 AM, George Cox wrote: > > Hi, I've stumbled across your "book-is-the-program" software Pollen and feel > it is a solution to something I've wanted for years. One quick question on > practical implementation: Do you 'write' inside DrRacket, use a

Re: [pollen] Re: Dynamically generating a pollen book site for every user

2017-10-02 Thread Matthew Butterick
As they say here in Hollywood: you're nobody till somebody hates you. > On Sep 30, 2017, at 2:35 PM, Joel Dueck wrote: > > Unrelated, but I wish I had learned of that HN thread when it was fresh. So > much misinformation. I would have had fun arguing^H^H supplying

Re: [pollen] Combining multiple input pages into single output.

2017-09-24 Thread Matthew Butterick
quire "article2.html.pm > <http://article2.html.pm/>")) > ◊(require (prefix-in art2: 'art2-submod)) > - template.html > > > > > ◊(->html ◊doc) > > > With this configuration I end up with and empty page when > renderingindex.html.pm <http://inde

Re: [pollen] Combining multiple input pages into single output.

2017-09-23 Thread Matthew Butterick
> On Sep 23, 2017, at 3:29 AM, Karim Chellaoui wrote: > > I'm new to Pollen, I read the tutorial but couldn't find the way to apply > this answer. I'm getting confused: how to effectively insert submodule > ch1-submod in the main file? I tried different functions but it

Re: [pollen] Is there a nice way to display a hash table in my document?

2017-09-17 Thread Matthew Butterick
> On Sep 17, 2017, at 10:02 AM, 飛羽如月 wrote: > > Now I want to feed each element of this list into a tag function, basically > something like > ◊(map p (hash-map references (lambda (x y) (string-append x ": " y > if it actually works. How do I make this work?

Re: [pollen] Does pollen pre-processor support languages other than English?

2017-09-07 Thread Matthew Butterick
> On Sep 7, 2017, at 7:53 PM, Leandro Facchinetti wrote: > > the Pollen development server could send an ‘Content-Encoding’ HTTP header, > to avoid issues like the one jcheng8 reported. By default, it would send > ‘UTF-8’, but this choice could be parameterizable via the

Re: [pollen] Does pollen pre-processor support languages other than English?

2017-09-07 Thread Matthew Butterick
> On Sep 6, 2017, at 7:55 PM, Leandro Facchinetti wrote: > > Pollen does not come with opinions regarding enconding, the author (you) has > to specify it. PS By default, all Racket strings are encoded as UTF-8. And thus, so are Pollen strings.

Re: [pollen] Does pollen pre-processor support languages other than English?

2017-09-06 Thread Matthew Butterick
> On Sep 6, 2017, at 6:34 PM, jche...@gmail.com wrote: > > Hi, first time pollen user here. I am trying to write a book in Chinese. > Seems like Chinese could not be correctly parsed by pre-processor. Below is > an example. Is there a way to get it working?Thanks a lot. > > vegetables.pp >

Re: [pollen] A "second-run" for a txexpr?

2017-09-05 Thread Matthew Butterick
> On Sep 5, 2017, at 4:26 PM, trent...@ifi.uio.no wrote: > > Bullet-list is in my control, I was just using the example from the pollen > Typography for Lawyers for inspiration since it felt like writing tags for > every list felt too heavy, and I figured others had run into this issue >

Re: [pollen] pollen rock 0.4

2017-07-20 Thread Matthew Butterick
. > > So, for now you can't "launch" an editor, instead you can only edit an > existing file in the editor. > > > On Wednesday, July 19, 2017 at 10:51:46 AM UTC-7, Matthew Butterick wrote: > Thank you Junsong. I've installed this version of `pollen-rock` but I do

[pollen] RacketCon 2017 & quasi-PollenCon

2017-06-12 Thread Matthew Butterick
RacketCon is happening Oct 7-8 in Seattle, and tickets are available now: http://con.racket-lang.org This year, we'll be having our usual day of speakers (Sat) but also a day of free-form hacking (Sun). Although Sunday is not officially "PollenCon", I will be there the whole day to work on

  1   2   >