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

do not use teletype spaces in BNF #2788

Closed
zygoloid opened this issue Mar 15, 2019 · 3 comments · Fixed by #2834
Closed

do not use teletype spaces in BNF #2788

zygoloid opened this issue Mar 15, 2019 · 3 comments · Fixed by #2834
Assignees

Comments

@zygoloid
Copy link
Member

The space between grammar elements in BNF should be roman spaces, not teletype spaces.

We could fix this by redefining \terminal so that it formats spaces as roman automatically, or we could change all the \terminal{...}s so that they enclose only a single terminal. I think the latter is more semantically appropriate.

@zygoloid
Copy link
Member Author

zygoloid commented Mar 15, 2019

Alternative: now we have \keyword, automatically format characters not in [ a-z_-] as teletype and get rid of \terminal.

@jensmaurer
Copy link
Member

jensmaurer commented Mar 15, 2019

Once #2778 has gone in, I'll have a look. Formatting punctuation characters and numbers differently in some context seems to require advanced LaTeX foo.

@godbyk, do you have an idea how to approach "automatically format characters not in [ a-z_-] as teletype"? (If that ends up too involved, I'll just fix the approx. 50-100 occurrences where we need to exclude spaces from \terminal.)

@tkoeppe
Copy link
Contributor

tkoeppe commented Mar 15, 2019

Alternative: now we have \keyword, automatically format characters not in [ a-z_-] as teletype and get rid of \terminal.

I wonder if this isn't a little too magical. I'm leaning towards "explicit is better" here for the sake of maintainability. If the automatic mechanism doesn't quite do what you want in a particular case, I imagine it could be hairy trying to modify it while keeping everything else working.

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.

3 participants