Last active
February 25, 2019 20:58
-
-
Save bstro/a7ab051c6aa76087f94effb6f38e02e9 to your computer and use it in GitHub Desktop.
Revisions
-
Brendan Stromberger revised this gist
Feb 25, 2019 . 2 changed files with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ #lang pollen ◊; I have a custom tagged called `digram`. I use it like this: ◊digram{◊(lesser-yin)} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #lang racket/base (define (digram . elements) (case (current-poly-target) [(txt) elements] -
Brendan Stromberger revised this gist
Feb 25, 2019 . 1 changed file with 2 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,13 @@ ◊; 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)}} @@ -18,12 +16,10 @@ ◊digram-row-item{◊digram{◊(lesser-yin)}} } ◊; digram-row would map to an <ol>, and digram-row-item to an <li>, ◊; 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)} @@ -32,10 +28,8 @@ ◊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 <li> automatically. How do I do this? ◊; Thanks! -
Brendan Stromberger renamed this gist
Feb 25, 2019 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,15 @@ `◊; 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)}} @@ -16,10 +18,12 @@ ◊digram-row-item{◊digram{◊(lesser-yin)}} } ``` ◊; digram-row would map to an <ol>, and digram-row-item to an <li>, ◊; 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)} @@ -28,8 +32,10 @@ ◊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 <li> automatically. How do I do this? ◊; Thanks! ``` -
Brendan Stromberger created this gist
Feb 25, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ (define (digram . elements) (case (current-poly-target) [(txt) elements] [else (txexpr 'span empty elements)])) (define (digram-row . elements) (case (current-poly-target) [(txt) elements] [else (txexpr 'ol empty elements)])) (define (digram-row-item . elements) (case (current-poly-target) [(txt) elements] [else (txexpr 'li empty elements)])) (define (lesser-yin) (case (current-poly-target) [(txt) "figure out later"] [else "⚍"])) (define (lesser-yang) (case (current-poly-target) [(txt) "figure out later"] [else "⚎"])) (define (greater-yin) (case (current-poly-target) [(txt) "figure out later"] [else "⚏"])) (define (greater-yang) (case (current-poly-target) [(txt) "figure out later"] [else "⚌"])) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ ◊; 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 <ol>, and digram-row-item to an <li>, ◊; 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 <li> automatically. How do I do this? ◊; Thanks!