Le 18/01/2022 à 21:11, Fred Drake a écrit :
> Before the Python documentation was managed in reStructuredText, we
> used a LaTeX with a large range of specific markup, including
> *\var{/varname/}*. I don't remember why that didn't get carried into
> what became the Python domain in Sphinx.
Interesting insight, thank you. With ``:samp:`` not
being part of any domain, I think it would be
reasonable to
- make it format ``{}`` parts with a specific
style defaulting to emphasis,
- add some role to pair it, doing the same formatting
as what's inside a ``{}`` part of ``:samp:``.
I drafted a sketchy implementation (though I haven't
looked into backwards compatibility details yet).
The outstanding issue is: how could we name this
role? Sadly, ``:var:`` is already taken in the C and
C++ domains. ``:meta:`` is conceivable, but ``.. meta::``
is a standard docutils directive, so it might be
confusing. I'm a bit out of ideas ... ``:placeholder:``
maybe?
Regards,
Jean