[XeTeX] Problem with bidi + longtable + caption packages

maxwell maxwell at umiacs.umd.edu
Wed Oct 21 02:55:06 CEST 2015


(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

-----------Minimal example follows---------
\documentclass{report}

\usepackage{longtable}
%Tell the caption pkg to do ragged right at load time:
\usepackage[singlelinecheck=off
            ,justification=raggedright
            ]{caption}
\usepackage{bidi}
%Tell the caption pkg again:
\captionsetup{singlelinecheck=off
              ,justification=raggedright
              }

\begin{document}

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

\end{document}


More information about the XeTeX mailing list