Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
add comment

4 Answers

\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.)

share|improve this answer
add comment

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}
share|improve this answer
add comment
  1. Maybe it's a good thing if you improve your knowledge about quotation, but
  2. for the moment simply write "{}a{}"
share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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