diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd2c510 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.sconsign.dblite +_build +*.pyc +_ignore diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..950e669 --- /dev/null +++ b/SConstruct @@ -0,0 +1,29 @@ +import glob +import os + +VariantDir('_build', src_dir='.') + +env = Environment(ENV=os.environ) +inkscape = Builder(action = 'inkscape --without-gui --export-pdf=$TARGET $SOURCE') +env['BUILDERS']['Inkscape'] = inkscape +env['BUILDERS']['Latexdiff'] = Builder(action = 'latexdiff $SOURCES > $TARGET') +env['BUILDERS']['Copier'] = Builder(action = Copy('$TARGET', '$SOURCE')) + +figure_pdfs = [env.Inkscape(target="figures/" + os.path.basename(svg).replace('.svg','.pdf'), source=svg) + for svg in glob.glob('prep-figures/*.svg')] + +pdfs = [env.Copier(target = '_build/' + os.path.basename(pdf), source = pdf) + for pdf in glob.glob('figures/*.pdf')] + +Depends(Flatten([pdfs]), Flatten([figure_pdfs])) + +main=env.PDF(target='_build/main.pdf',source='main.tex') + +Depends(Flatten([main]), + Flatten([pdfs, figure_pdfs, 'main.bib'])) + +cont_build = env.Command('.continuous', ['main.bib', 'main.tex'], + 'while :; do inotifywait -e modify $SOURCES; scons -Q; done') +Alias('continuous', cont_build) + +Default(main) diff --git a/main.bib b/main.bib new file mode 100644 index 0000000..d798266 --- /dev/null +++ b/main.bib @@ -0,0 +1,15 @@ + +@ARTICLE{Felsenstein1981-zs, +title = "Evolutionary trees from {DNA} sequences: a maximum likelihood approach", +author = "Felsenstein, J", +journal = "J. Mol. Evol.", +publisher = "Springer", +volume = 17, +number = 6, +pages = "368--376", +year = 1981, +url = "http://www.ncbi.nlm.nih.gov/pubmed/7288891", +issn = "0022-2844", +pmid = "7288891" +} + diff --git a/main.tex b/main.tex new file mode 100644 index 0000000..0c0279c --- /dev/null +++ b/main.tex @@ -0,0 +1,36 @@ +\documentclass{article} + +\usepackage{graphicx} +\usepackage[hidelinks]{hyperref} + + +\hyphenation{Ge-nome Ge-nomes hyper-mut-ation through-put} + +\title{Template} +\author{You} + +\begin{document} +\maketitle + +\begin{abstract} +Abstract here. +\end{abstract} + + +\section{Introduction} +\cite{Felsenstein1981-zs} + +% \begin{figure}[h] +% \centering +% \includegraphics[width=0.35\textwidth]{figures/subsplit.pdf} +% \caption{\ +% A subsplit structure. +% } +% \label{fig:subsplit} +% \end{figure} + + +\bibliographystyle{plain} +\bibliography{main} + +\end{document}