10

I want to input a string "a" in a LaTeX document using German (\documentclass[ngerman]{article}), but I do not want "a to be turned into ä; what can I do? (I know \verb works; are there any other solutions?) Thanks!

4 Answers 4

9

\dq a should work. Note also that proper quotation marks would be

"`like this"'

i.e. "quotation backtick" and "quotation apostrophe". (Also see the csquotes package.)

9

Assuming that you really want the "straight" double quote: The correct command is \textquotedbl but \string" works too and is shorter:

\documentclass{article}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\begin{document}
\string"a\string" 

\textquotedbl a\textquotedbl
\end{document}
0
2

other answers are appropriate if this is ordinary text. but if you want, for example, to indicate how to type something, you may want to use "typewriter" style, so

\verb+"a"+

should give you a suitable result.

0
  1. Maybe it's a good thing if you improve your knowledge about quotation, but
  2. for the moment simply write "{}a{}"
2
  • 1
    You assume that they want to quote something which is not stated in the question. Commented Sep 27, 2016 at 9:07
  • I'm coming to the party pretty late, but regarding point 1, it might have been nice to include a link to the documentation.
    – hlongmore
    Commented Jan 31, 2021 at 10:10

You must log in to answer this question.

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