2

I find typing

`a word'

and

``a word''

quite inconvenient, because I find it rather annoying to type

`

and

``

all the time. Instead, I'd prefer typing 'a word' and "a word" (which I often do when I don't pay attention, causing wrong displays). I was hoping the inputenc package would make this possible, but apparently it doesn't.

Is there a solution for this?

Werner
  • 603,163
Jeroen
  • 4,491
  • 3
    No; if you type b instead of a, TeX will print a “b”, won't it? If you often use quotes, have a look at the csquotes package. – egreg Apr 15 '14 at 23:47
  • 3
    Emacs does this in latex-mode (i.e., smartly uses ``ẁord'' when I write "word"). – jon Apr 16 '14 at 00:01
  • I make , and their doubled equivalents into active characters using csquotes and then type those directly. (Actually I only ever use the single ones.) The annoying thing is that I can't easily type them so I end up pasting them. I wish that my editor allowed me to specify custom quotation marks so that I didn't have to do this. My editor would autoreplace ``...'' etc. though. Just that is less flexible. – cfr Apr 16 '14 at 00:02

1 Answers1

5

This is not possible as LaTeX needs to know where a quotation is starting and where it ends. Imagine, you are writing

"Outer with "inner quote"".

No chance for LaTeX to know, what you want. The accent (apostrophe) is used for other stuff as you can see in this example:

I can't use what I've written.

So there are the following possibilities.

  • You may search for an editor which auto-replaces your "" by “” and your '' by ‘’ as you are used to from existing office tools. TeXnicCenter does that, but I turned it off, as it was doing it to often i.m.o. (@jon mentions Emacs in latex-mode. Don't know it, but you may give it a try)

  • You may try to get your correct quotation signs somehow into your code. Let's say copy it from somewhere or do a shortcut. Than you can use csquotes and define \MakeAutoQuote{“}{”} \MakeAutoQuote*{‘}{’} in order to make these signs active.

  • Or you use the cleanest way, which I am using and define some single sign to be your quotation sign. I don't know, if you run in to problems somewhere with the < or >, but I can't find any situation right now. This would look like this:

    % arara: pdflatex
    
    \documentclass{article}
    \usepackage[english]{babel}
    \usepackage{csquotes}
    \MakeAutoQuote{<}{>}
    
    \begin{document}
    \noindent<A double quote containing <a single quote>>. And in order to use the \textless{}-sign or the \textgreater{}-sign in the text, you will have to write the full command \verb+\textless{}+ or resp.\ \verb+\textgreater{}+ for them.
    \end{document}
    

enter image description here

LaRiFaRi
  • 43,807