> 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/02-paragraphs-and-new-lines.md).

# الفقرات والأسطر الجديدة

## مقدمة

تقدّم هذه المقالة *أساسيات* تنسيق فقرات LaTeX، بما في ذلك كيفية تغيير محاذاة النص. يمكن العثور على معلومات أكثر تفصيلاً وأمثلة إضافية في المقالات [محاذاة النص](/latex/ar/altnsyq/06-text-alignment.md) و [تنسيق الفقرات](/latex/ar/altnsyq/04-articles-how-to-change-paragraph-spacing-in-latex.md).

## مثال أول

لنبدأ بمثال يقوم بتنسيق فقرتين متمركزتين بكتابتهما داخل `center` بيئة. لاحظ كيف تبدأ فقرة جديدة بإدراج سطر فارغ بينهما—مع أن هذه طريقة شائعة الاستخدام، فهي ليست الطريقة الوحيدة لبدء فقرة جديدة.

```latex
\begin{center}
المثال 1: الفقرة التالية (الموضوعة بين علامتي اقتباس) هي
مثال على المحاذاة المتمركزة باستخدام بيئة center.

``La\TeX{} هو نظام لإعداد المستندات ولغة ترميز للمستندات
المستندات. يستخدم \LaTeX{} برنامج التنضيد \TeX{} لتنسيق
مخرجاته، وهو نفسه مكتوب بلغة الماكرو \TeX{}.
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل
يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}."
\end{center}
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+paragraph+formatting\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bcenter%7D%0AExample+1%3A+The+following+paragraph+%28given+in+quotes%29+is+an+%0Aexample+of+centred+alignment+using+the+center+environment.+%0A%0A%60%60La%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%22%0A%5Cend%7Bcenter%7D%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![مثال على فقرة متمركزة في LaTeX](/files/e5971e761a038b0a30cbff8427a8d08d3717563a)

## بدء فقرة جديدة

كما ذُكر أعلاه، تتمثل إحدى طرق بدء فقرة جديدة في إدراج سطر فارغ، لكن المقتطف البرمجي التالي يوضح حلاً بديلاً يستخدم الأمر `\par` الأمر:

```latex
هذا نص موجود في الفقرة الأولى.
هذا نص موجود في الفقرة الأولى.
هذا نص موجود في الفقرة الأولى.\par
هذا نص موجود في الفقرة الثانية.
هذا نص موجود في الفقرة الثانية.
هذا نص موجود في الفقرة الثانية.
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Starting+a+new+paragraph\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+text+contained+in+the+first+paragraph.+%0AThis+is+text+contained+in+the+first+paragraph.+%0AThis+is+text+contained+in+the+first+paragraph.%5Cpar%0AThis+is+text+contained+in+the+second+paragraph.+%0AThis+is+text+contained+in+the+second+paragraph.%0AThis+is+text+contained+in+the+second+paragraph.%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![استخدام الأمر \par لإنشاء فقرة](/files/cd21e5a7fd32fa2b42926acf8cb749b20e45842f)

## محاذاة الفقرات

افتراضياً تكون الفقرات في LaTeX مضبوطة بالكامل، أي بمحاذاة كلٍ من الهامشين الأيسر والأيمن. إذا كنت ترغب في تنضيد *غير مضبوطة* يمكنك استخدام `flushleft` أو `flushright` البيئات.

### بيئتي flushleft وflushright

يوضح المثال التالي تنضيد فقرة داخل `flushleft` و `flushright` البيئات—ولرؤية مثال على `center` بيئة، انظر القسم [مثال أول](#a-first-example).

```latex
\section*{فقرة منضدة بمحاذاة اليسار}

\begin{flushleft}
La\TeX{} هو نظام لإعداد المستندات ولغة ترميز للمستندات
المستندات. يستخدم \LaTeX{} برنامج التنضيد \TeX{} لتنسيق
مخرجاته، وهو نفسه مكتوب بلغة الماكرو \TeX{}.
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل
يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.
\end{flushleft}

\section*{فقرة منضدة بمحاذاة اليمين}

\begin{flushright}
La\TeX{} هو نظام لإعداد المستندات ولغة ترميز للمستندات
المستندات. يستخدم \LaTeX{} برنامج التنضيد \TeX{} لتنسيق
مخرجاته، وهو نفسه مكتوب بلغة الماكرو \TeX{}.
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل
يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.
\end{flushright}
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+flushleft+and+flushright\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%2A%7BA+paragraph+typeset+flush+left%7D%0A%0A%5Cbegin%7Bflushleft%7D%0ALa%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%5Cend%7Bflushleft%7D%0A%0A%5Csection%2A%7BA+paragraph+typeset+flush+right%7D%0A%0A%5Cbegin%7Bflushright%7D%0ALa%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%5Cend%7Bflushright%7D%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![بيئات flushleft وflushright في LaTeX](/files/bae25a411be103584c565ff1942d14493cc46f21)

### \raggedright و\raggedleft

بديل لاستخدام بيئات مثل `flushleft`, `flushright` أو `center` هي ما يُسمّى بأوامر «التبديل»:

* `\raggedright`، وهو بديل لاستخدام `flushleft` البيئة
* `\raggedleft`، وهو بديل لاستخدام `flushright` البيئة
* `\centering`، وهو بديل لاستخدام `center` البيئة

تغيّر أوامر التبديل هذه محاذاة النص من الموضع الذي تُدرج فيه حتى نهاية المستند—ما لم تُقصر آثارها على مجموعة أو يغيّرها أمر تبديل آخر.

في المثال التالي، تكون آثار `\raggedright`, `\raggedleft` و `\centering` محلية لأنها تُستخدم داخل المجموعة التي ينشئها `\begingroup ... \endgroup`. بالإضافة إلى ذلك، لاحظ أنه في كل حالة يتبع نص الفقرة سطر فارغ، قبل الأمر `\endgroup` ، الذي يجعل LaTeX ينضد الفقرة بينما تكون الإعدادات المطبقة بواسطة `\raggedright`, `\raggedleft` و `\centering` ما تزال سارية.

```latex
\section*{فقرة منضدة بضبط كامل}
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.

\section*{فقرة منضدة باستخدام \texttt{\string\raggedright}}

\begingroup
\raggedright
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.

\endgroup

\section*{فقرة منضدة باستخدام \texttt{\string\raggedleft}}

\begingroup
\raggedleft
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.

\endgroup

\section*{فقرة منضدة باستخدام \texttt{\string\centering}}

\begingroup
\centering
\LaTeX{} ليس اسم برنامج تنضيد معيّن (قابل للتنفيذ)، بل يشير إلى مجموعة الأوامر (ماكروهات \TeX{}) التي تشكل الترميز
الاصطلاحات المستخدمة لتنسيق مستندات \LaTeX{}.

\endgroup
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Non-justified+paragraph+formatting+options\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%2A%7BA+fully+justified++typeset+paragraph%7D+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Craggedright%7D%7D%0A%0A%5Cbegingroup%0A%5Craggedright+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Craggedleft%7D%7D%0A%0A%5Cbegingroup%0A%5Craggedleft+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Ccentering%7D%7D%0A%0A%5Cbegingroup%0A%5Ccentering+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![خيارات محاذاة متنوعة لتنضيد فقرة LaTeX](/files/fa8ec91bc39e3737fae0d6ba3849e92cb488904e)

للمزيد من المعلومات التفصيلية وأمثلة محاذاة النص، انظر [مقال Overleaf عن محاذاة النص](/latex/ar/altnsyq/06-text-alignment.md) الذي يناقش أيضاً استخدام [حزمة LaTeX ragged2e](https://ctan.org/pkg/ragged2e?lang=en) لتنضيد النص غير المضبوط وضبط تقسيم الكلمات.

## إزاحة الفقرات

افتراضياً تُزاح الفقرات الجديدة عادةً بمقدار يتحكم فيه معرّف يُسمّى `\parindent` الذي يمكن تعيين قيمته باستخدام الأمر `\setlength`؛ على سبيل المثال:

```latex
\setlength{\parindent}{20pt}
```

يعيّن `\parindent` إلى 20pt. ويمكنك تجنب الإزاحة بتعيين `\parindent` إلى 0pt (أو 0mm، 0cm إلخ) أو باستخدام الأمر `\noindent` في بداية الفقرة. افتراضياً لا تُزاح أول فقرة داخل قسم من المستند كما هو موضح في المثال التالي:

```latex
\setlength{\parindent}{20pt}

\section*{هذا قسم}
\textbf{الفقرة الأولى} من قسم، وكما ترى، فهي غير مزاحة. هذا مزيد من النص في الفقرة. هذا مزيد من النص في الفقرة.

\textbf{الفقرة الثانية}. كما ترى فهي مزاحة. هذا مزيد من النص في الفقرة. هذا مزيد من النص في الفقرة.

\noindent\textbf{الفقرة الثالثة}. هذه أيضاً غير مزاحة بسبب استخدام \texttt{\string\noindent}. هذا مزيد من النص في الفقرة. هذا مزيد من النص في الفقرة.  القيمة الحالية لـ \verb|\parindent| هي \the\parindent. هذا مزيد من النص في الفقرة.
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+paragraph+indentation\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csetlength%7B%5Cparindent%7D%7B20pt%7D%0A%0A%5Csection%2A%7BThis+is+a+section%7D%0A%5Ctextbf%7BFirst+paragraph%7D+of+a+section+which%2C+as+you+can+see%2C+is+not+indented.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.%0A%0A%5Ctextbf%7BSecond+paragraph%7D.+As+you+can+see+it+is+indented.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.+%0A%0A%5Cnoindent%5Ctextbf%7BThird+paragraph%7D.+This+too+is+not+indented+due+to+use+of+%5Ctexttt%7B%5Cstring%5Cnoindent%7D.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.++The+current+value+of+%5Cverb%7C%5Cparindent%7C+is+%5Cthe%5Cparindent.+This+is+more+text+in+the+paragraph.%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![عرض إزاحة فقرات LaTeX](/files/02e8a5b8d881e73698d4677efbc75e1d51faa87a)

### ملاحظات حول الأوامر المتعلقة بالإزاحة

تتحكم ثلاثة أوامر في إزاحة الفقرة أو تؤثر عليها:

* `\parindent`: معرّف يخزن الحجم الحالي لإزاحة الفقرة
* `\indent`: يعتمد تأثير هذا الأمر على الموضع الذي يُستخدم فيه:
  * في وضع أفقي (داخل فقرة أو `\hbox`) أو في الوضع الرياضي يدرج فراغاً (مربعاً فارغاً) بعرض `\parindent`
  * في وضع عمودي (بين الفقرات أو في `\vbox`) يبدأ فقرة جديدة مزاحة
* `\noindent`: يعتمد تأثير هذا الأمر أيضاً على الموضع الذي يُستخدم فيه:
  * في وضع عمودي (بين الفقرات أو في `\vbox`) فإنه يبدأ أيضاً فقرة جديدة *غير مزاحة* فقرة
  * في وضع أفقي (داخل فقرة أو `\hbox`) أو في الوضع الرياضي فلا تأثير له: يتم تجاهله

يوضح المثال التالي `\indent`:

```latex
\documentclass{article}
% استخدام حزمة geometry مع
% حجم صفحة صغير لإنشاء الرسم التوضيحي للمقال
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\begin{document}
\noindent فقرة جديدة مع بعض النص، ثم أمر \verb|\indent|\indent. بعد ذلك، بعض الرياضيات داخل السطر والتي تحتوي أيضاً على إزاحة $y\indent x$. كما يعمل \verb|\indent| أيضاً عند استخدامه في \verb|\hbox| مثل \verb|\hbox{A\indent B}| والذي ينتج \hbox{A\indent B}.
\end{document}
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+the+%5Cindent+command\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cnoindent+A+new+paragraph+with+some+text%2C+then+an+%5Cverb%7C%5Cindent%7C%5Cindent+command.+Next%2C+some+inline+math+which+also+has+an+indent+%24y%5Cindent+x%24.+%5Cverb%7C%5Cindent%7C+also+works+when+used+in+an+%5Cverb%7C%5Chbox%7C+such+as+%5Cverb%7C%5Chbox%7BA%5Cindent+B%7D%7C+which+produces+%5Chbox%7BA%5Cindent+B%7D.%0A%5Cend%7Bdocument%7D)

ينتج هذا المثال المخرجات التالية:

![عرض الأمر \indent](/files/055dbe683ac960dfe15385e9f957ac506bf45f00)

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

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

* [تنسيق الفقرات](/latex/ar/altnsyq/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [محاذاة النص](/latex/ar/altnsyq/06-text-alignment.md)
* [الأطوال في LaTeX](/latex/ar/altnsyq/01-lengths-in-latex.md)
* [فواصل الأسطر والمسافات الفارغة](/latex/ar/altnsyq/05-line-breaks-and-blank-spaces.md)
* [القوائم](/latex/ar/asasyat-latex/04-lists.md)
* [الخط العريض والمائل والتحته خط](/latex/ar/asasyat-latex/03-bold-italics-and-underlining.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/02-paragraphs-and-new-lines.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.
