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

An option to flatten the file structure.

Open suvojit-0x55aa opened this issue 3 years ago • 4 comments

Although this was made to make text repos compatible with arxiv submission, I think an option to flatten the sub directories will also extend this toll to be useable in submission to other platforms.

Description of the feature: \includegraphics{activation/Activations.pdf} these file include lines can be shortened to \includegraphics{activation_Activations.pdf}

and the activation/Activations.pdf copied to same directory as the tex file.

suvojit-0x55aa avatar Jan 29 '21 13:01 suvojit-0x55aa

Hi @suvojit-0x55aa, This would definitely be useful, marking it as enhancement to see if someone would be willing to create a PR. Thanks!

jponttuset avatar Feb 15 '21 10:02 jponttuset

This would also be a helpful workaround for #26

tvercaut avatar Mar 29 '21 12:03 tvercaut

It would really be useful. I have a Data folder With Pictures where I make a lot of tests and is very disorganised. I keep the latex project in a different folder. It would be nice to have this latex code automatically make a local copy only of the pictures that are really called inside the '.tex' documents

AndreaMarchetti1996 avatar Oct 26 '23 12:10 AndreaMarchetti1996

It should be sufficient to copy all relevant files to the root dir of the archive, discarding any directory structure, if the user does not include any file into the TeX document by path but rather uses TEXINPUTS/\input@path/\graphicspath/BIBINPUTS etc. The unmodified TeX file in the archive should still compile normally, since the root dir is included in all search paths (TEXINPUTS, BIBINPUTS, graphicspath, etc.).

Problems:

  1. Of course one can do stuff in TeX that breaks this, as one can break anything using TeX.
  2. This does not prefix file names. For this to work, the script would always need to change the TeX file (or one programs the prefixing in TeX).

jorsn avatar Jan 04 '24 16:01 jorsn