[XeTeX] RTL paragraphs with XeTeX?

Petr Tomasek tomasek at etf.cuni.cz
Fri Jul 1 17:17:57 CEST 2011


On Fri, Jul 01, 2011 at 04:56:19PM +0200, Petr Tomasek wrote:
> 
> Hello!
> 
> Does anyone know of a simple example of how to do RTL
> paragraphs in XeTeX (no XeLaTeX or bidi package etc.!)
> 
> What does the trick? I tried to fiddle with \parfillskip,

Ok, I found, that the following sort-of does:

-----------------------------------------
\parfillskip=0pt\parindent=0pt
\leavevmode\beginR \hskip 8em Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris luctus accumsan vulputate. Vivamus vel lacus nunc, a dictum lacus. Duis rutrum, odio blandit dapibus facilisis, ipsum neque vestibulum ligula, ut vulputate leo nisl eget dolor. Donec luctus consequat porta. Duis tristique elit in sapien vulputate non pulvinar felis interdum. Praesent auctor eleifend sollicitudin. In hac habitasse platea dictumst. Donec congue congue interdum. Suspendisse vel dictum nulla. Nullam sit amet mi ut libero blandit scelerisque.\hskip 3em plus 1fil\nobreak\hbox{}\break\endR
\par

\leftskip=0pt plus 1fil% simple ragged-right paragraph
\parfillskip=0pt\parindent=0pt
\leavevmode\beginR \hskip 8em Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris luctus accumsan vulputate. Vivamus vel lacus nunc, a dictum lacus. Duis rutrum, odio blandit dapibus facilisis, ipsum neque vestibulum ligula, ut vulputate leo nisl eget dolor. Donec luctus consequat porta. Duis tristique elit in sapien vulputate non pulvinar felis interdum. Praesent auctor eleifend sollicitudin. In hac habitasse platea dictumst. Donec congue congue interdum. Suspendisse vel dictum nulla. Nullam sit amet mi ut libero blandit scelerisque.\hskip 3em plus 1fil\nobreak\hbox{}\break\endR
\par
-----------------------------------------

If someone knows of a better way, please, let me know!
Thanks!

Petr Tomasek

-- 
Petr Tomasek <http://www.etf.cuni.cz/~tomasek>
Jabber: butrus at jabbim.cz

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EA 355:001  DU DU DU DU
EA 355:002  TU TU TU TU
EA 355:003  NU NU NU NU NU NU NU
EA 355:004  NA NA NA NA NA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the XeTeX mailing list