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

Preserve whitespace after \shr and \shl where appropriate. #1342

Closed
wants to merge 1 commit into from

Conversation

Eelis
Copy link
Contributor

@Eelis Eelis commented Jan 8, 2017

Diffs:
diff

@@ -2633,7 +2633,7 @@
the function signature
\tcode{basic_ostream\& stream::operator\shl(ios_base\& (*)(ios_base\&))}
to permit expressions of the form
\tcode{cout \shl dec}
\tcode{cout \shl{} dec}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of this macro. Just say << here (and everywhere).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'll give it a try

Copy link
Contributor Author

@Eelis Eelis Jan 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The macros are defined as:

\newcommand{\shl}{<{<}}
\newcommand{\shr}{>{>}}

I tried removing the extra curlies, and it changes the order of some index entries. So I guess that's what they're for.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't they also prevent LaTeX replacing them with guillemets in some contexts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did an "appearance" check with diffpdf, and no guillemets showed up. Maybe because the macros are only ever used inside \tcode and similar.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think the idea that anyone needs to prevent guillemets is archaic and pointless, and so we really should just get rid of those two macros.

Copy link
Contributor Author

@Eelis Eelis Jan 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a representative example of the index entry order difference I mentioned:
diff
If that change is deemed acceptable, then I can submit a pull request to remove \shl and \shr altogether.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either index looks fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen them causing problems in the standard, but maybe it was just the one use in lex.tex or something like that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwakely: Maybe they arose when a \tcode or equivalent was missing? There are no guillemets now.

@Eelis
Copy link
Contributor Author

Eelis commented Jan 9, 2017

Fixed by #1346

@Eelis Eelis closed this Jan 9, 2017
@Eelis Eelis deleted the shlshr branch January 10, 2017 16:32
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 this pull request may close these issues.

None yet

3 participants