summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xelatex/bidi-atbegshi/test-foreground-RTL.tex
blob: 985a7eb4c66b6738c04e5e7c1fbc7aff369e2202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\documentclass{article}
\usepackage{bidi-atbegshi}
\usepackage{ptext}
\usepackage{xepersian}
\settextfont{IRXLotus}
\setbox0\hboxR{\Huge\textbf{چپ بالا}}
\setbox1\hboxR{\Huge\textbf{راست بالا}}
\setbox2\hboxR{\Huge\textbf{چپ پایین}}
\setbox3\hboxR{\Huge\textbf{راست پایین}}
\AtBeginShipout{%
\AtBeginShipoutUpperRightForeground{%
\put(-\wd1,-\ht1){\box1}
}%
\AtBeginShipoutUpperLeftForeground{%
\put(0,-\ht0){\usebox0}
}%
\AtBeginShipoutLowerRightForeground{%
\put(-\wd3,\dp3){\usebox3}
}%
\AtBeginShipoutLowerLeftForeground{%
\put(0,\dp2){\usebox2}
}%
}
\begin{document}
\ptext
\end{document}