SimonAytes / LaTeX-Table-Generator

Spreadsheet to LaTeX table converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaTeX-Table-Generator

Description

Creating tables in LaTeX is a labor-intensive process that is prone to errors. This program remedies this by allowing you to generate a table in a matter of seconds. By inputting a tab-delimited .txt file, this program generates a .tex file containing a table with default formatting.

Running the application

Creating a tab-delimited file

Because this program only accepts tab-delimited .txt files, it is very important that you make sure to export your Excel Workbook as one. Follow the steps below to learn how to do this:

  1. In Excel, go to File -> Save As.
  2. After specifying a name for your file, click the dropdown and select "Tab delimited text (.txt)".

Screen Shot 2021-08-02 at 4 29 25 PM

  1. Click Save. (NOTE: If you are prompted with a data-loss warning, ignore it and continue)

  2. Done! Now you can use this file to generate a LaTeX table.

Operation

To start using LaTeX-Table-Generator, follow the steps below:

  1. Clone the GitHub repository to your local computer (learn how here).
  2. Open Terminal and navigate to the location of the repository.
  3. In Terminal, type python table_generator.py. Hit enter.
  4. Before continuing, confirm that your Terminal window looks like the picture below (NOTE: You may have to resize your console window)

Screen Shot 2021-08-02 at 4 38 03 PM

  1. Enter the full system path of your tab-delimeted file. Hit enter.

Input Target Path

  1. When prompted, enter the name of the output file without extension (it will output as a .tex file). Hit enter.

Screen Shot 2021-08-02 at 4 59 12 PM

  1. The file has been created! Your Terminal window should look like the picture below.

Finished Example

  1. Locate the output file in the /Outputs/ folder within the repository directory.

Output File

You can now open the .tex file in your preferred LaTeX environment. Below is an example of a generated table in TexStudio.

TexStudio Table

Errors

The picture below shows the only error message this application provides.

Error Message

The most common causes of this error are:

  • Input file is not a .txt file
  • Input file is not tab-delimited
  • Input file does not exist
  • File path is wrong

If your issues still persists, please create an issue on the GitHub project's page, providing details and pictures as necessary.

Contact

Send me an email or contact me via my personal site.

About

Spreadsheet to LaTeX table converter


Languages

Language:Python 97.2%Language:TeX 2.8%