2012-07-12から1日間の記事一覧

reStructuredTextのsimple tableをtexに変換、ただしmulticolumn, multirowは不可

数式は:math:`hoge`。 #!/usr/bin/python import sys import re rstfile = open(sys.argv[1]) remath = re.compile(r':math:`.*`') rows = [] for line in rstfile: if re.match("^=+$", line.strip().replace(' ', '')): rows.append([elem for elem in lin…

Emacsで行の端を折り返さない

M-x auto-fill-mode