arxiv-latex-cleaner icon indicating copy to clipboard operation
arxiv-latex-cleaner copied to clipboard

Can the package fuse different latex files into one ?

Open MohamedAliRashad opened this issue 2 years ago • 4 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 ?

MohamedAliRashad avatar May 08 '22 02:05 MohamedAliRashad

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

jponttuset avatar May 20 '22 08:05 jponttuset

@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.

MohamedAliRashad avatar May 20 '22 11:05 MohamedAliRashad

Just use latexpand main.tex > merged_main.tex

JeremieMelo avatar Dec 28 '23 22:12 JeremieMelo

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.

sharmaeklavya2 avatar Apr 19 '24 21:04 sharmaeklavya2