Skip to content

Commit

Permalink
integrate some rules in the template file
Browse files Browse the repository at this point in the history
  • Loading branch information
jxpeng98 committed Mar 19, 2024
1 parent e065dc9 commit 3a3681c
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 51 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- increse the spacing between heading and the firstline of the following paragraphy
- change the tempalte name to `ssrn-scribe`.
- integrate some rules in the template rather than the `main.typ`
37 changes: 15 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@

Following the official tutorial, I create a single-column paper template for general use. You can use it for papers published on SSRN etc.

## Updates
## How to use

* v0.4.5: Adjust the template and ready to the package manager of Typst.
* `bibloc`, `bibstyle` and `bibtitle` has been integrated into the bibliography function.
### Use as an template package

## How to use
Typst integrated the template with their official package manager. You can use it as the other third-party packages.

1. Download the template or clone the repository.
You only need to enter the following command in the terminal to initialize the template.
```
typst init @preview/ssrn-scribe
```
If will generate a subfolder `ssrn-scribe` including the `main.typ` file in the current directory with the latest version of the template.

### Mannully use

<!-- (**If you use the latest version `v0.11.0`, you can use `typst init @preview/general-paper-template` to generate the `main.typ` template directly.**) -->
1. Download the template or clone the repository.

2. generate your bibliography file using `.biblatex` and store the file in the same directory of the template.
3. modify the `main.typ` file and compile it.

3. modify the `main.typ` file in the subfolder `/template` and compile it.
***Note:* You should have `paper_template.typ` and `main.typ` in the same directory.**

In the template, you can modify the following parameters:
Expand All @@ -41,12 +47,9 @@ In the template, you can modify the following parameters:

```
///////////////////////////////
#import "@local/ssrn-scribe:0.4.8": *
#import "@preview/ssrn-scribe:0.4.9": *
///////////////////////////////
#show: thmrules
#show: paper.with(
font: "PT Serif", // "Times New Roman"
fontsize: 12pt, // 12pt
Expand All @@ -71,19 +74,9 @@ In the template, you can modify the following parameters:
acknowledgments: "This paper is a work in progress. Please do not cite without permission.",
// bibliography: bibliography("bib.bib", title: "References", style: "apa"),
)
// your main text goes here
#set heading(numbering: "1.")
#set text(spacing: 100%)
#set par(
leading: 1.2em,
first-line-indent: 2em,
justify: true,
)
= Introduction
#lorem(50)
```

## Preview
Expand Down
25 changes: 22 additions & 3 deletions paper_template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// Copyright (c) 2024
// Author: Jiaxin Peng
// License: MIT
// Version: 0.4.8
// Date: 2024-03-18
// Version: 0.4.9
// Date: 2024-03-19
// Email: jiaxin.peng@outlook.com
///////////////////////////////
Expand Down Expand Up @@ -47,6 +47,7 @@

doc,
) = {
show: thmrules
set math.equation(numbering: "(1)", supplement: auto)

set par(leading: 1em)
Expand Down Expand Up @@ -138,9 +139,27 @@
set footnote.entry(separator: line(length: 100%, stroke: 0.5pt))
set footnote.entry(indent: 0em)
set align(left)
set heading(numbering: "1.")
show heading: it => [
#set align(left)
#counter(heading).display(
it.numbering
) #it.body
#v(10pt)
]
set text(spacing: 100%)
set par(
leading: 1.2em,
first-line-indent: 0em,
justify: true,

)




columns(1, doc)


if bibliography != none {
colbreak()
bibliography
Expand Down
35 changes: 12 additions & 23 deletions template/main.typ
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
///////////////////////////////
#import "@preview/ssrn-scribe:0.4.8": *
#import "@preview/ssrn-scribe:0.4.9": *
///////////////////////////////
#show: thmrules
#set page(numbering: "1")
#show: paper.with(
font: "PT Serif", // "Times New Roman"
fontsize: 12pt, // 12pt
Expand All @@ -19,6 +15,12 @@
email: "tung@artos.edu",
note: "123",
),
(
name: "Theresa Tungsten",
affiliation: "Artos Institute",
email: "tung@artos.edu",
note: "123",
),
),
date: "July 2023",
abstract: lorem(80), // replace lorem(80) with [ Your abstract here. ]
Expand All @@ -31,22 +33,9 @@
// bibliography: bibliography("bib.bib", title: "References", style: "apa"),
)
// your main text goes here
#set heading(numbering: "1.")
#show heading: it => [
#set align(left)
#counter(heading).display(
it.numbering
) #it.body
#v(10pt)
]
#set text(spacing: 100%)
#set par(
leading: 1.2em,
first-line-indent: 0em,
justify: true,
)


// Your main content goes here
= Introduction
#lorem(50)
#lorem(10)

= Literature Review
#lorem(20)
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ssrn-scribe"
version = "0.4.8"
version = "0.4.9"
entrypoint = "paper_template.typ"
authors = [ "jxpeng98",]
repository = "https://github.com/jxpeng98/Typst-Paper-Template"
Expand Down

0 comments on commit 3a3681c

Please # to comment.