Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\placeholder or \placeholdernc? #3135

Open
burblebee opened this issue Aug 6, 2019 · 5 comments · May be fixed by #3138
Open

\placeholder or \placeholdernc? #3135

burblebee opened this issue Aug 6, 2019 · 5 comments · May be fixed by #3138
Assignees

Comments

@burblebee
Copy link
Contributor

burblebee commented Aug 6, 2019

I've seen both \placeholder and \placeholdernc used within tcode/codeblock contexts throughout the spec. The nc form should be used to turn off italic correction in places where it "looks bad", but it's not clear what constitutes such a place. This should be clarified in our guidelines with examples of when to use each, and we should do a sweep of the Latex sources to fix any incorrect uses.

In #3056, @zygoloid provides some hints as to when to use which:

Please don't blindly change \placeholder to \placeholdernc. The latter is a surgical tool for fixing cases of bad kerning due to italics corrections, and should be used sparingly only where there is actual bad kerning. Usually the italics correction is what we want; the bounding box for italicized text is wider due to the right overhang, and it so we want to create a little extra space.

I've found that \placeholdernc improves the presentation immediately before a period or a comma (where there is no higher text for the italics to get uncomfortably close to). So let's take that as rough guidance for now: use \placeholdernc before a teletype period or comma, where there would otherwise be an unsightly amount of horizontal space.

Looking through a few more examples, \placeholdernc before a left paren also seems more pleasant to my eye, but before a left angle bracket I prefer including the italic correction.

@JohelEGP
Copy link
Contributor

JohelEGP commented Aug 6, 2019

How about their use in \rSecs? I noticed one of the recent motions by @zygoloid using \textit or something like that instead.

@jensmaurer jensmaurer self-assigned this Aug 6, 2019
@jensmaurer
Copy link
Member

\rSec are special, because the contained code is evaluated twice, once for the table of contents and once for the actual section heading. That causes all kinds of LaTeX surprises for unsuspecting macros.

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 6, 2019

The non-correcting spacing is most necessary when horizontal fixed-width alignment is required (e.g. in code blocks). Apart from that, I agree that it can be useful before round parentheses, which is where I've occasionally applied this, but we don't have a recipe-rule guide on this. If you can formulate one whose application would improve on the status quo, then we should definitely consider it.

@JohelEGP
Copy link
Contributor

JohelEGP commented Aug 6, 2019

\rSec are special, because the contained code is evaluated twice, once for the table of contents and once for the actual section heading. That causes all kinds of LaTeX surprises for unsuspecting macros.

Then should they be changed to \textit? I remember using \placeholder on an \rSec: 64433fa#diff-f762baff089b9a748fa0f3216c173577R6137

@jensmaurer
Copy link
Member

If it works, let's go for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants