#lang pollen ◊; I have a custom tagged called `digram`. I use it like this: ◊digram{◊(lesser-yin)} ◊; I use this to render these characters: ⚌ ⚍ ⚎ ⚏ ◊; I will be using these all over my document, but in this specific ◊; case, I need to render them much like they appear above: in a row. ◊; Eventually I will be rendering to HTML, Latex, PDF, and JSON (if I can ◊; figure out how). But for now, I am just concerned with HTML. I started ◊; with this idea (see pollen.rkt below for tag implementation): ◊digram-row{ ◊digram-row-item{◊digram{◊(lesser-yin)}} ◊digram-row-item{◊digram{◊(greater-yin)}} ◊digram-row-item{◊digram{◊(lesser-yin)}} ◊digram-row-item{◊digram{◊(lesser-yin)}} } ◊; digram-row would map to an
    , and digram-row-item to an
  1. , ◊; but I felt that this was coupling my representation of the digram row ◊; a little too closely to the HTML output. I am wondering if it might not ◊; be better to shoot for something like this: ◊digram-row{ ◊digram{◊(lesser-yin)} ◊digram{◊(greater-yin)} ◊digram{◊(lesser-yin)} ◊digram{◊(lesser-yin)} } ◊; I would like digram-row to be able to look at its children and if it ◊; determines that one of its children is a digram, then wrap the digram ◊; in an
  2. automatically. How do I do this? ◊; Thanks!