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

typography: ' (straight single quote) or (curly single quote) #6187

Open
morinmorin opened this issue Mar 14, 2023 · 4 comments
Open

typography: ' (straight single quote) or (curly single quote) #6187

morinmorin opened this issue Mar 14, 2023 · 4 comments

Comments

@morinmorin
Copy link
Contributor

morinmorin commented Mar 14, 2023

In the codeblock environment, single quotes are rendered as straight quotes; however, in other places (i.e. in most places), single quotes are rendered as curly quotes. IMO, it would be better to render them as straight quotes consistently.

Spreading out \textquotesingle is tedious and hurts readability. So modifying \tcode (and likes) to render single quotes as straight quotes would be nice.

@JohelEGP
Copy link
Contributor

#5006 did it for the codeblock enviroment.

however, in other places (i.e. in most places), curly quotes are used.

I can only find one such place, added recently:

$ git grep -C1 "tcode{[^}]\*'" *.tex
compatibility.tex-std::format("{:*^{}}", "", '1');    // ill-formed, previously returned an
compatibility.tex:                                    // implementation-defined number of \tcode{'*'} characters
compatibility.tex-\end{codeblock}

1678793998

@morinmorin
Copy link
Contributor Author

morinmorin commented Mar 14, 2023

At least in Chapter 5 ([lex]), most single quotes (e.g. single quotes in \tcode) are rendered as curly ones.

#5006 did it for the codeblock enviroment.

Thank you for the link to the related PR!

@JohelEGP
Copy link
Contributor

My grep above didn't pick up any other ' in \tcode. But in [lex], I do see curly ' in the grammar.
1678832455

@morinmorin
Copy link
Contributor Author

You can use something like

grep --color=auto -n -P '\\\w+\{[^}]*'"'"'[^}]*\}' *.tex

(This assumes GNU grep and there are some false positives.)

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

No branches or pull requests

2 participants