A Tool to Create ASCII Tables

ascii table

I needed an ASCII table in a LaTeX document. I wasn’t sure how large it should be or how many columns it should have, so it should be easily customizable. So I hacked together a little command line tool that creates .tex files for ASCII tables. That’s it. Written in C.

The tool offers some options:

./ascii --help
 Usage: ascii [OPTION…] A minimal tool to generate .tex code for ASCII tables
   -a, --standalone           Creates standalone latex files
   -C, --clabel=STRING        Modify the char label
   -d, --dec                  Only create the decimal column
   -D, --dlabel=STRING        Modify the decimal label
   -e, --end=n                Character code to end with
   -h, --hex                  Only create the hexadecimal column
   -H, --hlabel=STRING        Modify the hexadecimal label
   -o, --output=FILE          Output filename, default is ascii.tex
   -s, --start=n              Character code to start with
   -w, --wrap=n               Number of lines before the table wraps to the next
   -?, --help                 Give this help list
       --usage                Give a short usage message
   -V, --version              Print program version