Options
- sphinxmark_enable (bool)
True
- enable watermarksFalse
- disable watermarksDefault = False
Example:
sphinxmark_enable = True
- sphinxmark_div (string)
CSS div where watermark is displayed
sphinxmark provides a template css file that uses the specified image as the watermark for any area defined as
div.body
by default. This setting works for the default Sphinx theme. To use sphinxmark with themes that have the document body in a different div, specify the div using thesphinxmark_div
option.Default = ‘body’
Examples:
sphinx_rtd_theme ->
sphinxmark_div = 'document'
openstackdocstheme ->
sphinxmark_div = 'docs-body'
sphinx_book_theme ->
sphinxmark_div = 'row#main-content'
- sphinxmark_border (string)
left
- place watermark on left borderright
- place watermark on right bordersetting the
sphinxmark_border
option overrides thesphinxmark_repeat
andsphinxmark_fixed
options.when using a text watermark, adjust the
sphinxmark_text
options to achieve the desired appearance.Default = None
Example:
sphinxmark_border = 'left'
- sphinxmark_repeat (bool)
True
- image repeats down the pageFalse
- image appears once at top of pageDefault = True
Example:
sphinxmark_repeat = True
- sphinxmark_fixed (bool)
True
- watermark does not scroll with contentFalse
- watermark scrolls with contentWhen set to
True
, this option centers the watermark in the viewport, not the div specified bysphinxmark_div
.Default = False
Example:
sphinxmark_fixed = False
- sphinxmark_image (string)
image file in
html_static_path
directory to use as watermarktext
selects the text-based watermark specified in thesphinxmark_text
optionif no image is specified, a default DRAFT watermark image is used
Default = ‘default’
Examples:
sphinxmark_image = 'preview_mark.png'
sphinxmark_image = 'text'
- sphinxmark_text (string)
Text to use for watermark when
text
option is selected insphinxmark_image
Default = ‘default’
Example:
sphinxmark_text = 'Preview'
- sphinxmark_text_size (int)
Font size for text specified in
sphinxmark_text
Default = 100
Example:
sphinxmark_text_size = 100
- sphinxmark_text_width (int)
Width of transparent box containing text specified in
sphinxmark_text
If a large
sphinxmark_text_size
is specified, or thesphinxmark_text
string is long, you may need to set this option to a number higher than the default for the entire string to display. Note that the text will be cut off at the edge of the containing CSS div regardless of thesphinxmark_text_width
setting.Default = 1000
Example:
sphinxmark_text_width = 1000
- sphinxmark_text_color (tuple)
RGB color code for text specified in
sphinxmark_text
.Default = (255, 0, 0)
Example:
sphinxmark_text_color = (255, 0, 0)
- sphinxmark_text_opacity (int)
Opacity (RGB Alpha) for text specified in
sphinxmark_text
Default = 20
Example:
sphinxmark_text_opacity = 20
- sphinxmark_text_spacing (int)
Set spacing between text watermarks
Default = 400
Example:
sphinxmark_text_spacing = 400
- sphinxmark_text_rotation (int)
Text watermark rotation
Default = 0
Example:
sphinxmark_text_rotation = 90