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

Allow no space between symbol and following word #8

Open
Quelklef opened this issue Jun 12, 2019 · 3 comments
Open

Allow no space between symbol and following word #8

Quelklef opened this issue Jun 12, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Quelklef
Copy link
Contributor

I really like this extension, but I will not be using it for the following reason:
\forall x \exists y will render to ∀ x ∃ y. If I don't want the spaces, I might think to try \forallx\existsy, which doesn't work because \forallx and \existsy are not valid commands. This leaves me in the position of having to manually remove the spaces after conversion.

Plausible solutions, none of which are perfect:

  • Render \command <content> as <rendered command><content>, removing the space automatically. Downside: nice for some commands, like \forall, but ugly for others.
  • Render \command<content>, without a space, as <rendered command><content>. This would allow \forallx. Downside: would require some kind of most-consumed rule to disambiguate between e.g. \approxnotequal rendering to ≈notequal or .
  • Render \command <content> as <rendered command> <content> and \command,<content> as <rendered command><content>. Basically, have a special symbol to denote "no space". Downside: arcane and possibly ambiguous
@golopot
Copy link
Owner

golopot commented Jun 12, 2019

How about making some symbols special cases, for example ∀ ∃ ∂ ∫ ∑ ⋂, such that rendering them will removing the unwanted space?

@Quelklef
Copy link
Contributor Author

That's certainly another option, downside being that you lose consistency and predictability... I'm honestly not sure what the right way to go about it is.

@golopot golopot added enhancement New feature or request help wanted Extra attention is needed labels Jun 13, 2019
@HFriberg
Copy link

If you are typing the expression by hand, just render \forall before typing the x. These exact keystrokes (omitting the backslash which is keyboard layout dependent):
<f><o><r><a><l><l><Alt+w><x>

No special character is easier than that and the rendering rules stay consistent.

The only remaining issue is if you are copying expressions from another tex source. If this is the situation you are trying to solve, then improved tex compliance with respect to whitespace handling is what you are really asking for. Assuming the extension would try to simulate an inline math environment in tex, then note that whitespaces are semantical (i.e., command separators without rendering implications). This means that the extension would (1) translate all symbols, (2) delete all whitespaces, and then (3) insert unicode spaces of various kinds (half-length, full-length, ...) at various places based on internal rules for what usually looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants