Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aunit documentation #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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
13 changes: 8 additions & 5 deletions doc/share/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ def get_version():
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 +102,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