Skip to content

Commit

Permalink
Merged improvements in documentation generation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvarBer committed Dec 20, 2016
2 parents 4692839 + d69a139 commit 97c39f1
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 60 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# TeX files
*.tex

# TeX aux files
*.aux

# Vim Backup files
*.swp
*~
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ script: true
after_success:
- sudo apt-get install texlive-latex-extra
- cd docs
- wget http://mirrors.ctan.org/macros/latex/contrib/standalone.zip
- unzip standalone.zip
- cd standalone
- wget http://texdoc.net/texmf-dist/tex/generic/ydoc/ydocstrip.tex
- xelatex standalone.ins
- cd .. && mv standalone/* .
- make travis && cd ..

deploy:
Expand All @@ -18,9 +24,13 @@ deploy:
file: docs/persimmon.pdf
skip_cleanup: true
overwrite: true
on:
branch:
- master

# Only run CI on master
branches:
only:
- master
- dev

2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Project Definition
Project Definition ![travis](https://travis-ci.org/AlvarBer/Persimmon.svg?branch=master)
==================

Problem
Expand Down
48 changes: 29 additions & 19 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,46 @@ PDF := persimmon.pdf # PDF Main Target
CSL := emerald-harvard.csl # CSL file used for citations
TEMPLATE := template.tex # LaTeX template for producing PDF
BIBLIOGRAPHY := persimmon.bib # BibLaTeX bibliography
MARKDOWN := chapter0.md chapter1.md chapter2.md chapter3.md # Markdown files
MARKDOWN := chapter0.md chapter1.md chapter2.md chapter3.md # Markdown files
GRAPHS := $(wildcard graphs/*.tex)
IMAGES := $(GRAPHS:.tex=.pdf)
LATEXHEADERS := latexheaders.tex
IMAGES += $(wildcard graphs/*.png) # Standalone pictures to be inserted
LATEXHEADERS := latexheaders.tex # Additional LaTeX headers
METADATA := metadata.yaml # Metadata files (Author, Date, Title, etc..)

all: $(PDF)
all: pdf

$(PDF): $(MARKDOWN) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE) metadata.yaml
pdf: $(MARKDOWN) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE) $(IMAGES) $(METADATA)
pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
--top-level-division chapter --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
--include-in-header latexheaders.tex metadata.yaml $(MARKDOWN) -o $@
--include-in-header $(LATEXHEADERS) $(METADATA) $(MARKDOWN) -o $(PDF)

graphs/%.pdf: graphs/%.tex
xelatex $<

travis:
travis: $(IMAGES)
pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
--chapters --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
--include-in-header latexheaders.tex metadata.yaml $(MARKDOWN) -o $(PDF)

--include-in-header $(LATEXHEADERS) $(METADATA) $(MARKDOWN) -o $(PDF)

# Splitted creation (Not currently working)
CHAPTERS := $(MARKDOWN:.md=.tex) # LaTeX Chapters
splitted: $(CHAPTERS) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE)
pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
--top-level-division chapter --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
$(CHAPTERS) -o $(PDF)
# For standalone images (Not used)
graphs/%.pdf: graphs/%.tex
xelatex $<

%.tex: metadata.yaml %.md
pandoc --no-tex-ligatures metadata.yaml $*.md -o $@
## Splitted creation (Not currently working)
#CHAPTERS := $(MARKDOWN:.md=.tex) # LaTeX Chapters
#GRAPHS := $(wildcard graphs/*.tex)
#IMAGES += $(GRAPHS:.tex=.pdf)
#
##splitted: $(CHAPTERS) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE)
# pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
# --top-level-division chapter --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
# $(CHAPTERS) -o $(PDF)
#
#%.tex: metadata.yaml %.md
# pandoc --no-tex-ligatures metadata.yaml $*.md -o $@
#
## For standalone images (Not used)
#graphs/%.pdf: graphs/%.tex
# xelatex $<
#

clean:
rm -f *.pdf chapter?.tex *.log *.aux *.png
Expand Down
43 changes: 3 additions & 40 deletions docs/chapter2.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,7 @@ and the best way to understand the progression of those and their relation
is with a diagram.


\begin{figure}
\centering
\caption{Objectives Tree}
\begin{tikzpicture}
\draw (-1, 1.4) rectangle (1, 2.1) node[midway, gray] {Capped};
\draw [->, gray, thick] (0, 2.2) -- (0, 2.7);
\draw (-1, 2.8) rectangle (1, 3.5) node[midway, gray] {Parity};
\draw [->, gray, thick] (0, 3.6) -- (0, 4.3);
\draw (-1, 4.4) rectangle (1, 5.1) node[midway, gray] {Compilation};
\draw [red, dashed] (-3, 5.5) -- (3, 5.5) node[below left] {Out of scope};
\draw [->, gray, thick] (-0.1, 5.2) -- (-2, 5.9);
\draw [->, gray, thick] (0.1, 5.2) -- (2, 5.9);
\draw (-3, 6) rectangle (-1, 6.7) node[midway, gray] {Web};
\draw (1, 6) rectangle (3, 6.7) node[midway, gray] {Synthesis};
\end{tikzpicture}
\end{figure}
![Objectives Tree](objectives.pdf)

**Capped** is more than a minimum viable product, a extensive proof-of-concept,
with a few limited algorithms and the ability of inputing `.csv` files. with a
Expand All @@ -43,30 +28,8 @@ the ability to visualize on persimmon a python source file.

Now that we understand the objectives we can draw a much detailed gantt diagram.

\begin{figure}
\caption{Gantt Diagram}
\begin{ganttchart}[
hgrid,
vgrid,
time slot format=isodate-yearmonth,
x unit=2cm,
compress calendar,
inline,
]{2016-10}{2017-04}
\gantttitlecalendar{year, month=name} \\
\ganttbar{Distil Idea}{2016-10}{2016-10} \\
\ganttbar{Planning}{2016-11}{2016-12} \\
\ganttgroup{Implementation}{2016-12}{2017-03} \\
\ganttbar{Iteration 1}{2016-12}{2017-01} \\
\ganttlinkedmilestone{Capped}{2017-01} \\
\ganttlinkedbar{Iteration 2}{2017-02}{2017-02} \\
\ganttlinkedmilestone{Parity}{2017-02} \\
\ganttlinkedbar{Iteration 3}{2017-03}{2017-03} \\
\ganttlinkedmilestone{Compilation}{2017-03} \\
\ganttbar{Report Building}{2016-10}{2017-03}
\ganttbar{Refinement}{2017-04}{2017-04} \\
\end{ganttchart}
\end{figure}
![Gantt Diagram](gantt.pdf)


We ommited previous months that included idea refinement but are not
interesting for us.
Expand Down

0 comments on commit 97c39f1

Please sign in to comment.