تعذر تحديد حجم الرسم (لا يوجد BoundingBox)
! LaTeX Error: Cannot determine size of graphic (no BoundingBox).
ماذا يعني هذا الخطأ
لم يستطع LaTeX تحديد أبعاد رسم مُدرج لأن الملف يفتقر إلى تعليق BoundingBox. يحدث ذلك عند إدراج ملفات EPS في وضع pdfLaTeX، أو عندما يكون ملف الصورة تالفًا.
التجميع الذكي في FormaTeX
يكتشف التجميع الذكي في FormaTeX ملفات EPS المُدرجة مع pdfLaTeX ويحوّلها تلقائيًا باستخدام epstopdf قبل التجميع.
الأسباب الشائعة
- إدراج ملف .eps مع pdflatex (الذي يتطلب .pdf أو .png أو .jpg)
- ملف EPS يفتقر إلى تعليق الترويسة %%BoundingBox:
- ملف صورة تالف أو بحجم صفر بايت
- استخدام سير عمل dvips مع محاولة إدراج ملف PDF
كيفية الإصلاح
حوّل ملفات EPS إلى PDF باستخدام epstopdf (نفّذ epstopdf figure.eps للحصول على figure.pdf). ومع pdflatex، استخدم ملفات .pdf أو .png أو .jpg. حمّل حزمة epstopdf لأتمتة هذا التحويل أثناء التجميع.
أمثلة على الشيفرة
\documentclass{article}
\usepackage{graphicx}
\begin{document}
% pdflatex cannot use EPS without conversion
\includegraphics{figure.eps}
\end{document}\documentclass{article}
\usepackage{graphicx}
\usepackage{epstopdf} % auto-converts EPS to PDF
\begin{document}
\includegraphics{figure.eps} % epstopdf converts it on-the-fly
% Or manually convert first:
% \includegraphics{figure.pdf}
\end{document}أخطاء ذات صلة
جرّب الحل مباشرة
الصق شيفرة LaTeX في الـ playground وجمّعها فورًا.

