├── README.md ├── assets ├── main_page-0001.jpg ├── main_page-0002.jpg ├── main_page-0003.jpg └── main_page-0004.jpg ├── logo_bupt.png ├── logo_bupt2.png ├── logo_bupt_translucent.png ├── main.pdf ├── main.typ └── template.typ /README.md: -------------------------------------------------------------------------------- 1 | # BUPT Course Description Template 2 | 3 | This repository contains a template for creating Course Description using [Typst](https://typst.app/). It is designed to assist in generating clear and professional course summaries, especially useful for students at BUPT who need to present course details in a standardized and visually appealing format when applying to universities. 4 | 5 | ```diff 6 | - 注意: 7 | - 教务处对于专业英文名的要求是按照在读证明上官方的称呼(例如 Bachelor of Engineering in Computer Science and Technology),或者可以按照教务给的封面模板不写专业英文名; 8 | - 对于除 Course Description 字段以外不包含在教务处给的课程描述素材包中的内容教务处不予对正文内容进行盖章,但允许给封面盖章。 9 | ``` 10 | 11 | ## Preview 12 | 13 | | ![main_page-0001](./assets/main_page-0001.jpg) | ![main_page-0002](./assets/main_page-0002.jpg) | 14 | | ---------------------------------------------- | ---------------------------------------------- | 15 | | ![main_page-0003](./assets/main_page-0003.jpg) | ![main_page-0004](./assets/main_page-0004.jpg) | 16 | 17 | ## Usage 18 | 19 | In the `main.typ` file, you just need to fill in the information of your university, major, school, name, student ID, and the details of each course. The template will automatically generate a PDF file with the course descriptions. 20 | 21 | ### Metadata 22 | 23 | Please begin your `main.typ` file with the following metadata: 24 | 25 | ```typst 26 | #import "template.typ": template, course 27 | 28 | #show: template.with( 29 | university: "The name of your University", 30 | major: "The name of your major", 31 | school: "The name of your School / Department", 32 | name: "Your Name", 33 | id: "Your Student ID", 34 | // The cover image settings 35 | cover: ( 36 | logo_path: "logo_bupt2.png", 37 | logo_width: 100%, 38 | logo_with_university_name: true, 39 | ), 40 | // The watermark image settings as the background of the document 41 | watermark: ( 42 | img_path: "logo_bupt_translucent.png", 43 | img_width: 160mm, 44 | ), 45 | ) 46 | ``` 47 | 48 | ### Course Categories 49 | 50 | Just use `= Course Category Name` to create a new category. For example, if you want to create a category named 'Major Courses', you can write 51 | 52 | ```typst 53 | 54 | = Major Courses 55 | 56 | #course(...) 57 | 58 | #course(...) 59 | 60 | ``` 61 | 62 | ### Course Description Items 63 | 64 | The `#course` function's parameters are all named parameters. If you don't want to fill in some of the parameters, you can just don't use them. For example, if you don't need 'Pre-requisites', you can just write 65 | 66 | ```typst 67 | #course( 68 | name: [Course Name 1], 69 | id: [Course ID 1], 70 | semester: [Semester 1], 71 | credit: [Credit 1], 72 | hours: [Hours 1], 73 | grade: [Grade 1], 74 | preparatory: [Preparatory Course(s) 1], 75 | content: [ 76 | - Chapter 1 77 | - Chapter 2 78 | - Chapter 3 79 | ], 80 | description: [ 81 | The main body of Course Description 1 \ 82 | #lorem(100) 83 | ], 84 | assessment: [ 85 | - Assignment 1 86 | - Assignment 2 87 | - Assignment 3 88 | - Exam 1 89 | - Exam 2 90 | ], 91 | ) 92 | ``` 93 | 94 | and the 'Pre-requisites' part will not be shown in this course description table. 95 | -------------------------------------------------------------------------------- /assets/main_page-0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/assets/main_page-0001.jpg -------------------------------------------------------------------------------- /assets/main_page-0002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/assets/main_page-0002.jpg -------------------------------------------------------------------------------- /assets/main_page-0003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/assets/main_page-0003.jpg -------------------------------------------------------------------------------- /assets/main_page-0004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/assets/main_page-0004.jpg -------------------------------------------------------------------------------- /logo_bupt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/logo_bupt.png -------------------------------------------------------------------------------- /logo_bupt2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/logo_bupt2.png -------------------------------------------------------------------------------- /logo_bupt_translucent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/logo_bupt_translucent.png -------------------------------------------------------------------------------- /main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsyislearning/typst-course-description-template/dd1f3c01b38dff7272a1e11d8260b2399319e326/main.pdf -------------------------------------------------------------------------------- /main.typ: -------------------------------------------------------------------------------- 1 | #import "template.typ": template, course 2 | 3 | #show: template.with( 4 | university: "The name of your University", 5 | major: "The name of your major", 6 | school: "The name of your School / Department", 7 | name: "Your Name", 8 | id: "Your Student ID", 9 | // The cover image settings 10 | cover: ( 11 | logo_path: "logo_bupt2.png", 12 | logo_width: 100%, 13 | logo_with_university_name: true, 14 | ), 15 | // The watermark image settings as the background of the document 16 | watermark: ( 17 | img_path: "logo_bupt_translucent.png", 18 | img_width: 160mm, 19 | ), 20 | ) 21 | 22 | = Category 1 23 | 24 | #course( 25 | name: [Course Name 1], 26 | id: [Course ID 1], 27 | semester: [Semester 1], 28 | credit: [Credit 1], 29 | hours: [Hours 1], 30 | grade: [Grade 1], 31 | preparatory: [Preparatory Course(s) 1], 32 | prerequisite: [Prerequisite(s) 1], 33 | content: [ 34 | - Chapter 1 35 | - Chapter 2 36 | - Chapter 3 37 | ], 38 | description: [ 39 | The main body of Course Description 1 \ 40 | #lorem(100) 41 | ], 42 | assessment: [ 43 | - Assignment 1 44 | - Assignment 2 45 | - Assignment 3 46 | - Exam 1 47 | - Exam 2 48 | ], 49 | ) 50 | 51 | = Category 2 52 | 53 | #course( 54 | name: [Course Name 2], 55 | id: [Course ID 2], 56 | semester: [Semester 2], 57 | credit: [Credit 2], 58 | hours: [Hours 2], 59 | grade: [Grade 2], 60 | preparatory: [Preparatory Course(s) 2], 61 | prerequisite: [Prerequisite(s) 2], 62 | content: [ 63 | - Chapter 1 64 | - Chapter 2 65 | - Chapter 3 66 | ], 67 | description: [ 68 | The main body of Course Description 2 \ 69 | #lorem(100) 70 | ], 71 | assessment: [ 72 | - Assignment 1 73 | - Assignment 2 74 | - Assignment 3 75 | - Exam 1 76 | - Exam 2 77 | ], 78 | ) 79 | -------------------------------------------------------------------------------- /template.typ: -------------------------------------------------------------------------------- 1 | #let template( 2 | university: none, 3 | major: none, 4 | school: none, 5 | name: none, 6 | id: none, 7 | cover: none, 8 | watermark: none, 9 | doc, 10 | ) = { 11 | // Cover 12 | page()[ 13 | #align(center)[ 14 | #image(cover.logo_path, width: cover.logo_width) 15 | #if not cover.logo_with_university_name { 16 | text(weight: "semibold", size: 24pt)[#university] 17 | v(1fr) 18 | } 19 | #text(weight: "bold", size: 30pt, "Course Description") 20 | #v(1fr) 21 | #text(weight: "semibold", size: 16pt)[#major] 22 | #parbreak() 23 | #text(weight: "semibold", size: 18pt)[#school] 24 | ] 25 | #v(3fr) 26 | #set text(weight: "medium", size: 14pt) 27 | Name: #name #parbreak() 28 | Student No. #id #parbreak() 29 | ] 30 | 31 | // Page settings 32 | set page( 33 | header: [ 34 | Course Description - #name 35 | #h(1fr) 36 | #university 37 | ], 38 | footer: context [ 39 | #counter(page).display("1 / 1", both: true) 40 | #h(1fr) 41 | #datetime.today().display() 42 | ], 43 | background: image( 44 | watermark.img_path, 45 | width: watermark.img_width, 46 | ) 47 | ) 48 | 49 | // Table of contents 50 | page(footer: [#h(1fr)#datetime.today().display()])[ 51 | #outline( 52 | title: "Table of Contents", 53 | indent: 2em, 54 | ) 55 | ] 56 | 57 | // Main body 58 | counter(page).update(1) 59 | set par(justify: true) 60 | set heading(numbering: "1.1.") 61 | doc 62 | } 63 | 64 | #let course( 65 | name: none, 66 | id: none, 67 | semester: none, 68 | credit: none, 69 | hours: none, 70 | grade: none, 71 | preparatory: none, 72 | prerequisite: none, 73 | content: none, 74 | description: none, 75 | assessment: none, 76 | ) = { 77 | heading(depth: 2)[#name] 78 | let cells = ( 79 | ([*Course Title*], name), 80 | ([*Course No.*], id), 81 | ([*Semester*], semester), 82 | ([*Credit*], credit), 83 | ([*Course Hours*], hours), 84 | ([*My Grade*], grade), 85 | ([*Preparatory Course(s)*], preparatory), 86 | ([*Prerequisite(s)*], prerequisite), 87 | ([*Content*], content), 88 | ([*Course Description*], description), 89 | ([*Assessment*], assessment), 90 | ) 91 | let table_args = () 92 | for row in cells { 93 | if row.at(1) != none { 94 | table_args.push(row.at(0)) 95 | table_args.push(row.at(1)) 96 | } 97 | } 98 | table( 99 | columns: (auto, 1fr), 100 | ..table_args, 101 | ) 102 | } 103 | --------------------------------------------------------------------------------