-
Notifications
You must be signed in to change notification settings - Fork 569
quic-style:0.0.1 #2380
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
Open
taniiicom
wants to merge
14
commits into
typst:main
Choose a base branch
from
taniiicom:add-quic-style
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
quic-style:0.0.1 #2380
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
338405f
Squashed 'packages/preview/quic-style/' content from commit 75b95b81
taniiicom 0736c87
Merge commit '338405f5146d3c4f8ff9e7098377b9e892efb863' as 'packages/…
taniiicom ca0c9ea
rm: quic-style
taniiicom b9c8da1
Squashed 'packages/preview/quic-style/0.0.1/' content from commit 108…
taniiicom 17dc6f3
Merge commit 'b9c8da117a1270a37d4a485f3d76dee4796b8ca8' as 'packages/…
taniiicom 6c99ff3
Squashed 'packages/preview/quic-style/0.0.1/' changes from 108be7aa..…
taniiicom b56b932
Merge commit '6c99ff3a716c6d2192a8437a2de8b289bcf9966d' into add-quic…
taniiicom ac68646
Squashed 'packages/preview/quic-style/0.0.1/' changes from 083dbece..…
taniiicom d4088de
Merge commit 'ac686465bca31dfc2e338e448ee4df07fd1835f4' into add-quic…
taniiicom 1bc3ad7
Squashed 'packages/preview/quic-style/0.0.1/' changes from a3d1869f..…
taniiicom 9a73032
Merge commit '1bc3ad7ca42e56bbebb6b30deeead993f355fa42' into add-quic…
taniiicom 085f48d
rm: quic-style
taniiicom 743c1d6
Squashed 'packages/preview/quic-style/0.0.1/' content from commit 9f1…
taniiicom 859b9fa
Merge commit '743c1d6d9ae3a9e68a8e6e0ae6c3b1a696b85e65' as 'packages/…
taniiicom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.github | ||
scripts | ||
tests | ||
Justfile | ||
docs | ||
fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# this is not a "standard" ignore file, it's specific to this template's `scripts/package` script | ||
# list any files here that should not be uploaded to Universe when releasing this package | ||
|
||
# if you are used to ignore files, be aware that .typstignore is a bit more limited: | ||
# - only this file is used; .typstignore files in subdirectories are not considered | ||
# - patterns must match file/directory names from the beginning: `x.typ` will not match `src/x.typ` | ||
# - `*` in patterns works, but also matches directory separators: `*.typ` _will_ match `src/x.typ` | ||
# .git and .typstignore are excluded automatically | ||
|
||
.github | ||
scripts | ||
tests | ||
Justfile | ||
# PDF manuals should be included so that they can be linked, but not their sources | ||
docs/* | ||
!docs/*.pdf | ||
fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# [unreleased](https://github.com/JamesxX/graceful-genetics/tags/) | ||
## Added | ||
|
||
## Removed | ||
|
||
## Changed | ||
|
||
## Migration Guide from v0.1.X | ||
|
||
--- | ||
|
||
# [v0.1.1](https://github.com/JamesxX/graceful-genetics/releases/tags/v0.1.1) | ||
## Added | ||
- `make-venue` is a template argument to allow the end-author to change the "header" shown on the first page | ||
- `make-title` is another template argument for the same ends but for the title + authors + abstract + keywords combo. It is placed in the page floating scoped to `parent`. | ||
|
||
## Removed | ||
|
||
## Changed | ||
- `set page(columns: 2)` instead of `show: columns(2)` | ||
|
||
--- | ||
|
||
# [v0.1.0](https://github.com/JamesxX/graceful-genetics/releases/tags/v0.1.0) | ||
Initial Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
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 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. | ||
|
||
For more information, please refer to <https://unlicense.org> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# typst-quic-style | ||
|
||
 | ||
|
||
A cohesive Typst design template that can be used in various situations—daily life, research, and experiments! | ||
|
||
Forked from [JamesxX/graceful-genetics](https://github.com/JamesxX/graceful-genetics) — thanks! | ||
|
||
## 日本語対応 | ||
|
||
- 段落の字下げ (見出しの直下も字下げする) | ||
- 行間 | ||
- 日本語フォント (Zen Kaku Gothic New, Zen Old Mincho) | ||
- 表の上にキャプション | ||
|
||
など... | ||
|
||
## Required Fonts | ||
|
||
This template requires the following fonts: | ||
|
||
- [Zen Kaku Gothic New](https://fonts.google.com/specimen/Zen+Kaku+Gothic+New) - For Japanese sans-serif text | ||
- [Zen Old Mincho](https://fonts.google.com/specimen/Zen+Old+Mincho) - For Japanese serif text | ||
- TeX Gyre Heros - For English sans-serif text | ||
- TeX Gyre Pagella - For English serif text | ||
|
||
Please download and install these fonts on your system before using the template. | ||
|
||
### Font Installation | ||
|
||
1. Download the fonts: | ||
|
||
- Zen fonts can be downloaded from Google Fonts | ||
- TeX Gyre fonts can be downloaded from [GUST e-foundry](https://www.gust.org.pl/projects/e-foundry/tex-gyre) | ||
|
||
2. Install the fonts on your system: | ||
- For Linux: Copy the font files to `~/.local/share/fonts/` and run `fc-cache -f -v` | ||
- For macOS: Double-click the font files and click "Install Font" | ||
- For Windows: Double-click the font files and click "Install" | ||
|
||
## Package Installation | ||
|
||
- Linux: ~/.local/share/typst/packages/local | ||
- macOS: ~/Library/Application Support/typst/packages/local | ||
- Windows: %APPDATA%\typst\packages\local | ||
|
||
## Package Structure | ||
|
||
The main components of this package are: | ||
|
||
- `src/` - Core implementation files | ||
- `template/` - Template files for different document types | ||
- `thumbnails/` - Preview images of the templates | ||
|
||
Additional files for development and documentation: | ||
|
||
- `docs/manual.pdf` - Detailed documentation of the package | ||
- `examples/` - Example documents showcasing different use cases | ||
- `tests/` - Test files for development | ||
|
||
## Media | ||
|
||
<p align="center"> | ||
<img alt="paper" src="./thumbnails/paper.jpg" width="45%"> | ||
| ||
<img alt="progress report" src="./thumbnails/progress_report.jpg" width="45%"> | ||
| ||
</p> | ||
|
||
<p align="center"> | ||
<img alt="note" src="./thumbnails/note.jpg" width="45%"> | ||
| ||
<img alt="log" src="./thumbnails/log.jpg" width="45%"> | ||
</p> | ||
|
||
## Getting Started | ||
|
||
To use this template, simply import it as shown below: | ||
|
||
```typ | ||
#import "@preview/quic-style:0.0.1" | ||
|
||
#show: quic-style.template.with( | ||
title: [タイトル], | ||
authors: ( | ||
( | ||
name: "name", | ||
department: "department", | ||
institution: "institution", | ||
city: "city", | ||
country: "country", | ||
mail: "[email protected]", | ||
), | ||
), | ||
date: ( | ||
year: 2025, | ||
month: "May", | ||
day: 7, | ||
), | ||
keywords: ( | ||
"Space", | ||
"Mail", | ||
"Astromail", | ||
"Faster-than-Light", | ||
"Mars", | ||
), | ||
doi: "", | ||
abstract: [ | ||
Recent advances in space-based document processing have enabled faster mail delivery between different planets of a solar system. Given the time it takes for a message to be transmitted from one planet to the next, its estimated that even a one-way trip to a distant destination could take up to one year. During these periods of interplanetary mail delivery there is a slight possibility of mail being lost in transit. This issue is considered so serious that space management employs P.I. agents to track down and retrieve lost mail. We propose A-Mail, a new anti-matter based approach that can ensure that mail loss occurring during interplanetary transit is unobservable and therefore potentially undetectable. Going even further, we extend A-Mail to predict problems and apply existing and new best practices to ensure the mail is delivered without any issues. We call this extension AI-Mail. | ||
], | ||
doc_type: "PROGRESS_REPORT", // or "NOTE", "LOG", "PAPER" | ||
) | ||
|
||
// セクション | ||
= 1. | ||
``` |
Binary file added
BIN
+141 KB
...0.0.1/examples/jpg/log/1746454624764-37f124df-8b80-4a0d-924d-950977260891_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+116 KB
....0.1/examples/jpg/note/1746454624748-e5509a7f-fa34-4c9f-8730-60f9b437f147_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+52.9 KB
....0.1/examples/jpg/note/1746454624748-e5509a7f-fa34-4c9f-8730-60f9b437f147_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+148 KB
...0.1/examples/jpg/paper/1746454624953-937267c3-0f4a-4e13-883d-6965615b4df4_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.5 KB
...0.1/examples/jpg/paper/1746454624953-937267c3-0f4a-4e13-883d-6965615b4df4_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+136 KB
...es/jpg/progress_report/1746454624745-dbdaed55-6cc7-4655-9222-e0cd1f5c2764_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.8 KB
...es/jpg/progress_report/1746454624745-dbdaed55-6cc7-4655-9222-e0cd1f5c2764_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
#let make-venue(doc_type) = { | ||
let top_text = "" | ||
let bottom_text = "" | ||
let fill_color = luma(140) // Default color | ||
|
||
if doc_type == "PROGRESS_REPORT" { | ||
top_text = "PROGRESS" | ||
bottom_text = "REPORT" | ||
fill_color = rgb("#ffa500") // 例: オレンジ系の色 | ||
} else if doc_type == "PAPER" { | ||
top_text = "PAPER" | ||
bottom_text = "" // PAPER の場合は下のテキストなし | ||
fill_color = rgb("#4169e1") // 例: 青系の色 | ||
} else if doc_type == "NOTE" { | ||
top_text = "NOTE" | ||
bottom_text = "" // NOTE の場合は下のテキストなし | ||
fill_color = rgb("#3cb371") // 例: 緑系の色 | ||
} else if doc_type == "LOG" { | ||
top_text = "LOG" | ||
bottom_text = "" // LOG の場合は下のテキストなし | ||
fill_color = luma(140) | ||
} | ||
// 他のタイプが必要な場合はここに追加 | ||
|
||
move( | ||
dy: -1.9cm, | ||
{ | ||
box( | ||
rect(fill: fill_color, inset: 10pt, height: 2.5cm)[ | ||
#set text(font: "Zen Old Mincho", fill: white, weight: 700, size: 20pt) | ||
#align(bottom)[#top_text] // 変数を使用 | ||
], | ||
) | ||
set text(22pt, font: "Zen Kaku Gothic New") | ||
// 下のテキストが存在する場合のみ表示 | ||
if bottom_text != "" { | ||
box(pad(left: 10pt, bottom: 10pt, [#bottom_text])) // 変数を使用 | ||
} | ||
}, | ||
) | ||
} | ||
|
||
#let make-title( | ||
title, | ||
authors, | ||
date, | ||
abstract, | ||
keywords, | ||
) = { | ||
// タイトルでは, 字下げを打ち消し | ||
set par( | ||
justify: true, | ||
leading: 1.1em, | ||
spacing: 1.9em, | ||
first-line-indent: ( | ||
all: false, | ||
amount: 0pt, | ||
), | ||
) | ||
|
||
set par(spacing: 1em) | ||
set text(font: "Zen Kaku Gothic New") | ||
|
||
par( | ||
justify: false, | ||
text(24pt, fill: rgb("004b71"), title, weight: "bold"), | ||
) | ||
|
||
text( | ||
12pt, | ||
authors.enumerate().map(((i, author)) => box[#author.name #super[#(i + 1)]]).join(", "), | ||
) | ||
parbreak() | ||
|
||
for (i, author) in authors.enumerate() [ | ||
#set text(8pt) | ||
#super[#(i + 1)] | ||
#author.institution | ||
#link("mailto:" + author.mail) \ | ||
] | ||
|
||
if date != none { | ||
v(8pt) | ||
set text(10pt) | ||
align(right)[#date] | ||
v(8pt) | ||
} else { | ||
v(8pt) | ||
} | ||
set text(10pt) | ||
set par(justify: true) | ||
|
||
[ | ||
#heading(outlined: false, bookmarked: false)[Abstract] | ||
#text(font: "Zen Old Mincho", abstract) | ||
#v(3pt) | ||
*Keywords:* #keywords.join(text(font: "Zen Old Mincho", "; ")) | ||
] | ||
v(18pt) | ||
} | ||
|
||
#let template( | ||
title: [], | ||
authors: (), | ||
date: [], | ||
doi: "", | ||
keywords: (), | ||
abstract: [], | ||
doc_type: "NOTE", | ||
Check warning on line 109 in packages/preview/quic-style/0.0.1/src/impl.typ
|
||
make-venue: make-venue, | ||
make-title: make-title, | ||
body, | ||
) = { | ||
set page( | ||
paper: "a4", | ||
margin: (top: 1.9cm, bottom: 1in, x: 1.6cm), | ||
columns: 2, | ||
numbering: "1", // ページ番号を追加 | ||
) | ||
|
||
// 日本語テキストの可読性向上のための設定 | ||
set par( | ||
justify: true, | ||
leading: 1.1em, | ||
spacing: 1.9em, | ||
first-line-indent: ( | ||
all: true, | ||
amount: 1em, | ||
), | ||
) | ||
set text(10pt, lang: "ja", font: "Zen Old Mincho") | ||
set list(indent: 8pt) | ||
// show link: set text(underline: false) | ||
show heading: set text(size: 11pt) | ||
show heading.where(level: 1): set text(font: "Zen Kaku Gothic New", fill: rgb("004b71"), size: 12pt) | ||
show heading.where(level: 2): set text(font: "Zen Kaku Gothic New", fill: rgb("004b71"), size: 11pt) | ||
show heading.where(level: 3): set text(font: "Zen Kaku Gothic New", fill: rgb("004b71"), size: 10pt) | ||
show heading: set block(above: 16pt, below: 8pt) | ||
show heading.where(level: 1): set block(below: 12pt) | ||
show heading.where(level: 2): set block(below: 12pt) | ||
show heading.where(level: 3): set block(below: 12pt) | ||
|
||
place(make-venue(doc_type), top, scope: "parent", float: true) | ||
place( | ||
make-title(title, authors, date, abstract, keywords), | ||
top, | ||
scope: "parent", | ||
float: true, | ||
) | ||
|
||
|
||
show figure: align.with(center) | ||
show figure: set text(8pt) | ||
show figure.caption: pad.with(x: 10%) | ||
|
||
//表のときにはキャプションを上へ | ||
show figure.where(kind: table): set figure.caption(position: top) | ||
|
||
// show: columns.with(2) | ||
body | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#import "impl.typ": template |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For consistency, it would be better to use kebab-case here:
And rename it in other places as well.