Skip to content

Commit

Permalink
Fixed bug related to symbol name
Browse files Browse the repository at this point in the history
  • Loading branch information
nogula committed Jun 5, 2024
1 parent 2cfc4bd commit 80bc7cf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tufte-memo
A memo document template inspired by the design of Edward Tufte's books for the Typst typesetting program.

For usage, see the usage guide [here](template/main.pdf).
For usage, see the usage guide [here](https://github.com/nogula/tufte-memo/blob/main/template/main.pdf).

The template provides handy functions: `template`, `note`, and `wideblock`. To create a document with this template, use:

Expand All @@ -24,5 +24,3 @@ The template provides handy functions: `template`, `note`, and `wideblock`. To c
additional configuration information is available in the usage guide.

The `note()` function provides the ability to produce sidenotes next to the main body content. It can be called simply with `#note[...]`. Additionally, `wideblock()` expands the width of its content to fill the full 6.5-inch-wide space, rather than be compressed in to a four-inch column. It is simply called with `wideblock[...]`.

![](thumbnail.png)
11 changes: 6 additions & 5 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
),
),
date: datetime.today(),
document_number: none,
document-number: none,
draft: false,
distribution: none,
abstract: none,
Expand Down Expand Up @@ -115,7 +115,7 @@
set text(font: "Gill Sans MT")
block(width: 100% + 3.5in - 1in,{
if counter(page).get().first() > 1 {
if document_number != none {document_number}
if document-number != none {document-number}
h(1fr)
if shorttitle != none {upper(shorttitle)} else {upper(title)}
if publisher != none {
Expand Down Expand Up @@ -233,7 +233,7 @@
text(size:11pt,font: "Gill Sans MT",{
if date != none {upper(date.display("[month repr:long] [day], [year]"))}
linebreak()
if document_number != none {document_number}
if document-number != none {document-number}
})


Expand All @@ -260,11 +260,12 @@

doc

show bibliography: set text(font:"Gill Sans MT")
show bibliography: set text(font:sans-fonts)
show bibliography: set par(justify:false)
set bibliography(title:none)
if bib != none {
heading(level:1,[References])
bibliography(bib,title:none,style:"american-institute-of-aeronautics-and-astronautics",full:false)
bib
}
}

Expand Down
Binary file removed template/main.pdf
Binary file not shown.
14 changes: 7 additions & 7 deletions template/main.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// #import "@preview/tufte-memo:0.1.0": *
#import "../lib.typ": *
#import "@preview/tufte-memo:0.1.1": *

#show: template.with(
title: [Tufte inspired Typst template],
shorttitle: [Tufte-Memo Usage Guide],
Expand All @@ -18,14 +18,14 @@
email: "Email"
),
),
document_number: [Version 0.1.0],
document-number: [Version 0.1.1],
abstract: [This Typst template adopts many aspects of the design and typography of Edward Tufte's books. The document itself demonstrates the functionality and usage of the template, including setup, sidenotes, figure display, citations, and more.],
publisher: [Product Engineering Department],
distribution: [authorized personnel],
toc: true,
toc: false,
footer-content: ([If the footer-content argument in the template call takes the form of an array, then the first item in that array is displayed here, as you see it, and the second item in that array is displayed on all subsequent pages after the first. If footer-content is not an array (and also not none), then the same content is displayed on all pages.],[This is the second element of the footer-content array, so it is displayed on all pages after the first.]),
draft: false,
bib: "template/references.bib"
bib: bibliography("references.bib")
)

= Introduction
Expand All @@ -48,14 +48,14 @@ The template can be configured with 13 arguments, which comprise:
- `subtitle` (`content`, optional).
- `authors` (`array`, required) takes the form as in the charged-ieee template #notecite(<Typst2024>) except instead of "department" there is "role" and "location" is ommitted.
- `date` (`datetime`, optional) displays the date on the title page if not `none`.
- `document_number` (`content`, optional) reference number for document's version or some other serialization. Displayed in the header if present.
- `document-number` (`content`, optional) reference number for document's version or some other serialization. Displayed in the header if present.
#wideblock[
- `draft` (`bool`, optional) displays a note in the footer and also places a watermark across every page if `true`.
- `distribution` (`content`, optional) places a note in the footer if present.
- `abstract` (`content`, optional) displays the abstract below the author block if present.
- `publisher` (`content`, optional) displays below the title in the header if present.
- `toc` (`bool`, optional) displays an `outline` below the abstract if `true`.
- `bib` (`path`, optional) displays a bibliography at the end of the document if not `none`. Must be a filepath reference if not `none`.
- `bib` (`bibliography`, optional) displays a bibliography at the end of the document if not `none`. Must be a filepath reference if not `none`.
- `footer-content` (`content` or `array`, optional) if `content` then displays in the footer; if `array`, then displays first element in first page footer and second element in all other pages; or `none` and no content is displayed in footer.

== Title Page Configuration
Expand Down
Binary file modified thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
[package]
name = "tufte-memo"
version = "0.1.0"
version = "0.1.1"
entrypoint = "lib.typ"
authors = ["Noah Gula"]
license = "MIT"
description = "A memo document template inspired by the design of Edward Tufte's books."
categories = ["report"]
homepage = "https://github.com/nogula/tufte-memo"
repository = "https://github.com/nogula/tufte-memo"

[template]
path = "template"
entrypoint = "main.typ"
thumbnail = "thumbnail.png"

0 comments on commit 80bc7cf

Please sign in to comment.