The following worked fine for me:
    .. tabularcolumns:: |>{\RaggedRight}p{\dimexpr 0.3\linewidth-2\tabcolsep
}
                        |>{\RaggedRight}p{\dimexpr 0.4\linewidth-2\tabcolsep
}
                        |>{\RaggedLeft}p{\dimexpr 0.3\linewidth-2\tabcolsep
}|

    .. _tasks_rsync_opts_tab:                        
                        
    .. table:: Rsync Configuration Options
        :class: longtable

        +------------+----------+----------------+
        | Setting    | Value    | Description    | 
        +------------+----------+----------------+
        | Setting    | Value    | Description    |
        +------------+----------+----------------+   

Also, the commands are l, r, and c, not L, R, C.  So the following also 
works:
.. tabularcolumns:: |r|r|l|

See https://en.wikibooks.org/wiki/LaTeX/Tables

I always specify the width I want for PDF output to ensure that latex 
doesn't do anything weird with the wrapping or have text run into the next 
cell.  Normally I use list tables because I think they are easier to 
maintain (and contain other nodes, like lists and admonitions), so I am not 
sure if the same behavior happens with simple tables.

On Tuesday, October 25, 2016 at 3:48:21 PM UTC-7, Warren Block wrote:
>
> On Tue, 25 Oct 2016, Peter Burdine wrote: 
>
> > 
> > Please post the tabularcolumns directive you are using and enough of the 
> table definition to see the first header row.  There isn't enough info to 
> see what the issue could be. 
> > 
> > One thing to verify is that the number of columns in the tabularcolumns 
> directive is the same as the actual table. 
>
> Sorry, here's a bit: 
>
>    .. tabularcolumns:: |R|R|L| 
>
>    .. _tasks_rsync_opts_tab: 
>
>    .. table:: Rsync Configuration Options 
>       :class: longtable 
>
>       +------------+----------+----------------+ 
>       | Setting    | Value    | Description    | 
>
>
> This produces 
>
>    ! Missing # inserted in alignment preamble. 
>    <to be read again> 
>                       \cr 
>    l.5164 \begin{longtable}{|p{1.0cm}|p{1.0cm}|L|} 
>
> The \RaggedRight colspec produces the "undefined control sequence" shown 
> earlier.  Using |p{1.0cm}|p{1.0cm}|L| gives 
>
>    ! Missing # inserted in alignment preamble. 
>    <to be read again> 
>                       \cr 
>    l.5164 \begin{longtable}{|p{1.0cm}|p{1.0cm}|L|} 
>
> I have no preamble, so maybe it's that.  Or maybe another extension is 
> needed, at the moment only ifconfig and httpdomain are declared.  But 
> without the tabularcolumns directive, it does produce a PDF. 
>
> Thanks! 
>
> > On Oct 24, 2016 4:40 PM, "Warren Block" <[email protected] 
> <javascript:>> wrote: 
> >       On Mon, 10 Oct 2016, Peter Burdine wrote: 
> > 
> >             Sphinx tables in latex are inconsistent at the moment.  
> There is a ticket open to use just one package for tables, but right now I 
> think it picks 1 of 4(?) packages depending on what it thinks it best.  In 
> all of the 
> >             documentation we write, I always 
> >             add :class: longtable to all of the table definitions to 
> allow for (what I think) is better layout, plus the header/footer for 
> continuations. 
> > 
> >             You can format the columns and overall table width using the 
> tabularcolumns directive, eg 
> >             .. tabularcolumns:: |>{\RaggedRight}p{\dimexpr 
> 0.3\linewidth-2\tabcolsep} 
> >                                 |>{\RaggedRight}p{\dimexpr 
> 0.5\linewidth-2\tabcolsep} 
> >                                 |>{\RaggedRight}p{\dimexpr 
> 0.2\linewidth-2\tabcolsep}| 
> > 
> >             Adding that everywhere tends to get annoying quickly, plus 
> is is difficult for most people understand what is going on (FYI this 
> produces a table with 3 columns, all left aligned, with 30%, 50%, and 20% 
> of the page widths). 
> > 
> > 
> > What else is needed to use this?  If I add it, PDF creation halts in the 
> middle, with 
> > 
> >   ! Undefined control sequence. 
> >   <template> ...inewidth -2\tabcolsep }\RaggedRight 
> >                                                     \ignorespaces 
> >   l.5169 \textsf 
> >                 {\relax 
> >   ? 
> > 
> > This is sphinx 1.4.6. 
> > 
> > -- 
> > You received this message because you are subscribed to a topic in the 
> Google Groups "sphinx-users" group. 
> > To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/sphinx-users/LBGxmGESUhg/unsubscribe. 
> > To unsubscribe from this group and all its topics, send an email to 
> [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sphinx-users. 
> > For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sphinx-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sphinx-users. 
> > For more options, visit https://groups.google.com/d/optout. 
> > 
> >

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to