Skip to content

placeholders should be formatted with math fonts #326

Open

Description

@zygoloid

As discussed at Rapperswil, we'd like to experiment with this.

Activity

  1. self-assigned this
    on Jun 18, 2014
  2. tkoeppe commented on Dec 10, 2015

    @tkoeppe
    Contributor

    If we are talking about code placeholders here, then I'm worried that the math font won't harmonize with the teletype font. They have different contrast and different cap height. This may work in certain situations, but it may come to bite us in the future.

    I find italic teletype appropriate for the job. Just like "normal" body font italics are appropriate for mathematical variables in the context of body text, italic teletype seems appropriate for "code variables". (Though perhaps we should facilitate disabling the italic correction.)

    image

  3. removed their assignment
    on Apr 13, 2016
  4. jensmaurer commented on Nov 17, 2016

    @jensmaurer
    Member

    See also #1060.

  5. tkoeppe commented on Nov 17, 2016

    @tkoeppe
    Contributor

    Indeed. I think the need for italics in this context is by and large the same as for any code placeholder, so I'd be perfectly happy treating the two the same way.

    (Note that for capital letters, the distinction between italic and slanted isn't very big, so either is fine here.)

  6. jensmaurer commented on Dec 13, 2016

    @jensmaurer
    Member

    See #1139 for indexed (type) variables.

  7. added
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Dec 1, 2017
  8. jensmaurer commented on Dec 1, 2017

    @jensmaurer
    Member

    We should decide how to proceed and update the wiki accordingly.

  9. jensmaurer commented on Jun 7, 2018

    @jensmaurer
    Member

    Editorial meeting discussion: Variables of different kinds might be formatted differently. Possible kinds: type, variable, object, value, expression. It seems the convention is to use italics for all but the first and last; use code font for those. For meta-variables that expand to code, use code font. For other meta-variables, use math. For string interpolation, use \placeholder. Also for "op" in fold-expression. Update the wiki.
    Idea: Introduce \tvar for type placeholders and make them italics. Not pursued.

  10. removed
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Jun 7, 2018
  11. eisenwave commented on Jul 17, 2025

    @eisenwave
    Member

    @tkoeppe can we close this? We use \placeholder for all sorts of things like character-type at this point, and we probably don't want that to be in math font.

    I think we could put what Jens said into the specification style guidelines; that seems to be the established convention at this point. Other than that, we're done with this issue, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigAn issue causing a large set of changes, scattered across most of the text.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions