Graphics, Figures & TablesTables in Arabic

Information and discussion about graphics, figures & tables in LaTeX documents.
Asma_F
Posts: 20
Joined: Sat Mar 04, 2017 12:12 pm

Tables in Arabic

Post by Asma_F »

This is what happened when I try to update MiKTeX
Attachments
2.png
2.png (15.2 KiB) Viewed 18393 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Tables in Arabic

Post by Stefan Kottwitz »

Perhaps choose another MiKTeX repository (where the update comes from).

Or consider installing TeX Live instead. It's supported by the TeX Users Group, cross-platform including Windows, stable and mature. That's what I use.

Stefan
LaTeX.org admin
Asma_F
Posts: 20
Joined: Sat Mar 04, 2017 12:12 pm

Tables in Arabic

Post by Asma_F »

Process exited normally now but no output shows up.
Attachments
Definitions.log
(59.05 KiB) Downloaded 2725 times
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tables in Arabic

Post by rais »

perhaps you need to switch from arabtex to arabxetex package, if using XeLaTeX.
You should switch from inputenc to fontspec package, too.
Come to think of it, if Arabic is the only language used in your document, you could switch the main font:

Code: Select all

\documentclass[11pt]{article}

\usepackage[a4paper, total={7in, 9in}, showframe]{geometry}
\usepackage[export]{adjustbox}
\usepackage[table]{xcolor}
\usepackage{amssymb}
\usepackage{graphicx}
     
\usepackage{fontspec}
\setmainfont[Script=Arabic]{Amiri}
          
\title{%
    \Huge\textsc{ التأثيرات البيولوجية للإشعاعات المؤينة }}
\date{}
\author{}
     
\begin{document}

\maketitle

\begin{table}[h]
\centering
\begin{adjustbox}{width=0.4\textwidth,center}
  \begin{tabular}[]{|c|c|}
    \hline
                     التعريف & المصطلح
    \\\hline

                     احتمال الإصابةبالمرض العشوائي عند التعرض لجرعة إشعاعية محددة & معامل المخاطرة 
    \\\hline
  \end{tabular}
\end{adjustbox}
{\color{blue!60!black}\rule{0.3\textwidth}{1pc}\hfill\rule{0.3\textwidth}{1pc}}
\end{table}
          
\end{document}
The two blue blocks just demonstrate the horizontal position and size of the {adjustbox} environment.

KR
Rainer
Asma_F
Posts: 20
Joined: Sat Mar 04, 2017 12:12 pm

Tables in Arabic

Post by Asma_F »

Thank you Rainer. It works now but I changed (Amiri ) to (Arial Unicode MS) because the first one caused an error

(! fontspec error: "font-not-found"!! The font "Amiri" cannot be found.)


I faced another problem which is the order of the sentence is not as it should be. I mean in Arabic, sentences start from right to left but when I compile it start from left to right.

I really appreciate any help
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Tables in Arabic

Post by Stefan Kottwitz »

Perhaps use the bidi package.

Stefan
LaTeX.org admin
Asma_F
Posts: 20
Joined: Sat Mar 04, 2017 12:12 pm

Tables in Arabic

Post by Asma_F »

Thank you Stefan. I used the package and the problem solved.

This is my code in case someone faces the same problem.

Code: Select all

\documentclass[11pt]{article}
 \usepackage{polyglossia}

\usepackage[a4paper, total={7in, 9in}]{geometry}
\usepackage[export]{adjustbox}
\usepackage[table]{xcolor}
\usepackage{amssymb}
\usepackage{graphicx}
 
\usepackage{fontspec}
\setmainfont[Script=Arabic]{Calibri}
 



\usepackage{bidi}
\setRTL
\begin{document}
 \title{%
    \Huge\textsc{ {التأثيرات البيولوجية للإشعاعات المؤينة }}}
\date{}
\author{}
\maketitle
 
\begin{table}[h]
\centering
\begin{adjustbox}{width=0.9\textwidth,center}
  \begin{tabular}[]{|c|c|}
    \hline
                     المصطلح & التعريف 
    \\\hline
 
                    معامل المخاطرة &  احتمال الإصابةبالمرض العشوائي عند التعرض لجرعة إشعاعية محددة 
    \\\hline
  \end{tabular}
\end{adjustbox}

\end{table}
 
\end{document}
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Tables in Arabic

Post by rais »

Asma_F wrote: I faced another problem which is the order of the sentence is not as it should be. I mean in Arabic, sentences start from right to left but when I compile it start from left to right.
Sorry about that---I didn't even realize my error---glad you've found a solution.

KR
Rainer
Post Reply