Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

mk_tex_table.sh - Convert standalone LaTeX table files to PDF documents

Description

This script processes standalone LaTeX table files (.tex) and converts them to complete PDF documents. It wraps each table with a full LaTeX document structure including necessary packages for table formatting and compiles them to PDF using pdflatex.

Usage

./mk_tex_table.sh

Input

Output

Behavior

Packages Included

The script automatically includes these LaTeX packages for comprehensive table support:

Dependencies

Example

If directory contains results.tex and summary.tex:

How It Works

  1. File Discovery: Scans for .tex files, excluding those already prefixed with pdf_

  2. Document Creation: For each table file:

    • Creates a complete LaTeX document with document class and package imports

    • Includes the original table content

    • Adds proper document structure (\begin{document} and \end{document})

  3. Compilation: Runs pdflatex on each complete document to generate PDF

Page Layout

The generated documents use:

Example Workflow

# Directory contains: table1.tex, table2.tex, summary.tex
./mk_tex_table.sh

# Results:
# - pdf_table1.tex, pdf_table1.pdf
# - pdf_table2.tex, pdf_table2.pdf  
# - pdf_summary.tex, pdf_summary.pdf

This tool is particularly useful for converting standalone LaTeX table fragments into viewable PDF documents for review or presentation purposes.