Re: @exampleindent macro does not seem to have effect
Rik <[email protected]>
| Newsgroups | gmane.comp.tex.texinfo.bugs |
|---|---|
| Message-ID | <[email protected]> |
On 3/13/26 00:57, Patrice Dumas wrote:
> On Thu, Mar 12, 2026 at 08:42:07AM +0100, Rik wrote:
>> Summary: Using @exampleindent does not change indent of @example blocks for
>> "plain text" and Info output
>
> This is implemented:
> https://cgit.git.savannah.gnu.org/cgit/texinfo.git/commit/?id=3446435f5717aa202a3e874e53e504fb47c958bd
>
> Thanks for the report!
>
> This is probably broken since 2013, which means that this is not
> something often sought after, at least in Info and plaintext output.
>
Super! Thanks for the very quick action. I cloned the Texinfo repo and
verified that the macro is working just as it should now.
I agree, this probably isn't a commonly used feature. It will, however, be
very useful for GNU Octave documentation. We use @example blocks within
@deftypefn blocks and the overall indentation really starts to stack up.
Maybe there is a different structure, but we have @deftypefn blocks to
document functions, and within those blocks we use @example, and within
those blocks we use @result with our own indentation to align columns.
Example rendered plaintext for padecoef function
------------------------------------------------
-- [NUM, DEN] = padecoef (T)
-- [NUM, DEN] = padecoef (T, N)
Compute the Nth-order Padé approximant of the continuous-time delay T in
transfer function form. The Padé approximant of ‘exp (-sT)’ is
defined by
the following equation
Pn(s)
exp (-sT) ~ -------
Qn(s)
Where both Pn(s) and Qn(s) are Nth-order rational functions defined
by the
following expressions
N (2N - k)!N! k
Pn(s) = SUM --------------- (-sT)
k=0 (2N)!k!(N - k)!
Qn(s) = Pn(-s)
The inputs T and N must be non-negative numeric scalars. If N is
unspecified it defaults to 1.
The output row vectors NUM and DEN contain the numerator and denominator
coefficients in descending powers of s. Both are Nth-order polynomials.
For example:
t = 0.1;
n = 4;
[num, den] = padecoef (t, n)
⇒ num =
1.0000e-04 -2.0000e-02 1.8000e+00 -8.4000e+01 1.6800e+03
⇒ den =
1.0000e-04 2.0000e-02 1.8000e+00 8.4000e+01 1.6800e+03
------------------------------------------------
It's the last part of the documentation where the stacking really starts to
add up.
Thanks again,
Rik