Skip to content

Commit

Permalink
Merge pull request #173 from SimonRohou/codac2_dev
Browse files Browse the repository at this point in the history
[doc] using Furo style + customization
  • Loading branch information
SimonRohou authored Jan 8, 2025
2 parents 50664bf + 3fdb97c commit 9f06f93
Show file tree
Hide file tree
Showing 8 changed files with 267 additions and 58 deletions.
17 changes: 10 additions & 7 deletions doc/manual/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
div.rst-content a:visited
{
color: #2980b9;
text-decoration: none;
.sidebar-tree .current > .reference {
background: none;
}

div.rst-content li.toctree-l1 > a
{
font-weight: bold;
.sidebar-tree .current-page > .reference {
background: var(--color-sidebar-item-background--current);
font-weight: normal;
}

a.sidebar-brand {
padding: 2rem 0rem;
padding-right: 1rem;
}
117 changes: 117 additions & 0 deletions doc/manual/_static/logos/logo_codac.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 31 additions & 4 deletions doc/manual/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@

project = 'Codac'
copyright = 'Codac Team'
author = 'Codac Team'
author = 'Simon Rohou, Benoît Desrochers, Fabrice Le Bars and others'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx_rtd_theme',
'sphinx_math_dollar',
'sphinx.ext.mathjax'
]

templates_path = ['_templates']
Expand All @@ -25,7 +27,7 @@ exclude_patterns = []
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_static_path = ['_static']
html_theme = "sphinx_rtd_theme"
html_theme = "furo"
html_logo = "_static/logos/logo_codac.svg"

# These paths are either relative to html_static_path
Expand All @@ -35,6 +37,31 @@ html_css_files = [
]

html_theme_options = {
'logo_only': True,
'display_version': True,

"sidebar_hide_name": True,

"light_css_variables": {
"color-brand-primary": "white",
"color-brand-content": "#1F506B",

"color-sidebar-background": "#3281AC",
"color-sidebar-caption-text": "white",
"color-sidebar-item-background--current": "var(--color-brand-content)",
"color-sidebar-item-background--hover": "#3B9ACC",
"color-sidebar-item-expander-background--hover": "#3B9ACC",
"color-sidebar-link-text": "white",
"sidebar-caption-font-size": "120%",

"color-link--visited": "var(--color-link)",
},

"announcement": "You are currently reading the new Codac documentation, which is currently in preparation.",
}

# See https://www.sympy.org/sphinx-math-dollar/
mathjax3_config = {
"tex": {
"inlineMath": [['\\(', '\\)']],
"displayMath": [["\\[", "\\]"]],
}
}
103 changes: 56 additions & 47 deletions doc/manual/index.rst
Original file line number Diff line number Diff line change
@@ -1,59 +1,68 @@
Codac manual
============

Welcome to the Codac website.


.. toctree::
:caption: Overview of Codac
:maxdepth: 3

Constraint programming and IA <http://codac.io>
The Codac framework <http://codac.io>
Target audience <http://codac.io>
.. .. toctree::
.. :hidden:
.. :caption: Overview of Codac
.. :maxdepth: 3
..
.. Intervals and constraints <http://codac.io>
.. The Codac framework <http://codac.io>
.. Target audience <http://codac.io>
.. toctree::
:hidden:
:caption: User manual
:maxdepth: 2

installation/index.rst
intervals/index.rst
linear/index.rst
functions/index.rst
tubes/index.rst

.. toctree::
:maxdepth: 3

contractors/index.rst
separators/index.rst

.. toctree::
:maxdepth: 2

pavers/index.rst
cn/index.rst
geometry/index.rst
ellipsoids/index.rst
topology/index.rst
visualization/index.rst
extensions/index.rst
seealso/index.rst
references/index.rst


.. toctree::
:caption: How-to guides
:maxdepth: 3

howto/robotics/index.rst
howto/geometry/index.rst
howto/dynamical/index.rst


.. toctree::
:caption: Development
:maxdepth: 3

Changelog <http://codac.io>
C++ API <http://codac.io>
Information for developers <http://codac.io>
.. intervals/index.rst
.. linear/index.rst
.. functions/index.rst
.. tubes/index.rst
.. .. toctree::
.. :hidden:
.. :maxdepth: 3
..
.. contractors/index.rst
.. separators/index.rst
.. .. toctree::
.. :hidden:
.. :maxdepth: 2
..
.. pavers/index.rst
.. cn/index.rst
.. geometry/index.rst
.. ellipsoids/index.rst
.. topology/index.rst
.. visualization/index.rst
.. extensions/index.rst
.. seealso/index.rst
.. references/index.rst
.. .. toctree::
.. :hidden:
.. :caption: How-to guides
.. :maxdepth: 3
..
.. howto/robotics/index.rst
.. howto/geometry/index.rst
.. howto/dynamical/index.rst
.. .. toctree::
.. :hidden:
.. :caption: Development
.. :maxdepth: 3
..
.. Changelog <http://codac.io>
.. C++ API <http://codac.io>
.. Information for developers <http://codac.io>
23 changes: 23 additions & 0 deletions doc/manual/installation/cpp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
C++ installation
================

1. **Dependencies**: Ensure you have CMake (>=3.10) and a C++14 compatible compiler.
2. **Clone the repository**:

.. code-block:: bash
git clone https://github.com/codac-team/codac.git
cd codac
3. **Build the library**:

.. code-block:: bash
mkdir build
cd build
cmake ..
make
Using Codac in CMake projects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 changes: 9 additions & 0 deletions doc/manual/installation/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Installation Guide
==================

.. toctree::
:maxdepth: 1

python.rst
cpp.rst
matlab.rst
12 changes: 12 additions & 0 deletions doc/manual/installation/matlab.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
MATLAB installation
===================

1. **Dependencies**: Ensure you have MATLAB R2019b or later.
2. **Python integration**: Follow the instructions `here <https://www.mathworks.com/help/matlab/matlab_external/install-supported-python-implementation.html>`_ to set up Python integration.
3. **Install the Python package**:

.. code-block:: bash
pip install codac
Once Codac is installed, you can use it in your MATLAB scripts, ensuring proper integration with Python for functionality.
9 changes: 9 additions & 0 deletions doc/manual/installation/python.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Python installation
===================

1. **Dependencies**: Ensure you have a supported version of Python (>=3.6).
2. **Install via pip**: Use the following command to install Codac:

.. code-block:: bash
pip install codac

0 comments on commit 9f06f93

Please sign in to comment.