apostrophe in a verbatim enviroment
Is it possible to get an apostrophe to typeset as a vertical mark ( ' ) rather than a curved mark ( ’ ) when using \starttyping and MKII? I am trying to get the old “typewriter” look for a brief stretch of text. Alan
On Thu, 6 Nov 2008, Alan Bowen wrote:
Is it possible to get an apostrophe to typeset as a vertical mark ( ' ) rather than a curved mark ( ’ ) when using \starttyping and MKII? I am trying to get the old “typewriter” look for a brief stretch of text.
See http://archive.contextgarden.net/message/20060913.020414.752ac0bd.en.html for a possible solution. See Taco's and Hans's mails in the thread for other options. Aditya
Thanks, Aditya. This is a good start. The problem is that I need this to work with \starttyping...\stoptyping because there are spacing and line-breaking issues as well. Right now: \starttext \catcode`'=\active \def'{\raise.6em\hbox{\char13}} \starttyping 202'906 202'096 \stoptyping \tt 202'906 202'096 \stoptext gives me the layout I want or the apostrophe (char13) I need, but not both at the same time. On Nov 6, 2008, at 18;14,51 , Aditya Mahajan wrote:
On Thu, 6 Nov 2008, Alan Bowen wrote:
Is it possible to get an apostrophe to typeset as a vertical mark ( ' ) rather than a curved mark ( ’ ) when using \starttyping and MKII? I am trying to get the old “typewriter” look for a brief stretch of text.
See http://archive.contextgarden.net/message/20060913.020414.752ac0bd.en.html
for a possible solution. See Taco's and Hans's mails in the thread for other options.
Aditya___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Alan Bowen wrote:
Thanks, Aditya. This is a good start. The problem is that I need this to work with \starttyping...\stoptyping because there are spacing and line-breaking issues as well.
Right now:
\starttext \catcode`'=\active \def'{\raise.6em\hbox{\char13}}
You can add this line to make \starttyping work: \appendtoks \catcode`'=\active \to\everysetupverbatim And a (perhaps unneeded) hint: if you don't want a perpetually active ', the two lines above can be written as: \begingroup \catcode`'=\active \gdef'{\raise.6em\hbox{\char13}} \endgroup Best wishes, Taco
Many thanks, Taco, that works perfectly. I have been typesetting this book for my brother and that was the last knot to be untied before sending it off. Very best, Alan PS Your tact in phrasing your hint is also much appreciated! 8-) On Nov 7, 2008, at 10;45,46 , Taco Hoekwater wrote:
Alan Bowen wrote:
Thanks, Aditya. This is a good start. The problem is that I need this to work with \starttyping...\stoptyping because there are spacing and line-breaking issues as well.
Right now:
\starttext \catcode`'=\active \def'{\raise.6em\hbox{\char13}}
You can add this line to make \starttyping work:
\appendtoks \catcode`'=\active \to\everysetupverbatim
And a (perhaps unneeded) hint: if you don't want a perpetually active ', the two lines above can be written as:
\begingroup \catcode`'=\active \gdef'{\raise.6em\hbox{\char13}} \endgroup
Best wishes, Taco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
Aditya Mahajan
-
Alan Bowen
-
Taco Hoekwater