1

Edit#1

made some progress, but still not get it: I managed to use mono font by tweaking my custom.css like this:

em.property{
  font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 
'Bitstream Vera Sans Mono', monospace;
}

I indeed have a mono-space font now, but triple quotes are still messy:

enter image description here

Initial Question:

I generate my project's documentation using autodoc (alabaster theme for now, but I could change). I have an issue with the rendering of my classes parameters.

source:

class CBUSH(SimpleCard):
"""
Generalized Spring-and-Damper Connection
Defines a generalized spring-and-damper structural element that may be nonlinear
or frequency dependent.

ref: NX Nastran 12 Quick Reference Guide 11-39 (p.1399)
"""

TABLE = """
| 1     | 2   | 3    | 4  | 5  | 6     | 7  | 8  | 9   | 10 |
|-------+-----+------+----+----+-------+----+----+-----+----|
| CBUSH | EID | PID  | GA | GB | GO/X1 | X2 | X3 | CID |    |
|       | S   | OCID | S1 | S2 | S3    |    |    |     |    |
"""
GIDS_PATTERN = re.compile('^G[A|B]$')
DEFAULTS = {'S': 0.5, 'OCID': -1}

rendered as:

enter image description here

So, the question is: how to set parameters description font to mono space font?

From code source, i saw that the balises used to render those items are <code class="descname">TABLE</code><em class="property">, so I tried to create a static/custom.css with the following code:

tt.property{
  font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}

but so far, nothing worked.

Community
  • 1
  • 1
Nic
  • 3,365
  • 3
  • 20
  • 31

0 Answers0