aboutsummaryrefslogtreecommitdiff
path: root/structure
diff options
context:
space:
mode:
Diffstat (limited to 'structure')
-rw-r--r--structure/book/en/00-header.html2
-rw-r--r--structure/book/en/00-header.yml3
-rw-r--r--structure/book/en/00-preamble.md39
-rw-r--r--structure/book/en/00-preamble.tex2
-rw-r--r--structure/book/en/99-end.md2
-rw-r--r--structure/book/pt-br/00-header.html2
-rw-r--r--structure/book/pt-br/00-header.yml3
-rw-r--r--structure/book/pt-br/00-preamble.md40
-rw-r--r--structure/book/pt-br/00-preamble.tex2
-rw-r--r--structure/book/pt-br/99-end.md2
-rw-r--r--structure/notes/en/00-preamble.md8
-rw-r--r--structure/notes/pt-br/00-preamble.md8
12 files changed, 91 insertions, 22 deletions
diff --git a/structure/book/en/00-header.html b/structure/book/en/00-header.html
new file mode 100644
index 0000000..94b4620
--- /dev/null
+++ b/structure/book/en/00-header.html
@@ -0,0 +1,2 @@
+<link rel="alternate" type="application/atom+xml" href="/atom.xml" />
+<link rel="alternate" type="application/rss+xml" href="/rss.xml" />
diff --git a/structure/book/en/00-header.yml b/structure/book/en/00-header.yml
index 2ad19fe..f56c37a 100644
--- a/structure/book/en/00-header.yml
+++ b/structure/book/en/00-header.yml
@@ -18,8 +18,9 @@ mainfont: "Linux Libertine O"
monofont: "Liberation Mono"
# Paper size
-#papersize: a4paper
#papersize: letterpaper
+#papersize: a4paper
+#papersize: a5paper
papersize: b5paper
# Geometry
diff --git a/structure/book/en/00-preamble.md b/structure/book/en/00-preamble.md
index cc6a3cb..e83f82b 100644
--- a/structure/book/en/00-preamble.md
+++ b/structure/book/en/00-preamble.md
@@ -9,7 +9,9 @@ if (knitr::is_html_output()) {
cat("\n")
cat('<img src="images/cover.png">')
cat("\n")
- cat("<h2>About</h2>")
+ cat("\n")
+
+ cat("## About {#about .unlisted .unnumbered}")
cat("\n")
cat('<em>')
cat(readLines('DISCLAIMER'), sep='\n')
@@ -19,11 +21,13 @@ if (knitr::is_html_output()) {
cat(readLines('.metadata/revision.txt'), sep='\n')
cat('</em></strong> - compiled at <strong><em>')
cat(readLines('.metadata/date.txt'), sep='\n')
- cat('</em></strong>.')
+ cat('</em></strong> using <a href="https://bookup.fluxo.info">Bookup</a>.')
cat('<br/>')
cat('Older versions available in the <a href="/archive">archive</a>.')
cat('<br/>')
- cat('Notebook available <a href="/notes">here</a>.')
+ cat('Follow updates in this book: <a href="/rss.xml">RSS</a> / <a href="/atom.xml">Atom</a>.')
+ cat('<br/>')
+ cat('Notebook available <a href="/notes">here</a>, with a changelog <a href="/notes/changelog.html">here</a>.')
cat('<br/><br/>')
cat(readLines('snippets/project.txt'))
cat(' - ')
@@ -31,21 +35,44 @@ if (knitr::is_html_output()) {
cat('<br/>')
cat('Published by ')
#cat(rmarkdown::metadata$publisher)
- cat(readLines('snippets/publisher.txt'))
+ cat(readLines('snippets/publisher.txt'), ' - ', readLines('snippets/publisher-url.txt'))
cat('<br/>')
cat('Published at ')
cat(readLines('snippets/url.txt'), sep='\n')
cat('<br/><br/>')
cat(readLines('snippets/keywords.txt'), sep='\n')
cat("\n")
- cat("<h2>Credits</h2>")
+ cat("\n")
+
+ cat("## How to cite {#citing .unlisted .unnumbered}")
+ cat("\n")
+ library(stringr)
+ author = str_split_1(rmarkdown::metadata$author, ' ')
+ author_cite = paste(toupper(author[2]), author[1], sep=', ')
+ version = readLines('.metadata/latest.txt')
+ if (version != '0.0.0') {
+ archive = paste('archive', version, sep='/')
+ }
+ else {
+ archive = ''
+ }
+
+ cat('Adapt the following example to your <a href="https://en.wikipedia.org/wiki/Citation" target="_blank">citation</a> standard (APA, ABNT etc) and also to the version you want to cite:<br/><br/>', sep='\n')
+ cat(paste('<blockquote><i>', author_cite, '. <b>', rmarkdown::metadata$title, '.</b> ', readLines('snippets/publisher.txt'), ', ', readLines('.metadata/year.txt'), ' - version ', version, ' - ', readLines('snippets/url.txt'), '/', archive, '</i></blockquote>', sep=''))
+ cat("\n")
+ cat("\n")
+
+ cat("## Credits {#credits .unlisted .unnumbered}")
cat("\n")
cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
cat('<br/><br/>')
cat(readLines('LICENSE'), sep='\n')
cat('<br/><br/>')
cat(readLines('snippets/cover.txt'), sep='\n')
- cat("<h2>PDF version</h2>")
+ cat("\n")
+ cat("\n")
+
+ cat("## PDF version {#pdf .unlisted .unnumbered}")
cat("\n")
cat('Download the PDF <a href="book.pdf">here</a>, or browse it below:')
cat("\n")
diff --git a/structure/book/en/00-preamble.tex b/structure/book/en/00-preamble.tex
index df9a166..d81eb2e 100644
--- a/structure/book/en/00-preamble.tex
+++ b/structure/book/en/00-preamble.tex
@@ -37,7 +37,7 @@ Copyleft \copyright\ \input{.metadata/year.txt} \thanklessauthor\ \input{snippe
% https://www.typeerror.org/docs/latex/_005cprotect
\par\smallcaps{\protect\input{snippets/project.txt} - \protect\input{snippets/volume.txt}}
-\par\smallcaps{Published by \protect\input{snippets/publisher.txt}}
+\par\smallcaps{Published by \protect\input{snippets/publisher.txt} - \protect\input{snippets/publisher-url.txt}}
\par\smallcaps{Published at \protect\input{snippets/url.txt}}
diff --git a/structure/book/en/99-end.md b/structure/book/en/99-end.md
index d0c8b8d..6092e8f 100644
--- a/structure/book/en/99-end.md
+++ b/structure/book/en/99-end.md
@@ -12,7 +12,7 @@
<!-- This seems not to be the case anymore: https://bookdown.org/yihui/bookdown/citations.html -->
<script type="text/html">
```{r echo=FALSE, results='asis'}
-if (knitr::is_html_output()) {
+if (knitr::is_html_output() && file.exists('snippets/changed.md')) {
cat(readLines('snippets/changes.md'), sep='\n')
}
```
diff --git a/structure/book/pt-br/00-header.html b/structure/book/pt-br/00-header.html
new file mode 100644
index 0000000..94b4620
--- /dev/null
+++ b/structure/book/pt-br/00-header.html
@@ -0,0 +1,2 @@
+<link rel="alternate" type="application/atom+xml" href="/atom.xml" />
+<link rel="alternate" type="application/rss+xml" href="/rss.xml" />
diff --git a/structure/book/pt-br/00-header.yml b/structure/book/pt-br/00-header.yml
index 2ad19fe..f56c37a 100644
--- a/structure/book/pt-br/00-header.yml
+++ b/structure/book/pt-br/00-header.yml
@@ -18,8 +18,9 @@ mainfont: "Linux Libertine O"
monofont: "Liberation Mono"
# Paper size
-#papersize: a4paper
#papersize: letterpaper
+#papersize: a4paper
+#papersize: a5paper
papersize: b5paper
# Geometry
diff --git a/structure/book/pt-br/00-preamble.md b/structure/book/pt-br/00-preamble.md
index 367686d..2f26dc3 100644
--- a/structure/book/pt-br/00-preamble.md
+++ b/structure/book/pt-br/00-preamble.md
@@ -9,7 +9,9 @@ if (knitr::is_html_output()) {
cat("\n")
cat('<img src="images/cover.png">')
cat("\n")
- cat("<h2>Sobre</h2>")
+ cat("\n")
+
+ cat("## Sobre {#about .unlisted .unnumbered}")
cat("\n")
cat('<em>')
cat(readLines('DISCLAIMER'), sep='\n')
@@ -19,11 +21,13 @@ if (knitr::is_html_output()) {
cat(readLines('.metadata/revision.txt'), sep='\n')
cat('</em></strong> - compilada em <strong><em>')
cat(readLines('.metadata/date.txt'), sep='\n')
- cat('</em></strong>.')
+ cat('</em></strong> usando <a href="https://bookup.fluxo.info">Bookup</a>.')
cat('<br/>')
cat('Versões anteriores disponíveis no <a href="/archive">arquivo</a>.')
cat('<br/>')
- cat('Caderno de anotações disponível <a href="/notes">aqui</a>.')
+ cat('Acompanhe as atualizações deste livro: <a href="/rss.xml">RSS</a> / <a href="/atom.xml">Atom</a>.')
+ cat('<br/>')
+ cat('Caderno de anotações disponível <a href="/notes">aqui</a>, com um registro de mudanças <a href="/notes/changelog.html">aqui</a>.')
cat('<br/><br/>')
cat(readLines('snippets/project.txt'))
cat(' - ')
@@ -31,21 +35,45 @@ if (knitr::is_html_output()) {
cat('<br/>')
cat('Publicado por ')
#cat(rmarkdown::metadata$publisher)
- cat(readLines('snippets/publisher.txt'))
+ cat(readLines('snippets/publisher.txt'), ' - ', readLines('snippets/publisher-url.txt'))
cat('<br/>')
cat('Publicado em ')
cat(readLines('snippets/url.txt'), sep='\n')
cat('<br/><br/>')
cat(readLines('snippets/keywords.txt'), sep='\n')
cat("\n")
- cat("<h2>Créditos</h2>")
+ cat("\n")
+
+ cat("## Como citar {#citing .unlisted .unnumbered}")
+ cat("\n")
+
+ library(stringr)
+ author = str_split_1(rmarkdown::metadata$author, ' ')
+ author_cite = paste(toupper(author[2]), author[1], sep=', ')
+ version = readLines('.metadata/latest.txt')
+ if (version != '0.0.0') {
+ archive = paste('archive', version, sep='/')
+ }
+ else {
+ archive = ''
+ }
+
+ cat('Adapte o exemplo a seguir para o seu padrão de <a href="https://pt.wikipedia.org/wiki/Cita%C3%A7%C3%A3o" target="_blank">citação</a> (ABNT, APA etc) e também para a versão que você quer citar:<br/><br/>', sep='\n')
+ cat(paste('<blockquote><i>', author_cite, '. <b>', rmarkdown::metadata$title, '.</b> ', readLines('snippets/publisher.txt'), ', ', readLines('.metadata/year.txt'), ' - versão ', version, ' - ', readLines('snippets/url.txt'), '/', archive, '</i></blockquote>', sep=''))
+ cat("\n")
+ cat("\n")
+
+ cat("## Créditos {#credits .unlisted .unnumbered}")
cat("\n")
cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
cat('<br/><br/>')
cat(readLines('LICENSE'), sep='\n')
cat('<br/><br/>')
cat(readLines('snippets/cover.txt'), sep='\n')
- cat("<h2>Versão PDF</h2>")
+ cat("\n")
+ cat("\n")
+
+ cat("## Versão PDF {#pdf .unlisted .unnumbered}")
cat("\n")
cat('Baixe a versão PDF <a href="book.pdf">aqui</a>, ou navegue abaixo:')
cat("\n")
diff --git a/structure/book/pt-br/00-preamble.tex b/structure/book/pt-br/00-preamble.tex
index a867bd6..5c58743 100644
--- a/structure/book/pt-br/00-preamble.tex
+++ b/structure/book/pt-br/00-preamble.tex
@@ -37,7 +37,7 @@ Copyleft \copyright\ \input{.metadata/year.txt} \thanklessauthor\ \input{snippe
% https://www.typeerror.org/docs/latex/_005cprotect
\par\smallcaps{\protect\input{snippets/project.txt} - \protect\input{snippets/volume.txt}}
-\par\smallcaps{Publicado por \protect\input{snippets/publisher.txt}}
+\par\smallcaps{Publicado por \protect\input{snippets/publisher.txt} - \protect\input{snippets/publisher-url.txt}}
\par\smallcaps{Publicado em \protect\input{snippets/url.txt}}
diff --git a/structure/book/pt-br/99-end.md b/structure/book/pt-br/99-end.md
index ba2d787..f5734eb 100644
--- a/structure/book/pt-br/99-end.md
+++ b/structure/book/pt-br/99-end.md
@@ -12,7 +12,7 @@
<!-- This seems not to be the case anymore: https://bookdown.org/yihui/bookdown/citations.html -->
<script type="text/html">
```{r echo=FALSE, results='asis'}
-if (knitr::is_html_output()) {
+if (knitr::is_html_output() && file.exists('snippets/changed.md')) {
cat(readLines('snippets/changes.md'), sep='\n')
}
```
diff --git a/structure/notes/en/00-preamble.md b/structure/notes/en/00-preamble.md
index 4490a20..d683e16 100644
--- a/structure/notes/en/00-preamble.md
+++ b/structure/notes/en/00-preamble.md
@@ -9,7 +9,9 @@ if (knitr::is_html_output()) {
cat("\n")
cat('<img src="images/cover.png">')
cat("\n")
- cat("<h2>About</h2>")
+ cat("\n")
+
+ cat("## About {#about .unlisted .unnumbered}")
cat("\n")
cat('<em>')
cat(readLines('DISCLAIMER'), sep='\n')
@@ -22,7 +24,9 @@ if (knitr::is_html_output()) {
cat('</em></strong>.')
cat('<br/><br/>')
cat("\n")
- cat("<h2>Credits</h2>")
+ cat("\n")
+
+ cat("## Credits {#credits .unlisted .unnumbered}")
cat("\n")
cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
cat('<br/><br/>')
diff --git a/structure/notes/pt-br/00-preamble.md b/structure/notes/pt-br/00-preamble.md
index 37d097e..1fc370c 100644
--- a/structure/notes/pt-br/00-preamble.md
+++ b/structure/notes/pt-br/00-preamble.md
@@ -9,7 +9,9 @@ if (knitr::is_html_output()) {
cat("\n")
cat('<img src="images/cover.png">')
cat("\n")
- cat("<h2>Sobre</h2>")
+ cat("\n")
+
+ cat("## Sobre {#about .unlisted .unnumbered}")
cat("\n")
cat('<em>')
cat(readLines('DISCLAIMER'), sep='\n')
@@ -22,7 +24,9 @@ if (knitr::is_html_output()) {
cat('</em></strong>.')
cat('<br/><br/>')
cat("\n")
- cat("<h2>Créditos</h2>")
+ cat("\n")
+
+ cat("## Créditos {#credits .unlisted .unnumbered}")
cat("\n")
cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
cat('<br/><br/>')