Skip to content

Commit

Permalink
basic documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fredguth committed Oct 27, 2022
1 parent 0f400c4 commit cdd88d9
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 480 deletions.
50 changes: 50 additions & 0 deletions 02-Main/customizing.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Customizing
---

You can customize your book by changing `_quarto.yml` and the files it referendes. This project organize files in 4 basic folders:

- 01-Front: for frontmatter content;
- 02-Main: for mainmatter content;
- 03-Back: for backmatter content;

### Book Structure

- Cover
- Front Matter
- Title Page
- Copyright
- Dedication
- Epigraph/dictum
- Table of Contents
- Main Matter
- chapters
- Back Matter
- references
- appendices
- acknowledgements
- colophon

### File Structure

| Book Part | File | How to customize |
|-----------|:-------------------------|:-------------------|
| Cover | images/bookcover.pdf | Replace the file. If no file, no cover. |
| Titlepage | _quarto.yml | Built from metadata. For further customization use [partials](https://quarto.org/docs/journals/templates.html). |
| Copyright | 01-Front/dedication.tex | Replace or exclude/rename file. |
| Dedication| 01-Front/dedication.tex | Replace or exclude/rename file. |
| Epigraph | 01-Front/epigraph.tex | Replace or exclude/rename file. |
| ToC | _quarto.yml | Built from metadata. For further customization use [partials](https://quarto.org/docs/journals/templates.html). |
| Chapters | _quarto.yml | You can reference [chapters, parts and apendices](https://quarto.org/docs/books/book-structure.html).
| Acknolegements | 03-Back/ack.qmd | Replace or exclude/rename file. |
| Colophon | 03-Back/colophon.qmd | Replace or exclude/rename file. |

### Advanced Cutomization

In `_extensions/tufte/_extension.yml` you can check the default settings of the Tufte-Quarto Book type. All these settings can be overwritten in _quarto.yml.

The project uses [tufte-book](https://tufte-latex.github.io/tufte-latex/) Latex class.

### Customizing the Website

Besides the settings from `_extensions/tufte/_extension.yml > format > html` that can be overwritten in `_quarto.yml > format > html`, you can further customize the website by creating a `style.css` file and referencing it in `_quarto.yml`. Check `_extensions/tufte/style.css` as an example, but avoid changing directly there as Tufte-Quarto updates may break your changes.
2 changes: 1 addition & 1 deletion 03-Back/ack.qmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Acknowledgements
# Acknowledgements {.unlisted .unnumbered}

Many thanks to the Quarto team for creating this wonderful tool. I am also grateful for the support I got at [Quarto's Discussion Board](https://github.com/quarto-dev/quarto-cli/discussions?discussions_q=author%3Afredguth), specialy:

Expand Down
16 changes: 7 additions & 9 deletions 03-Back/colophon.qmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
title: Colophon
---
:::{.content-hidden when-format="html"}
\vspace*{\fill}

# Colophon {.unlisted .unnumbered}

Composed in ET Book, a free and open-sopurce typeface designed by Dmitry Krasny, Bonnie Scranton, and Edward Tufte; and \TeX Gyre Heros, a fontbased on the URW Nimbus Sans L kindly released by URW++ Design and Development Inc. under GFL.
Based on [Tufte-Latex](https://tufte-latex.github.io/tufte-latex/) and [Quarto](https://quarto.org).


![](/images/gutemberg_press){.column-margin}



\vspace*{1cm}

![](/Images/gutemberg_press.pdf){.column-margin}
:::
2 changes: 1 addition & 1 deletion 03-Back/references.qmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# References {.unnumbered}
# References {.unnumbered .unlisted}

::: {#refs}
:::
Binary file added Images/gutemberg_press.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions Images/gutemberg_press.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions _extensions/tufte/_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ contributes:
mainfont: "heuristica"
toc-location: left
toc-title: "Contents"
default-image-extension: svg
pdf:
reference-location: margin
citation-location: margin
Expand All @@ -32,22 +33,21 @@ contributes:
- tufte-book.cls
- tufte-common.def
- tufte.bst
include-in-header:
- "partials/in-header.tex"
- "partials/definitions.tex"
template-partials:
template-partials: # replaces
- "partials/title.tex"
include-before-body:
- "partials/before-body.tex"
include-after-body:
include-in-header: #adds
- "partials/in-header.tex"
- "partials/definitions.tex"
include-after-body: #adds
- "partials/after-body.tex"
toc-depth: 2
toc-title: "Contents"
indent: 0px
biblio-style: dina
biblio-style: dinat
# mainfont: "Minion Pro"
mainfont: "ETbb"
sansfont: "TeX Gyre Heros"
sansfontoptions: "Scale=MatchUppercase"

default-image-extension: pdf

30 changes: 18 additions & 12 deletions _extensions/tufte/partials/before-body.tex
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Why can't I access metadata here?
% \includepdf{$tufte.cover$}
% \includepdf{$tufte.coversheet$}
% TODO: remove comment
% \includepdf{Images/cover.pdf}
% \includepdf{Images/coversheet.pdf}
% TODO: remove/change maketitle if cover present
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\IfFileExists{01-Front/copyright.tex}{\input{01-Front/copyright.tex}\clearpage}{}
\IfFileExists{Images/bookcover.pdf}{\includepdf{Images/bookcover.pdf}\clearpage}{}

$if(has-frontmatter)$
\frontmatter
$endif$
$if(title)$
$if(beamer)$
\frame{\titlepage}
$else$
\maketitle
\pagenumbering{gobble}
\IfFileExists{01-Front/copyright.tex}{\input{01-Front/copyright.tex}\clearpage}{}
\IfFileExists{01-Front/dedication.tex}{\input{01-Front/dedication.tex}\clearpage}{}
\IfFileExists{01-Front/epigraph.tex}{\input{01-Front/epigraph.tex}\clearpage}{}
\pagenumbering{arabic}
\mainmatter
$endif$
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$endif$
\pagenumbering{arabic}
28 changes: 12 additions & 16 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@ project:
type: tufte
book:
title: |
Tufte-Quarto Extension\
Tufte-Quarto Project Type\
Documentation
title-short: $$~$$ # title-short used in the pdf head
output-file: TufteStyledBook
title-short: Tufte-Quarto # title-short is used in the pdf head
output-file: TufteStyledBook # outputs: docs/TufteStyledBook.pdf
author: Fred Guth
publisher: The Publisher
date-format: MMMM, YYYY
license: "CC BY"
chapters:
- index.qmd
# - 02-Main/preface.qmd
# - part: repo.qmd
# - part: Customizing
# chapters:
# - 02-Main/document.qmd
# - 02-Main/website.qmd
# - 03-Back/notation.qmd
# - 03-Back/acronyms.qmd
# - 03-Back/colophon.qmd
appendices:
- 03-Back/ack.qmd
- 03-Back/colophon.qmd
format:
- 02-Main/customizing.qmd
# - 02-Back/known_issues.qmd
- part: about.qmd
chapters:
- 03-Back/references.qmd
- 03-Back/ack.qmd
- 03-Back/colophon.qmd
bibliography: references.bib
format: # remove
pdf:
keep-tex: true
1 change: 1 addition & 0 deletions about.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# About {.unnumbered .unlisted}
Loading

0 comments on commit cdd88d9

Please sign in to comment.