(* Web page for each family *) maintainfamilypages := ( Print["Creating list of plant species sorted by families ..."]; xsizem1 = 400; (* Max width of pop-up thumbnail *) ysizem1 = 300; (* Max height of pop-up thumbnail *) height = 270; font =12; margin =3; Do[ fauthor = familyAuthor[family]; fref = familyReference[family]; fcname = familyCommonName[family]; familyfull = familyfull1a = family; If[Head[fauthor] === String, familyfull = familyfull <> " " <> fauthor]; familyfull1 = familyfull2 = familyfull; If[Head[fref] === String, familyfull2 = familyfull2 <> " " <> fref]; If[Head[fcname] === String, familyfull1 = familyfull1 <> " - " <> fcname; familyfull2 = familyfull2 <> " (" <> fcname <> ")"; familyfull1a = familyfull1a <> " (" <> fcname <> ")"; ]; text = { "
" ~~ Shortest[x__] ~~ "
" -> x, 1]; If[!MatchQ[wikitxt, {_}], Print["Internal error: first paragraph of Wiki article not found: ", name, " -> ", wikitext, " -> ", wikitxt], wikitxt = StringTrim[wikitxt[[1]]]; If[wikitxt === "", Print["Internal error: first paragraph of Wiki article is empty: ", name, " -> ", wikitext, " -> ", wikitxt]; ]]; ]; namer = StringReplace[name0, redirects]; name1 = StringReplace[namer, " " -> "%20"]; name1a = StringReplace[name1, " " -> "_"]; planta = StringReplace[plant, " " -> "_"]; plantal = ToLowerCase[planta]; wikiurl = "http://en.wikipedia.org/wiki/" <> name1a; datasql = plantdatasql[plant]; { "(" <> StringJoin[Riffle[syns, ", "]] <> ")
", ""], If[cnames =!= {}, "Common names: " <> StringJoin[Riffle[cnames, ", "]] <> "
", ""], If[nts =!= {}, "My notes: " <> StringJoin[Riffle[nts, "\n"]] <> "
", ""], If[wikitxt =!= "", "Extract from wikiurl <> "\">Wikipedia article: " <> wikitxt <> "
", ""], "",
Table[
{year, roll, pic, capt, xsize, ysize, date, pop} = dat;
link = "asergeev/pictures/archives/compress/" <> year <> "/" <> roll <> "/" <> pic <> ".htm";
(*linkjpg = "asergeev/pictures/archives/" <> year <> "/" <> roll <> "/jpeg/" <> pic <> ".jpg";*)
linkjpg = "asergeev/pictures/archives/" <> year <> "/" <> roll <> "/jpeg/" <> pic <> "b.jpg";
slink = "asergeev/pictures/archives/compress/" <> year <> "/" <> roll <> "/" <> pic <> ".htm";
capt1 = " link <> "\" TARGET=\"_blank\" TITLE=\"Photo " <> roll <> "-" <> pic <>
"\">" <>
capt;
xscale = xsizem1/xsize;
yscale = ysizem1/ysize;
scale = Min[xscale, yscale];
xm = Round[scale xsize];
ym = Round[scale ysize];
wthmaxt = 240;
hthmaxt = 180;
{pw, ph} = {xsize, ysize};
(*
{sc1, sc2} = {wthmaxt, hthmaxt}/{xsize, ysize};
sc = Min[sc1, sc2];
{pwr, phr} = Round[sc {xsize, ysize}];
*)
If[pw > ph,
phc = ph;
If[pw > 4./3 ph,
pwc = 4./3 ph,
pwc = pw];
pwr = hthmaxt/phc pwc;
phr = hthmaxt,
pwc = pw;
If[ph > 4./3 pw,
phc = 4./3 pw,
phc = ph];
pwr = hthmaxt;
phr = hthmaxt/pwc phc;
];
pwr = Round[pwr];
phr = Round[phr];
imgtrail = "ONMOUSEOVER=\"showtrail('asergeev/pictures/archives/compress/" <> year <> "/" <> roll <> "/jpeg/" <> pic <> "m.jpg'," <> ToString[xm] <> "," <> ToString[ym] <> ");" <>
"\" ONMOUSEOUT=\"hidetrail();\"";
jpg = " linkjpg <> "\" TARGET=\"_blank\"> year <> "/" <> roll <> "/jpeg/" <> pic <> "t.jpg" <>
"\" BORDER=\"0\" HEIGHT=\"" <> ToString[phr] <> "\" WIDTH=\"" <> ToString[pwr] <> "\" " <> imgtrail <> ">";
If[MemberQ[excls, {roll, pic}], "",
" " <> jpg <>
" "], {dat, datasql}],
"" <> capt1 <> " |
QNHG (Qatar Natural History Group) and associated people, for a possibility to participate in their field excursions and to learn about local nature.