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: add a matrix style#502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eriknw merged 1 commit intopython-graphblas:mainfromalugowski:matrix
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletionsdocs/_static/matrix.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
/* Based on the stylesheet used by matrepr (https://github.com/alugowski/matrepr) and modified for sphinx */

table.matrix {
border-collapse: collapse;
border: 0px;
}

/* Disable a horizintal line from the default stylesheet */
.table.matrix > :not(caption) > * > * {
border-bottom-width: 0px;
}

/* row indices */
table.matrix > tbody tr th {
font-size: smaller;
font-weight: bolder;
vertical-align: middle;
text-align: right;
}
/* row indices are often made bold in the source data; here make them match the boldness of the th column label style*/
table.matrix strong {
font-weight: bold;
}

/* column indices */
table.matrix > thead tr th {
font-size: smaller;
font-weight: bolder;
vertical-align: middle;
text-align: center;
}

/* cells */
table.matrix > tbody tr td {
vertical-align: middle;
text-align: center;
position: relative;
}

/* left border */
table.matrix > tbody tr td:first-of-type {
border-left: solid 2px var(--pst-color-text-base);
}
/* right border */
table.matrix > tbody tr td:last-of-type {
border-right: solid 2px var(--pst-color-text-base);
}

/* prevents empty cells from collapsing, especially empty rows */
table.matrix > tbody tr td:empty::before {
/* basicaly fills empty cells with   */
content: "\00a0\00a0\00a0";
visibility: hidden;
}
table.matrix > tbody tr td:empty::after {
content: "\00a0\00a0\00a0";
visibility: hidden;
}

/* matrix bracket ticks */
table.matrix > 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: solid 2px var(--pst-color-text-base);
}
table.matrix > 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: solid 2px var(--pst-color-text-base);
}
table.matrix > 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: solid 2px var(--pst-color-text-base);
}
table.matrix > 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: solid 2px var(--pst-color-text-base);
}
2 changes: 1 addition & 1 deletiondocs/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc", "numpydoc", "sphinx_panels", "nbsphinx"]
html_css_files = ["custom.css"]
html_css_files = ["custom.css", "matrix.css"]
html_js_files = ["custom.js"]

# Add any paths that contain templates here, relative to this directory.
Expand Down
1 change: 1 addition & 0 deletionsdocs/user_guide/io.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,7 @@ array will match the collection dtype.
v = gb.Vector.from_coo([1, 3, 6], [2, 3, 4], float, size=10)

.. csv-table::
:class: matrix
:header: 0,1,2,3,4,5,6,7,8,9,10

,2.0,,3.0,,,4.0,,,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp