(* Main index file *) maintainIndex := ( {wthmaxm, hthmaxm} = {400, 300}; Print["Creating main index file ..."]; xsizem1 = 400; (* Max width of pop-up thumbnail *) ysizem1 = 300; (* Max height of pop-up thumbnail *) height = 270; font =12; margin =3; sfont := Switch[font, 14, "small", 12, "x-small", _, ToString[font]]; text = { " Flora of Qatar

Home PagePicture ArchivesFlora of Qatar

Flora of Qatar

Species of plants listed in alphabetical order

Species of plants listed by family

Compact list of plants

Pictures in chronological order

", (* Paginating to several year sets *) qyearsets = Prepend[Table[{y, y}, {y, 2014, qyearmax}], {2010, 2013}]; Print["Year sets for thumbnails: ", qyearsets // TableForm]; (* Main body - giant photomontage - for each year set *) Table[ {ymin, ymax} = qyearset; title = label = ToString[ymin]; If[ymax != ymin, title = title <> " - " <> ToString[ymax]; title1 = "Years " <> title, title1 = "Year " <> title]; qplantpics = Select[qplantpictures, (ymin <= ToExpression[#[[1]]] <= ymax) &]; Print[" --- ", title1, ": Total of ", Length[qplantpics], " pictures of Qatari plants."]; montagepics = Table[ {year, roll, pic} = qplant; ToFileName[{dir00, "pictures", "archives", "compress", year, roll, "jpeg"}, pic <> "q.jpg"], {qplant, qplantpics}]; filemont = ToFileName[{dir0}, "montage" <> label <> ".jpg"]; thsize = 50; columns = 30; maintainMontage; nborder = 1; montagewidth = columns (thsize + 2 nborder); montageheight = rows (thsize + 2 nborder); imgmap[qyearset] = { " label <> "\">", nf = 1; nrow = ncol = 1; Table[ xbr = (thsize + 2 nborder) ncol; ybr = (thsize + 2 nborder) nrow; x1 = ToString[xbr - thsize - nborder]; y1 = ToString[ybr - thsize - nborder]; x2 = ToString[xbr - nborder]; y2 = ToString[ybr - nborder]; nf++; ncol++; If[ncol > columns, ncol = ncol - columns; nrow++]; {y, roll, pic} = picture; plant = plantsonpicture[picture][[1]]; planta = ToLowerCase[StringReplace[plant, " " -> "_"]]; href = planta <> ".htm"; psize = picsize[roll, pic]; {pw, ph} = psize; {sc1, sc2} = {wthmaxm, hthmaxm}/{pw, ph}; sc = Min[sc1, sc2]; {pw2, ph2} = Round[sc {pw, ph}]; {xm, ym} = ToString /@ {pw2, ph2}; imgtrail = "ONMOUSEOVER=\"showtrail('asergeev/pictures/archives/compress/" <> y <> "/" <> roll <> "/jpeg/" <> pic <> "m.jpg'," <> xm <> "," <> ym <> ");\" " <> "ONMOUSEOUT=\"hidetrail();\""; " x1 <> "," <> y1 <> "," <> x2 <> "," <> y2 <> "\" href=\"" <> href <> "\" " <> imgtrail <> ">", {picture, qplantpics}], "" }; "

" <> title1 <> "

label <> ".jpg\" ALT=\"Photomontage of pictures of plants in Qatar. " <> title1 <> "\" BORDER=\"0\" WIDTH=\"" <> ToString[montagewidth] <> "\" HEIGHT=\"" <> ToString[montageheight] <> "\" USEMAP=\"#montage" <> label <> "\">
", {qyearset, qyearsets}], (* ... *) (* Footer *) "

Links

Outside links

How the web page was created

Acknowledgements

QNHG (Qatar Natural History Group) and associated people, for a possibility to participate in their field excursions and to learn about local nature.

", Table[imgmap[qyearset], {qyearset, qyearsets}], " " }; file = ToFileName[dir0, "index.htm"]; Export[file, StringJoin[Riffle[Flatten[text], "\n"]], "Text", CharacterEncoding -> "UTF8"]; );