> 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/fen-ye-bie/06-knitting-patterns.md).

# 編み物パターン

## はじめに

LaTeX には、編み物のパターンや画像を含む文書をより簡単に組版できる特別な文書クラスがあります。この記事では、このパッケージの使い方を説明します [`knittingpattern`](https://ctan.org/pkg/knittingpattern?lang=en).

編み物のパターンを使うのは簡単です。正しい文書クラスを宣言するだけです

```latex
\documentclass{knittingpattern}

\begin{document}

\title{編み物のパターン}
\author{Overleaf team}
\date{\today}
\maketitle

\cpyrght{Overleaf team}

\intro{
    ここに導入文を入れます。
    隣の画像と同じ高さにすると、見栄えがよくなります。
    ここに導入文を入れます。
    隣の画像と同じ高さにすると、見栄えがよくなります...
}{lion-logo}
```

![KnittingPatternsEx1OverleafV2.png](/files/30cd0c4d355bbc8aee398d80aed3c8fdfd84fe7d)

文書の先頭にあるコマンドは

```latex
\documentclass{knittingpattern}
```

いくつかのコマンドを使って一部の要素のレイアウトを変更しやすくするための、いくつかのコマンドを有効にします。たとえば

* `\cpyrght{...}` ページ番号を削除し、脚注を追加します。著作権表示用です。
* `\intro{}{}` 中括弧の中に2つのパラメータを取ります。1つ目は（導入）テキスト、2つ目は画像です。テキストは左側に印字され、画像はその横に表示されます。

[Overleaf でこの `knitpattern` Overleaf でのパッケージ](https://www.overleaf.com/project/new/template/19507?id=65965453\&templateName=Knitting+Patterns+Demo\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 図表

図を含む画像を追加するには **knittingpattern** 特別なコマンドを提供します

```latex
\diagram{overleaf-logo}
```

![KnittingPatternsEx2OverleafV2.png](/files/4af07268690d08159f8e8f65c03c609e5bb9f0bd)

コマンド `\diagram` ページ幅の半分の幅を持つ、中央揃えの枠付き画像を出力します。

[Overleaf でこの `knitpattern` Overleaf でのパッケージ](https://www.overleaf.com/project/new/template/19507?id=65965453\&templateName=Knitting+Patterns+Demo\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 注意と注記

文書内の特定のテキストブロックを強調したい場合、文書に枠付きの注意書きと注記を追加するための2つのコマンドがあります。

```latex
\definecolor{colour0}{HTML}{000000}
\definecolor{colour2}{HTML}{97DE76}
\definecolor{colour4}{HTML}{EDB668}

\begin{document}

\note{colour0}{colour2}{Materials}{
    毛糸、少しの毛糸、そして
    毛糸部分のために毛糸が必要になるかもしれません。
}

こんな特別なコマンドもあります

\important{colour0}{colour4}{この注記はとても重要です。
だから強調表示されています}
\end{document}
```

![KnittingPatternsEx3.png](/files/1355ae490af7cfbc19b241871c42c803155414d4)

コマンド `\note{}{}{}{}` 4つのパラメータを取ります:

* 枠線の色、
* 背景色、
* タイトル、そして
* 枠内に表示するテキストです。

色には **xcolor** HTML の構文を使います。 [LaTeX で色を使う](/latex/ja/shu-shi-she-ding/13-using-colors-in-latex.md) 詳しくは

をご覧ください。2つ目のコマンド `\important`は、基本的に `\note`と同じ構文ですが、タイトルは省略されています。

[Overleaf でこの `knitpattern` Overleaf でのパッケージ](https://www.overleaf.com/project/new/template/19507?id=65965453\&templateName=Knitting+Patterns+Demo\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 編み物の手順を追加する

編み物についての文書の主な目的は、実際に編み方の指示を提供することです。パッケージ **knittingpatern** は、手順の表を出力する環境を提供します。

```latex
\documentclass{knittingpatern}
\definecolor{colour3}{HTML}{99CCFF}
\definecolor{colour5}{HTML}{CCFFCC}

\begin{document}
\begin{pattern}{colour3}{colour5}
作り目 & (st)\\
手順1 & (st)\\
手順2 & (st)\\
手順3 & (st)\\
手順4 & (st)\\
手順5 & (st)\\
手順6 & (st)\\
手順7 & (st)\\
手順8 & (st)\\
手順9 & (st)\\
手順10 & (st)\\
\quad\vdots & \quad\vdots\\
\end{pattern}
\end{document}
```

![KnittingPatternsEx4.png](/files/75fae59002bbf2b19a0476018da366360b61978c)

この環境は、表の読みやすさを向上させるために、表で使う交互の色を決める2つのパラメータを取ります。詳しくは [LaTeX で色を使う](/latex/ja/shu-shi-she-ding/13-using-colors-in-latex.md) LaTeX での色の操作についてご覧ください。

[Overleaf でこの `knitpattern` Overleaf でのパッケージ](https://www.overleaf.com/project/new/template/19507?id=65965453\&templateName=Knitting+Patterns+Demo\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 参考文献

詳細は以下を参照してください:

* [最初の LaTeX 文書を作成する](/latex/ja/latexno/01-learn-latex-in-30-minutes.md)
* [太字、斜体、下線](/latex/ja/latexno/03-bold-italics-and-underlining.md)
* [画像の挿入](/latex/ja/sononotopikku/27-inserting-images.md)
* [画像と表の配置](/latex/ja/to/02-positioning-images-and-tables.md)
* [段落の書式設定](/latex/ja/shu-shi-she-ding/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [LaTeX で色を使う](/latex/ja/shu-shi-she-ding/13-using-colors-in-latex.md)
* [フォントサイズ、ファミリー、スタイル](/latex/ja/fonto/01-font-sizes-families-and-styles.md)
* [フォント書体](/latex/ja/fonto/02-font-typefaces.md)
* [その `knittingpattern` パッケージドキュメントに記載されているオプションがあります](https://ctan.org/pkg/knittingpattern?lang=en)


---

# 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/fen-ye-bie/06-knitting-patterns.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.
