> 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/akhtaa-latex/01-h-float-specifier-changed-to-ht.md).

# !h' تم تغيير محدد العائم إلى !ht'

وهذا هو الحال عندما تواجه LaTeX مشكلة في وضع العنصر العائم الخاص بك (مثل صورة أو شكل من أي نوع) في الموضع الذي حددته في [مُحدِّد العناصر العائمة](/latex/ar/alashkal-waljdawl/02-positioning-images-and-tables.md) أي **`ht`** في **`\begin{figure}[ht]`** . تحاول LaTeX وضع الأشكال بطريقة تتوافق مع تدفق النص لتجنب الفجوات الكبيرة وتكدّس الفقرات. يتيح لنا معامل تحديد الموضع تحكمًا أكبر في مكان وضع الشكل. خيارات التموضع المختلفة المتاحة لنا مذكورة أدناه:

| المُحدِّد | الإذن                                                                                                                         |
| --------- | ----------------------------------------------------------------------------------------------------------------------------- |
| h         | ضع العنصر العائم *هنا*، أي، *تقريبًا* في النقطة نفسها التي يظهر فيها في النص المصدر (ولكن ليس *بالضبط* في الموضع)             |
| t         | ضعه عند *أعلى* الصفحة.                                                                                                        |
| b         | ضعه عند *الأسفل* الصفحة.                                                                                                      |
| ص         | وضعه على صفحة خاصة *page* للعناصر العائمة فقط.                                                                                |
| !         | تجاوز المعلمات الداخلية التي تستخدمها LaTeX لتحديد مواضع عائمة «جيدة».                                                        |
| H         | يضع العنصر العائم في الموضع نفسه تمامًا في كود LaTeX. يتطلب *float* الحزمة (*\usepackage{float}*). وهذا يعادل إلى حد ما *h!*. |

على الرغم من أن LaTeX ستبذل قصارى جهدها لاتباع التموضع الذي نحدده، فقد لا يكون من الممكن دائمًا الالتزام به. عندما تواجه LaTeX صعوبة في وضع العنصر العائم في الموقع المطلوب، فقد تتجاوز محدد التموضع لصالح محدد تموضع جديد لا يقطع تدفق النص. وعند حدوث ذلك، ستظهر رسالة خطأ كما هو موضح أدناه.

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\begin{document}

\section{Introduction}
\vspace{10cm}

\begin{figure}[h]
    \centering
    \includegraphics{image.PNG}
\end{figure}

\end{document}
```

سيؤدي هذا إلى إنشاء رسالة خطأ تبدو كما يلي

main.tex، السطر 12

تم تغيير محدد العائم \`h' إلى \`ht'.

مُحدِّد العناصر العائمة **`h`** بحد ذاته يكون عادةً أمرًا صارمًا جدًا بالنسبة إلى LaTeX. ولحل هذا الخطأ، من الأفضل تخفيف هذا الطلب إلى **`ht`** أي ضع العنصر العائم إما *هنا* أو عند *أعلى* الصفحة. ويمكن تخفيف هذا الطلب أكثر إلى **`htbp`** أو **`!htbp`** إذا لزم الأمر. وإذا كنت ترغب في تجاوز هذا الاستبدال وجعل الشكل يوضع في موقع محدد في الصفحة، فهناك بعض الطرق المفيدة للقيام بذلك موضحة أدناه.

**باستخدام حزمة float:**

إذا قمنا بتضمين **`float`** الحزمة في المقدمة الخاصة بنا، فبدلاً من استخدام **`h`** لتحديد *هنا* في خيار محدد العناصر العائمة لدينا، يمكننا استخدام **`H`**&#x627;لأقوى، والذي سيضمن بقاء الشكل في مكانه.

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{float}

\begin{document}

\section{Introduction}

\begin{figure}[H]
    \centering
    \includegraphics{image.PNG}
\end{figure}

\end{document}
```

**باستخدام حزمة placeins:**

باستخدام **`placeins`** الحزمة، يمكننا استخدام **`\FloatBarrier`** الأمر. أينما وضعنا أمر **`\FloatBarrier`** ، سيتم وضع حاجز لا تستطيع الأشكال المرور عبره. وهذا يعني أنه إذا وضعنا أمر **`\FloatBarrier`** على جانبي الشكل، فسيتم تثبيته في مكانه

```latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{placeins}

\begin{document}

\section{Introduction}

\FloatBarrier
\begin{figure}
    \centering
    \includegraphics{image.PNG}
\end{figure}

\FloatBarrier
\end{document}
```

**ضبط المعلمات:**

لإخبار LaTeX بوضع الأشكال داخل النص وليس في نهاية الفصل (وهو السلوك الافتراضي)، نقوم بضبط معلمات «تموضع العناصر العائمة» في مقدمة المستند. فيما يلي بعض القيم المفيدة.

```latex
\renewcommand\topfraction{.9}
\renewcommand\textfraction{0.35}
\renewcommand\floatpagefraction{0.8}
```


---

# 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/akhtaa-latex/01-h-float-specifier-changed-to-ht.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.
