Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
14 changes: 11 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ jobs:
with:
fetch-depth: 2

- name: "Setup"
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: "Install Python dependencies"
run: |
sudo apt-get update
sudo apt-get install -y python3-sphinx
uv pip install --system -r doc/requirements.txt
sphinx-build --version

- name: "Build documentation"
Expand All @@ -42,6 +49,7 @@ jobs:
- name: "Setup LaTeX"
if: github.repository == 'flintlib/flint' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
sudo apt-get update
# See https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra tex-gyre texlive-latex-extra latexmk

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ config.m4
src/flint-mparam.h
.gdb_history
vgcore.*
.venv/
venv/
3 changes: 3 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Sphinx documentation dependencies
sphinx>=9.0
sphinx_clarity_theme==1.0.2
23 changes: 0 additions & 23 deletions doc/source/_static/default.css

This file was deleted.

37 changes: 37 additions & 0 deletions doc/source/_static/styles/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* More dense API signatures */
dt.sig {
margin: 0 !important;
border: 0 !important;
border-bottom: 1px solid var(--color-base-100) !important;
}

dt {
font-weight: normal !important;
}

/* -- object description styles --------------------------------------------- */

.sig-name {
font-weight: bold;
}

.sig-param.n {
font-style: italic;
}

/* C++ specific styling */

.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}

.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}

.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
18 changes: 3 additions & 15 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,14 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'

html_context = {
'css_files': ['_static/default.css'],
}
html_theme = 'sphinx_clarity_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#

html_theme_options = {
'sidebarwidth' : 300,
'collapsiblesidebar': True,
'bodyfont': "'arial', sans-serif",
'headfont': "'arial', sans-serif",
'sidebarbtncolor': '#666',
'sidebarbgcolor': '#444',
'sidebarlinkcolor': '#ddd',
'relbarbgcolor': '#333',
'footerbgcolor': '#333',
'headbgcolor': '#fff',
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -130,6 +116,8 @@
#
# html_sidebars = {}

html_css_files = ["styles/custom.css"]


# -- Options for HTMLHelp output ---------------------------------------------

Expand Down
16 changes: 16 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Introduction

.. toctree::
:maxdepth: 1
:caption: Introduction

introduction.rst
building.rst
Expand All @@ -38,6 +39,7 @@ General utilities

.. toctree::
:maxdepth: 1
:caption: General utilities

flint.rst
profiler.rst
Expand All @@ -50,6 +52,7 @@ Generic rings

.. toctree::
:maxdepth: 1
:caption: Generic rings

gr.rst
gr_implementing.rst
Expand All @@ -74,6 +77,7 @@ Integers

.. toctree::
:maxdepth: 1
:caption: Integers

ulong_extras.rst
fmpz.rst
Expand Down Expand Up @@ -109,6 +113,7 @@ Rational numbers

.. toctree::
:maxdepth: 1
:caption: Rational numbers

fmpq.rst
fmpq_vec.rst
Expand All @@ -131,6 +136,7 @@ Integers mod n

.. toctree::
:maxdepth: 1
:caption: Integers mod n

nmod.rst
nmod_vec.rst
Expand Down Expand Up @@ -162,6 +168,7 @@ Groups and other structures

.. toctree::
:maxdepth: 1
:caption: Groups and other structures

perm.rst
qfb.rst
Expand All @@ -174,6 +181,7 @@ Number fields and algebraic numbers

.. toctree::
:maxdepth: 1
:caption: Number fields and algebraic numbers

nf.rst
nf_elem.rst
Expand All @@ -185,6 +193,7 @@ Real and complex numbers

.. toctree::
:maxdepth: 1
:caption: Real and complex numbers

overview.rst
using.rst
Expand Down Expand Up @@ -235,6 +244,7 @@ Exact real and complex numbers

.. toctree::
:maxdepth: 1
:caption: Exact real and complex numbers

introduction_calcium.rst
examples_calcium.rst
Expand All @@ -253,6 +263,7 @@ Finite fields

.. toctree::
:maxdepth: 1
:caption: Finite fields

fq.rst
fq_default.rst
Expand Down Expand Up @@ -292,6 +303,7 @@ p-adic numbers

.. toctree::
:maxdepth: 1
:caption: p-adic numbers

padic.rst
padic_poly.rst
Expand All @@ -303,6 +315,7 @@ Floating-point support code

.. toctree::
:maxdepth: 1
:caption: Floating-point support code

double_extras.rst
double_interval.rst
Expand All @@ -314,6 +327,7 @@ Interfaces

.. toctree::
:maxdepth: 1
:caption: Interfaces

python_flint.rst

Expand All @@ -322,6 +336,7 @@ References

.. toctree::
:maxdepth: 1
:caption: References

references.rst

Expand All @@ -330,5 +345,6 @@ Version history

.. toctree::
:maxdepth: 1
:caption: Version history

history.rst