Back to News
Advertisement
Advertisement

⚑ Community Insights

Discussion Sentiment

60% Positive

Analyzed from 163 words in the discussion.

Trending Topics

#tex#italic#idea#pretty#bad#since#necessary#spaces#insert#spacing

Discussion (1 Comments)Read Original on HackerNews

gucci-on-fleekβ€’about 5 hours ago
Most of these suggestions are pretty good, but a few of them are questionable:

1. Using xspace is generally a bad idea since it's unpredictable [0]. My personal preference is to add a mandatory delimiter as suggested by The TeXbook:

  For example, the author might have said
      \def\TeX/{...}
  instead of defining \TeX without the slash. Then it would be necessary to type \TeX/
  each time the TeX logo is desired, but the new definition would have the advantage that
  spaces are not ignored after β€˜\TeX/’. You can use this idea to define macros that are
  intended to be used in sentences, so that users don’t have to worry about the possible
  disappearance of spaces.
2. It should never be necessary to manually insert italic spacing in LaTeX documents, since all the built-in commands do it for you. This is why LaTeX uses "\textit{italic}" for its formatting commands (compared to "{\it italic}" in Plain), so that it can automatically insert italic spacing at the end.

3. "\leavevmode \\" is almost always a bad idea in body text [1], but the theorem environments are pretty weird, so there are no great alternatives here. "\leavevmode\par\noindent" is probably a better choice, but it's still fairly ugly.

[0]: https://tex.stackexchange.com/q/86565/270600

[1]: https://tex.stackexchange.com/a/82666/270600