
import json

def storeJSON(dict, file_string):
    with open(file_string, 'w') as fp:
        json.dump(dict, fp, indent=4)

def storeTEX(dict, file_string):
    with open(file_string, 'w') as fp:
        fp.write("\\begin{tabular}\n")
        fp.write("  \\hline\n")
        fp.write("  ")
        # First we need to write out the headers
        for row in dict:
            for column in dict[row]:
                fp.write("& %s " % (column))
            fp.write("\\\\\n")
            break
        fp.write("  \\hline\n")

        # Now read all rows and output them as well
        for row in dict:
            fp.write("  %s " % (row))
            for column in dict[row]:
                fp.write("& %s " % dict[row][column])
            fp.write("\\\\\n")
        fp.write("  \\hline\n")
        fp.write("\\end{tabular}\n")


import json

def storeJSON(dict, file_string):
    with open(file_string, 'w') as fp:
        json.dump(dict, fp, indent=4)

def storeTEX(dict, file_string):
    with open(file_string, 'w') as fp:
        fp.write("\\begin{tabular}\n")
        fp.write("  \\hline\n")
        fp.write("  ")
        # First we need to write out the headers
        for row in dict:
            for column in dict[row]:
                fp.write("& %s " % (column))
            fp.write("\\\\\n")
            break
        fp.write("  \\hline\n")

        # Now read all rows and output them as well
        for row in dict:
            fp.write("  %s " % (row))
            for column in dict[row]:
                fp.write("& %s / %s " % (dict[row][column][0], dict[row][column][1]))
            fp.write("\\\\\n")
        fp.write("  \\hline\n")
        fp.write("\\end{tabular}\n")

Fix latex output for splitted up/down values
Fix latex output for splitted up/down values

  
  import json
  
  def storeJSON(dict, file_string):
      with open(file_string, 'w') as fp:
          json.dump(dict, fp, indent=4)
  
  def storeTEX(dict, file_string):
      with open(file_string, 'w') as fp:
          fp.write("\\begin{tabular}\n")
          fp.write("  \\hline\n")
          fp.write("  ")
          # First we need to write out the headers
          for row in dict:
              for column in dict[row]:
                  fp.write("& %s " % (column))
              fp.write("\\\\\n")
              break
          fp.write("  \\hline\n")
  
          # Now read all rows and output them as well
          for row in dict:
              fp.write("  %s " % (row))
              for column in dict[row]:
-                 fp.write("& %s " % dict[row][column])
+                 fp.write("& %s / %s " % (dict[row][column][0], dict[row][column][1]))
              fp.write("\\\\\n")
          fp.write("  \\hline\n")
          fp.write("\\end{tabular}\n")
  
Fix latex output for splitted up/down values
## Code Before:

import json

def storeJSON(dict, file_string):
    with open(file_string, 'w') as fp:
        json.dump(dict, fp, indent=4)

def storeTEX(dict, file_string):
    with open(file_string, 'w') as fp:
        fp.write("\\begin{tabular}\n")
        fp.write("  \\hline\n")
        fp.write("  ")
        # First we need to write out the headers
        for row in dict:
            for column in dict[row]:
                fp.write("& %s " % (column))
            fp.write("\\\\\n")
            break
        fp.write("  \\hline\n")

        # Now read all rows and output them as well
        for row in dict:
            fp.write("  %s " % (row))
            for column in dict[row]:
                fp.write("& %s " % dict[row][column])
            fp.write("\\\\\n")
        fp.write("  \\hline\n")
        fp.write("\\end{tabular}\n")

## Instruction:
Fix latex output for splitted up/down values
## Code After:

import json

def storeJSON(dict, file_string):
    with open(file_string, 'w') as fp:
        json.dump(dict, fp, indent=4)

def storeTEX(dict, file_string):
    with open(file_string, 'w') as fp:
        fp.write("\\begin{tabular}\n")
        fp.write("  \\hline\n")
        fp.write("  ")
        # First we need to write out the headers
        for row in dict:
            for column in dict[row]:
                fp.write("& %s " % (column))
            fp.write("\\\\\n")
            break
        fp.write("  \\hline\n")

        # Now read all rows and output them as well
        for row in dict:
            fp.write("  %s " % (row))
            for column in dict[row]:
                fp.write("& %s / %s " % (dict[row][column][0], dict[row][column][1]))
            fp.write("\\\\\n")
        fp.write("  \\hline\n")
        fp.write("\\end{tabular}\n")
