fat_table 0.4.0 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +2 -1
- data/README.org +1426 -447
- data/README.rdoc +1 -2
- data/TODO.org +17 -10
- data/examples/create_trans.sql +14 -0
- data/examples/quick.pdf +0 -0
- data/examples/quick.png +0 -0
- data/examples/quick.ppm +0 -0
- data/examples/quick.tex +8 -0
- data/examples/quick_small.png +0 -0
- data/examples/quicktable.tex +123 -0
- data/examples/trades.db +0 -0
- data/examples/trans.csv +13 -0
- data/fat_table.gemspec +1 -0
- data/lib/ext/array.rb +15 -0
- data/lib/fat_table/column.rb +89 -208
- data/lib/fat_table/convert.rb +174 -0
- data/lib/fat_table/errors.rb +4 -0
- data/lib/fat_table/evaluator.rb +7 -0
- data/lib/fat_table/footer.rb +228 -0
- data/lib/fat_table/formatters/formatter.rb +200 -166
- data/lib/fat_table/formatters/latex_formatter.rb +9 -7
- data/lib/fat_table/table.rb +366 -117
- data/lib/fat_table/version.rb +1 -1
- data/lib/fat_table.rb +19 -16
- data/md/README.md +1 -2
- metadata +31 -5
@@ -91,7 +91,7 @@ module FatTable
|
|
91
91
|
else
|
92
92
|
''
|
93
93
|
end
|
94
|
-
result += "\\usepackage[pdftex,x11names]{xcolor}\n"
|
94
|
+
result += "\\usepackage[pdftex,table,x11names]{xcolor}\n"
|
95
95
|
result
|
96
96
|
end
|
97
97
|
|
@@ -113,12 +113,14 @@ module FatTable
|
|
113
113
|
# default.
|
114
114
|
def decorate_string(str, istruct)
|
115
115
|
str = quote(str)
|
116
|
-
result =
|
117
|
-
result
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
116
|
+
result = istruct.italic ? "\\itshape{#{str}}" : str
|
117
|
+
result = istruct.bold ? "\\bfseries{#{result}}" : result
|
118
|
+
if istruct.color && istruct.color != 'none'
|
119
|
+
result = "{\\textcolor{#{istruct.color}}{#{result}}}"
|
120
|
+
end
|
121
|
+
if istruct.bgcolor && istruct.bgcolor != 'none'
|
122
|
+
result = "\\cellcolor{#{istruct.bgcolor}}#{result}"
|
123
|
+
end
|
122
124
|
unless istruct.alignment == format_at[:body][istruct._h].alignment
|
123
125
|
ac = alignment_code(istruct.alignment)
|
124
126
|
result = "\\multicolumn{1}{#{ac}}{#{result}}"
|