Esempio n. 1
0
def test_table_color():
    ltt = LatexTable(data=[['alpha', 10.123], ['alpha_s', 30]])
    ltt.set_cell_color(0, 0, (111, 123, 95))
    assert_equal(
        str(ltt),
        '%\\usepackage[table]{xcolor} % include this for color\n%\\usepackage{rotating} % include this for rotate header\n%\\documentclass[xcolor=table]{beamer} % for beamer\n\\begin{tabular}{|c|c|}\n\\hline\n\\cellcolor[RGB]{111,123,95} $\\alpha$ &     10.123\\\\\n\\hline\n$\\alpha_{s}$ & 30\\\\\n\\hline\n\\end{tabular}'
    )
Esempio n. 2
0
def test_table_color():
    ltt = LatexTable(data=[["alpha", 10.123], ["alpha_s", 30]])
    ltt.set_cell_color(0, 0, (111, 123, 95))
    expected = """%\\usepackage[table]{xcolor} % include this for color
%\\usepackage{rotating} % include this for rotate header
%\\documentclass[xcolor=table]{beamer} % for beamer
\\begin{tabular}{|c|c|}
\\hline
\\cellcolor[RGB]{111,123,95} $\\alpha$ &     10.123\\\\
\\hline
$\\alpha_{s}$ & 30\\\\
\\hline
\\end{tabular}"""
    assert str(ltt) == expected
Esempio n. 3
0
def test_table_color():
    ltt = LatexTable(data=[['alpha', 10.123], ['alpha_s', 30]])
    ltt.set_cell_color(0, 0, (111, 123, 95))
    expected = '%\\usepackage[table]{xcolor} % include this for color\n%\\usepackage{rotating} % include this for rotate header\n%\\documentclass[xcolor=table]{beamer} % for beamer\n\\begin{tabular}{|c|c|}\n\\hline\n\\cellcolor[RGB]{111,123,95} $\\alpha$ &     10.123\\\\\n\\hline\n$\\alpha_{s}$ & 30\\\\\n\\hline\n\\end{tabular}'
    assert str(ltt) == expected