[XeTeX] Problem with bidi + longtable + caption packages

Herbert Schulz herbs at wideopenwest.com
Wed Oct 21 03:34:26 CEST 2015

> On Oct 20, 2015, at 7:55 PM, maxwell <maxwell at umiacs.umd.edu> wrote:
> (Apologies if this isn't the right mailing list--the documentation I have says I should send this to persian-tex at tug.org, but I don't see that mailing list on the list of TUG mailing lists, nor am I subscribed to it... and if it does exist, I don't know how to subscribe to it.)
> I've encountered a problem in the interaction between the longtable, bidi, and caption packages.  I'll attach the minimal example at the bottom of this msg, but I have a question.  We're running the 2014 TeXLive distro; I never got around to downloading the 2015 distro.  We'll probably do that, but we're having some connectivity issues (serves me right for not having downloaded it months ago), and there are some hoops to jump through, so it won't be instant gratification.
> The issue we've found is that we want table captions to be ragged right, rather than centered.  Ordinarily, the caption package handles this fine.  But when I have a longtable, and I use the bidi package as well, I can only get centered captions for long tables (ordinary floating table captions work fine).
> I've tried numerous variants of the code below, e.g. telling the caption pkg to do ragged right only in one or the other of the places, loading the bidi bpackage before or after the \captionsetup command (it cannot be loaded before the caption pkg is loaded), etc.
> Did anyone else notice this last year, and if so, has it been fixed in the 2015 distro?
>    Mike Maxwell
>    University of Maryland


The longtable environment is like a tabular environment, not the same as a floating environment like the teble environment. It's floats that take the caption. Try


%Tell the caption pkg to do ragged right at load time:
%Tell the caption pkg again:
%            ,justification=raggedright
%            }


Some test!

\caption{A long table}%Should be ragged right, but is centered instead
{AAAA} & {BBBB} & {CCCC} & {DDDD}


Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the XeTeX mailing list