Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Jun 1, 2018
0 parents commit 7a191ed
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.sconsign.dblite
_build
*.pyc
_ignore
29 changes: 29 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -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)
15 changes: 15 additions & 0 deletions main.bib
Original file line number Diff line number Diff line change
@@ -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"
}

36 changes: 36 additions & 0 deletions main.tex
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 7a191ed

Please sign in to comment.