readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.74k stars 1.73k forks source link

aafig generate disproportionate height #54

Closed tony closed 10 years ago

tony commented 10 years ago

http://tmuxp.readthedocs.org/en/latest/about_tmux.html

These are default .. aafig:: directives. Aafig will hard code a height and width into the output.

The height: 100% !important is causing the images to stretch.

tony commented 10 years ago

@snide

Et al: If you are having trouble setting up sphinx-aafig on on readthedocs, my workaround is to output HTML aafig output as PNG. My settings:


# aafig format, try to get working with pdf
aafig_format = dict(latex='pdf', html='png')

aafig_default_options = dict(
    scale=.75,
    aspect=0.5,
    proportional=True,
)

The html='png' is key.

Also, in my doc/requirements.pip:

-r ../requirements.pip
docutils==0.11
sphinx
sphinxcontrib-aafig
reportlab
Pillow

Notice I'm installing the PIL (python imaging library) fork "Pillow". This fixes some local issues I'd have where PIL wouldn't compile with my libfreetype libraries and give me error. Pillow was more copacetic.

-r ../requirements.pip just ensures my normal package modules install for my project install first, then my doc-specific ones in doc/requirements.pip. This issue would be a good article for write-the-docs / rtd recipes.

tony commented 10 years ago

Live example: http://tmuxp.readthedocs.org/en/latest/about_tmux.html

snide commented 10 years ago

Yeah, you're digging into the deep dark corners of what's possible with aafig.