-
Notifications
You must be signed in to change notification settings - Fork 1.1k
hadronic-rirekisho:0.1.0 #5257
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
yoshphys
wants to merge
6
commits into
typst:main
Choose a base branch
from
yoshphys:add-hadronic-rirekisho
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
hadronic-rirekisho:0.1.0 #5257
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7a24453
Add rirekisho 0.1.0
yoshphys bb415cd
Use polite (です・ます) tone in README
yoshphys b2d6124
Rename package to hadronic-rirekisho
yoshphys f8f4e38
Credit Wikimedia Commons source for example photo/signature
yoshphys 3c22412
Fix Universe package-check warnings, update repository URL
yoshphys 120949b
docs: move file-tree section to bottom, link example.pdf in README
yoshphys 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,16 @@ | ||
| MIT No Attribution | ||
|
|
||
| Copyright 2026 yoshphys | ||
|
|
||
| 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. | ||
|
|
||
| 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. |
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,208 @@ | ||
| # typst-hadronic-rirekisho | ||
|
|
||
| [Typst](https://typst.app/) で書く日本語履歴書テンプレートです。[Typst Universe](https://typst.app/universe/) パッケージとして配布予定です(`@preview/hadronic-rirekisho`)。 | ||
|
|
||
| ## インストール・使い方 | ||
|
|
||
| 新規プロジェクトをテンプレートから作成します: | ||
|
|
||
| ```sh | ||
| typst init @preview/hadronic-rirekisho:0.1.0 | ||
| ``` | ||
|
|
||
| または既存プロジェクトから直接インポートします: | ||
|
|
||
| ```typst | ||
| #import "@preview/hadronic-rirekisho:0.1.0": * | ||
| ``` | ||
|
|
||
| 記入例(湯川秀樹)のソースと出力は [`example/example.typ`](example/example.typ) と [`example/example.pdf`](example/example.pdf) にあります。 | ||
|
|
||
| --- | ||
|
|
||
| ## 設定(`履歴書設定`) | ||
|
|
||
| フォントや文字サイズなどの定数はすべて `履歴書設定` で一括指定でき、各ブロックに反映されます。 | ||
|
|
||
| ```typst | ||
| #show: 履歴書設定.with( | ||
| margin: 2.0cm, | ||
| date: datetime(year: 1950, month: 3, day: 1), | ||
| date_style: "和暦", | ||
| ) | ||
| ``` | ||
|
|
||
| | パラメータ | 型 | デフォルト | 説明 | | ||
| |---------------|------------|------------------------|------------------------------------------| | ||
| | `lang` | `str` | `"ja"` | 文書言語(禁則処理・グリフ選択に影響) | | ||
| | `paper` | `str` | `"a4"` | 用紙サイズ | | ||
| | `margin` | `length` | `1.5cm` | ページ余白 | | ||
| | `font` | `array` | 明朝体 (`font-serif`) | 本文フォント | | ||
| | `sans_font` | `array` | ゴシック体 (`font-san`) | 見出し用フォント | | ||
| | `mono_font` | `array` | 等幅 (`font-mono`) | 郵便番号・電話・メール用フォント | | ||
| | `system_size` | `length` | `8pt` | ラベル・枠見出しの文字サイズ | | ||
| | `name_size` | `length` | `16pt` | 氏名の文字サイズ | | ||
| | `input_size` | `length` | `10pt` | 記入値の文字サイズ | | ||
| | `base_size` | `length` | `system_size` | 本文の基本文字サイズ | | ||
| | `date` | `datetime` | 今日 | 履歴書の作成日 | | ||
| | `date_style` | `str` | `"和暦"` | 日付表示形式(`"和暦"` または `"西暦"`) | | ||
|
|
||
| --- | ||
|
|
||
| ## ブロック | ||
|
|
||
| ### `#基本情報(...)` | ||
|
|
||
| 氏名・生年月日・住所・写真を出力します。 | ||
|
|
||
| ```typst | ||
| #基本情報( | ||
| 姓: "山田", 名: "太郎", | ||
| 姓読み: "やまだ", 名読み: "たろう", | ||
| 生年月日: "昭和50年1月1日", | ||
| 年齢: 50, | ||
| 現住所: ( | ||
| 郵便番号: "100-0001", | ||
| 住所: "東京都 千代田区 千代田 1番1号", | ||
| ふりがな: "とうきょうと ちよだく ちよだ", | ||
| 電話: "090-0000-0000", | ||
| メール: "taro@example.com", | ||
| ), | ||
| 連絡先: "同上", // または現住所と同じ形式の辞書 | ||
| 写真: image("photo.jpg"), // none で空欄 | ||
| ) | ||
| ``` | ||
|
|
||
| ### `#学歴職歴(学歴: (...), 職歴: (...))` | ||
|
|
||
| 学歴と職歴を一つのテーブルに出力します。 | ||
|
|
||
| ```typst | ||
| #学歴職歴( | ||
| 学歴: ( | ||
| (年: "平成10", 月: "4", 内容: "○○大学 △△学部 入学"), | ||
| (年: "平成14", 月: "3", 内容: "○○大学 △△学部 卒業"), | ||
| ), | ||
| 職歴: ( | ||
| (年: "平成14", 月: "4", 内容: "株式会社○○ 入社"), | ||
| (年: "", 月: "", 内容: [以上#h(8em)], align: end), | ||
| ), | ||
| ) | ||
| ``` | ||
|
|
||
| ### `#資格欄(資格: (...))` | ||
|
|
||
| 免許・資格を出力します。エントリー形式は学歴職歴と同じです。 | ||
|
|
||
| ### `#志望動機(height: 5cm)[...]` | ||
|
|
||
| 志望動機欄を出力します。`height` で欄の高さを指定します。 | ||
|
|
||
| ### `#本人希望(height: 5cm)[...]` | ||
|
|
||
| 本人希望欄を出力します。`height` で欄の高さを指定します。 | ||
|
|
||
| ### `#賞罰(エントリー: (...))` | ||
|
|
||
| 賞罰欄を出力します。エントリー形式は学歴職歴と同じです。 | ||
|
|
||
| ### `#署名欄(signature: none)` | ||
|
|
||
| 署名欄を出力します。`signature` に画像を渡すと署名として表示します。 | ||
|
|
||
| ```typst | ||
| #署名欄(signature: image("signature.png", height: 1.0cm)) | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## ユーティリティ | ||
|
|
||
| テンプレートには以下の関数が含まれており、本文中でも使用できます。 | ||
|
|
||
| | 関数 | 説明 | | ||
| |---|---| | ||
| | `和暦date(d)` | `datetime` → 和暦文字列(明治〜令和、それ以前は西暦) | | ||
| | `西暦date(d)` | `datetime` → 西暦文字列 | | ||
| | `日付(d)` | `date_style` 設定に従いどちらかで表示 | | ||
| | `kintou(width, s)` | 文字列 `s` を幅 `width` に均等割付(例: `kintou(4em, "氏名")`) | | ||
|
|
||
| ```typst | ||
| // 和暦モード(デフォルト) | ||
| #日付(datetime(year: 1949, month: 10, day: 3)) | ||
| // → 昭和24年10月3日 | ||
|
|
||
| // 西暦モード(履歴書設定で date_style: "西暦" を指定した場合) | ||
| // → 1949年10月3日 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## フォントについて | ||
|
|
||
| デフォルトフォントは [okumuralab/typst-js](https://github.com/okumuralab/typst-js) にならい、役割ごとに 1 書体を指定しています。 | ||
|
|
||
| | 用途 | フォント | | ||
| |--------------------|-------------------------------------------------| | ||
| | 本文(明朝) | 欧文: New Computer Modern、和文: 原ノ味明朝 | | ||
| | 見出し(ゴシック) | 原ノ味角ゴシック | | ||
| | 等幅 | DejaVu Sans Mono | | ||
|
|
||
| New Computer Modern と DejaVu Sans Mono は Typst 本体に同梱されています。原ノ味フォントは TeX Live に同梱されているので、Typst が見つけられない場合はフォント検索パスに加えてください: | ||
|
|
||
| ```sh | ||
| export TYPST_FONT_PATHS=/usr/local/texlive/2026/texmf-dist/fonts/opentype | ||
| ``` | ||
|
|
||
| TeX Live がない場合は [原ノ味フォントを直接インストール](https://github.com/trueroad/HaranoAjiFonts)するか、`履歴書設定` の `font`・`sans_font`・`mono_font` パラメータで手元のフォント(ヒラギノ、游書体、Noto など)を指定してください。 | ||
|
|
||
| ```typst | ||
| #show: 履歴書設定.with( | ||
| font: ((name: "New Computer Modern", covers: latin-covers), "Hiragino Mincho ProN"), | ||
| sans_font: "Hiragino Kaku Gothic ProN", | ||
| ) | ||
| ``` | ||
|
|
||
| [typst.app](https://typst.app/) 上で使う場合、原ノ味フォントはシステムに存在しないため、フォントファイルをプロジェクトのルートにアップロードすると自動的に認識されます。 | ||
|
|
||
| 本文フォントのように `(欧文フォント, 和文フォント)` を組にする場合は、上の例のように `covers` で欧文の受け持ち範囲を指定します(`latin-covers` はテンプレートが公開している定数です)。 | ||
|
|
||
| --- | ||
|
|
||
| ## 謝辞 | ||
|
|
||
| このテンプレートは以下のプロジェクトを参考にして作成しました。 | ||
|
|
||
| - [Nikudanngo/typst-ja-resume-template](https://github.com/Nikudanngo/typst-ja-resume-template) | ||
| - [okumuralab/typst-js](https://github.com/okumuralab/typst-js) — 和欧混植(`covers`)、均等割付(`kintou`)、和文組版の設定 | ||
|
|
||
| --- | ||
|
|
||
| ## 記入例の画像について | ||
|
|
||
| `example/photo.jpg` と `example/signature.png` は Wikimedia Commons の [File:Yukawa.jpg](https://commons.wikimedia.org/wiki/File:Yukawa.jpg)(PD Sweden)と [File:Hideki Yukawa signature.jpg](https://commons.wikimedia.org/wiki/File:Hideki_Yukawa_signature.jpg)(PD ineligible)に基づくパブリックドメイン画像です。 | ||
|
|
||
| --- | ||
|
|
||
| ## ライセンス | ||
|
|
||
| [MIT No Attribution](LICENSE) です。記入済みの履歴書を配布・提出する際にライセンス表記を残す必要はありません。 | ||
|
|
||
| --- | ||
|
|
||
| ## ファイル構成 | ||
|
|
||
| ```text | ||
| typst-hadronic-rirekisho/ | ||
| ├── typst.toml # パッケージマニフェスト | ||
| ├── rirekisho.typ # テンプレート本体(パッケージのエントリーポイント) | ||
| ├── LICENSE | ||
| ├── thumbnail.png # Typst Universe 掲載用サムネイル | ||
| ├── template/ | ||
| │ └── main.typ # `typst init` で複製される記入例 | ||
| └── example/ | ||
| ├── example.typ # 記入例(湯川秀樹) | ||
| ├── example.pdf # 記入例の出力 | ||
| ├── photo.jpg # 証明写真(各自用意) | ||
| └── signature.png # 署名画像(各自用意) | ||
| ``` |
Binary file not shown.
91 changes: 91 additions & 0 deletions
91
packages/preview/hadronic-rirekisho/0.1.0/example/example.typ
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,91 @@ | ||
| #import "/rirekisho.typ": * | ||
|
|
||
| #show: 履歴書設定.with( | ||
| paper: "a4", | ||
| margin: 2.0cm, | ||
| date: datetime(year: 1950, month: 3, day: 1), | ||
| date_style: "和暦", // or "西暦" | ||
| // macOS fonts (defaults: Harano Aji from TeX Live) | ||
| font: ((name: "New Computer Modern", covers: latinCovers), "Hiragino Mincho ProN"), | ||
| sans_font: "Hiragino Kaku Gothic ProN", | ||
| mono_font: "Menlo", | ||
| // Sizes are also configurable. Defaults: | ||
| // system_size: 8pt, // labels and frame captions | ||
| // name_size: 16pt, // name | ||
| // input_size: 10pt, // user-entered values | ||
| ) | ||
|
|
||
| #set page(numbering: none) | ||
|
|
||
| // Historical recreation: Yukawa Hideki (1907–1981), Nobel Prize in Physics 1949. | ||
| // Age is as of 1950 (昭和25). Photo: place a portrait image at example/photo.jpg. | ||
|
|
||
| #基本情報( | ||
| 姓: "湯川", 名: "秀樹", | ||
| 姓読み: "ゆかわ", 名読み: "ひでき", | ||
| 生年月日: "明治40年1月23日", | ||
| 年齢: 43, | ||
| 現住所: ( | ||
| 郵便番号: "606-0807", | ||
| 住所: "京都府 京都市 左京区 下鴨泉川町 6番5号", | ||
| ふりがな: "きょうとふ きょうとし さきょうく しもがもいずみかわちょう", | ||
| 電話: "075-000-0000", | ||
| メール: "hideki.yukawa@example.ac.jp", | ||
| ), | ||
| 連絡先: "同上", | ||
| 写真: image("photo.jpg"), | ||
| ) | ||
|
|
||
| #学歴職歴( | ||
| 学歴: ( | ||
| (年: "大正7", 月: "4", 内容: "京都府立京都第一中学校 入学"), | ||
| (年: "大正12", 月: "3", 内容: "京都府立京都第一中学校 卒業"), | ||
| (年: "大正12", 月: "4", 内容: "第三高等学校 理科甲類 入学"), | ||
| (年: "大正15", 月: "3", 内容: "第三高等学校 理科甲類 卒業"), | ||
| (年: "大正15", 月: "4", 内容: "京都帝国大学 理学部 物理学科 入学"), | ||
| (年: "昭和4", 月: "3", 内容: "京都帝国大学 理学部 物理学科 卒業"), | ||
| ), | ||
| 職歴: ( | ||
| (年: "昭和4", 月: "4", 内容: "京都帝国大学 理学部 副手 就任"), | ||
| (年: "昭和7", 月: "", 内容: "京都帝国大学 理学部 講師 就任"), | ||
| (年: "昭和8", 月: "", 内容: "大阪帝国大学 理学部 講師 兼担"), | ||
| (年: "昭和9", 月: "", 内容: "大阪帝国大学 理学部 専任講師 就任"), | ||
| (年: "昭和11", 月: "3", 内容: "大阪帝国大学 理学部 助教授 昇任"), | ||
| (年: "昭和14", 月: "5", 内容: "京都帝国大学 理学部 教授 就任"), | ||
| (年: "昭和14", 月: "6", 内容: "学術研究会議 会議員 就任"), | ||
| (年: "昭和23", 月: "9", 内容: "プリンストン高等研究所 客員教授 就任"), | ||
| (年: "昭和24", 月: "7", 内容: "コロンビア大学 客員教授 就任"), | ||
| (年: "昭和25", 月: "9", 内容: "コロンビア大学 教授 就任(現在に至る)"), | ||
| (年: "", 月: "", 内容: [以上#h(8em)], align: end), | ||
| ), | ||
| ) | ||
|
|
||
| #資格欄( | ||
| 資格: ( | ||
| (年: "昭和13", 月: "", 内容: "理学博士 取得(大阪帝国大学)"), | ||
| ), | ||
| ) | ||
|
|
||
| #志望動機(height: 9cm)[ | ||
| 中間子理論の研究を通じて、素粒子物理学という新たな学問領域の基礎を構築することに長年取り組んでまいりました。 | ||
| 理論と実験の緊密な連携なくして物理学の進歩はなく、その信念のもとで国内外の研究者との共同研究を推進してきました。 | ||
| プリンストン高等研究所およびコロンビア大学での経験を通じ、国際的な視野と研究ネットワークを得ました。 | ||
|
|
||
| この経験を活かし、日本における理論物理学研究の国際的な拠点を築くべく尽力したいと考えています。 | ||
| 若い研究者が自由な発想のもとで基礎科学に取り組める環境を整えることを使命と考えており、 | ||
| 日本発の基礎科学が国際社会に貢献できるよう全力で臨む所存です。 | ||
| ] | ||
|
|
||
| #本人希望(height: 2.5cm)[ | ||
| 貴校の規程に従います。 | ||
| ] | ||
|
|
||
| #賞罰( | ||
| エントリー: ( | ||
| (年: "昭和15", 月: "5", 内容: "帝国学士院恩賜賞 受賞"), | ||
| (年: "昭和18", 月: "4", 内容: "文化勲章 受章"), | ||
| (年: "昭和24", 月: "10", 内容: "ノーベル物理学賞 受賞"), | ||
| ), | ||
| ) | ||
|
|
||
| #署名欄(signature: image("signature.png", height: 1.0cm)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Linking to this file in your README would allow users to access a preview of what the package does easily. In the current situation, this file is quite hard to discover. Can you add that please?