; ; ; tit1 = '\begin{tabular}{|c|r||c|r|} \hline tit2 = '{\sl Carrington Rotation} & {\sl Starting Date} & {\sl Carrington Rotation} & {\sl Starting Date} \\ \hline outfil = 'mk_carr_id.tex openw, lun, outfil, /get_lun printf, lun, tit1 printf, lun, tit2 ; st_rot = 1846 en_rot = 1875+12 ;+30+12 (really is 1905+24) for irot=st_rot, en_rot do begin str = string(irot, format='(2x, i4.4)') dummy = irot timarr = clon2ex(dummy) ;clon2ex changes the data type date = gt_day(timarr, /str) date = str_replace(date, ' ', '~') str = str + ' & {\tt ' + date + '} ' ;--- second pair of columns str = str + ' & ' + string(irot+30, format='(2x, i4.4)') dummy = irot+30+12 timarr = clon2ex(dummy) ;clon2ex changes the data type date = gt_day(timarr, /str) date = str_replace(date, ' ', '~') str = str + ' & {\tt ' + date + '} ' str = str + '\\' if (irot eq en_rot) then str = str + ' \hline print, str printf, lun, str if (irot eq en_rot) then printf, lun, '\end{tabular} end ; free_lun, lun end