Skip to content

Commit

Permalink
final edits; add image file for blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
pmur002 committed Nov 24, 2020
1 parent 3c7e6d0 commit 2182cbc
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 31 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ RUN Rscript -e 'library(devtools); install_version("devoid", "0.1.1", repos="htt
RUN Rscript -e 'library(devtools); install_version("gridBezier", "1.1-1", repos="https://cran.rstudio.com/")'

# Using COPY will update (invalidate cache) if the tar ball has been modified!
COPY dvir_0.3-0.tar.gz /tmp/
RUN R CMD INSTALL /tmp/dvir_0.3-0.tar.gz
# RUN Rscript -e 'devtools::install_github("pmur002/dvir@v0.3-0")'
# COPY dvir_0.3-0.tar.gz /tmp/
# RUN R CMD INSTALL /tmp/dvir_0.3-0.tar.gz
RUN Rscript -e 'devtools::install_github("pmur002/dvir@v0.3-0")'

RUN apt-get install -y locales && locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker:

web:
make docker
cp -r ../dvir-tikz-report/* ~/Web/Reports/dvir/luatex/
cp -r ../dvir-tikz-report/* ~/Web/Reports/dvir/tikz/

zip:
make docker
Expand Down
Binary file added Marketing/Rlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Marketing/dvir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 38 additions & 5 deletions Marketing/image.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,47 @@

library(dvir)

png("dvir.png", width=200, height=100)
png("dvir.png", width=200, height=100, bg="white")
grid.newpage()
grid.tikzpicture("
\\path (0, 0) node[circle,minimum size=.5in,fill=blue!20,draw,thick] (x) {\\sffamily{R}}
(3, 0) node[circle,minimum size=.5in,fill=blue!20,draw,thick] (y) {Ti{\\it k}Z!};
\\draw[-{Stealth[length=4mm]}, decorate, decoration={zigzag, post=curveto, post length=5mm}] (x) .. controls (1, 1) and (2, 1) .. (y);
\\draw[-{Stealth[length=4mm]}, decorate, decoration={zigzag, post=curveto, post length=5mm}] (y) .. controls (2, -1) and (1, -1) .. (x);
\\path (0, 0) node[circle,minimum size=.5in,fill=blue!10,draw,thick] (x) {{\\sffamily R}}
(3, 0) node[circle,minimum size=.5in,fill=blue!10,draw,thick] (y) {Ti{\\it k}Z!};
\\draw[decorate, decoration={zigzag, post=curveto, post length=5mm}] (x) .. controls (1, 1) and (2, 1) .. (y);
\\draw[decorate, decoration={zigzag, post=curveto, post length=5mm}] (y) .. controls (2, -1) and (1, -1) .. (x);
",
preamble=tikzpicturePreamble(packages=c("decorations.pathmorphing",
"arrows.meta")))
## Draw R logo over text "R" ?
Rgrob <- grid.get("text", grep=TRUE)
library(png)
logo <- readPNG("Rlogo.png")
downViewport(Rgrob$vp)
grid.raster(logo,
x=Rgrob$x + 0.5*stringWidth("R"),
y=Rgrob$y + 0.5*stringHeight("R"),
height=unit(7, "mm"),
hjust=.55)
upViewport(0)
grid.remove("text", grep=TRUE)
## Draw better arrows ?
library(gridGeometry)
library(vwline)
edges <- grid.get("polyline", grep=TRUE, global=TRUE)
curveArrow <- function(i) {
pts <- grobCoords(edges[[i]], closed=FALSE)
segs <- trim(pts,
from=unit(c(1, -3), c("npc", "mm")),
to=unit(c(-4, -5), c("mm", "mm")))
arrow1 <- offsetXsplineGrob(segs[[1]]$x, segs[[1]]$y, default.units="in",
shape=1,
w=widthSpline(unit(c(2, 0), "mm")))
arrow2 <- offsetXsplineGrob(segs[[2]]$x, segs[[2]]$y, default.units="in",
shape=1,
w=widthSpline(unit(c(4, 0), "mm")))
arrow <- polyclipGrob(arrow1, arrow2, "minus",
gp=gpar(fill="black"))
grid.draw(arrow)
}
curveArrow(1)
curveArrow(2)
dev.off()
6 changes: 3 additions & 3 deletions dvir-tikz.Rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -1163,11 +1163,11 @@ tikz files, causing the LaTeX compilation to fail."
<p>
Murrell, P. (2020).
"Adding TikZ support to 'dvir'"
Technical Report 2020-??, Department of Statistics,
Technical Report 2020-05, Department of Statistics,
The University of Auckland. version 1.
[ <a href="how-to-cite.bib">bib</a> |
<a href="http://doi.org/10.17608/k6.auckland.12133281">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/">http</a> ]
<a href="http://doi.org/10.17608/k6.auckland.13283900">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/2020/11/25/2020-05-adding-tikz-support-to-dvir">http</a> ]
</p>

<h2><a name="references">9. References</a></h2>
Expand Down
6 changes: 3 additions & 3 deletions dvir-tikz.cml
Original file line number Diff line number Diff line change
Expand Up @@ -1197,11 +1197,11 @@ tikz files, causing the LaTeX compilation to fail."
<p>
Murrell, P. (2020).
"Adding TikZ support to 'dvir'"
Technical Report 2020-??, Department of Statistics,
Technical Report 2020-05, Department of Statistics,
The University of Auckland. version 1.
[ <a href="how-to-cite.bib">bib</a> |
<a href="http://doi.org/10.17608/k6.auckland.12133281">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/">http</a> ]
<a href="http://doi.org/10.17608/k6.auckland.13283900">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/2020/11/25/2020-05-adding-tikz-support-to-dvir">http</a> ]
</p>

<h2><a name="references">References</a></h2>
Expand Down
10 changes: 5 additions & 5 deletions dvir-tikz.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h1>Adding TikZ support to 'dvir'</h1>
<p><span style="font-style: italic">by Paul Murrell</span><a href="http://orcid.org"><img alt="" src="https://www.stat.auckland.ac.nz/~paul/ORCID/ORCiD.png" style="width: 16px; height: 16px; vertical-align: middle"></a><span style="font-family: mono; font-size: small"><a href="http://orcid.org/0000-0002-3224-8858">http://orcid.org/0000-0002-3224-8858</a></span></p>
<p class="date">
Version 1:
Wednesday 18 November 2020
Tuesday 24 November 2020
</p>


Expand Down Expand Up @@ -664,7 +664,7 @@ <h3>Generating DVI output</h3>
</p>

<div class="chunk" id="unnamed-chunk-31"><div class="rcode"><div class="output"><pre class="knitr r"> pre version=2, num=25400000, den=473628672, mag=1000,
comment= TeX output 2020.11.18:2029
comment= TeX output 2020.11.24:2202
bop counters=1 0 0 0 0 0 0 0 0 0, p=-1
down4 a=1069005536
push
Expand Down Expand Up @@ -1288,11 +1288,11 @@ <h2>How to cite this document</h2>
<p>
Murrell, P. (2020).
"Adding TikZ support to 'dvir'"
Technical Report 2020-??, Department of Statistics,
Technical Report 2020-05, Department of Statistics,
The University of Auckland. version 1.
[ <a href="how-to-cite.bib">bib</a> |
<a href="http://doi.org/10.17608/k6.auckland.12133281">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/">http</a> ]
<a href="http://doi.org/10.17608/k6.auckland.13283900">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/2020/11/25/2020-05-adding-tikz-support-to-dvir">http</a> ]
</p>

<h2><a name="references">9. References</a></h2>
Expand Down
6 changes: 3 additions & 3 deletions dvir-tikz.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1101,11 +1101,11 @@ tikz files, causing the LaTeX compilation to fail."
<p>
Murrell, P. (2020).
"Adding TikZ support to 'dvir'"
Technical Report 2020-??, Department of Statistics,
Technical Report 2020-05, Department of Statistics,
The University of Auckland. version 1.
[ <a href="how-to-cite.bib">bib</a> |
<a href="http://doi.org/10.17608/k6.auckland.12133281">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/">http</a> ]
<a href="http://doi.org/10.17608/k6.auckland.13283900">DOI</a> |
<a href="http://stattech.blogs.auckland.ac.nz/2020/11/25/2020-05-adding-tikz-support-to-dvir">http</a> ]
</p>

<h2><a name="references">9. References</a></h2>
Expand Down
Binary file modified dvir_0.3-0.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions how-to-cite.bib
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ @techreport{murrell-dvir-tikz-2020
year={2020},
note={version 1},
institution={Department of Statistics, The University of Auckland},
number={2020-??},
url={},
doi={http://dx.doi.org/}
number={2020-05},
url={https://stattech.blogs.auckland.ac.nz/2020/11/25/2020-05-adding-tikz-support-to-dvir},
doi={http://dx.doi.org/10.17608/k6.auckland.13283900}
}
Binary file modified tex.dvi
Binary file not shown.
2 changes: 1 addition & 1 deletion tex.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 18 NOV 2020 20:29
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 24 NOV 2020 22:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
Expand Down
Binary file modified tikz.dvi
Binary file not shown.
2 changes: 1 addition & 1 deletion tikz.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 18 NOV 2020 20:29
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 24 NOV 2020 22:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
Expand Down
Binary file modified tikzR.dvi
Binary file not shown.
2 changes: 1 addition & 1 deletion tikzR.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 18 NOV 2020 20:29
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 24 NOV 2020 22:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
Expand Down
Binary file modified tikzRlabel.dvi
Binary file not shown.
2 changes: 1 addition & 1 deletion tikzRlabel.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 18 NOV 2020 20:29
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 24 NOV 2020 22:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
Expand Down
Binary file modified tikzSVG.dvi
Binary file not shown.
2 changes: 1 addition & 1 deletion tikzSVG.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 18 NOV 2020 20:29
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex 2020.11.16) 24 NOV 2020 22:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
Expand Down

0 comments on commit 2182cbc

Please sign in to comment.