<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>Hello, today I did several hacks for different tabular packages in LATeX that makes them to typeset tables from right to left, there is a problem with longtable.sty that it does not break tables. I thought you might find the codes useful. I would be very happy if someone could give me a hint to fix longtable.sty issue.<br><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\@ifpackageloaded{stabular}{%<br>\def\@stabular{\if@RTL\global\@RTLtabtrue\fi<br> \leavevmode \bgroup \if@RTLtab\beginR \fi<br> \let\@acol\@tabacol
<br> \let\@classz\@tabclassz
<br> \let\@classiv\@tabclassiv \let\\\@tabularcr\@stabarray}<br>\def\endstabular{\crcr\egroup\if@RTLtab\egroup\endR\egroup\fi<br> \egroup \if@RTLtab\endR\fi\egroup<br> \global\@RTLtabfalse}
<br>\expandafter \let \csname endstabular*\endcsname = \endstabular<br>\def\@sarray[#1]#2{%
<br> \bgroup
<br> \setbox\@arstrutbox\hbox{%
<br> \vrule \@height\arraystretch\ht\strutbox
<br> \@depth\arraystretch \dp\strutbox
<br> \@width\z@}%
<br> \@mkpream{#2}%
<br> \edef\@preamble{%
<br> \ialign \noexpand\@halignto
<br> \bgroup \@arstrut \@preamble \tabskip\z@skip \cr}%
<br> \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
<br> \let\tabularnewline\\%
<br>% \let\par\@empty
<br> \let\@sharp##%
<br> \set@typeset@protect
<br> \lineskip\z@skip\baselineskip\z@skip<br> \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi
<br> \@preamble}<br>}{}<br><br>\@ifpackageloaded{longtable}{%<br>\def\LT@makecaption#1#2#3{%<br> \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%<br> \sbox\@tempboxa{\if@RTL\beginR\fi#1{#2: }#3\if@RTL\endR\fi}%<br> \ifdim\wd\@tempboxa>\hsize<br> #1{#2: }#3%<br> \else<br> \hbox to\hsize{\hfil\box\@tempboxa\hfil}%<br> \fi<br> \endgraf\vskip\baselineskip}%<br> \hss}}}<br><br>\def\longtable{\if@RTL\global\@RTLtabtrue\fi%<br> \par<br> \ifx\multicols\@undefined<br> \else<br> \ifnum\col@number>\@ne<br> \@twocolumntrue<br> \fi<br> \fi<br> \if@twocolumn<br> \LT@err{longtable not in 1-column mode}\@ehc<br> \fi<br> \begingroup \if@RTLtab\beginR \fi<br> \@ifnextchar[\LT@array{\LT@array[x]}}<br><br>\def\LT@array[#1]#2{%<br> \refstepcounter{table}\stepcounter{LT@tables}%<br> \if l#1%<br> \LTleft\z@ \LTright\fill<br> \else\if r#1%<br> \LTleft\fill \LTright\z@<br> \else\if c#1%<br> \LTleft\fill \LTright\fill<br> \fi\fi\fi<br> \let\LT@mcol\multicolumn<br> \let\LT@@tabarray\@tabarray<br> \let\LT@@hl\hline<br> \def\@tabarray{%<br> \let\hline\LT@@hl<br> \LT@@tabarray}%<br> \let\\\LT@tabularcr\let\tabularnewline\\%<br> \def\newpage{\noalign{\break}}%<br> \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%<br> \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%<br> \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption<br> \@tempdima\ht\strutbox<br> \let\@endpbox\LT@endpbox<br> \ifx\extrarowheight\@undefined<br> \let\@acol\@tabacol<br> \let\@classz\@tabclassz \let\@classiv\@tabclassiv<br> \def\@startpbox{\vtop\LT@startpbox}%<br> \let\@@startpbox\@startpbox<br> \let\@@endpbox\@endpbox<br> \let\LT@LL@FM@cr\@tabularcr<br> \else<br> \advance\@tempdima\extrarowheight<br> \col@sep\tabcolsep<br> \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr<br> \fi<br> \setbox\@arstrutbox\hbox{\vrule<br> \@height \arraystretch \@tempdima<br> \@depth \arraystretch \dp \strutbox<br> \@width \z@}%<br> \let\@sharp##\let\protect\relax<br> \begingroup<br> \@mkpream{#2}%<br> \xdef\LT@bchunk{%<br> \global\advance\c@LT@chunks\@ne<br> \global\LT@rows\z@\setbox\z@\vbox\bgroup<br> \LT@setprevdepth<br> \tabskip\LTleft \noexpand\halign to\hsize\bgroup<br> \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}%<br> \endgroup<br> \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols<br> \LT@make@row<br> \m@th\let\par\@empty<br> \everycr{}\lineskip\z@\baselineskip\z@<br> \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi<br> \LT@bchunk}<br><br><br>\def\endlongtable{%<br> \crcr<br> \noalign{%<br> \let\LT@entry\LT@entry@chop<br> \xdef\LT@save@row{\LT@save@row}}%<br> \LT@echunk<br> \LT@start<br> \unvbox\z@<br> \LT@get@widths<br> \if@filesw<br> {\let\LT@entry\LT@entry@write\immediate\write\@auxout{%<br> \gdef\expandafter\noexpand<br> \csname LT@\romannumeral\c@LT@tables\endcsname<br> {\LT@save@row}}}%<br> \fi<br> \ifx\LT@save@row\LT@@save@row<br> \else<br> \LT@warn{Column \@width s have changed\MessageBreak<br> in table \thetable}%<br> \LT@final@warn<br> \fi<br> \endgraf\penalty -\LT@end@pen<br> \egroup\if@RTLtab\endR\egroup\fi<br> \if@RTLtab\endR\fi \endgroup<br> \global\@mparbottom\z@<br> \pagegoal\vsize<br> \endgraf\penalty\z@\addvspace\LTpost<br> \ifvoid\footins\else\insert\footins{}\fi<br> \global\@RTLtabfalse}<br>}{}<br><br>\@ifpackageloaded{tabls}{%<br><br>\def\endtabular{\endarray $\if@RTLtab\endR\fi\egroup<br> \global\@RTLtabfalse}<br><br>\expandafter\let\csname endtabular*\endcsname=\endtabular<br><br>\def\endarray{\ifvmode\csname crcr\endcsname % just do \crcr if \\ given<br> \else \\[\z@ \global\advance\@arstdepth-\@otarlinesep]% <br> \fi\egroup\if@RTLtab\egroup\endR\egroup\fi\@unrecurse\egroup}<br><br>\def\@array[#1]#2{% remember global variables to allow recursion:<br> \edef\@unrecurse{\global\@skip@bove\the\@skip@bove<br> \global\@arstheight\the\@arstheight\global\@arstdepth\the\@arstdepth}%<br>% Make the strut on the first line be shorter by the linesep outside<br> \let\@otarlinesep\@tarlinesep \global\@skip@bove-\@otarlinesep<br>% This setup works for both tabular and array because of this test:<br> \ifx\@classz\@arrayclassz \let\@tarlinesep\arraylinesep<br> \else \let\@tarlinesep\tablinesep \fi<br> \divide\@tarlinesep\tw@ % half sep is applied to height & depth<br> \let\@seesize\relax \let\@rememsize\relax \@mkpream{#2}%<br> \@tempdima\arraystretch\ht\strutbox \@tempdimb\arraystretch\dp\strutbox<br> \ifdim\@tarlinesep>\z@ % (need \protect for \multicolumn)<br> \def\@rememsize{\protect\@r@m@msize}\let\@seesize\@s@@size<br> \advance\@tempdima-\@tarlinesep \advance\@tempdimb-\@tarlinesep<br> \fi \setbox\@arstrutbox\hbox{% set up smaller strut<br> \vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}%<br> \let\protect\noexpand<br> \edef\@preamble{\ialign \noexpand\@halignto \bgroup<br> \unhcopy\@arstrutbox \@preamble \tabskip\z@skip &\@sharp \cr}%<br>% I have added an extra column (&\@sharp) to take the smart strut.<br> \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox<br> \if#1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi<br> \bgroup \let\par\@empty<br> \global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox<br> \advance\extrarulesep.5\arrayrulewidth<br> \let\@sharp##\let\protect\relax \lineskip\z@skip \baselineskip\z@skip<br> \if@RTLtab\hbox\bgroup\beginR\vbox\bgroup\fi<br> \@preamble}<br>}{}<br><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>And I have attached the tex file and pdf output of an example of longtable.sty, so you can see the issue clearly.<br><br /><hr />Find out how with Windows Live! <a href='http://windowslive.ninemsn.com.au/' target='_new'>Want to stay on top of your life online?</a></body>
</html>