LaTeX forum ⇒ Graphics, Figures & TablesTables in Arabic Topic is solved

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

Postby Asma_F » Mon Apr 17, 2017 10:11 am

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 8370
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Apr 17, 2017 11:30 am

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
Site admin

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

Postby Asma_F » Mon Apr 17, 2017 4:57 pm

Process exited normally now but no output shows up.
Attachments
Definitions.log
(59.05 KiB) Downloaded 16 times

rais
Posts: 146
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Tue Apr 18, 2017 11:38 pm

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:
  1. \documentclass[11pt]{article}
  2.  
  3. \usepackage[a4paper, total={7in, 9in}, showframe]{geometry}
  4. \usepackage[export]{adjustbox}
  5. \usepackage[table]{xcolor}
  6. \usepackage{amssymb}
  7. \usepackage{graphicx}
  8.  
  9. \usepackage{fontspec}
  10. \setmainfont[Script=Arabic]{Amiri}
  11.  
  12. \title{%
  13. \Huge\textsc{ التأثيرات البيولوجية للإشعاعات المؤينة }}
  14. \date{}
  15. \author{}
  16.  
  17. \begin{document}
  18.  
  19. \maketitle
  20.  
  21. \begin{table}[h]
  22. \centering
  23. \begin{adjustbox}{width=0.4\textwidth,center}
  24. \begin{tabular}[]{|c|c|}
  25. \hline
  26. التعريف & المصطلح
  27. \\\hline
  28.  
  29. احتمال الإصابةبالمرض العشوائي عند التعرض لجرعة إشعاعية محددة & معامل المخاطرة
  30. \\\hline
  31. \end{tabular}
  32. \end{adjustbox}
  33. {\color{blue!60!black}\rule{0.3\textwidth}{1pc}\hfill\rule{0.3\textwidth}{1pc}}
  34. \end{table}
  35.  
  36. \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

Postby Asma_F » Fri Apr 21, 2017 12:05 pm

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: 8370
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Apr 21, 2017 3:50 pm

Perhaps use the bidi package.

Stefan
Site admin

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

Postby Asma_F » Fri Apr 21, 2017 5:23 pm

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

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

  1. \documentclass[11pt]{article}
  2. \usepackage{polyglossia}
  3.  
  4. \usepackage[a4paper, total={7in, 9in}]{geometry}
  5. \usepackage[export]{adjustbox}
  6. \usepackage[table]{xcolor}
  7. \usepackage{amssymb}
  8. \usepackage{graphicx}
  9.  
  10. \usepackage{fontspec}
  11. \setmainfont[Script=Arabic]{Calibri}
  12.  
  13.  
  14.  
  15.  
  16. \usepackage{bidi}
  17. \setRTL
  18. \begin{document}
  19. \title{%
  20. \Huge\textsc{ {التأثيرات البيولوجية للإشعاعات المؤينة }}}
  21. \date{}
  22. \author{}
  23. \maketitle
  24.  
  25. \begin{table}[h]
  26. \centering
  27. \begin{adjustbox}{width=0.9\textwidth,center}
  28. \begin{tabular}[]{|c|c|}
  29. \hline
  30. المصطلح & التعريف
  31. \\\hline
  32.  
  33. معامل المخاطرة & احتمال الإصابةبالمرض العشوائي عند التعرض لجرعة إشعاعية محددة
  34. \\\hline
  35. \end{tabular}
  36. \end{adjustbox}
  37.  
  38. \end{table}
  39.  
  40. \end{document}

rais
Posts: 146
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Apr 22, 2017 8:11 pm

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


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests