-
Notifications
You must be signed in to change notification settings - Fork 1k
xmdjy-simple-report-template:0.1.0 and xmdjy-simple-report-template:0.1.1 #4352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 xmdjy | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| *A simple experiment report template for typst* | ||
| 简单、通用的实验报告模板,使用typst制作 | ||
|
|
||
| --- | ||
| - 该模板在主题页设置了鲜明的关于学校信息的元素,适合学校课程的实验报告来使用,集成了封面生成、自动化排版、代码块高亮、文献引用等功能,便捷美观 | ||
| - 模板默认学校为山东大学,同时接受其他学校的自定义设置,修改方法见下文 | ||
| - 使用typst编写模板,语法简洁,功能上不输latex,编译速度快、使用简单 | ||
| --- | ||
| ## Preview | ||
|  | ||
|
|
||
| --- | ||
| ## Usage | ||
| ### 使用前请确保安装了以下字体: | ||
| - 宋体、楷体、黑体 | ||
| - JetBrains Mono | ||
| [Get JetBrains Mono and insatll](https://www.jetbrains.com/ja-jp/lp/mono/) | ||
| ### 项目结构说明 | ||
| ```text | ||
| exp-report/ | ||
| ├── lib.typ # 模板文件,可进行定制修改 | ||
| └── template/ | ||
| ├── main.typ # 你的报告正文文件 | ||
| |—— ref.bib # 参考文献引用 | ||
| └── images/ # 模板图片资源目录,以及你的报告需要用的图片 | ||
| ``` | ||
|
|
||
| ## Quick start | ||
| ### 方式一:使用typst web编辑器(最简单) | ||
| 1、访问[typst网页版](https://typst.app/),注册并登录 | ||
| 2、点击**Start from template**,搜索模板`xmdjy-simple-report-template` | ||
| 3、选择模板并点击 **"Create"** 即可开始编辑 | ||
| ### 方式二:vscode本地编辑(推荐) | ||
| #### 第一步:安装插件 | ||
|
|
||
| 在 VS Code 中安装 [Tinymist Typst](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist) 插件 | ||
|
|
||
| - 提供语法高亮、智能补全、错误检查 | ||
| - 支持实时 PDF 预览和导出 | ||
| #### 第二步:下载模板 | ||
| ```bash | ||
| git clone https://github.com/xmdjy/exp-report-template | ||
| cd template | ||
| ``` | ||
| 新建typst文件并导入模板 | ||
| ```typst | ||
| #import "@preview/xmdjy-simple-report-template:0.1.0" : * | ||
|
Check warning on line 47 in packages/preview/xmdjy-simple-report-template/0.1.0/README.md
|
||
| #showpage( | ||
| course: "课程名称", | ||
| college: "学院名", | ||
| author : "名字", | ||
| stdid: "学号", | ||
| title: "实验名", | ||
| class: "班级" | ||
| ) | ||
| #reportpage[ | ||
| //正文内容 | ||
| ] | ||
| ``` | ||
| 随后按照你的需要自行修改即可 | ||
| ## Customization | ||
| 即便你不是山东大学的学生,依旧可以通过修改模板中的一些信息达到简单的定制效果,在`lib.typ`中修改全局变量并放入你的学校相关图片即可,具体方法如下: | ||
| ```typst | ||
| #let school_title_pic = "./template/images/sdu-title-image.jpg" | ||
| #let school_logo_pic = "./template/images/sdu-pic-image.jpg" | ||
| #let school_title = "shandong university" | ||
| #let main_show_pic = "./template/images/sdu-report-image.png" | ||
| #let main_show_text = "实验报告展示" | ||
| ``` | ||
| - `school_title_pic`:学校中文名图片 | ||
| - `school_logo_pic`:学校校徽图片 | ||
| - `school_title`:学校英文全拼 | ||
| - `main_show_pic`:正文部分左上角图标,建议学校图标+中&拼图片 | ||
| - `main_show_text`:正文右上角文字,可以写与你的实验报告相关的内容 | ||
|
|
||
| **注:请将上述图片放在./template/images目录下,修改时只需要改图片的文件名即可 | ||
| 如果修改好排版不太协调,请尝试修改$v()$中的间隔参数** | ||
|
|
||
|  | ||
| **经过简单替换之后达到的效果,同样适用!** | ||
| ## Reference | ||
| - [typst官网](https://typst.app/) | ||
| - [typst中文教程](https://typst-doc-cn.github.io/docs/tutorial/) | ||
| - [小蓝书](https://typst-doc-cn.github.io/tutorial/) | ||
| - [南京大学-并不复杂的Typst讲座](https://www.bilibili.com/video/BV1AJ4m1j7Sa) | ||
| - [上海交通大学本科生毕业设计(论文)中期检查报告-模板](https://github.com/zh1-z/SJTU-Bachelor-Thesis-Midterm-Typst-Template) | ||
|
|
||
| **感谢以上资源对模板开发的帮助!** | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| #import "@preview/cuti:0.4.0": show-cn-fakebold | ||
| #import "@preview/codly:1.3.0": * | ||
| #import "@preview/codly-languages:0.1.1": * | ||
|
Check warning on line 3 in packages/preview/xmdjy-simple-report-template/0.1.0/lib.typ
|
||
| #import "@preview/gentle-clues:1.3.0": * | ||
|
Check warning on line 4 in packages/preview/xmdjy-simple-report-template/0.1.0/lib.typ
|
||
| #import "@preview/lovelace:0.3.0": * | ||
|
Check warning on line 5 in packages/preview/xmdjy-simple-report-template/0.1.0/lib.typ
|
||
|
|
||
| #let school-title-pic = "./template/images/sdu-title-image.jpg" | ||
| #let school-logo-pic = "./template/images/sdu-pic-image.jpg" | ||
| #let school-title = "shandong university" | ||
| #let main-show-pic = "./template/images/sdu-report-image.png" | ||
| #let main-show-text = "实验报告正文" | ||
|
|
||
| #let field(label, content) = ( | ||
| [ | ||
| #set align(left + horizon) | ||
| #block( | ||
| width: 100%, | ||
| stroke: (bottom: white + 0.5pt), | ||
| inset: (top: 0pt, bottom: 5pt), | ||
| )[ | ||
| #set text(font: ("KaiTi")) | ||
| #text(size: 16pt)[#label] | ||
| ] | ||
| ], | ||
| [ | ||
| #set align(center + horizon) | ||
| #block( | ||
| width: 100%, | ||
| stroke: (bottom: 0.5pt), | ||
| inset: (top: 0pt, bottom: 5pt), | ||
| )[ | ||
| #set text(font: ("Times New Roman", "KaiTi"), size: 16pt) | ||
| #set par(first-line-indent: 0pt, leading: 0em) | ||
| #content | ||
| ] | ||
| ] | ||
| ) | ||
| #let showpage( | ||
| course : "", | ||
| class : "", | ||
| author : "", | ||
| stdid : "", | ||
| college : "", | ||
| title : "", | ||
| ) = { | ||
| set page( | ||
| paper: "a4", | ||
| margin: (top: 2.12cm,bottom: 3cm,left: 1cm,right: 1cm), | ||
| numbering: none, | ||
| ) | ||
| show: show-cn-fakebold | ||
| align(center)[ | ||
| #image(school-title-pic,width: 10.8cm) | ||
| #text(font: "Times New Roman",size: 20pt,)[#upper(school-title)] | ||
| #v(0.5cm) | ||
| #text(size: 16pt)[#underline(course) 课程实验报告] | ||
| #image(school-logo-pic,width: 12cm) | ||
| #v(0.0cm) | ||
| #grid( | ||
| columns: (80pt, 180pt), | ||
| column-gutter: 0em, | ||
| row-gutter: 10pt, | ||
| ..field([主#h(2em)题],title), | ||
| ..field([学#h(2em)院:],college), | ||
| ..field([班#h(2em)级:],class), | ||
| ..field([姓#h(2em)名:], author), | ||
| ..field([学#h(2em)号:],stdid), | ||
| ) | ||
| ] | ||
| } | ||
| #let reportpage( | ||
| body, | ||
| ) = { | ||
| set page( | ||
| paper: "a4", | ||
| margin: (top: 2.58cm,bottom: 2cm,left: 1.2cm,right: 1.2cm), | ||
| numbering : none, | ||
| header-ascent: 0.0cm, | ||
| header: [ | ||
| #set text(font: ("Times New Roman", "KaiTi"),size: 18pt) | ||
| #grid( | ||
| columns: (1fr,1fr), | ||
| align: bottom, | ||
| image(main-show-pic,width: 6.8cm), | ||
| [ | ||
| #align(right)[#text(size: 16pt)[#main-show-text]] | ||
| #v(0.45cm) | ||
| ] | ||
| ) | ||
| #v(-1.05em) | ||
| #line(length: 100%,stroke: 1.5pt) | ||
| ], | ||
| background: place(top+left,dx: 1.2cm,dy: 2.58cm + 0.5cm)[ | ||
| #box( | ||
| width: 100% - 1.2cm - 1.2cm, | ||
| height: 100% - 2.58cm - 2cm - 0.5cm, | ||
| stroke: 1pt | ||
| ) | ||
| ], | ||
| footer: align(center)[ | ||
| #set text(font: ("Times New Roman", "KaiTi"),size: 16pt) | ||
| #context[ | ||
| #counter(page).display("1") | ||
| ] | ||
| ], | ||
| ) | ||
| show: codly-init.with() | ||
| codly(languages: codly-languages) | ||
| show : rest => pad( | ||
| top: 0.75cm, | ||
| bottom: 0.3cm, | ||
| left: 0.2cm, | ||
| right: 0.2cm, | ||
| rest | ||
| ) | ||
| set text(font : ("JetBrains Mono", "KaiTi"),size: 12pt) | ||
| set par( | ||
| justify: true, | ||
| leading: 1.2em, //行间距 | ||
| spacing: 1.5em, //段间距 | ||
| ) | ||
| show strong: set text(stroke: 0.02857em) | ||
| show emph: it => { | ||
| show regex("[\p{Unified_Ideograph}\p{Punctuation}]"): char => { | ||
| box(skew(ax: -12deg, char)) | ||
| } | ||
| it | ||
| } | ||
| set heading(numbering: "一 I") | ||
| show heading : it => { | ||
| let nums = if it.numbering != none { counter(heading).at(it.location()) } else {none} | ||
| let font_pattern = "" | ||
| let title_size = 12pt | ||
| let numbering_str = none | ||
| if it.level == 1 { | ||
| font_pattern = ("Times New Roman", "KaiTi") | ||
| title_size = 16pt | ||
| numbering_str = numbering("一",..nums) | ||
| //colbreak(weak : true) | ||
| }else{ | ||
| font_pattern = ("Times New Roman", "KaiTi") | ||
| if nums != none { | ||
| nums = nums.slice(1) | ||
| numbering_str = numbering("I",..nums) | ||
| } | ||
| } | ||
| set text(font : font_pattern,size : title_size,weight : "bold") | ||
| if it.level > 1 { | ||
| v(2em,weak : true) | ||
| } | ||
| grid( | ||
| columns: (auto,1fr), | ||
| column-gutter: 0.6em, | ||
| align : bottom, | ||
| [#numbering_str], | ||
| [#it.body] | ||
| ) | ||
| v(1.5em,weak : true) | ||
| } | ||
| body | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| //#import "@preview/xmdjy-simple-report-template:0.1.0" : * | ||
| #import "../lib.typ" : * | ||
|
Check failure on line 2 in packages/preview/xmdjy-simple-report-template/0.1.0/template/main.typ
|
||
| #showpage( | ||
| course: "课程名称", | ||
| college: "学院名", | ||
| author : "名字", | ||
| stdid: "学号", | ||
| title: "实验名", | ||
| class: "班级" | ||
| ) | ||
|
|
||
| #reportpage[ | ||
| = 简介 | ||
| #text(fill : blue,weight : "bold")[Typst]是一款轻量级的编程语言,具有markdown类似的语法和相当latex的排版能力,可以用来完成实验报告,同时适合vibe coding来水平时的作业报告(bushi,为了美观与整齐我设计了这样的一个模板供大家使用 | ||
|
|
||
| = 使用说明 | ||
| == 常用排版语法 | ||
| - 标题使用\=、\==来表示不同级别的标题 | ||
| - *加粗* / _斜体_使用\*和\_来包裹 | ||
| - #highlight(fill : yellow)[高亮]使用 \#highlight[] 来高亮文本 | ||
| - #sub[下标]和#super[上标]使用 \#sub[] 和 \#super[] 来表示上下标 | ||
| - 无序列表使用 \- 开始,有序列表使用 \+ 开始 | ||
| + 有序1 | ||
| + 有序2 | ||
| == 插入图片 | ||
| #figure( | ||
| image("images/exp.png",width : 75%), | ||
| caption : [图片的说明], | ||
| ) | ||
|
|
||
|
|
||
| == 插入表格 | ||
| #figure( | ||
| table( | ||
| columns : 3, | ||
| align : center, | ||
| [*阶段*],[*研究内容*],[*应用*], | ||
| [content1],[content2],[content3], | ||
| [111],[222],[333], | ||
| ), | ||
| caption : [表格说明], | ||
| ) | ||
|
|
||
| == 代码块 | ||
| ```cpp | ||
| #include<bits/stdc++.h> | ||
| using namespace std; | ||
| signed main(){ | ||
| cout << "code example" << endl; | ||
| return 0; | ||
| } | ||
| ``` | ||
|
|
||
| == 数学公式 | ||
| 行内公式示例:$E=m c^2$ \ | ||
| 行间公式示例:$ A = pi r^2 $ \ | ||
| 更复杂一点的:$ cal(F)(omega) = integral_(-infinity)^(infinity) f(t) e^(-i omega t) d t $ \ | ||
| 其他示例:$ A = mat(1, 2; 3, 4) \ quad sum_(i=1)^n i = (n(n+1)) / 2 $ \ | ||
|
|
||
|
|
||
| == 类obsidan笔记框 | ||
| #idea[test contents] | ||
|
|
||
| #warning[test contents] | ||
|
|
||
|
|
||
| == 文献引用 | ||
| 在给出的ref.bib中添加需要引用的文献,然后在文中使用 \ | ||
| [ICIR2025]Think Then React 动作生成的新思路 @tan2025think | ||
| #bibliography("ref.bib", style: "gb-7714-2015-numeric",title : "参考文献") | ||
|
|
||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| @misc{rawles2024androidworlddynamicbenchmarkingenvironment, | ||
| title={AndroidWorld: A Dynamic Benchmarking Environment for Autonomous Agents}, | ||
| author={Christopher Rawles and Sarah Clinckemaillie and Yifan Chang and Jonathan Waltz and Gabrielle Lau and Marybeth Fair and Alice Li and William Bishop and Wei Li and Folawiyo Campbell-Ajala and Daniel Toyama and Robert Berry and Divya Tyamagundlu and Timothy Lillicrap and Oriana Riva}, | ||
| year={2024}, | ||
| eprint={2405.14573}, | ||
| archivePrefix={arXiv}, | ||
| primaryClass={cs.AI}, | ||
| url={https://arxiv.org/abs/2405.14573}, | ||
| } | ||
|
|
||
| @inproceedings{ | ||
| tan2025think, | ||
| title={Think Then React: Towards Unconstrained Action-to-Reaction Motion Generation}, | ||
| author={Wenhui Tan and Boyuan Li and Chuhao Jin and Wenbing Huang and Xiting Wang and Ruihua Song}, | ||
| booktitle={The Thirteenth International Conference on Learning Representations}, | ||
| year={2025}, | ||
| url={https://openreview.net/forum?id=UxzKcIZedp} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [package] | ||
| name = "xmdjy-simple-report-template" | ||
| version = "0.1.1" | ||
|
Check failure on line 3 in packages/preview/xmdjy-simple-report-template/0.1.0/typst.toml
|
||
| entrypoint = "lib.typ" | ||
| authors = ["xmdjy <xmdjy703@outlook.com>"] | ||
| license = "MIT" | ||
| description = "A simple and customizable experimental report template for SDU students (Shandong University)." | ||
| repository = "https://github.com/xmdjy/exp-report-template" | ||
| keywords = ["sdu","simple","personalization"] | ||
| exclude = ["template/fonts"] | ||
| categories = ["report"] | ||
|
|
||
| [template] | ||
| path = "template" | ||
| entrypoint = "main.typ" | ||
| thumbnail = "thumbnail.png" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR also seems to include version
0.1.0. Could you rebase/sync your fork so it only contains the changes from the latest version?