diff options
Diffstat (limited to 'structure/book/en/00-preamble.md')
| -rw-r--r-- | structure/book/en/00-preamble.md | 39 |
1 files changed, 33 insertions, 6 deletions
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 ©", 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") |
