Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
660 changes: 660 additions & 0 deletions packages/preview/quati-abnt/0.0.2/LICENSE

Large diffs are not rendered by default.

214 changes: 214 additions & 0 deletions packages/preview/quati-abnt/0.0.2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# quati-abnt

Compose documents according to ABNT standards.

## Initialization

Create a new project using this template using the following command when running typst locally, or by selecting the template on the Typst web app.

```bash
typst init @preview/quati-abnt:0.0.2
```

This will create two folders: `article`, intended for scientific papers, and `academic_work`, intended for dissertations, theses, and monographs.

```
.
├── article
│ └── main.typ
└── academic_work
└── main.typ
```

Each folder contains a `main.typ` file, which is the entry point for the document.

If you do not intend on using one of the templates, you can delete the corresponding folder.

After that, select the `main.typ` file of the desired template to render the document.

On the `/packages.typ` file inside each template folder, you will find the importing of the `quati-abnt` package.

```typst
#import "@preview/quati-abnt:0.0.2" as quati-abnt
```

## Paper template

The `article` template is intended for scientific **papers**.

### Main file

To render the paper, select the `/main.typ` file.

This file initializes the template, offering options to configure it.

```typst
// ## Template. Modelo.
#show: it => quati-abnt.article.template(
it,

// Define the color of links and cross-references.
// Defina a cor dos links e das referências cruzadas.
color_of_links: oklch(25%, 0.17, 264.05deg),

// Define whether to count pages and place its numbers at the headers.
// Defina se deve contar as páginas e exibir seus números nos cabeçalhos.
should_number_pages: true,

// Define whether to display editor notes.
// Defina se deve exibir as notas de editor.
should_display_editor_notes: true,
)
```

### Packages

Still on the root folder, you can include more Typst packages on the `/packages.typ` file.
This template depends on these packages, which are already re-exported to your project: `equate`; `glossarium`; and `subpar`.

### Components

You can define your own components on the `/components.typ` file.
We have already set some exemples of editor notes for you to edit.

```typst
#let note_from_alice = (
note: editor_note,
it,
) => {
let color = oklch(80.43%, 0.1, 278.25deg)
note(
prefixes: (
(
body: "Alice",
fill: color,
stroke: color.saturate(25%),
),
),
it,
)
}
```

### Data

Set the following data on the `/data/data.typ` file:

- title;
- subtitle (optional);
- author(s).

Then, you can include your references on the `data/bibliography.bib` file.

If you want, you can set abbreviations, glossary entries, and symbols on the `/data/glossary.typ` file.

Also, you can set commonly used terms that should not be included in the glossary on the `/data/terms.typ` file.

### Pre-textual elements

On the `/content/pre_textual.typ` file, you can set the title in a foreign language, which is optional.

Then, write the abstract and the keywords in the main language.

```typst
// ## Abstract. Resumo.
#let abstract_in_main_language = {
(
keywords_title: "Palavras-chave",
keywords: (
"modelo",
"artigo",
"ABNT",
"Typst",
),
title: "Resumo",
body: [
Este exemplo apresenta o uso do `quati-abnt`, modelo de artigo segundo as @nbr:pl da @abnt.
Esse modelo é desenvolvido para a ferramenta Typst.
],
)
}
```

You can optionally set the abstract and keywords in foreign languages on the same file.

### Content

Finally, you can write the content of your paper on the `/content/textual/main.typ` file.

Feel free to create more files and folders to organize your content, if you want.
You can include those files on the `/content/textual/main.typ` file using the `#include` command.

```typst
#include "./introduction.typ"
```

### Post-textual elements

On the `/content/post_textual.typ` file, you can set the appendices, annexes, and an acknowledgment section.
All of these elements are optional.

## Monograph template

The `academic_work` template is intended for **dissertations**, **theses**, and **monographs**.

The structure of this template is similar to the `article` template, but it has more pre-textual and post-textual elements.

This section only covers the differences between the two templates.

### Data

Set the following data on the `/data/data.typ` file:

- title;
- subtitle (optional);
- author(s);
- advisor(s);
- members of the examination committee;
- organization (university);
- institution (faculty) (optional);
- department (optional);
- program (or course) (semi-optional);
- type of work (dissertation, thesis, or monograph);
- degree (semi-optional);
- degree topic;
- concentration area (optional);
- address;
- year;
- volume number (optional);
- approval date (optional).

If you prefer to write a custom nature paragraph, you can fill the `custom_nature` field with your own content.
In that case, the `program` and `degree` fields will be ignored.

### Pre-textual elements

On the `/content/pre_textual.typ` file, you can write the contents of the errata page, the dedication page, the acknowledgments page, and the epigraph page.

All of these elements are optional.
If you do not want to include one of them, just remove the respective inclusion command.

On the `/content/abstract.typ` file, you can write the abstract and keywords in the main language and in foreign languages.

### Content

Finally, you can write the content of your work on the `/content/textual/main.typ` file.

Feel free to create more files and folders to organize your content, if you want.
You can include those files on the `/content/textual/main.typ` file using the `#include` command.

```typst
#include "./introduction.typ"
```

Its usual for a monograph to have these chapters:

- introduction (_introdução_);
- theoretical foundation (_fundamentação teórica_);
- material and methods (_material e métodos_);
- results (_resultados_);
- final considerations (_considerações finais_).

### Post-textual elements

On the `/content/post_textual.typ` file, you can set the appendices and annexes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// # Advisors. Orientadores.

#import "../../common/util/text.typ": capitalize_first_letter
#import "../util/advisors.typ": get_advisor_role
#import "../components/people.typ": print_person

#let print_advisors = (
advisors: {
(
(
first_name: "Ciclana",
middle_name: "de",
last_name: "Castro",
gender: "feminine",
prefix: {
// "Profª Drª"
},
organization: (
name: "Nome da organização",
gender: "feminine",
),
),
)
},
) => {
let is_first_advisor = true
for advisor in advisors {
[
#capitalize_first_letter(get_advisor_role(gender: advisor.gender, is_co_advisor: not is_first_advisor)):
#advisor.prefix
#print_person(person: advisor)
#linebreak()
]
is_first_advisor = false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// # Outline entry. Entrada de sumário.

#let format_outline_entry = it => {
link(
it.element.location(),
it.indented(
it.prefix(),
sym.dash.em + sym.space + it.inner(),
),
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// # Entry on simple glossary list. Entrada em lista simples de glossário.

#import "../../common/style/style.typ": spacing_for_common_text
#import "../../common/packages.typ": glossarium

#let print_title = entry => {
(
grid(
columns: (1fr, 4fr),
column-gutter: spacing_for_common_text,
align: top,

strong(entry.short), entry.long,
)
)
}

#let print_description = entry => {}

#let print_back_references = entry => {}

#let print_gloss = (
deduplicate-back-references: true,
description-separator: "",
disable-back-references: false,
minimum-refs: 1,
show-all: false,
user-print-back-references: print_back_references,
user-print-description: print_description,
user-print-title: print_title,
entry,
) => context {
if glossarium.count-refs(entry.key) != 0 {
print_title(entry)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// # Epigraph. Epígrafe.
// NBR 14724:2024 4.2.1.6

#import "../../common/components/quote.typ": format_quote

// NBR 14724:2024 4.2.1.6, NBR 14724:2024 5.2.4, NBR 14724:2024 5.5
#let include_epigraph(
indent: true,
smaller_text: true,
body,
) = context {
show quote: it => format_quote(
indent: indent,
smaller_text: smaller_text,
)[#it]
body
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// # Examiner Signature. Assinatura do examinador.
// NBR 14724:2024 4.2.1.3

#import "../../common/style/style.typ": leading_for_common_text
#import "../../common/util/text.typ": capitalize_first_letter
#import "../components/people.typ": print_person

#let print_examiner(
examiner: (
first_name: "Ciclana",
middle_name: "de",
last_name: "Castro",
gender: "feminine",
prefix: {
// "Profª Drª"
},
organization: (
name: "Nome da organização",
gender: "feminine",
),
),
role: {
"orientador"
},
) = {
block(
above: 1.5cm,
)[
#block(below: leading_for_common_text)[
#line(length: 100%)
]
#par()[
#examiner.prefix
#print_person(person: examiner)
#if role != none [
#sym.dash.en
#capitalize_first_letter(role)
]
#linebreak()
#examiner.organization.name
]
]
}
Loading
Loading