From: Brett g P. <bgp...@ac...> - 2003-07-30 19:07:49
|
Is there an easy[*]_ way to do this in reST with output to HTML: I am documenting a custom color table, that currently looks like: ====== ====== ====== ====== Index Red Green Blue ------ ------ ------ ------ 0x01 0x00 0x00 0x01 0x02 0x00 0x01 0x00 (etc.) ====== ====== ====== ====== In my dream, I can add a cell on the end that is filled with the color of the (r,g,b) triple used for that entry in the color table. I don't see any apparent way to make this work, but I'm hoping that there's some clever solution hiding in the corners of the markup spec that I haven't seen or understood. I know that I could generate 256 color patch bitmaps and display those as images, but I'm trying to keep the number of collateral files needed to view this doc to a minumum... thanks... .. [*] for some value of 'easy' -- // Today's Oblique Strategy (© Brian Eno/Peter Schmidt): // Destroy -nothing -the most important thing // Brett g Porter * BgP...@ac... // http://mywebpages.comcast.net/bgporter/ |
From: Beni C. <cb...@te...> - 2003-07-30 19:24:51
|
Brett g Porter wrote on 2003-07-30: > Is there an easy[*]_ way to do this in reST with output to HTML: > > I am documenting a custom color table, that currently looks like: > ====== ====== ====== ====== > Index Red Green Blue > ------ ------ ------ ------ > 0x01 0x00 0x00 0x01 > 0x02 0x00 0x01 0x00 > > (etc.) > ====== ====== ====== ====== > > > In my dream, I can add a cell on the end that is filled with the color > of the (r,g,b) triple used for that entry in the color table. I don't > see any apparent way to make this work, but I'm hoping that there's some > clever solution hiding in the corners of the markup spec that I haven't > seen or understood. > > I know that I could generate 256 color patch bitmaps and display those > as images, but I'm trying to keep the number of collateral files needed > to view this doc to a minumum... > > thanks... > > .. [*] for some value of 'easy' > Tough :-). Closest to your dream would be a preprocessor on the HTML that would add the row automatically, filling in the color attribute from the given cells. But that would be sensitive to changes in the output format of the writer. Consider instead hardwiring the logic into docutils (as a transform?). -- Beni Cherniavsky <cb...@tx...> Put a backslash at the evening to continue hacking onto the next day. |
From: Brett g P. <bgp...@ac...> - 2003-07-30 19:51:14
|
Beni Cherniavsky wrote: > Brett g Porter wrote on 2003-07-30: > > >>Is there an easy[*]_ way to do this in reST with output to HTML: > > Tough :-). Closest to your dream would be a preprocessor on the HTML > that would add the row automatically, filling in the color attribute > from the given cells. But that would be sensitive to changes in the > output format of the writer. Consider instead hardwiring the logic > into docutils (as a transform?). > Thanks -- After spending two minutes with /F's Imaging Library, the overhead of generating the sample files is so ridiculously low that I'll just do that. (Can't believe I've never played with PIL before. Way cool!) -- // Today's Oblique Strategy (© Brian Eno/Peter Schmidt): // Destroy -nothing -the most important thing // Brett g Porter * BgP...@ac... // http://mywebpages.comcast.net/bgporter/ |