> 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/asasyat-latex/03-bold-italics-and-underlining.md).

# الخط العريض والمائل وتسطير النص

## مقدمة

يساعد تنسيق النص البسيط على إبراز المفاهيم المهمة داخل المستند وجعله أكثر قابلية للقراءة. يمكن أن يؤدي استخدام الكلمات المائلة أو الغامقة أو المسطرة إلى تغيير انطباع القارئ.

في هذه المقالة ستُشرح ثلاثة أدوات أساسية لتنسيق النص: الميلان، والغامق، والتسطير. لنبدأ بمثال:

```latex
بعض من \textbf{أعظم}
الاكتشافات في \underline{العلوم}
تمت \textbf{\textit{بالصدفة}}.
```

[افتح هذا المقطع من LaTeX في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ASome+of+the+%5Ctextbf%7Bgreatest%7D+%0Adiscoveries+in+%5Cunderline%7Bscience%7D+%0Awere+made+by+%5Ctextbf%7B%5Ctextit%7Baccident%7D%7D.%0A%5Cend%7Bdocument%7D)

يوضح الرسم التالي ناتج هذا الكود في LaTeX — تتم إضافة مقدمة المستند تلقائيًا بواسطة رابط Overleaf:

![مثال على الميلان والغامق والتسطير](/files/e5165aa8aec064ba12b02f68c5113baf8ea08ae9)

كما ترى، توجد ثلاثة أوامر أساسية ويمكن تداخلها للحصول على تأثيرات مركبة.

ملاحظة: أوامر تنسيق النص الأصلية من plain TeX، `\it` (لجعل النص مائلاً) و `\bf` (النص الغامق) ستظل تعمل في مستند LaTeX، لكن يُنصح بتجنب استخدامها ولا يُوصى بها لأنها لا تحافظ على الأنماط السابقة. فعلى سبيل المثال، عند استخدام تلك الأوامر القديمة لا يمكنك تطبيق كلٍ من الميلان والغامق في الوقت نفسه.

## نص مائل

لجعل النص مائلاً، الأمر سهل، استخدم `\textit` (`\emph`) الأمر:

```latex
بعض من أعظم
الاكتشافات في العلوم
تمت \textit{بالصدفة}.
```

[افتح هذا المقطع من LaTeX في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=italic+text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ASome+of+the+greatest+%0Adiscoveries+in+science+%0Awere+made+by+%5Ctextit%7Baccident%7D.%0A%5Cend%7Bdocument%7D)

يوضح الرسم التالي ناتج هذا الكود في LaTeX — تتم إضافة مقدمة المستند تلقائيًا بواسطة رابط Overleaf:

![مثال على نص مائل](/files/ba2e989807bce9415209c4492737b15b825bd07b)

## نص غامق

لجعل النص غامقًا استخدم `\textbf` الأمر:

```latex
بعض من \textbf{أعظم}
الاكتشافات في العلوم
تمت بالصدفة.
```

[افتح هذا المقطع من LaTeX في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=bold+text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ASome+of+the+%5Ctextbf%7Bgreatest%7D+%0Adiscoveries+in+science+%0Awere+made+by+accident.%0A%5Cend%7Bdocument%7D)

يوضح الرسم التالي ناتج هذا الكود في LaTeX — تتم إضافة مقدمة المستند تلقائيًا بواسطة رابط Overleaf:

![Textformattingex3.png](/files/c667f0a057c5e9d269d7f025b1b19f7be451ec0c)

## نص مسطر

لتسطير النص استخدم `\underline` الأمر:

```latex
بعض من أعظم
الاكتشافات في \underline{العلوم}
تمت بالصدفة.
```

[افتح هذا المقطع من LaTeX في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=underline+text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ASome+of+the+greatest+%0Adiscoveries+in+%5Cunderline%7Bscience%7D+%0Awere+made+by+accident.%0A%5Cend%7Bdocument%7D)

يوضح الرسم التالي ناتج هذا الكود في LaTeX — تتم إضافة مقدمة المستند تلقائيًا بواسطة رابط Overleaf:

![مثال على نص مسطر](/files/1f101bfbbd532fb9150adbefaec7115ed20ef2d7)

## إبراز النص

يمكن إبراز النص باستخدام `\emph` الأمر. أحيانًا يكون الأمر `\emph` يتصرف تمامًا كما `\textit`، لكنه ليس نفسه تمامًا:

```latex
بعض من أعظم \emph{الاكتشافات}
في العلوم
تمت بالصدفة.

\textit{بعض من أعظم \emph{الاكتشافات}
في العلوم
تمت بالصدفة.}

\textbf{بعض من أعظم \emph{الاكتشافات}
في العلوم
تمت بالصدفة.}
```

[افتح هذا المقطع من LaTeX في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=emphasizing+text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0ASome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+%0Ain+science+%0Awere+made+by+accident.%0A%0A%5Ctextit%7BSome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+%0Ain+science+%0Awere+made+by+accident.%7D%0A%0A%5Ctextbf%7BSome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+%0Ain+science+%0Awere+made+by+accident.%7D%0A%5Cend%7Bdocument%7D)

يوضح الرسم التالي ناتج هذا الكود في LaTeX — تتم إضافة مقدمة المستند تلقائيًا بواسطة رابط Overleaf:

![مثال على نص مُبرز](/files/7e0a7e63bdc60efbd42cb7cedc1e8182bfbfe2af)

ما الذي `\emph` يُحدِثه الأمر فعليًا بوسيطه يعتمد على السياق — داخل النص العادي يكون النص المُبرز مائلاً، لكن هذا السلوك ينعكس إذا استُخدم داخل نص مائل — انظر المثال أعلاه. علاوة على ذلك، بعض الحزم، مثل [Beamer](/latex/ar/alarwdh-altqdymyh/01-beamer.md)، تغيّر سلوك `\emph` الأمر.

## مجموعة كاملة من الأمثلة

يجمع المثال التالي مقتطفات الشفرة المختلفة الواردة في هذه المقالة بحيث يمكنك فتحها كلها معًا في Overleaf.

```latex
المثال الأول: الغامق، والميلان، والتسطير:

بعض من \textbf{أعظم} الاكتشافات في \underline{العلوم} تمت \textbf{\emph{بالصدفة}}.

\vspace{1.5cm}

مثال على نص مائل:

بعض من أعظم الاكتشافات في العلوم تمت \emph{بالصدفة}.

\vspace{1.5cm}

مثال على نص غامق:

بعض من \textbf{أعظم} الاكتشافات في العلوم تمت بالصدفة.

\vspace{1.5cm}

مثال على نص مسطر:

بعض من أعظم الاكتشافات في \underline{العلوم} تمت بالصدفة.

\vspace{1.5cm}

مثال على نص مُبرز في سياقات مختلفة:

بعض من أعظم \emph{الاكتشافات} في العلوم تمت بالصدفة.

\textit{بعض من أعظم \emph{الاكتشافات} في العلوم تمت بالصدفة.}

\textbf{بعض من أعظم \emph{الاكتشافات} في العلوم تمت بالصدفة.}
```

[افتح كود LaTeX هذا في Overleaf.](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=text+formatting+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Ctitle%7BBold%2C+Italics+and+Underline%7D%0A%5Cauthor%7BAn+example+from+Overleaf%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0AFirst+example%2C+bold%2C+italics+and+underline%3A%0A%0ASome+of+the+%5Ctextbf%7Bgreatest%7D+discoveries+in+%5Cunderline%7Bscience%7D+were+made+by+%5Ctextbf%7B%5Cemph%7Baccident%7D%7D.%0A%0A%5Cvspace%7B1.5cm%7D%0A%0AExample+of+italicized+text%3A+%0A%0ASome+of+the+greatest+discoveries+in+science+were+made+by+%5Cemph%7Baccident%7D.%0A%0A%5Cvspace%7B1.5cm%7D%0A%0AExample+of+boldface+text%3A%0A%0ASome+of+the+%5Ctextbf%7Bgreatest%7D+discoveries+in+science+were+made+by+accident.%0A%0A%5Cvspace%7B1.5cm%7D%0A%0AExample+of+underlined+text%3A%0A%0ASome+of+the+greatest+discoveries+in+%5Cunderline%7Bscience%7D+were+made+by+accident.%0A%0A%5Cvspace%7B1.5cm%7D%0A%0AExample+of+emphasized+text+in+different+contexts%3A%0A%0ASome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+in+science+were+made+by+accident.%0A%0A%5Ctextit%7BSome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+in+science+were+made+by+accident.%7D%0A%0A%5Ctextbf%7BSome+of+the+greatest+%5Cemph%7Bdiscoveries%7D+in+science+were+made+by+accident.%7D%0A%5Cend%7Bdocument%7D)

## قراءة إضافية

لمزيد من المعلومات، انظر

* [الفقرات والأسطر الجديدة](/latex/ar/asasyat-latex/02-paragraphs-and-new-lines.md)
* [القوائم](/latex/ar/asasyat-latex/04-lists.md)
* [تنسيق الفقرة](/latex/ar/altnsyq/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [فواصل الأسطر والمسافات الفارغة](/latex/ar/altnsyq/05-line-breaks-and-blank-spaces.md)
* [المقدمة التي ليست قصيرة جدًا إلى LaTeX2ε](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/asasyat-latex/03-bold-italics-and-underlining.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.
