Created
June 19, 2015 13:48
-
-
Save ShinNoNoir/2995b205f0b88ebc7487 to your computer and use it in GitHub Desktop.
Makefile template for IEEE transactions
This file contains hidden or 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
| DOC=your_main_tex_file # without extension! | |
| BIB=${DOC} | |
| # default render options (also see .tex example): | |
| RENDER=rendertwocol | |
| OUTPUT_SUFFIX=_2col | |
| LATEX_CODE=\\def\\${RENDER}{1} \\input{${DOC}} | |
| TMP_DIR=tmp | |
| LATEX=pdflatex | |
| FLAGS=--output-directory=${TMP_DIR} --aux-directory=${TMP_DIR} | |
| all: onecol twocol | |
| _makepdf: | |
| mkdir ${TMP_DIR} -p | |
| ${LATEX} "${LATEX_CODE}" ${FLAGS} | |
| cp ${DOC}.bib tmp | |
| cd tmp; bibtex ${BIB} | |
| rm tmp/${DOC}.bib | |
| ${LATEX} "${LATEX_CODE}" ${FLAGS} | |
| ${LATEX} "${LATEX_CODE}" ${FLAGS} | |
| mv tmp/${DOC}.pdf ${DOC}${OUTPUT_SUFFIX}.pdf | |
| twocol: | |
| make RENDER=rendertwocol OUTPUT_SUFFIX=_2col _makepdf | |
| onecol: | |
| make RENDER=renderonecol OUTPUT_SUFFIX=_1col _makepdf | |
| clean: | |
| rm -rf ${TMP_DIR} |
This file contains hidden or 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
| % Structure of your LaTeX document: | |
| \ifdefined\rendertwocol | |
| \documentclass[10pt,twocolumn,twoside]{IEEEtran} | |
| \else | |
| \ifdefined\renderonecol | |
| \documentclass[11pt,draftcls,onecolumn]{IEEEtran} | |
| \else | |
| % DEFAULT: | |
| %\documentclass[11pt,draftcls,onecolumn]{IEEEtran} | |
| \documentclass[10pt,twocolumn,twoside]{IEEEtran} | |
| \fi | |
| \fi | |
| \begin{document} | |
| % ... | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment