Skip to content

Commit

Permalink
Switch to content blocks for titles
Browse files Browse the repository at this point in the history
  • Loading branch information
laurmaedje committed Nov 20, 2023
1 parent 5799d6b commit 2b629bd
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ams/main.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "template.typ": *
#show: ams-article.with(
title: "Mathematical Theorems",

This comment has been minimized.

Copy link
@brunobord

brunobord Nov 21, 2023

the issue with this patch is that it leads to compilation errors (using the latest release - 0.9.0, don't know about the latest master).

$ typst compile main.typ 
error: expected string or none, found content
   ┌─ template.typ:41:22
   │
41 │   set document(title: title, author: names)
   │                       ^^^^^

The document() function expects a string (or none)

https://typst.app/docs/reference/meta/document/

This comment has been minimized.

Copy link
@laurmaedje

laurmaedje Nov 21, 2023

Author Member

It works with the latest main branch. I changed it here already as this is the development version, but I haven't pushed the changes to the web app yet.

This comment has been minimized.

Copy link
@brunobord

brunobord Nov 21, 2023

thanks for the quick response! keep up the good work!

This comment has been minimized.

Copy link
@AncientTree

AncientTree Nov 28, 2023

It works with the latest main branch. I changed it here already as this is the development version, but I haven't pushed the changes to the web app yet.

winget install provide typst 0.9.0 (7bb4f6df). How could I install the latest main branch on Windows 10? Thanks :)

This comment has been minimized.

Copy link
@laurmaedje

laurmaedje Nov 28, 2023

Author Member

You would need to compile it yourself by installing Rust from rustup.rs and then following the instruction in Typst's readme. However, there will also be a new release (0.10) quite soon.

title: [Mathematical Theorems],
authors: (
(
name: "Ralph Howard",
Expand Down
4 changes: 2 additions & 2 deletions ams/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// it as an article in the style of the American Mathematical Society.
#let ams-article(
// The article's title.
title: "Paper title",
title: [Paper title],

// An array of authors. For each author you can specify a name,
// department, organization, location, and email. Everything but
Expand Down Expand Up @@ -132,7 +132,7 @@
show math.equation: set text(weight: 400)

// Configure citation and bibliography styles.
set bibliography(style: "springer-mathphys", title: "References")
set bibliography(style: "springer-mathphys", title: [References])

show figure: it => {
show: pad.with(x: 23pt)
Expand Down
2 changes: 1 addition & 1 deletion dept-news/main.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "template.typ": *
#show: dept-news.with(
title: "Chemistry Department",
title: [Chemistry Department],
edition: [
March 18th, 2023 \
Purview College
Expand Down
2 changes: 1 addition & 1 deletion dept-news/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// it as the fun newsletter of a college department.
#let dept-news(
// The newsletter's title.
title: "Newsletter title",
title: [Newsletter title],

// The edition, displayed at the top of the sidebar.
edition: none,
Expand Down
2 changes: 1 addition & 1 deletion fiction/main.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "template.typ": *
#show: book.with(
title: "Liam's Playlist",
title: [Liam's Playlist],
author: "Janet Doe",
dedication: [for Rachel],
publishing-info: [
Expand Down
2 changes: 1 addition & 1 deletion fiction/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// it as a simple fiction book.
#let book(
// The book's title.
title: "Book title",
title: [Book title],

// The book's author.
author: "Author",
Expand Down
2 changes: 1 addition & 1 deletion ieee/main.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "template.typ": *
#show: ieee.with(
title: "A typesetting system to untangle the scientific writing process",
title: [A typesetting system to untangle the scientific writing process],
abstract: [
The process of scientific writing is often tangled up with the intricacies of typesetting, leading to frustration and wasted time for researchers. In this paper, we introduce Typst, a new typesetting system designed specifically for scientific writing. Typst untangles the typesetting process, allowing researchers to compose papers faster. In a series of experiments we demonstrate that Typst offers several advantages, including faster document creation, simplified syntax, and increased ease-of-use.
],
Expand Down
2 changes: 1 addition & 1 deletion ieee/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// it as an article in the style of the IEEE.
#let ieee(
// The paper's title.
title: "Paper Title",
title: [Paper Title],

// An array of authors. For each author you can specify a name,
// department, organization, location, and email. Everything but
Expand Down

0 comments on commit 2b629bd

Please sign in to comment.