Skip to content

table captions placement #161

Closed
Closed

Description

@shimizukawa

I'd like to define if table titles (captions) are placed before or after the table.


Activity

  1. added
    type:enhancement
    on Jan 2, 2015
  2. shimizukawa commented on Jan 2, 2015

    @shimizukawa
    MemberAuthor

    From Anonymous on 2009-07-03 04:36:06+00:00

    Caption's placement with figures and tables is simply determined by the \caption{...} being given before or after the includegraphics command resp. tabulary environment.

  3. shimizukawa commented on Jan 2, 2015

    @shimizukawa
    MemberAuthor

    From Georg Brandl on 2010-08-25 12:19:51+00:00

    Removing milestone: 0.6 (automated comment)

  4. jfbu commented on May 9, 2017

    @jfbu
    Contributor

    This is solved by merge of #3686 (which is based on the table templates from #3389, 2a37b0e). The user can position the caption after table using the templates. The \sphinxaftercaption should not be used then, and the \sphinxcapstartof{table} should stay where it is, if one wants internal hyperlink to go to top of table.

    What is lacking is a config setting to do this automatically, but already user can use custom templates modifying the defaults.

  5. gmilde commented on Jun 26, 2025

    @gmilde
    Contributor

    Docutils implements this with a CSS rule in the "mandatory" style file "minimal.css":

    table.captionbelow { caption-side: bottom; }

    The "special" class value can be specified globally in the table-style setting in docutils.conf or per table with the :class: directive option, e.g.:

    .. table:: the caption
       :class: captionbelow
    
       = = =
       M N O
       = = =

    It would be good, if the Sphinx standard CSS themes supported this, too.
    As a workaround, you can add the rule in a custom style sheet.

  6. jdillard commented on May 28, 2026

    @jdillard
    SponsorMember

    This issue seems solved so I am going to close it. I also think there should probably be a single issue to track caption placement as there is a lot of overlap #1723

    Nice CSS, I learned something new.

  7. locked as resolved and limited conversation to collaborators on Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    builder:latextype:enhancement

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions