google-research / arxiv-latex-cleaner

arXiv LaTeX Cleaner: Easily clean the LaTeX code of your paper to submit to arXiv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can the package fuse different latex files into one ?

MohamedAliRashad opened this issue · comments

I was looking for a tool that can clean different latex files and merge them into one big tex file while remove necessaries.
Is this what happens here ?

Hi @MohamedAliRashad,
At the moment, this functionality is not implemented, but happy to incorporate a PR.
Best,

@jponttuset
I actually have no idea how something like this could be done ... based on my research it's a task hard said than done.

Just use latexpand main.tex > merged_main.tex

Before I knew about the existence of arxiv-latex-cleaner, I wrote my own python script to do this: https://github.com/sharmaeklavya2/tex-flatten. The basic idea is that you read main.tex, and recursively replace all occurrences of \input{X} by the contents of X. You just need to be careful about not considering \input commands that are inside comments. You can copy code from my repository if you want.