]> gitweb.fluxo.info Git - bookup.git/commitdiff
Feat: improve readability in the HTML frontmatter 0.3.0
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 18 Nov 2025 16:08:50 +0000 (13:08 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 18 Nov 2025 16:08:50 +0000 (13:08 -0300)
structure/book/en/00-preamble.md
structure/book/pt-br/00-preamble.md

index 146be9b128f718ee3e1db3cd18741567ad85550d..5bb4c1322fc29e4b3fc86e4b5b3cf454d6bdb152 100644 (file)
@@ -9,6 +9,7 @@ if (knitr::is_html_output()) {
   cat("\n")
   cat('<img src="images/cover.png">')
   cat("\n")
+
   cat("<h2>About</h2>")
   cat("\n")
   cat('<em>')
@@ -38,6 +39,7 @@ if (knitr::is_html_output()) {
   cat('<br/><br/>')
   cat(readLines('snippets/keywords.txt'), sep='\n')
   cat("\n")
+
   cat("<h2>How to cite</h2>")
   cat("\n")
   library(stringr)
@@ -50,10 +52,12 @@ if (knitr::is_html_output()) {
   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("<h2>Credits</h2>")
   cat("\n")
   cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
@@ -61,6 +65,7 @@ if (knitr::is_html_output()) {
   cat(readLines('LICENSE'), sep='\n')
   cat('<br/><br/>')
   cat(readLines('snippets/cover.txt'), sep='\n')
+
   cat("<h2>PDF version</h2>")
   cat("\n")
   cat('Download the PDF <a href="book.pdf">here</a>, or browse it below:')
index c8f693f6585c3e4274a30c9dc9fc2088593b7780..8602f0be178ff163ba4d439323d203b8ba9b1402 100644 (file)
@@ -9,6 +9,7 @@ if (knitr::is_html_output()) {
   cat("\n")
   cat('<img src="images/cover.png">')
   cat("\n")
+
   cat("<h2>Sobre</h2>")
   cat("\n")
   cat('<em>')
@@ -38,8 +39,10 @@ if (knitr::is_html_output()) {
   cat('<br/><br/>')
   cat(readLines('snippets/keywords.txt'), sep='\n')
   cat("\n")
+
   cat("<h2>Como citar</h2>")
   cat("\n")
+
   library(stringr)
   author      = str_split_1(rmarkdown::metadata$author, ' ')
   author_cite = paste(toupper(author[2]), author[1], sep=', ')
@@ -50,9 +53,11 @@ if (knitr::is_html_output()) {
   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'), ' - version ', version, ' - ', readLines('snippets/url.txt'), '/', archive, '</i></blockquote>', sep=''))
   cat("\n")
+
   cat("<h2>Créditos</h2>")
   cat("\n")
   cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
@@ -60,6 +65,7 @@ if (knitr::is_html_output()) {
   cat(readLines('LICENSE'), sep='\n')
   cat('<br/><br/>')
   cat(readLines('snippets/cover.txt'), sep='\n')
+
   cat("<h2>Versão PDF</h2>")
   cat("\n")
   cat('Baixe a versão PDF <a href="book.pdf">aqui</a>, ou navegue abaixo:')