Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

conf.py 2.8 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  1. """
  2. An opinionated sphinx setup for academic or scientific reports in Sphinx.
  3. Sphinx Documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
  4. """
  5. import re
  6. from datetime import datetime
  7. from dynaconf import settings
  8. # -- Project Information ------
  9. # Project or Documentation Title
  10. project = settings.get("project_title", "My Project")
  11. project_slug = re.sub("([^a-zA-Z0-9])+", "-", project).lower()
  12. # TODO: Handle Multiple Authors
  13. author = settings.get("author", "")
  14. # Academic Work should not be copy righted
  15. copyright = settings.get("copyright", "") or f"{datetime.today().year}, {author}"
  16. # -- Document Settings ------
  17. # Index Document (excluding suffix)
  18. master_doc = "index"
  19. # Files to ignore
  20. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  21. # Parsers for source file extensions
  22. source_suffix = {
  23. '.rst': 'restructuredtext',
  24. '.txt': 'markdown',
  25. '.md': 'markdown',
  26. }
  27. # Template Paths
  28. templates_path = ["templates"]
  29. # -- Extensions -----
  30. extensions = [
  31. # Autodoc
  32. "sphinx.ext.autodoc",
  33. # TODOs for WIP Docs
  34. "sphinx.ext.todo",
  35. # Render LaTeX for HTML outputs
  36. "sphinx.ext.mathjax",
  37. # Configuration-driven Content
  38. "sphinx.ext.ifconfig",
  39. # Add Code Documentation if there is associated code
  40. "sphinx.ext.viewcode",
  41. # Embed Jupyter Notebooks
  42. "nbsphinx",
  43. # PlantUML driven Diagrams
  44. "sphinx.ext.graphviz",
  45. "sphinxcontrib.plantuml",
  46. # Citations and Reference Management
  47. "sphinxcontrib.bibtex",
  48. # Markdown Support
  49. "recommonmark",
  50. ]
  51. # TODO: Add in other extensions in the toml file
  52. # Pseudo-code:
  53. extensions.extend(filter(lambda ext: ext not in extensions, settings.get("extensions")))
  54. # -- Figure and Caption Settings -----
  55. # See: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-numfig
  56. numfig = True
  57. # -- LaTeX Settings -----
  58. # See: https://www.sphinx-doc.org/en/master/latex.html
  59. # See: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_documents
  60. _targetname = f"{project_slug}.tex"
  61. latex_documents = [
  62. (master_doc, _targetname, project, author, "howto")
  63. ]
  64. latex_logo = settings.get("logo", None)
  65. if settings.get("printed", False):
  66. latex_show_pagerefs = True
  67. latex_show_urls = "footnote"
  68. _latex_preamble = r"""
  69. \usepackage{booktabs}
  70. % See: https://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html
  71. % make phantomsection empty inside figures
  72. \usepackage{etoolbox}
  73. \AtBeginEnvironment{figure}{\renewcommand{\phantomsection}{}}
  74. """
  75. # See: https://www.sphinx-doc.org/en/master/latex.html#the-latex-elements-configuration-setting
  76. latex_elements = {
  77. "figure_align": "H",
  78. "preamble": _latex_preamble,
  79. }
  80. # -- HTML Settings -----
  81. html_theme = "alabaster"
  82. html_static_path = ["static"]
  83. # -- TODOS Settings -----
  84. todo_include_todos = True
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...