--- pretty_name: TableTex language: - en license: other tags: - image - latex - table task_categories: - image-to-text size_categories: - 10KPlease generate complete LaTeX code for the table in the image, including the table body and the full preamble." }, { "role": "assistant", "content": "```latex\n\\documentclass{article}\n...\n```" } ], "images": [ "eess/image/2010.13713v2_tex_table3.png" ], "source": { "title": "Self-supervised Human Activity Recognition by Learning to Predict Cross-Dimensional Motion", "authors": [ "Setareh Rahimi Taghanaki", "Michael Rainbow", "Ali Etemad" ], "url": "https://arxiv.org/abs/2010.13713v2", "attribution": "\"Self-supervised Human Activity Recognition by Learning to Predict Cross-Dimensional Motion\" by Setareh Rahimi Taghanaki, Michael Rainbow, and Ali Etemad, arXiv:2010.13713v2, licensed under CC BY-SA 4.0. The table was extracted, wrapped as standalone LaTeX, rendered, and cropped by TableTex.", "license": { "name": "CC BY-SA 4.0", "url": "https://creativecommons.org/licenses/by-sa/4.0/" }, "modifications": [ "Extracted the table LaTeX from the article source.", "Wrapped it as a standalone LaTeX document.", "Rendered and cropped it into a PNG image." ] } } ``` Fields: - `messages`: multimodal prompt and target LaTeX response. - `images`: list containing the relative output path of the table image. - `source`: source and rights metadata for the sample. ### CSPO and evaluation configurations `cspo_train.jsonl` and `test.jsonl` store one JSON object per line: ```json { "image_path": "stat/image/2501.02454v2_tex_table8.png", "subject": "stat", "tex_code": "\\documentclass{article}\n...", "source": { "title": "Finite-Sample Valid Randomization Tests for Monotone Spillover Effects", "authors": [ "Shunzhuang Huang", "Xinran Li", "Panos Toulis" ], "url": "https://arxiv.org/abs/2501.02454v2", "attribution": "\"Finite-Sample Valid Randomization Tests for Monotone Spillover Effects\" by Shunzhuang Huang, Xinran Li, and Panos Toulis, arXiv:2501.02454v2, licensed under CC BY-SA 4.0. The table was extracted, wrapped as standalone LaTeX, rendered, and cropped by TableTex.", "license": { "name": "CC BY-SA 4.0", "url": "https://creativecommons.org/licenses/by-sa/4.0/" }, "modifications": [ "Extracted the table LaTeX from the article source.", "Wrapped it as a standalone LaTeX document.", "Rendered and cropped it into a PNG image." ] } } ``` Fields: - `image_path`: relative output path of the table image. - `subject`: arXiv subject category. - `tex_code`: standalone LaTeX code corresponding to the image. - `source`: source and rights metadata for the sample. ### Source metadata Every sample includes: - `source.title`: complete title of the source article. - `source.authors`: authors of the source article. - `source.url`: version-specific arXiv abstract URL. - `source.attribution`: attribution statement for the sample. - `source.license.name`: exact source-license name. - `source.license.url`: URL of the source license. - `source.modifications`: transformations performed by TableTex. ## Generating the Images ### 1. Install Dependencies TableTex image generation requires: - Python 3.10 or later - `tqdm` - TeX Live providing `pdflatex` and `pdfcrop` - Poppler providing `pdftoppm` Install the Python dependency with: ```bash pip install tqdm ``` Install TeX Live using the official resources: - **TeX Live:** [Official Website](https://tug.org/texlive/) - **Installation Guide:** [TeX Live Documentation](https://tug.org/texlive/doc.html) We recommend installing the full TeX Live distribution to ensure that all LaTeX packages used by the dataset are available. On Ubuntu/Debian systems, also install the following system dependencies: ```bash sudo apt-get update sudo apt-get install -y ghostscript poppler-utils ``` ### 2. Run the Script Run the following commands from the dataset root: ```bash python generate_images.py sft_train.json python generate_images.py cspo_train.jsonl python generate_images.py test.jsonl ``` The default behavior is to process every record. To process only the first 20 records: ```bash python generate_images.py test.jsonl --limit 20 ``` To use a different output root: ```bash python generate_images.py test.jsonl --output-root ./rendered ``` ### 3. Output Files By default, generated PNG images are written directly to: ```text //image/.png ``` The standalone LaTeX files used for compilation are written to: ```text /tex//image/.tex ``` ## Dataset Creation TableTex was constructed from LaTeX sources of scientific articles on arXiv. For each sample, the table LaTeX was extracted from an article, wrapped as a standalone document, and associated with version-specific source and licensing metadata. Images can be generated using the included rendering script. The source articles cover publications from 2012 to 2025 and were selected from the following Creative Commons license families: - CC BY - CC BY-SA - CC0 - CC BY-NC The exact license applicable to each sample is recorded in its `source.license` object. ## Intended Use TableTex is intended for research on table image-to-LaTeX generation, including supervised fine-tuning, reinforcement-learning-based post-training, and evaluation of models that reconstruct tables from images as LaTeX code. ## Copyright, Attribution, and Licensing TableTex contains samples derived from arXiv articles released under CC BY, CC BY-SA, CC0, or CC BY-NC licenses. Copyright remains with the respective authors and/or other rightsholders. The applicable license, attribution, and modification information for each sample is recorded in its `source` metadata. Users are responsible for complying with the applicable source license when using, adapting, or redistributing the LaTeX annotations or generated images, including any attribution, share-alike, and non-commercial requirements where applicable. Rendering an image locally does not alter the copyright or license terms of the source material. ## Citation If you use TableTex in your work, please cite: ```bibtex @article{yang2026cspo, title={CSPO: Alleviating Reward Ambiguity for Structured Table-to-LaTeX Generation}, author={Yang, Yunfan and Lan, Cuiling and Sang, Jitao and Lu, Yan}, journal={arXiv preprint arXiv:2604.10918}, year={2026} } ```