Tips for sharing your LaTeX source files

If you need to share the .tex source files of your work but they include comments that you would rather not distribute, you can use this simple in-line Perl script to removes comments automatically.

perl -pe 's/(^|[^\])%.*/$1%/' < old.tex > new.tex

When you’re asked for your .tex paper you probably also need to include all the files which are called there (i.e. images and bibliography) in order to make possible for the receiver to recreate the final .dvi (or .pdf) file  correctly.
Here you can find a Perl script which collects all the files you call in your .tex file, and packages them up, together with the original .tex file, as a .tar file.
This works only if you’re using LaTeX, the ones using PDFLaTex should take a look here.



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s