Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle inline tags that span multiple lines #5

Open
virtuald opened this issue Feb 27, 2021 · 4 comments
Open

Handle inline tags that span multiple lines #5

virtuald opened this issue Feb 27, 2021 · 4 comments

Comments

@virtuald
Copy link
Contributor

Used to work, but it's broken now:

$ sphinxify
/**
 * Constructs a control-affine plant inversion model-based feedforward from
 * given model dynamics.
 *
 * If given the vector valued function as f(x, u) where x is the state
 * vector and u is the input vector, the B matrix(continuous input matrix)
 * is calculated through a NumericalJacobian. In this case f has to be
 * control-affine (of the form f(x) + Bu).
 *
 * The feedforward is calculated as
 * <strong> u_ff = B<sup>+</sup> (rDot - f(x)) </strong>, where <strong>
 * B<sup>+</sup> </strong> is the pseudoinverse of B.
 *
 * This feedforward does not account for a dynamic B matrix, B is either
 * determined or supplied when the feedforward is created and remains constant.
 *
 * For more on the underlying math, read
 * https://file.tavsys.net/control/controls-engineering-in-frc.pdf.
 */

        """Constructs a control-affine plant inversion model-based feedforward from
        given model dynamics.

        If given the vector valued function as f(x, u) where x is the state
        vector and u is the input vector, the B matrix(continuous input matrix)
        is calculated through a NumericalJacobian. In this case f has to be
        control-affine (of the form f(x) + Bu).

        The feedforward is calculated as
        ** u_ff = B<sup>+</sup> (rDot - f(x)) **, where **
        B<sup>+</sup> ** is the pseudoinverse of B.

        This feedforward does not account for a dynamic B matrix, B is either
        determined or supplied when the feedforward is created and remains constant.

        For more on the underlying math, read
        https://file.tavsys.net/control/controls-engineering-in-frc.pdf.
        """
...

docstring of wpimath._controls._controls.controller.ControlAffinePlantInversionFeedforward_1_1:9: WARNING: Inline strong start-string without end-string.
docstring of wpimath._controls._controls.controller.ControlAffinePlantInversionFeedforward_2_1:9: WARNING: Inline strong start-string without end-string.
docstring of wpimath._controls._controls.controller.ControlAffinePlantInversionFeedforward_2_2:9: WARNING: Inline strong start-string without end-string.
docstring of wpimath._controls._controls.controller.LinearPlantInversionFeedforward_1_1:3: WARNING: Inline strong start-string without end-string.
docstring of wpimath._controls._controls.controller.LinearPlantInversionFeedforward_2_1:3: WARNING: Inline strong start-string without end-string.
docstring of wpimath._controls._controls.controller.LinearPlantInversionFeedforward_2_2:3: WARNING: Inline strong start-string without end-string.

@auscompgeek
Copy link
Owner

The problem here is that the <strong> spans multiple lines. I'm not sure how easily we can fix this.

@auscompgeek auscompgeek changed the title More doxygen quirks Handle inline tags that span multiple lines Feb 27, 2021
@auscompgeek
Copy link
Owner

So there are :strong: and :emphasis: roles, and roles can span multiple lines, so doable. IMO RobotPy should use :math: roles where appropriate though.

I'll handle sub and sup tags as well.

@auscompgeek
Copy link
Owner

Hmm. How do you nest bold and superscript in rST?

@auscompgeek
Copy link
Owner

https://docutils.sourceforge.io/FAQ.html#is-nested-inline-markup-possible

… that is definitely not nice. I'm just not going to handle nesting.

We could probably do with a way to warn about this from robotpy-build, but, uh, future work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants