When I using[origin=c], the tabular is corrupted.
and all the next table's was destroyed.
xepersian is a package for bidirectional writing (with XeLaTex).
If I enable \setLTR, the problem is solved.
I want the text vertically centred in cell.
please help me. thanks
% !TEX TS-program = XeLaTeX
\documentclass{article}
\usepackage{graphicx}
%%%\usepackage{bidi}
\usepackage{xepersian}
\settextfont{Arial}
\begin{document}
\setLTR
\begin{tabular}{|c|c|} \hline
\rotatebox{90}{my longer text} & \rotatebox{90}{my text}
\\ \hline
21 & 22 \\ \hline
\end{tabular}
\vspace{10mm}
\begin{tabular}{|c|c|} \hline
\rotatebox[origin=c]{90}{my longer text} & \rotatebox[origin=c]{90}{my text}
\\ \hline
21 & 22 \\ \hline
\end{tabular}
\vspace{10mm}
\setRTL
\begin{tabular}{|c|c|} \hline
\rotatebox[origin=c]{90}{my longer text} & \rotatebox[origin=c]{90}{my text}
\\ \hline
21 & 22 \\ \hline
\end{tabular}
\begin{tabular}{|c|c|} \hline
11 & 12
\\ \hline
21 & 22 \\ \hline
\end{tabular}
\end{document}
I have attached two photos.
pic 1: I enable \setLTR. (text in LTR mode). and i dont have problem.
pic 2: I enable \setRTL (default of xepersian package). and tabular 3,4 were hidden.


[origin=c]is the point around which the text is rotated. Within thetabularenvironment, the text is then shifted horizontally to the centre. So from my understanding,[origin=c]wound give the same result as[origin=b]or no specification. For vertical centring, have a look at this question: https://tex.stackexchange.com/questions/7208/how-to-vertically-center-the-text-of-the-cells If I misunderstand you, please clarify. – Huang_d Jun 16 '17 at 08:56