diff --git a/Makefile b/Makefile index 12b1cab09bb4a3d08bd0f5e72f9a01ee1afcda7c..2f046e230f6cd6446fb34804b0493b61cd534795 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PANDOCFLAGS = \ --standalone \ --pdf-engine=xelatex \ +SOURCES_CSV = $(wildcard *.csv) SOURCES_MD = $(sort $(wildcard chapter-*.md)) default: all @@ -18,7 +19,7 @@ $(SUBDIRS): subdirs: $(SUBDIRS) -document.pdf: $(SUBDIRS) metadata.yml $(SOURCES_MD) +document.pdf: $(SUBDIRS) metadata.yml $(SOURCES_CSV) $(SOURCES_MD) $(PANDOC) $(PANDOCFLAGS) -o document.pdf metadata.yml $(SOURCES_MD) check: spellcheck diff --git a/chapter-1-introduction.md b/chapter-1-introduction.md index a4754aa1c50a0b991be52ebc8816de69f68471a5..e15407168785c7c8cc0ce7740ea6deaa970164f6 100644 --- a/chapter-1-introduction.md +++ b/chapter-1-introduction.md @@ -116,10 +116,7 @@ table <- read.csv('example.csv') Tables ------ -| header 1 | header 2 | header 3 | -| -------- | :------: | -------: | -| left | centered | 424242 | -| aligned | content | 42 | +See the **Results** chapter below for some examples. LaTeX if you need it -------------------- diff --git a/chapter-3-results.md b/chapter-3-results.md index 455a6c889ec2bbeb53bf89a9c4fb7c4b8325dc5f..b1efb97246a31589d62464cb8a9d4fd54a9f7f11 100644 --- a/chapter-3-results.md +++ b/chapter-3-results.md @@ -1,2 +1,19 @@ Results ======= + +You can manually lay out tables using Markdown. + +| header 1 | header 2 | header 3 | +| -------- | :------: | -------: | +| left | centered | 424242 | +| aligned | content | 42 | + +Table: These are my super significant results. + +You can automatically insert tables from your results if you store them in CSV. + +\begin{table} + \centering + \csvautobooktabular{results.csv} + \caption{These are my super significant results.} +\end{table} diff --git a/metadata.yml b/metadata.yml index 6c85c58eafbfb82e08dc00f4fa8d11dc9545b051..9c6c06132a72bd8600c7fd175f2c94752a02e3a8 100644 --- a/metadata.yml +++ b/metadata.yml @@ -21,6 +21,7 @@ abstract: | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. header-includes: | + \usepackage{csvsimple} \usepackage{draftwatermark} papersize: a4paper diff --git a/results.csv b/results.csv new file mode 100644 index 0000000000000000000000000000000000000000..88700c7147b68d4273d85ef5c7dc491c73d56851 --- /dev/null +++ b/results.csv @@ -0,0 +1,3 @@ +a,b,c +1,2,3 +4,5,6