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 am working on one file which has some special chacters.

    König IR   : KA}unig ,K ~ A}unig 
%          : Comment in latex (so no text after this %)
-          : escape

I get different output which seems to be very funny. How can i handle such characters in LaTeX?

share|improve this question

1 Answer 1

up vote 8 down vote accepted
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
%\makeatletter

%\def\verbatim@font{\normalfont\fontfamily{ua1}\selectfont}  % verbatim in Arial
%
\makeatother

\begin{document}

\begin{verbatim}
König IR   : KA}unig ,K ~ A}unig 
%          : Comment in latex (so no text after this %)
-          : escape
\end{verbatim}

\noindent
\begin{tabular}{@{} p{2cm} @{\,:\,} l }
König IR   & KA\}unig ,K \textasciitilde\ A\}unig \\
\%         & Comment in latex (so no text after this \%)\\
-          & escape
\end {tabular}

\end{document}

enter image description here

and the same with arial for verbatim:

enter image description here

share|improve this answer
    
I am using same but its font type is different from other. I am using Arial in whole text but when i use verbatim, font type enclosed in this tag is different and there is one space before and after of this tag while i am not using any space. –  manish Jun 6 '12 at 8:01
    
I am using code \begin{verbatim} Helgadottir A, Thorleifsson G, Manolescu A, Gretarsdottir S \end{verbatim} But there is one line space before and after the text. Why? –  manish Jun 6 '12 at 8:08
    
give a complete example of what you did. I have no crystal ball ... –  Herbert Jun 6 '12 at 8:29
    
\documentstyle[html]{article} \textbf{[1] PMID:20622881} \begin{verbatim} Gretarsdottir S, Baas AF, Thorleifsson G, Holm H \end{verbatim} \textbf{\emph{ Genome-wide association study identifies a sequence variant within the DAB2IP gene conferring susceptibility to abdominal aortic aneurysm. }} Nat. Genet. 2010 07 11; 42(8) \end{document} –  manish Jun 6 '12 at 8:57
    
use \verb|Gretarsdottir S, Baas AF, Thorleifsson G, Holm H| instead. However, using documentstyle is from the last century ... You should use \documentclass –  Herbert Jun 6 '12 at 9:06

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.