> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ja/xiang-xi-ji-shi/25-how-to-create-a-multilingual-customisable-cd-disk-jewel-case-calendar-using-latex.md).

# LaTeXを使って多言語対応でカスタマイズ可能なCDディスクジュエルケースカレンダーを作成する方法

LaTeXの柔軟性のおかげで、LaTeXは月間カレンダーを含むさまざまな素敵なものを作るのにかなり便利な（しかも無料の！）ツールです。そこで、私なりに次のものを作ってみました。 [LaTeXクラスとテンプレート](https://www.overleaf.com/read/vtqtzgbcvmbg) カスタマイズ可能で多言語対応の月間カレンダーを作成するためのもので、CDや3.5インチのディスクのジュエルケースに収まります。画像や予定を追加でき、カレンダーの月の範囲も自由に選べます。1月から始めて12月で終わる必要はありません。

[![{{{alt}}}](/files/941538aa4a3c0d1d45460f3c507c194536898b24)](https://www.overleaf.com/read/vtqtzgbcvmbg)

個人用、贈り物用、あるいは記念日などの特別なイベントの記念品として作ることができます。クラブやサークルを運営しているなら、宣伝やグッズとして使うこともできます。たとえば、地元のバードウォッチング・クラブ向けに、近所によく来る鳥を紹介するカレンダーを作ることができます。仕事関連では、論文輪読会向けに、次学期の自分の分野での課題提出や学会投稿の重要日程を強調したカレンダーを作りたいと思うかもしれません。

### 月間カレンダー

その `cdcalendar` クラスはカレンダーのサイズを次のように設定します [CDジュエルケースに収まる](https://www.overleaf.com/read/htkctjjgmxjx)、そしてA4サイズの用紙上に配置します。

```latex
\documentclass[12pt]{cdcalendar}
\begin{document}

%% 2015年6月
\monthCalendar{2015}{06}
\clearpage

%% 2015年7月
\monthCalendar{2015}{07}
\end{document}
```

もっと小さいカレンダーを [3.5インチのフロッピーケースに収めたい](https://www.overleaf.com/read/vtqtzgbcvmbg) 場合は、代わりに `small` オプションを `cdcalendar` クラスに

```latex
\documentclass[9pt,small]{cdcalendar}
```

技術的な詳細に興味がある方のために説明すると、このカレンダーは `tikz`で描画され、2面または4面のレイアウトは `pgfpages`.

### 図版の追加

私は `\illustration` というコマンドを定義し、カレンダーの各ページにグラフィックを追加できるようにしました。

```latex
\usepackage{graphicx}

%% 構文: \illustration[caption]{width}{image-file-name}
\illustration[誕生日パーティーはとても楽しかったです！]{8.5cm}{Party.jpg}
```

画像は現在のページの左上に追加されます。元の縦横比は保持されるので、空きスペースに収まるよう、適切な比率の図版を選ぶ必要があります。

### 予定の追加／マーキング

各月の予定は `\event` コマンドを定義しようとする次の例で示されます：

```latex
\event{2015-10-25}{夏時間の終了}
```

を使ってマークできます。予定は月間カレンダーの上に一覧表示され、日付自体はカレンダー内で丸で囲まれます。予定は *の後に* 該当する `\monthCalendar` と同じページに指定する必要があります。

予定が数日にわたる場合は、オプションとして期間（日数）を `\event`:

```latex
\event[5]{2015-07-26}{ACL 2015, 北京}
```

に与えることもできますし、 *終了日* をオプションとして与えることもできます。

```latex
\event[2015-07-31]{2015-07-26}{ACL 2015, 北京}
```

どちらの形式のコマンドでも、同じ出力になります。

予定が2か月にまたがる場合、たとえば `\event[9]{2015-06-27}{サマーキャンプ}`、このコマンドを両方の月で実行する必要があります。つまり6月に1回、7月に1回です。

```latex
\monthCalendar{2015}{06}
\event[9]{2015-06-27}{サマーキャンプ}
\clearpage

\monthCalendar{2015}{07}
\event[9]{2015-06-27}{サマーキャンプ}
\clearpage
```

### 多言語カレンダー

日付、月名、曜日の頭文字は、 `babel`, `translator` と `datetime2`.

でサポートされている言語にローカライズできます。たとえば、スペイン語の日付のカレンダーを作るには、クラスオプションとして `spanish` を指定するだけです。

```latex
\documentclass[12pt,spanish]{cdcalendar}
```

次の言語オプションをテストしました。 `british, spanish, french, ngerman, italian, portuges, polish, croatian, greek`.

ただし、 [LuaLaTeXを使って](https://www.overleaf.com/blog/167) プロジェクトをコンパイルするのを忘れないでください。もし `french`なら、PDFLaTeXとは相性があまりよくなく、このテンプレートではXeLaTeXもあまりうまく動きません。

### スタイルのカスタマイズ

ほとんどの要素のフォントや色は、カレンダーの任意の時点でカスタマイズできます。いくつかの例はテンプレートを見てください。便宜のために、 `\makeCover` コマンド（および必要なメタデータ用コマンド）も用意されています。

このテンプレートを作るのは [とても楽しかった](https://www.overleaf.com/read/vtqtzgbcvmbg)です。このカレンダーにはきっともっと多くの使い道が見つかるはずです。どうぞお楽しみください！


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ja/xiang-xi-ji-shi/25-how-to-create-a-multilingual-customisable-cd-disk-jewel-case-calendar-using-latex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
