5

Using recent lualatex, fonts with TeX ligatures, but perhaps this question is more general...

I was just looking at @Mico code here regarding how straight double quotes are always replaced by right curly quotes, and how to fix user errors. Very nice.

In my case, I am trying to write a BASH script that pre-processes a *tex document, and looks for potential problems. I know how to write BASH, so that is not my question.

Among the various potential issues, my script will look for straight double quotes, and advise the user to substitute real curly quotes, or TeX ligatures, or whatever.

The macro \" can be used for umlaut. My question is: Other than quotes and umlaut, are there any other situations where straight double quotes might have a special TeX meaning? Assume that the user is not writing math equations.

It seems that packages related to quotation processing, are not on this topic.

rallg
  • 2,379
  • 1
    Not exactly a TeX usage, but it means something for filenames (\input etc.). – John Kormylo Feb 28 '23 at 22:14
  • @JohnKormylo That is also very helpful. – rallg Feb 28 '23 at 22:28
  • 1
    Quotes appear frequently in TikZ code for node labels. – Sandy G Feb 28 '23 at 22:39
  • Thanks, @SandyG that is helpful to other users (I do not use TiKz). – rallg Mar 01 '23 at 00:06
  • General usage could enter the picture, though likely rare: (a) seconds of arc (latitude and longitude, and in astronomy); (b) inches (imperial measurements); (c) itself, in \ttfamily text, in style guides (e.g., episode title), in verbatim blocks, and in code listings (+ any coding language special meanings); (d) as (part of) the delimiter string for an expl3 sequence; (e) for some packages, inside CSV files. Plus also, in some transliteration and mapping schemes and in representational schemes in the linguistic sphere. – Cicada Mar 01 '23 at 11:45
  • Question: would macros and expansion be part of the script? It's possible to have \mydq defined, for example. And, to prevent false positives, somehow ignore a package like csquotes handling whether ' or " is used when " is typed. – Cicada Mar 01 '23 at 11:55
  • The fact that you are using bash is almost certainly irrelevant to your question, and need not be mentioned, but bash is also almost certainly the wrong language for processing a TeX document (or any other data file). – chepner Mar 01 '23 at 14:21
  • @chepner Indeed, but I am not a programmer; bash is among the very few things I can handle, and it has the advantage that others know it. But bash is not irrelevant. Using a non-TeX language, I do not have to deal with catcodes or TeX-only special characters. – rallg Mar 01 '23 at 16:09
  • @Cicada Macros would not be part of the script. It is intended to trap common slef-caused user errors. For example, I do not use comments within the running text, but I might wish to use percent. The script will complain if it sees the % character, unless preceded by backslash. Although I know about TeX quotes, sometimes I type " out of force of habit. No problem with arc seconds, since I would directly use the Unicode character for that. And, I do not use monospace. But others might do that, so your comments are valuable. – rallg Mar 01 '23 at 16:12

1 Answers1

12

" is part of the tex syntax for a number. "FF is hex FF ie 255.

It is also part of web2c based TeX implementation filename syntax.
xxx"aaa bbb"ccc.tex
is the file xxxaaa bbbccc.tex all spaces between pairs of " are preserved, all "are removed and not part of the filename. It is not possible to reference a file with " in its name.

Many babel languages make "active and a shorthand with various constructs such as "- being a hyphen that does not suppress further hyphenation

David Carlisle
  • 757,742
  • 1
    Ah... I forgot about babel languages. Maybe I will turn the shorthands off. Evidently I need to think about this more than I had andticipated. – rallg Mar 01 '23 at 00:08
  • The "german" package uses "a as an alias for \"a for example, and that is widely used. – Simon Richter Mar 01 '23 at 17:48