Skip to content

Commit

Permalink
Merge branch 'mr/cardao/fix-sphinx-doc' into 'master'
Browse files Browse the repository at this point in the history
Update documentation to support sphinx 6.2.1

See merge request eng/das/test/aunit!1
  • Loading branch information
leocardao committed Mar 12, 2024
2 parents 62f7eca + c51c420 commit e20d8d6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1,969 deletions.
1 change: 0 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ clean:

%.pdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/$*/pdf
cp $(SOURCEDIR)/share/sphinx.sty $(BUILDDIR)/$*/pdf
$(MAKE) -C $(BUILDDIR)/$*/pdf all-pdf LATEXOPTS="-interaction=nonstopmode"

%.txt:
Expand Down
2 changes: 1 addition & 1 deletion doc/aunit_cb/restricted_runtimes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Additional restrictions relevant to the default ZFP profile include:

* AUnit requires ``GNAT.IO`` provided in :samp:`g-io.ad{?}` in the full or cert
profile run-time library sources (or as implemented by the user). Since this
is a run-time library unit it must be compiled with the gnatmake :option:`-a`
is a run-time library unit it must be compiled with the gnatmake :samp:`-a`
switch.

.. index:: Secondary stack, memcpy, memset
Expand Down
15 changes: 8 additions & 7 deletions doc/share/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,17 @@ def get_version():
if os.path.isfile('favicon.ico'):
html_favicon = 'favicon.ico'

html_static_path = ['_static']

latex_elements = {
'preamble': latex_elements.TOC_DEPTH +
latex_elements.PAGE_BLANK +
latex_elements.TOC_CMD +
latex_elements.LATEX_HYPHEN +
latex_elements.doc_settings(DOCS[doc_name]['title'],
get_version()),
'tableofcontents': latex_elements.TOC}
latex_elements.doc_settings(DOCS[doc_name]['title'], get_version()) +
latex_elements.FOOTER,
'tableofcontents': latex_elements.TOC
}

latex_table_style = ["standard", "colorrows"]

latex_documents = [
(master_doc, '%s.tex' % doc_name, project, u'AdaCore', 'manual')]
Expand All @@ -99,5 +100,5 @@ def get_version():


def setup(app):
app.add_lexer('ada', ada_pygments.AdaLexer())
app.add_lexer('gpr', ada_pygments.GNATProjectLexer())
app.add_lexer('ada', ada_pygments.AdaLexer)
app.add_lexer('gpr', ada_pygments.GNATProjectLexer)
21 changes: 21 additions & 0 deletions doc/share/latex_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@
\tolerance=1000
'''

FOOTER = r"""
\usepackage{titleref}
\makeatletter
\@ifundefined{fancyhf}{}{
\fancypagestyle{normal}{
\fancyhf{}
% Define footers
\fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
\fancyfoot[LO,RE]{\TR@currentTitle}
}
\fancypagestyle{plain}{
\fancyhf{}
% Define footers
\fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
\fancyfoot[LO,RE]{\TR@currentTitle}
}
}
\makeatother
"""


def doc_settings(full_document_name, version):
return '\n'.join([
Expand Down
Loading

0 comments on commit e20d8d6

Please sign in to comment.