PDF cover page#

For generating a PDF of your documentation, Sphinx uses a default cover page. However, you can use the generate_preamble function in the ansys_sphinx_theme.latex module to create and use a custom cover page:

ansys_sphinx_theme.latex.generate_preamble(title, watermark='watermark', date=None)#

Generate the preamble for the PDF documentation.


Title of the document.

watermarkstr, optional

Name of the watermark image.

datedatetime, optional

Date of document generation. If not provided, today’s date is used.


A string representing the LaTeX source code for the preamble.

You use this function to generate the value for the preamble key in the latex_elements variable declared in the conf.py file:

latex_elements = {
    "preamble": ansys_sphinx_theme.latex.generate_preamble(

To use the logo and watermark provided by Ansys on the cover page, you must import them and then add them to the latex_additional_files dictionary:

from ansys_sphinx_theme import (
latex_additional_files = [watermark, ansys_logo_white, ansys_logo_white_cropped]