String single quote in \tt
Hi, I just noticed that in the preprocessing manual, the single quotes are wrong. Look at the output of \starttext \starttyping let a = 'string' ; \stoptyping \mono{ let a = 'string' ;} {\tt let a = 'string' ;} \stoptext The singlequote character is converted into rightquote. This "feature" is also present in plain tex and Latex. rightquote string rightquote does not look good in program listings. Isn't there some way to turn off these intelligent quotes in \tt? Aditya
Aditya Mahajan wrote:
Hi,
I just noticed that in the preprocessing manual, the single quotes are wrong. Look at the output of
\starttext \starttyping let a = 'string' ; \stoptyping \mono{ let a = 'string' ;}
{\tt let a = 'string' ;} \stoptext
The singlequote character is converted into rightquote. This "feature" is also present in plain tex and Latex.
maybe \noligatures Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 11 Sep 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
I just noticed that in the preprocessing manual, the single quotes are wrong. Look at the output of
\starttext \starttyping let a = 'string' ; \stoptyping \mono{ let a = 'string' ;}
{\tt let a = 'string' ;} \stoptext
The singlequote character is converted into rightquote. This "feature" is also present in plain tex and Latex.
maybe \noligatures
Unless I misunderstood noligature, this does not work. \pdfnoligatures\tentt \tt a = 'string' ; \bye Still gives me rightquote. Aditya
Aditya Mahajan wrote:
Unless I misunderstood noligature, this does not work.
\pdfnoligatures\tentt \tt a = 'string' ; \bye
Still gives me rightquote.
we need to ask taco ... he has to run your snippet in his mind/memory Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Aditya Mahajan wrote:
Unless I misunderstood noligature, this does not work.
\pdfnoligatures\tentt \tt a = 'string' ; \bye
Still gives me rightquote.
we need to ask taco ... he has to run your snippet in his mind/memory
The single straight quote in 'Typewriter Text' encoding is \char 13, the directional one is in the ' slot (no, i do not know why) Something rude like \catcode`'=\active \def'{\char13 } \tt a = 'string' ; works in this example, but may not be usable in practise. Cheers, Taco
On Tue, 12 Sep 2006, Taco Hoekwater wrote:
Hans Hagen wrote:
Aditya Mahajan wrote:
Unless I misunderstood noligature, this does not work.
\pdfnoligatures\tentt \tt a = 'string' ; \bye
Still gives me rightquote.
we need to ask taco ... he has to run your snippet in his mind/memory
The single straight quote in 'Typewriter Text' encoding is \char 13, the directional one is in the ' slot (no, i do not know why)
Something rude like
\catcode`'=\active \def'{\char13 } \tt a = 'string' ;
works in this example, but may not be usable in practise.
Thanks. I tried to modify this example to work with context, and the simplest solution is \catcode`'=\active \def'{\raise.6em\hbox{\char13}} \starttext \tt a = 'string' ; \stoptext One probably also needs \catcode``=\active \def`{\char0} I will experiment and see if this definition can be activated on every teletype font switch. Aditya
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Taco Hoekwater