Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[doc] A matrix CSS style for matrices in docs #496

Closed
@alugowski

Description

@alugowski

I think the docs would be both easier to understand and nicer to look at by styling the matrices a bit more.

The matrices appear to be tables using the 'inline' class, this may be as simple as applying a CSS style. Below is the one I wrote for matrepr. AFAIK you just have to copy it to the CSS file in the statics directory then just select the class. This style was written for Jupyter so may or may not be a drop-in for Sphinx.

table.matreprmatrix  {border-collapse: collapse;}/* remove thin black line under Jupyter table headers */table.matreprmatrix>thead  {border:0px;}/* row indices */table.matreprmatrix>tbodytrth {font-size: smaller;vertical-align: middle;text-align: right;}/* col indices */table.matreprmatrix>theadtrth {font-size: smaller;vertical-align: middle;text-align: center;}/* cells */table.matreprmatrix>tbodytrtd {vertical-align: middle;text-align: center;position: relative;}/* left border */table.matreprmatrix>tbodytrtd:first-of-type {border-left: solid2px;}/* right border */table.matreprmatrix>tbodytrtd:last-of-type {border-right: solid2px;}/* prevents empty cells from collapsing, especially empty rows */table.matreprmatrix>tbodytrtd:empty::before {content:"\00a0\00a0\00a0";visibility: hidden;}table.matreprmatrix>tbodytrtd:empty::after {content:"\00a0\00a0\00a0";visibility: hidden;}/* matrix bracket ticks */table.matreprmatrix>tbody>tr:first-child>td:first-of-type::before {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left:0;right: auto;border-top: solid2px;}table.matreprmatrix>tbody>tr:last-child>td:first-of-type::before {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left:0;right: auto;border-bottom: solid2px;}table.matreprmatrix>tbody>tr:first-child>td:last-of-type::after {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left: auto;right:0;border-top: solid2px;}table.matreprmatrix>tbody>tr:last-child>td:last-of-type::after {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left: auto;right:0;border-bottom: solid2px;}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp