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

--
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/5dd99659-34a2-1e6a-7fc3-3be777afa0e4%40abou-samra.fr.

Reply via email to