I have a problem getting the - and = characters between single quotations.

`-' and `=' both produces -' in the generated pdf. If I put an alphabetical character between ` and ' it works as expected. I guess - and = are special characters.

How do I treat them?








Hello TeX! This is how I try to add single quotation marks before and after the characters `-' and `='.

  • 1
    Please note that t1enc and times are obsolete. Rather use \usepackage[T1]{fontenc} and, for Times, \usepackage{mathptmx} or `\usepackage{newtxtext,newtxmath}). – egreg May 1 '14 at 13:39
  • some "duplicate" packages here: amssymb loads amsfonts, so no need to have them both. also, mathtools loads amsmath. and the usual recommendation is that hyperref should be loaded last; for this, you should check specific package recommendations, because there are some exceptions. – barbara beeton May 1 '14 at 14:00

The file magyar.ldf defines ` as a shorthand prefix; in particular, from what I have been able to understand from the code,


gives an “intelligent en-dash”; when `- appears, it just produces a hyphen. Conversely, `= is a hyphen for composite words, allowing hyphenation in the word part following the hyphen.

If you want a single opening quote, just type `{}





Hello TeX! This is how I try to add single quotation marks
before and after the characters `{}-' and `{}='.


\verb|$a-b$|: $a-b$

\verb|$a`--b$|: $a`--b$

\verb|a-b|: a-b

\verb|a`-b|: a`-b

\verb|a`--b|: a`--b

Unfortunately, the language definition file is rather poorly documented. In the sense that I couldn't find any documentation for it.

enter image description here


Tried csquotes? It has commands like:

  1. \textquoteleft
  2. and \textquoteright

And an MWE:



\newcommand\singlequote[1]{\textquoteleft #1\textquoteright~}


\singlequote{=} some text here. \\
\singlequote{-} more text here.

  • Thanks, works nicely. I have text right after the quotation, but no spaces were added after the \textquoteright command. I added ~ after it to force a space. – VSZM May 1 '14 at 12:48
  • 1
    I've edited my post slightly so you can use a macro instead of typing it all out every single time. – 1010011010 May 1 '14 at 12:56
  • 4
    Having loaded csquotes this way you can just write \enquote*{=} etc. – Andrew Swann May 1 '14 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.