410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
# File 'lib/maruku/output/to_latex.rb', line 410
def to_latex_table
num_columns = self.align.size
head, *rows = @children
h = { :center => 'c' , :left => 'l' , :right => 'r'}
align_string = self.align.map {|a| h[a] }.join('|')
s = "\\begin{tabular}{#{align_string}}\n"
s << array_to_latex(head, '&') + "\\\\" + "\n"
s << "\\hline \n"
rows.each do |row|
s << array_to_latex(row, '&') + "\\\\" + "\n"
end
s << "\\end{tabular}"
s << "\n\n"
end
|