27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/rmatrix/printing/print_table.rb', line 27
def to_tex
tex_map = self.row_count.times.map do |row|
self.column_count.times.map do |column|
cell_repr(self.cells[[column, row]])
end
end
"\\\\[\n \\\\text{Mat}_{\\\\varphi\\\\text{ to }M} = \\\\kbordermatrix{\n& c_1 & c_2 & c_3 & c_4 & c_5 \\\\\\\\\nr_1 & 1 & 1 & 1 & 1 & 1 \\\\\\\\\nr_2 & 0 & 1 & 0 & 0 & 1 \\\\\\\\\nr_3 & 0 & 0 & 1 & 0 & 1 \\\\\\\\\nr_4 & 0 & 0 & 0 & 1 & 1 \\\\\\\\\nr_5 & 0 & 0 & 0 & 0 & 1\n }\n\\\\]\n"
end
|