Beispiel #1
0
def set_theme(name):
    global html_theme
    global html_theme_path
    if name == 'nature':
        html_theme = 'nature'
    elif name == 'rtd':
        import sphinx_rtd_theme
        html_theme = 'sphinx_rtd_theme'
        html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
    elif name == 'pyramid':
        # TODO: broken?
        import pylons_sphinx_themes
        html_theme = 'pyramid'
        html_theme_path = [pylons_sphinx_themes.get_html_themes_path()]
    elif name == 'adc':
        import sphinx_adc_theme
        html_theme = 'sphinx_adc_theme'
        html_theme_path = [sphinx_adc_theme.get_html_theme_path()]
    # elif name == 'jupyter':
    #     # TODO: should be on top of file?
    #     from jupyter_sphinx_theme import *
    #     init_theme()
    elif name == 'celery':
        import sphinx_celery
        html_theme = 'sphinx_celery'
        html_theme_path = [sphinx_celery.get_html_theme_path()]
    elif name == 'material':
        import sphinx_theme_pd
        html_theme = 'sphinx_theme_pd'
        html_theme_path = [sphinx_theme_pd.get_html_theme_path()]
    elif name == 'plone':
        extensions.append('sphinxjp.themecore')
        html_theme = 'plonetheme'
    elif name == 'mdn':
        import mdn_theme
        html_theme_path = [mdn_theme.get_theme_dir()]
        html_theme = 'mdn'
    else:
        raise Exception('Unknown theme {}'.format(name))
Beispiel #2
0
sys.path.insert(
    0,
    os.path.abspath(
        os.path.join(
            os.path.split(__file__)[0],
            "..",
            "..",
            "..",
            "..",
            "pyquickhelper",
            "src")))

from pyquickhelper.helpgen.default_conf import set_sphinx_variables
set_sphinx_variables(__file__, "mlstatpy", "Xavier Dupré", 2016,
                     sphtheme.__name__, [
                         sphtheme.get_html_theme_path()], locals(),
                     extlinks=dict(
                         issue=('https://github.com/sdpython/mlstatpy/issues/%s', 'issue')),
                     title="Machine Learning, Statistiques et Programmation", book=True)

blog_root = "http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/"

html_context = {
    'css_files': ['_static/my-styles.css'],
}

language = "fr"
custom_preamble = """\n\\newcommand{\\girafedec}[3]{ \\begin{array}{ccccc} #1 &=& #2 &+& #3 \\\\ a' &=& a &-& o  \\end{array}}
            \\newcommand{\\vecteur}[2]{\\pa{#1,\\dots,#2}}
            \\newcommand{\\N}[0]{\\mathbb{N}}
            \\newcommand{\\indicatrice}[1]{\\mathbf{1\\!\\!1}_{\\acc{#1}}}
Beispiel #3
0
# -*- coding: utf-8 -*-
import sys
import os
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet

choice = "bootstrap"

if choice == "sphtheme":
    import sphinx_theme_pd as sphtheme
    html_theme = sphtheme.__name__
    html_theme_path = [sphtheme.get_html_theme_path()]
elif choice == "bootstrap":
    import sphinx_bootstrap_theme
    html_theme = 'bootstrap'
    html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
else:
    raise NotImplementedError()

sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))

local_template = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                              "phdoc_templates")

set_sphinx_variables(
    __file__,
    "mlstatpy",
    "Xavier Dupré",
    2019,
    html_theme,
    html_theme_path,
    locals(),
Beispiel #4
0
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built
# documents.
# keep_warnings = False


# -- Options for HTML output -------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.import sphinx_theme_pd
html_theme = "sphinx_theme_pd"
html_theme_path = [sphinx_theme_pd.get_html_theme_path()]
# html_theme = 'bootstrap'
# html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
# html_logo = "logo.png"

# Theme options are theme-specific and customize the look and feel of a
# theme further.

# 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 = {}

# Add any paths that contain custom themes here, relative to this directory.
Beispiel #5
0
# -*- coding: utf-8 -*-
import sys
import os
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet

choice = "bootstrap"

if choice == "sphtheme":
    import sphinx_theme_pd as sphtheme
    html_theme = sphtheme.__name__
    html_theme_path = [sphtheme.get_html_theme_path()]
elif choice == "bootstrap":
    import sphinx_bootstrap_theme
    html_theme = 'bootstrap'
    html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
else:
    raise NotImplementedError()

sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))

local_template = os.path.join(os.path.abspath(
    os.path.dirname(__file__)), "phdoc_templates")

set_sphinx_variables(__file__, "mlstatpy", "Xavier Dupré", 2019,
                     html_theme, html_theme_path, locals(),
                     extlinks=dict(
                         issue=('https://github.com/sdpython/mlstatpy/issues/%s', 'issue')),
                     title="Machine Learning, Statistiques et Programmation", book=True, nblayout='table')

# next