2

For the shown MWE, upon using the sidewaystable", the page appears blank, yet upon using ordinary table environment, all works fine. However, I need to usesidewaystable` or landscape environment.

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,margin=2.5cm,bindingoffset=0.5cm]{geometry} 
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage[hidelinks,colorlinks=true,breaklinks,allcolors=blue]{hyperref} 

\usepackage[bidi=basic,layout=lists.tabular]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}

\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{amiri}
\babelfont[english]{rm}{Times New Roman}

\usepackage[table]{xcolor} 
\usepackage{tabu,multirow} 
\usepackage{array} 
\newcolumntype{?}[1]{!{\vrule width #1}} 
\usepackage{booktabs}
\setlength{\belowrulesep}{0pt}
\setlength{\belowbottomsep}{0pt}
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\abovetopsep}{0pt}
\usepackage{makecell} 
\usepackage{boldline} 


\title{jhhjjhhj}
\author{}
\date{}

\begin{document}

\chapter{شكر وتقدير} 

\begin{sidewaystable}
\setlength\arrayrulewidth{1pt} 
\begin{center}
\caption{أمثلة لبعض الكلمات المتشابهة باللغات الناقلة}
\rowcolors{2}{white}{gray!25}
\begin{tabular}{?{1mm}c|c|c|>{\centering\arraybackslash}m{5cm}?{1mm}c|} 
\rowcolor{white}
\toprule[1mm] 
\multicolumn{3}{?{1mm}c|}{\textbf{اللغة}} & \multirow{2}{*}{} \\ \cmidrule[1.25pt]{1-3} 
\rowcolor{white} 
العربية &
العبرانية &
وجه التشابة &
\multirow{-2}{*}{\textbf{ملاحظات}} 
\\
\midrule[1.5pt]
مَلِك & ميلْخِ & الحروف والمعنى & -\\
\hline
مُلُوكْ & مَلاخيمْ  & الحروف والمعنى & -\\
\hline
نَفْسي & نَفْشِيْ   & الحروف والمعنى & -\\
\hline
سَبْعَة & شِبْعَاهْ & الحروف والمعنى & -\\
\hline
يَقُومُ & ياقُومْ   & الحروف والمعنى & -\\
\hline
يَرحَضُ & يِرْحَاصْ & الحروف والمعنى & -\\
\hline
ثَلاَثَةُ   & شَلوشَاهْ & الحروف والمعنى & -\\
\hline
مَلَك   & ماَلاَخْ  & الحروف والمعنى & -\\
\hline
يَدُهُ  & ياَدو & الحروف والمعنى & -\\
\hline
إِيْايَ & أوتِيْ    & المعنى & -\\
\hline
إِيَّاكَ    & أوتْخَ    & المعنى & -\\
\hline
أثنْاَنِ    & شَنَايِمْ & المعنى & -\\
\hline
يحرق    & يسْروفْ   & الوزن & على وزن "يَفْعُلُ" مع فرق بسيط\\
\hline
يغسل    & يَخَبْيسْ & الوزن & على وزن "يُفَعِلُ" مع فرق بسيط\\
\hline
تَكَلَّمْتُ & دَبَّرْتِيْ   & الوزن & على وزن "فَعْلْتُ" مع فرق بسيط\\
\hline
أنْقَطَعَ   & نِخْرَاتْ & المعنى & النون هي الزائدة في انفعل لفظاً ومعنى\\
\hline
يُصَلِي & يِتْپَلَيلْ   & الوزن & تقريباً على وزن "يَتَفَعْلُ" فهو في الأصل ثلاثي (أي من ثلاثة حروف) مع إضافة حرف المضارعة وحرف التاء بالإضافة لتشديد عين الفعل\\
\bottomrule[1mm] 
\end{tabular}
\label{tab}
\end{center}
\end{sidewaystable}
\end{document}

Page1 Page2

3

If I simplify your example a bit the table appears but in the wrong place going up not down from the top of the page,

enter image description here

\documentclass[a4paper,12pt,twoside]{book}

\usepackage{rotating}


\usepackage[bidi=basic,layout=lists.tabular]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}

\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{amiri}
\babelfont[english]{rm}{Times New Roman}

\title{jhhjjhhj}
\author{}
\date{}

\begin{document}

\chapter{CCCC} 

\begin{sidewaystable}
\setlength\arrayrulewidth{1pt} 
\caption{capppp}

xxx

\begin{tabular}{c|c|c|c|p{5cm}|c|} 
aaa&bbb&ccc&dd&eee\\
1&2&3&4&5
\end{tabular}
\label{tab}

\end{sidewaystable}
\end{document}

So it seems that the newish bidi code in babel and the rotating package are not agreeing somewhere on which way is up.

This isn't really an answer, sorry but I wanted to post the full example, I'll ping Javier to ask if babel or rotating is at fault here.

A workaround might be to use rotatebox and some vspace to keep things visible:

enter image description here

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,margin=2.5cm,bindingoffset=0.5cm]{geometry} 
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage[hidelinks,colorlinks=true,breaklinks,allcolors=blue]{hyperref} 

\usepackage[bidi=basic,layout=lists.tabular]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}

\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{amiri}
\babelfont[english]{rm}{Times New Roman}

\usepackage[table]{xcolor} 
\usepackage{multirow} 
\usepackage{array} 
\newcolumntype{?}[1]{!{\vrule width #1}} 
\usepackage{booktabs}
\setlength{\belowrulesep}{0pt}
\setlength{\belowbottomsep}{0pt}
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\abovetopsep}{0pt}
\usepackage{makecell} 
\usepackage{boldline} 


\title{jhhjjhhj}
\author{}
\date{}

\begin{document}

\chapter{شكر وتقدير} 

\begin{table}

\vspace{-.6\textheight}
\rotatebox{90}{\begin{minipage}{.7\textheight}
\setlength\arrayrulewidth{1pt} 
\caption{أمثلة لبعض الكلمات المتشابهة باللغات الناقلة}
\rowcolors{2}{white}{gray!25}
\begin{tabular}{?{1mm}c|c|c|>{\centering\arraybackslash}m{5cm}?{1mm}c|} 
\rowcolor{white}
\toprule[1mm] 
\multicolumn{3}{?{1mm}c|}{\textbf{اللغة}} & \multirow{2}{*}{} \\ \cmidrule[1.25pt]{1-3} 
\rowcolor{white} 
العربية &
العبرانية &
وجه التشابة &
\multirow{-2}{*}{\textbf{ملاحظات}} 
\\
\midrule[1.5pt]
مَلِك & ميلْخِ & الحروف والمعنى & -\\
\hline
مُلُوكْ & مَلاخيمْ  & الحروف والمعنى & -\\
\hline
نَفْسي & نَفْشِيْ   & الحروف والمعنى & -\\
\hline
سَبْعَة & شِبْعَاهْ & الحروف والمعنى & -\\
\hline
يَقُومُ & ياقُومْ   & الحروف والمعنى & -\\
\hline
يَرحَضُ & يِرْحَاصْ & الحروف والمعنى & -\\
\hline
ثَلاَثَةُ   & شَلوشَاهْ & الحروف والمعنى & -\\
\hline
مَلَك   & ماَلاَخْ  & الحروف والمعنى & -\\
\hline
يَدُهُ  & ياَدو & الحروف والمعنى & -\\
\hline
إِيْايَ & أوتِيْ    & المعنى & -\\
\hline
إِيَّاكَ    & أوتْخَ    & المعنى & -\\
\hline
أثنْاَنِ    & شَنَايِمْ & المعنى & -\\
\hline
يحرق    & يسْروفْ   & الوزن & على وزن "يَفْعُلُ" مع فرق بسيط\\
\hline
يغسل    & يَخَبْيسْ & الوزن & على وزن "يُفَعِلُ" مع فرق بسيط\\
\hline
تَكَلَّمْتُ & دَبَّرْتِيْ   & الوزن & على وزن "فَعْلْتُ" مع فرق بسيط\\
\hline
أنْقَطَعَ   & نِخْرَاتْ & المعنى & النون هي الزائدة في انفعل لفظاً ومعنى\\
\hline
يُصَلِي & يِتْپَلَيلْ   & الوزن & تقريباً على وزن "يَتَفَعْلُ" فهو في الأصل ثلاثي (أي من ثلاثة حروف) مع إضافة حرف المضارعة وحرف التاء بالإضافة لتشديد عين الفعل\\
\bottomrule[1mm] 
\end{tabular}
\label{tab}
\end{minipage}}

\vspace{.6\textheight}
\end{table}
\end{document}
| improve this answer | |
  • If you may also consider this question, where the same issue occurs in landscape environment, so if you may please also ask Javier regarding the landscape/pdflandscape package as well tex.stackexchange.com/questions/520471/… – Silva Dec 25 '19 at 21:59
  • @Silva I haven't done anything about this today (It's Christmas:-) It may be best if you raise the issue here github.com/latex3/babel/issues I could do it but I can't read Arabic so testing or discussing any examples is a bit tricky for me. – David Carlisle Dec 25 '19 at 22:03
  • This is my first time on GitHUB, I would be grateful if you followup with me since I need this issue resolved ASAP. github.com/latex3/babel/issues/42#issue-542399075 – Silva Dec 26 '19 at 0:43
  • @ David, will this solution work with "Longtable" for multipage tables, also does it work if I need landscape page? since a fix was not found till now, so i may need to resort to your solution, although I was hoping for a fix!! – Silva Jan 23 at 6:59
  • @Silva you could try it and let me know... The issue goes deeper than babel and isn't easy to get all parts of the stack to be fixed and be compatible, especially as the underlying right to left primitives are very different on luatex than they are in xetex and pdftex I raised an issue here github.com/latex3/latex2e/issues/241 (but no fixes yet, sorry) – David Carlisle Jan 23 at 7:52
0

Regarding this unresolved issue, the workaround proposed by "Ulrike Fischer" as shown in Change page layout mid-document in lualatex can be used where it fully resolves this problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.