from data import trials for trial in trials: print('\\multirow{' + str(len(trial.pits)) + '}{' + '$\\times$'.join([str(el) for el in trial.size]) + '}') nei = trial.nearest_neighbor() pitcnt = len(trial.pits) for pitind in range(pitcnt): pit = trial.pits[pitind] print('& %.1f& %.1f& %.2f\\cr' % (pit.depth, pit.diam, nei[pitind])) if pitind+1 == pitcnt: break print('\\cline'); print('\\multispan{4}\\leaders\\hrule\\hfil\\cr')