Search found 5 matches

by dontpanic
Thu Jul 29, 2010 8:33 am
Forum: Fonts & Character Sets
Topic: Listing package displays curly 'quotes' and tiny tildes ~
Replies: 11
Views: 18627

Listing package displays curly 'quotes' and tiny tildes ~

A short example:

\documentclass[pdftex,a4paper]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[formats]{listings}
\definecolor{darkred}{rgb}{.5,0,0}
\definecolor{darkblue}{rgb}{0,0,.5}
\lstnewenvironment{R}
{
\lstset{
basicstyle=\ttfamily,
frame ...
by dontpanic
Wed Jul 28, 2010 5:15 pm
Forum: Fonts & Character Sets
Topic: Listing package displays curly 'quotes' and tiny tildes ~
Replies: 11
Views: 18627

Listing package displays curly 'quotes' and tiny tildes ~

I don't know why, but none of these solutions work... I also tried escapechar:
I am using two languages (SAS and R) and the escapechar only worked for SAS, in R it says "undefined control sequence".

So I've defined a new environment for R:

\lstnewenvironment{R}
{
\lstset{
basicstyle=\ttfamily ...
by dontpanic
Mon Jul 26, 2010 2:57 pm
Forum: Fonts & Character Sets
Topic: Listing package displays curly 'quotes' and tiny tildes ~
Replies: 11
Views: 18627

Re: Listing package displays curly 'quotes' and tiny tildes

unfortunately not better...

i don't understand, why you use tabsize= twice in lstset{}

And why do you need escapeinside={\%*}{*)}?
("Now all weird tildes will be replaced automatically in all of your code. Forget escape characters etc, this is all you need!")

Thanks!
dontpanic
by dontpanic
Mon Jul 26, 2010 1:17 pm
Forum: Fonts & Character Sets
Topic: Listing package displays curly 'quotes' and tiny tildes ~
Replies: 11
Views: 18627

Re: Listing package displays curly 'quotes' and tiny tildes

Thanks stinkinrich88!

It solves my tilde problem too, but now tabsize=4 doesn't work anymore:

\lstset{ breaklines=true, % new line
basicstyle=\ttfamily,
tabsize=4}

\begin{lstlisting}[language=R, format=tilde]
...
\end{lstlisting}

output looks like tabsize=0