-
-
Save robince/5353efef9b3572d3cc52 to your computer and use it in GitHub Desktop.
Script to prepare arXiv package of a document that depends on texlive2015's version of biblatex (using pdflatex)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script is useful if: | |
# - you have a manuscript that you want to upload to the arXiv, | |
# - you are using biblatex, and | |
# - you are using texlive2015 while arXiv is still on texlive2011 | |
# | |
# Put this file in a directory containing the manuscript you want to | |
# upload to arXiv.org, and adapt the paths below. | |
# The main latex file of your document (without .tex): | |
MAIN=mytexfile | |
# You must have both texlive2011 and texlive2014 installed: | |
TEXLIVE2011=/usr/local/texlive/2011 | |
TEXLIVE2015=/usr/local/texlive/2015 | |
# Adapt these paths to your texlive2011 installation | |
# (especially $PATH in case you have a 32bit system) | |
PATH="$TEXLIVE2011/bin/x86_64-darwin:$PATH" | |
MANPATH="$TEXLIVE2011/texmf/doc/man:$MANPATH" | |
INFOPATH="$TEXLIVE2011/texmf/doc/info:$INFOPATH" | |
TEXMFHOME="$TEXLIVE2011/texmf" | |
TEXMFCNF="$TEXLIVE2011/texmf/web2c" | |
# This should point to the biber or bibtex executable of texlive2015: | |
MAKE_BIB=$TEXLIVE2015/bin/x86_64-darwin/biber | |
if [ ! -d "$TEXLIVE2011" ] || [ ! -d "$TEXLIVE2015" ] | |
then | |
echo "You must have texlive-2011 AND texlive-2015 installed" | |
exit | |
fi | |
# make a temporary directory "arXiv-package" and | |
# copy texlive2015's biblatex there | |
rm arXiv-package.zip | |
rm -rf arXiv-package | |
mkdir arXiv-package | |
cp *.sty *.tex *.bib *.pdf arXiv-package/ | |
cp $TEXLIVE2015/texmf-dist/tex/latex/biblatex/*.* arXiv-package/ | |
cp $TEXLIVE2015/texmf-dist/tex/latex/biblatex/bbx/*.* arXiv-package/ | |
cp $TEXLIVE2015/texmf-dist/tex/latex/biblatex/cbx/*.* arXiv-package/ | |
cp $TEXLIVE2015/texmf-dist/tex/latex/biblatex/lbx/*.* arXiv-package/ | |
cp $TEXLIVE2015/texmf-dist/tex/latex/biblatex-ieee/*.* arXiv-package/ | |
#./git.tex.sh > arXiv-package/git.tex | |
cd arXiv-package | |
# Run texlive2011's latexmk, but without bibtex/biber | |
latexmk -pdf -bibtex- $MAIN | |
# Run texlive2014's bibtex/biber | |
$MAKE_BIB $MAIN | |
# Run texlive2011's latexmk again, but without bibtex/biber | |
latexmk -pdf -bibtex- $MAIN | |
# Remove files that arxiv does not want | |
rm *.aux *.bib *.blg *.log *.xml *.fdb_latexmk *.out *.pdfsync *.fls $MAIN.pdf | |
cd .. | |
# Create .zip archive | |
zip -r arXiv-package.zip arXiv-package | |
#rm -rf arXiv-package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment