commit fd6901636b79d522a904e43a5290b89f0e6f17d6 Author: PedroEdiaz Date: Mon May 4 21:17:10 2026 -0600 First Commit diff --git a/main.pdf b/main.pdf new file mode 100644 index 0000000..d180d7a Binary files /dev/null and b/main.pdf differ diff --git a/main.typ b/main.typ new file mode 100644 index 0000000..ad689be --- /dev/null +++ b/main.typ @@ -0,0 +1,35 @@ +#import "rfc.typ": rfc-document + +#rfc-document( + title: "A Structured Report on Typst Integration", + number: 9999, + status: "Informational", + category: "General", + authors: ("Jane Doe", "John Smith"), + date: datetime(year: 2026, month: 5, day: 5), +)[ + = 1. Introduction + This document demonstrates the `rfc-typst` package. It provides a clean, + RFC-compliant layout with automatic headers, footers, and structured headings. + + = 2. Architecture + The system follows a modular design. Below is a simplified component diagram: + +/* + #rfc-ascii[ + +----------+ +----------+ +----------+ + | Client |---->| Proxy |---->| Server | + +----------+ +----------+ +----------+ + ] +*/ + == 2.1. Data Flow + 1. Client sends request + 2. Proxy validates & forwards + 3. Server processes & responds + + = 3. Security Considerations + All communication is encrypted using TLS 1.3. Refer to RFC 8446 for details. + + = 4. References + #link("https://datatracker.ietf.org/doc/html/rfc8446")[RFC 8446] +] diff --git a/rfc.typ b/rfc.typ new file mode 100644 index 0000000..95f0c60 --- /dev/null +++ b/rfc.typ @@ -0,0 +1,60 @@ +#let rfc-document( + title: "Untitled Report", + short_title: "", + number: 0000, + status: "Informational", + category: "General", + authors: (), + date: datetime.today(), + frontmatter: content, + body +) = { + set text(font: "DejaVu Sans Mono") + show heading: set text(size: 12pt ) + show heading: set block(below: 1em) + + set page( header: context{ + if counter(page).get().first() == 1 { + let author_str = "" + for author in authors { + author_str += author + } + + grid( + columns: (1fr, 1fr), + align: (left, right), + [NVIAM Non Serviam\ Request for Comments: #number \ Category: #category ], [ #for author in authors {[#author \ ]} #date.display()], + ) + } else { + let s_title = short_title + + if s_title.len() == 0 { + s_title = title + } + + grid( + columns: (1fr, 1fr, 1fr), + align: (left, center, right), + [NVIAM #number], [*#s_title*], [#date.display()], + ) + } + }) + + set page( footer: context{ + if counter(page).get().first() > 1 { + grid( + columns: (1fr, 1fr, 1fr), + align: (left, center, right), + [#authors.first()], [#status], [Page #counter(page).display()], + ) + } + }) + + context {if counter(page).get().first() == 1 { + align(center)[*#title*] + outline() + pagebreak() + }} + + body +} diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..a04f79f --- /dev/null +++ b/typst.toml @@ -0,0 +1,11 @@ +[package] +name = "nviam-rfc" +version = "0.1.0" +entrypoint = "rfc.typ" +compiler = "0.11.0" +description = "A Typst package for writing structured technical reports in RFC style." +keywords = ["rfc", "report", "technical", "documentation", "template"] +categories = ["report", "template"] +license = "MIT" +repository = "https://git.nviam.dev/typst/rfc" +authors = ["Pedro E. Díaz "]