TEXDIRFLATTEN(1)

πŸ’– TEXDIRFLATTEN(1) πŸ’–

okay bestie, welcome to the texdirflatten man page, she's a Perl script and she's here to gather up all your LaTeX chaos into one little folder πŸŽ€


✨ NAME ✨

texdirflatten β€” collects all components of a (La)TeX file in a single output directory β€” i.e., it flattens its hierarchy. πŸ’…


🌸 SYNOPSIS 🌸

texdirflatten [-1|--onetex] [-f|--file input.tex] [-o outputdir]
               [--imgexts .ext1,.ext2,...] [--debug] [-V|--version]
[-?|--help]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this Perl script goes through a LaTeX file recursively, scanning all the child files, and it collects the deets on every included file and other data file β€” think graphics, BiBTeX bibliography files, all of it. πŸ‘‘

Then all of those component files get put into one single directory, which is the whole "flattening the document's directory tree" moment. Iconic.

Why do you care? Because it's literally perfect for distributing manuscripts to your collaborators, or for submitting to journals. no cap. 🫢


✨ OPTIONS ✨

  • --file, -f _input.tex`_ β€” specifies the input (La)TeX file. like, the main character file. πŸ“„
  • --onetex, -1 β€” if you specify this, it produces a single TeX file by expanding all \input and \include commands in place. one file to rule them all fr fr.
  • --output, -o _outputdir_ β€” the directory to collect all the files in. texdirflatten will copy each source file, graphics and bibliography file to this directory. It will be created if it is unexistent (yes, "unexistent", we're keeping that πŸ’€). If unspecified, it defaults to flat/. πŸ—‚οΈ
  • --imgexts .ext1,.ext2[,...] β€” prepends to the prioritized list of image extensions to search when trying to find the image to copy to the output folder. The first file with the extension found will be copied and the search stops. Default order is "", .eps, .pdf, .pstex β€” note that it includes files with no extension. If you're using pdflatex, you may want to add PDF before EPS with --imgexts .pdf. Don't forget the dot before the extension! ⚠️
  • --debug β€” enables copious amounts of debugging output. super useful if something is going wrong. πŸ”
  • --version, -V β€” displays the current version number and the usage, and exits. πŸ’«
  • --help, -? β€” show this manual page. hi bestie, you found it πŸ₯°

🌈 EXAMPLES 🌈

The following example scans manuscript.tex in the current directory and gathers it and all its components in the submit_01/ directory:

$ texdirflatten -f manuscript.tex -o submit_01

πŸ’€ CAVEATS πŸ’€

Please take backups before running this command. No warranties whatsoever provided. 🚨

You may need to run epstopdf on EPS files if you are using pdflatex:

$ for i in *.eps; do epstopdf $i; done

πŸ› BUGS πŸ›

Bug reports and patches are welcome. bring them to me, I'll love them πŸ˜­πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Cengiz Gunay <cengique<AT>users.sf.net>


Copyleft 2003-2017, Cengiz Gunay

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie!! this one is texdirflatten-v1.3, dated 2017-07-03 β€” go flatten some manuscripts, you absolute legend πŸ¦‹βœ¨πŸ’œ