[Tex/LaTex] How to i prevent LaTex from converting a apostrophe combination to this weird character
characterssymbols
I want to write this
But it becomes to this in the resulting PDF file
How can i prevent LaTex from converting the apostrophe combination to this weird character?
Best Answer
Never use " for quotes. In particular, if you use babel-german, where " is a shorthand character.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\begin{document}
``DAMN'' ebenfalls
,,Damn`` ebenfalls
"`Damn"' ebenfalls
"<Damn"> ebenfalls
\end{document}
To typeset verbatim material you need to use, for example, the verbatim environment (in your code snippet you only selected a font for verbatim material) and manually introduce line breaks (I commented out some lines because I don't have uarial.sty):
\documentclass[11pt,table,a4paper]{article}
\usepackage{array,ragged2e}
%\usepackage[scaled]{uarial}
\usepackage[T1]{fontenc}
\makeatletter
%\def\verbatim@font{\normalfont\ua1}
\makeatother
\begin{document}
\begin{verbatim}
This is my sample text for checking % character. I found
whereever there is % character it is treated as comment
and nothing gets printed after this. How can i fix this pblm.
I m using verb still getting same pblm. pls help me how
can i fix this pblm.
\end{verbatim}
\end{document}
The fancyvrb packages offers more possibilities and enhanced verbatim environments/commands; the listings package extends even more the possibilities.
If all that you need is to typeset the percentage character, use \%:
\documentclass[11pt,table,a4paper]{article}
\usepackage{array,ragged2e}
%\usepackage[scaled]{uarial}
\usepackage[T1]{fontenc}
\begin{document}
\begin{minipage}{0.3\linewidth}
This is my sample text for checking \% character. I found whereever there is \% character it is treated as comment and nothing gets printed after this. How can i fix this pblm. I m using verb still getting same pblm. pls help me how can i fix this pblm.
\end{minipage}
\end{document}
Best Answer
Never use
"
for quotes. In particular, if you usebabel-german
, where"
is a shorthand character.