Long latex formulars in inherited members are abbreviated in a wrong way
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
All latex formulars are shown correctly, or be abbreviated correctly.
Actual Behavior
Long latex formulas from ancestor classes are not shown correctly.
It depends on the length of the formular, short formulars are not abbreviated and represended correctly.
Steps to Reproduce
class Material(object):
""" Stores material data """
C: float
D: float
E: float
F: float
def __init__(self):
self.C = 0
r"""
6x6 material stiffness matrix
.. math::
C = \begin{bmatrix}
C_{11} & C_{12} & C_{13} & 0 & 0 & 0 \\
C_{12} & C_{22} & C_{23} & 0 & 0 & 0 \\
C_{13} & C_{23} & C_{33} & 0 & 0 & 0 \\
0 & 0 & 0 & C_{44} & 0 & 0 \\
0 & 0 & 0 & 0 & C_{55} & 0 \\
0 & 0 & 0 & 0 & 0 & C_{66}
\end{bmatrix}
"""
self.D = 0
r"""
2x3 material stiffness matrix
.. math::
D =
\begin{bmatrix}
D_{11} & D_{12} & D_{13} \\
D_{12} & D_{22} & D_{23} \\
\end{bmatrix}
"""
self.E = 0
r"""
2x3 material stiffness matrix
.. math::
E = \begin{bmatrix}
E_{11} & E_{12} & E_{13} \\
E_{12} & E_{22} & E_{23} \\
\end{bmatrix}
"""
self.F = 0
r"""
2x3 material stiffness matrix
.. math::
F =
\begin{bmatrix}
F_{11} & F_{12} & F \\
F_{12} & F_{22} & F_{23} \\
\end{bmatrix}
"""
class Composite(Material):
"""
Stores material data for a composite material
"""
with my module named core
pdoc --html core -c latex_math=True -c show_inherited_members=True -f
Additional info
- pdoc version: 0.8.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the inherited-member rendering path exercised by the core module and the command pdoc --html core -c latex_math=True -c show_inherited_members=True -f. Compare how the long C formula is abbreviated with the shorter D, E, and F formulas. Done means inherited LaTeX formulas are either shown fully or abbreviated without corrupting their content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100