[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @example's as doctests
From: |
Colin Macdonald |
Subject: |
Re: @example's as doctests |
Date: |
Sat, 28 Mar 2015 12:19:50 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 28/03/15 12:09, Oliver Heimlich wrote:
There
is only one thing which I am not happy with: I could only make the
following example pass by splitting it into three separate @example
blocks. Three @example blocks produce very poor formatting in the HTML
documentation because of big margins between them. So, there should be a
different solution.
## x = infsup (1 + eps);
## intervaltotext (x)
## @result{} [1.0000000000000002, 1.0000000000000003]
## y = nextout (x);
## intervaltotext (y)
## @result{} [1, 1.0000000000000005]
## z = infsup (1);
## intervaltotext (z)
## @result{} [1]
This should work:
## @example
## x = infsup (1 + eps);
## y = nextout (x);
## z = infsup (1);
## intervaltotext (x)
## @result{} [1.0000000000000002, 1.0000000000000003]
## intervaltotext (y)
## @result{} [1, 1.0000000000000005]
## intervaltotext (z)
## @result{} [1]
## @end example
But I think I can easily change it to respect group so that the below
would work. (And you also suggested this in your previous reply I
think). Would that be fine from a formatting point-of-view? IIRC, it
would only change pagination.
## @example
## @group
## x = infsup (1 + eps);
## intervaltotext (x)
## @result{} [1.0000000000000002, 1.0000000000000003]
## @end group
## @group
## y = nextout (x);
## intervaltotext (y)
## @result{} [1, 1.0000000000000005]
## @end group
## @group
## z = infsup (1);
## intervaltotext (z)
## @result{} [1]
## @end group
## @end example
- Re: @example's as doctests, Colin Macdonald, 2015/03/27
- Re: @example's as doctests, Oliver Heimlich, 2015/03/27
- Re: @example's as doctests, Oliver Heimlich, 2015/03/28
- Re: @example's as doctests,
Colin Macdonald <=
- Re: @example's as doctests, Oliver Heimlich, 2015/03/28
- Re: @example's as doctests, Julien Bect, 2015/03/28
- Re: @example's as doctests, Søren Hauberg, 2015/03/28
- Re: @example's as doctests, Oliver Heimlich, 2015/03/28
- Re: @example's as doctests, Julien Bect, 2015/03/28
- Re: @example's as doctests, Oliver Heimlich, 2015/03/28
- Re: @example's as doctests, Colin Macdonald, 2015/03/28
- Re: @example's as doctests, Oliver Heimlich, 2015/03/28
- Re: @example's as doctests, Colin Macdonald, 2015/03/28
Re: @example's as doctests, Jordi Gutiérrez Hermoso, 2015/03/27