> 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/ar/khas-balmjal/06-knitting-patterns.md).

# أنماط الحياكة

## مقدمة

يوفّر LaTeX فئة مستندات خاصة تجعل تنضيد المستندات التي تحتوي على نماذج حياكة وصورًا أسهل. تشرح هذه المقالة كيفية استخدام الحزمة [`knittingpattern`](https://ctan.org/pkg/knittingpattern?lang=en).

استخدام نماذج الحياكة أمر مباشر. كل ما عليك هو تعريف فئة المستند الصحيحة

```latex
\documentclass{knittingpattern}

\begin{document}

\title{Knitting patterns}
\author{Overleaf team}
\date{\today}
\maketitle

\cpyrght{Overleaf team}

\intro{
    النص التمهيدي هنا. سيبدو أفضل إذا كان لديه
    نفس الارتفاع مثل الصورة المجاورة له.
    النص التمهيدي هنا. سيبدو أفضل إذا كان لديه
    نفس الارتفاع مثل الصورة المجاورة له...
}{lion-logo}
```

![KnittingPatternsEx1OverleafV2.png](/files/8e02198e8c32d9c002e52a042349ae54522ea8d8)

الأمر الموجود في أعلى المستند

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

يُفعّل عدة أوامر لتسهيل تغيير تخطيط بعض العناصر بواسطة أوامر معينة. على سبيل المثال

* `\cpyrght{...}` يزيل أرقام الصفحات ويضيف حاشية سفلية. مخصص لملاحظات حقوق النشر.
* `\intro{}{}` يأخذ وسيطين داخل الأقواس المعقوفة. الأول هو نص (تمهيدي)، والثاني هو صورة. يُطبع النص على اليسار وتوضع الصورة بجانبه.

[افتح مثالًا على `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/dad2a6b1021ed1c400e4f9a8de4e55db6133cdc6)

الأمر `\diagram` يطبع صورة متمركزة ومحيطة بإطار، ويكون عرضها نصف عرض الصفحة.

[افتح مثالًا على `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
\definecolor{colour0}{HTML}{000000}
\definecolor{colour2}{HTML}{97DE76}
\definecolor{colour4}{HTML}{EDB668}

\begin{document}

\note{colour0}{colour2}{المواد}{
    صوف، وبعض الصوف، وقد تحتاج أيضًا إلى صوف لـ
    أجزاء الصوف.
}

وهناك أيضًا هذا الأمر الخاص

\important{colour0}{colour4}{هذه الملاحظة مهمة جدًا.
ولهذا السبب تم تمييزها}
\end{document}
```

![KnittingPatternsEx3.png](/files/43d0aed472f1ee2d855dfd95ee9f8473a87e8208)

الأمر `\note{}{}{}{}` يأخذ 4 معاملات:

* لون الإطار،
* لون الخلفية،
* عنوانًا و
* النص الذي سيُطبع داخل المربع.

تستخدم الألوان **xcolor** صيغة HTML. راجع [استخدام الألوان في LaTeX](/latex/ar/altnsyq/13-using-colors-in-latex.md) لمزيد من المعلومات.

الأمر الثاني، `\important`، له عمليًا نفس الصياغة مثل `\note`، ولكن يُحذف العنوان.

[افتح مثالًا على `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/dab0a5fcff444e6c9a493c845480b818e85630e7)

يأخذ وسيطين يحددان الألوان المتناوبة المستخدمة في الجدول لتحسين قابلية القراءة. راجع [استخدام الألوان في LaTeX](/latex/ar/altnsyq/13-using-colors-in-latex.md) لمزيد من المعلومات حول التعامل مع الألوان في LaTeX.

[افتح مثالًا على `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/ar/asasyat-latex/01-learn-latex-in-30-minutes.md)
* [الخط العريض والمائل والتحته خط](/latex/ar/asasyat-latex/03-bold-italics-and-underlining.md)
* [إدراج الصور](/latex/ar/mzyd-mn-almwdhwaat/27-inserting-images.md)
* [تموضع الصور والجداول](/latex/ar/alashkal-waljdawl/02-positioning-images-and-tables.md)
* [تنسيق الفقرة](/latex/ar/altnsyq/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [استخدام الألوان في LaTeX](/latex/ar/altnsyq/13-using-colors-in-latex.md)
* [أحجام الخطوط، والعائلات، والأنماط](/latex/ar/alkhtwt/01-font-sizes-families-and-styles.md)
* [وجوه الخطوط](/latex/ar/alkhtwt/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/ar/khas-balmjal/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.
