1

Apparently, I have misunderstood how quotation marks have been written my entire life. In English, the left quotation mark is a double, inverted comma on top, i.e.:

The way I thought it was written, it turns out, is used by literally no language on Earth! Specifically, a double, mirrored comma on top, i.e.:

I'd like to have LaTeX use the second form instead of the first when I use `` and ''. How can I change LaTeX to do this?

1
  • 1
    the mapping ` ` to is implemented by the font, so the natural way would be to use a different font with a different `` ligature Jun 26, 2021 at 15:29

1 Answer 1

1

You can execute a token cycle to pre-scan an input and intercept occurrences of ``, replacing them in the input stream with a reflection of ''. Only restriction on environment is it cannot encompass catcode changing material.

\documentclass{article}
\usepackage{tokcycle}[2021-05-25]
\usepackage{graphicx}
\Characterdirective{%
  \ifx`#1\tcpeek\z
    \ifx`\z
      \tcpop\z\addcytoks{\reflectbox{''}}
    \else
      \addcytoks{#1}
    \fi
  \else
    \addcytoks{#1}
  \fi
}
\begin{document}
\tokencyclexpress
Testing the ``quotes''...did I ``pass''?

This won't affect `single' use 

or even \number`x.
\endtokencyclexpress
\end{document}

enter image description here

8
  • I could not get this to work. I copied and pasted the TeX code you gave directly into a blank Overleaf project, and it gave me an "Undefined control sequence" on each use of the accent mark (I can't type it due to SE formatting). It also gave a warning ("You have requested, on input line 2, version", which is verbatim the entire warning message) on the line designating to use the tokcycle package. I produced a PDF with the text above, but the left quotation marks were the standard ones, not the ones shown in your image. Your image is, however, exactly what I'm looking for.
    – mknote
    Jun 26, 2021 at 19:18
  • 2
    @mknote Steven specified \usepackage{tokcycle}[2021-05-25] ie a very new version of the package, Overleaf has texlive 2020 so will not have this. You could get the package from ctan and add it to your project. Jun 26, 2021 at 19:43
  • Ah, I was not aware of that. Uploading the .tex file from CTAN made everything work. Porting over to my dissertation document, it seems like I'll need to add it to each chapter .tex instead of just one declaration in the main file, but that's fine. There's also an issue with a nested minipage itemize I have, but putting an \endtokencyclexpressbefore that list and a \tokencyclexpress after it works and throws no errors. This is exactly what I was looking for, thanks!
    – mknote
    Jun 26, 2021 at 20:57
  • As a side-note, this method seems to be very time-intensive on compilation, presumably because it's checking every character in the text. It seems using \tokencyclexpress ... \endtokencyclexpress only around blocks of text containing the quotation marks to be changed is a far better way to use this method.
    – mknote
    Jun 26, 2021 at 21:34
  • It also seems that I can just use \reflectbox{''} to manually create the quotation mark, although my original question asked for an automated procedure. Nevertheless, I have a good way of doing this, and hopefully this will help someone else in the future.
    – mknote
    Jun 26, 2021 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .