3
$\begingroup$
resultList=WordData/@{"aha","bib"};
len=Length@resultList;
Column[Table[Grid[Map[Item[Text@Style[#,FontSize->50,FontColor->RGBColor@@RandomReal[{0,1},3]],Background->RGBColor@@RandomReal[{0.5,1},3],FrameStyle->AbsoluteThickness[2]]&,resultList[[i]],{2}],Alignment->{{Center,Center,Center}},Frame->All,ItemSize->{30,5}(*,Spacings\[Rule]{{5,20,10},1}*)],{i,2}],Background->LightRed]

I found that the ItemSize setting will no longer work properly when converting the output cell to HTML format.

enter image description here enter image description here

——————

Note: I want to convert the cell generated by Grid to HTML format with content is in text format not gif.

As cormullion showed in the answer, when the output content is gif pictures in HTML file, they look good.

$\endgroup$
1
  • $\begingroup$ The other version of your question on Stackoverflow is probably better. It's not clear here whether you want a reason, think it's a bug, or want a solution. $\endgroup$
    – cormullion
    Mar 30, 2013 at 17:26

1 Answer 1

2
$\begingroup$

I'm still not clear what you're looking for, but, with a slightly modified version of the code (from your web page):

list = DictionaryLookup[x__ /; x == StringReverse[x]];

SeedRandom[1];

col = Column@Riffle[
  Framed[#,
    Background -> RGBColor[RandomReal[{0,1}, 3]],
    FrameMargins->2] & /@ list,
  Framed[
    TableForm[#, TableSpacing->{2,5}], 
    Background -> RGBColor[RandomReal[{0,1}, 3]],
    FrameMargins->2] & /@ (WordData /@ list)];

Framed[col, Background->Lighter@Pink]

On the left is Mathematica, on the right is the HTML page. I think they did a pretty good job.

two windows

$\endgroup$
1
  • $\begingroup$ Hi, cormullion, I've modified the question and the question is concise now. $\endgroup$ Aug 8, 2018 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.