All of lore.kernel.org
 help / color / mirror / Atom feed
* generic admonition versus specific admonitions
@ 2020-10-31 15:14 Robert P. J. Day
  2020-11-01 17:52 ` [docs] " Nicolas Dechesne
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2020-10-31 15:14 UTC (permalink / raw)
  To: YP docs mailing list


  as i'm sure you're all aware, reST supports a number of specific
admonition types (note, info, error, caution, ...), plus a generic
form that is used thusly:

.. admonition::

   blah blah

i was interested to see that the use of the generic admonition is
confined exclusively to a single .rst file in the profiling manual:

$ grep -r "\.\. admonition" *
profile-manual-arch.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
profile-manual-usage.rst:.. admonition:: Tying it Together
$

a few seconds research showed that, while it seems overly bland to use
a generic admonition, it has one cool advantage.

  if you use, say ".. note::", then the rendered note always has the
caption "Note" by default -- if you add a caption on that same line,
that caption becomes the first line *inside* the note box, while the
box caption continues to say simply, "Note".

  with a generic admonition, however, if you add a caption like, say,
in that profile file:

.. admonition:: Tying it Together

then that caption becomes the top-level caption of the admonition box,
which adds some emphasis to the caption.

  should there be an aesthetic standard?

rday

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [docs] generic admonition versus specific admonitions
  2020-10-31 15:14 generic admonition versus specific admonitions Robert P. J. Day
@ 2020-11-01 17:52 ` Nicolas Dechesne
  2020-11-01 17:56   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Dechesne @ 2020-11-01 17:52 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: YP docs mailing list

On Sat, Oct 31, 2020 at 4:14 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>
>   as i'm sure you're all aware, reST supports a number of specific
> admonition types (note, info, error, caution, ...), plus a generic
> form that is used thusly:
>
> .. admonition::
>
>    blah blah
>
> i was interested to see that the use of the generic admonition is
> confined exclusively to a single .rst file in the profiling manual:
>
> $ grep -r "\.\. admonition" *
> profile-manual-arch.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> profile-manual-usage.rst:.. admonition:: Tying it Together
> $
>
> a few seconds research showed that, while it seems overly bland to use
> a generic admonition, it has one cool advantage.
>
>   if you use, say ".. note::", then the rendered note always has the
> caption "Note" by default -- if you add a caption on that same line,
> that caption becomes the first line *inside* the note box, while the
> box caption continues to say simply, "Note".
>
>   with a generic admonition, however, if you add a caption like, say,
> in that profile file:
>
> .. admonition:: Tying it Together
>
> then that caption becomes the top-level caption of the admonition box,
> which adds some emphasis to the caption.

I added the 'tying it together' admonition, since none of the generic
ones were relevant. Otherwise we use the existing "note" or "tip" in
other places, in which case their caption is "Note" or "Tip".

>
>   should there be an aesthetic standard?

I am not sure what you are asking here. Can you please clarify?

>
> rday
>
> 
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [docs] generic admonition versus specific admonitions
  2020-11-01 17:52 ` [docs] " Nicolas Dechesne
@ 2020-11-01 17:56   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2020-11-01 17:56 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: YP docs mailing list

On Sun, 1 Nov 2020, Nicolas Dechesne wrote:

> I added the 'tying it together' admonition, since none of the
> generic ones were relevant. Otherwise we use the existing "note" or
> "tip" in other places, in which case their caption is "Note" or
> "Tip".

  ok, that's all i wanted to know.

rday

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-01 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 15:14 generic admonition versus specific admonitions Robert P. J. Day
2020-11-01 17:52 ` [docs] " Nicolas Dechesne
2020-11-01 17:56   ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.