ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \pounds problem
@ 2000-06-02 20:25 Christopher G D Tipper
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher G D Tipper @ 2000-06-02 20:25 UTC (permalink / raw)


\setupbodyfont
  [ber,pos,12pt]

\def\pounds{\char191{}}

does the trick. :-)

Christopher


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-06-02 13:00       ` Christopher G D Tipper
  2000-06-02 13:39         ` Ed L Cashin
@ 2000-06-02 13:55         ` Karsten Tinnefeld
  1 sibling, 0 replies; 10+ messages in thread
From: Karsten Tinnefeld @ 2000-06-02 13:55 UTC (permalink / raw)


> \def\pounds{\char191}

> ! Bad character code (19120).

> Obviously it is appending the 20 in £20 to the character code. Is there a
> TeX trick for forcing it out of \char mode?

It is in number parsing mode. You can add a space after a number. This 
space is "part of" the number representation and absorbed when parsing 
"in TeX's mouth". See TeXbook, pages 43f.

\def \pounds {\char 191 }

Karsten
-- 
Karsten Tinnefeld                       tinnefeld@ls2.cs.uni-dortmund.de
Fachbereich Informatik, Lehrstuhl 2                   T +49 231 755-4737
Universität Dortmund, D-44221 Dortmund, Deutschland   F +49 231 755-2047


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-06-02 13:00       ` Christopher G D Tipper
@ 2000-06-02 13:39         ` Ed L Cashin
  2000-06-02 13:55         ` Karsten Tinnefeld
  1 sibling, 0 replies; 10+ messages in thread
From: Ed L Cashin @ 2000-06-02 13:39 UTC (permalink / raw)
  Cc: Hans Hagen, ConTeXT Mailing List

"Christopher G D Tipper" <ctipper@hol.gr> writes:

...
> \def\pounds{\char191}
...
> ! Bad character code (19120).  l.163 ...Raphael has called it the
> \pounds 20
>                                           problem. Given \pounds 20,
> he ?  ! Emergency stop.
> 
> Obviously it is appending the 20 in £20 to the character code. Is
> there a TeX trick for forcing it out of \char mode?

Yes, in plain tex you would change this ...

    \def\pounds{\char191}

... to this ...

    \def\pounds{\char191\relax }

The space is probably not necessary there.  There's probably a more
elegant context-y way to handle characters that would integrate more
with context's high-level features.

-- 
--Ed Cashin                     PGP public key:
  ecashin@coe.uga.edu           http://www.coe.uga.edu/~ecashin/pgp/


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
@ 2000-06-02 13:19 Christopher G D Tipper
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher G D Tipper @ 2000-06-02 13:19 UTC (permalink / raw)


> The saga continues...

Anybody who actually feels minded to test that script had better use the following:

\setupbodyfont
  [ber,pos,12pt]

\def\pounds{\char191}

\starttext

\dollar dollar symbol

\sterling pound sterling symbol

\pounds

\ss \pounds

\stoptext

I used the 'ver' in \setupbodyfont to install a local font I have set up.

Christopher


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-06-01 22:45     ` Hans Hagen
@ 2000-06-02 13:00       ` Christopher G D Tipper
  2000-06-02 13:39         ` Ed L Cashin
  2000-06-02 13:55         ` Karsten Tinnefeld
  0 siblings, 2 replies; 10+ messages in thread
From: Christopher G D Tipper @ 2000-06-02 13:00 UTC (permalink / raw)
  Cc: ConTeXT Mailing List

> At 11:50 PM 5/31/2000 +0300, Christopher G D Tipper wrote:
> >Well, I have played around a bit, and I find the following in enco-win:
> >
> >\defineactivecharacter © {\copyright{}}
> >\defineactivecharacter £ {\pounds{}}
> 
> >So I'm stuck, and it looks like you've got the same problem too. Hans?
> 
> I never needed the pound (and not even enco-win), but I know it's \sterling
> -) 
> 
> Pound and Dollar are tricky ones, since in the tex fonts they are in the
> same slot but not in each font. So, there is also \dollar.  

The saga continues...

Basically, \sterling produces the right results with cmr fonts, but cussed old me is working in pos (URW postscript fonts), where it produces an italic $ symbol.

So I cook up the following which produces exactly the right results:

\setupbodyfont
  [ber,pos,ver,12pt]

\def\pounds{\char191}

\starttext

\dollar dollar symbol

\sterling pound sterling symbol

\pounds

\ss \pounds

\stoptext

Then I add \def\pounds{\char191} to the original document, and I get the following:

! Bad character code (19120).
l.163 ...Raphael has called it the \pounds 20 
                                          problem. Given \pounds 20, he
? 
! Emergency stop.

Obviously it is appending the 20 in £20 to the character code. Is there a TeX trick for forcing it out of \char mode?

Christopher

PS I tried the \character[191] command and it complains:

! Missing number, treated as zero.
<to be read again> 
                   [
\character #1->\ifcase #1
                         \unknowncharacter \or a\or b\or c\or d\or e\...
l.163 ...ael has called it the \character[
                                          191] 20 problem. Given %\po...
? 
! Emergency stop.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-05-31 20:50   ` Christopher G D Tipper
  2000-06-01 12:54     ` Ed L Cashin
@ 2000-06-01 22:45     ` Hans Hagen
  2000-06-02 13:00       ` Christopher G D Tipper
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2000-06-01 22:45 UTC (permalink / raw)
  Cc: ConTeXT Mailing List

At 11:50 PM 5/31/2000 +0300, Christopher G D Tipper wrote:
>Well, I have played around a bit, and I find the following in enco-win:
>
>\defineactivecharacter © {\copyright{}}
>\defineactivecharacter £ {\pounds{}}

>So I'm stuck, and it looks like you've got the same problem too. Hans?

I never needed the pound (and not even enco-win), but I know it's \sterling
-) 

Pound and Dollar are tricky ones, since in the tex fonts they are in the
same slot but not in each font. So, there is also \dollar.  

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.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-05-31 20:50   ` Christopher G D Tipper
@ 2000-06-01 12:54     ` Ed L Cashin
  2000-06-01 22:45     ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Ed L Cashin @ 2000-06-01 12:54 UTC (permalink / raw)
  Cc: ConTeXT Mailing List

"Christopher G D Tipper" <ctipper@hol.gr> writes:

> So I'm stuck, and it looks like you've got the same problem
> too. Hans?

I don't consider it to be a problem that "\pounds" is not defined in
plain TeX.  It just isn't part of the macropackage.  

I don't know much about using special characters in context, but if I
wanted to do it, I'd check out chapter five of the beta English manual
at ...

  http://www.pragma-ade.nl/general/manuals/beta/cont-enp.pdf

-- 
--Ed Cashin                     PGP public key:
  ecashin@coe.uga.edu           http://www.coe.uga.edu/~ecashin/pgp/


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-05-31 19:10 ` Ed L Cashin
@ 2000-05-31 20:50   ` Christopher G D Tipper
  2000-06-01 12:54     ` Ed L Cashin
  2000-06-01 22:45     ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Christopher G D Tipper @ 2000-05-31 20:50 UTC (permalink / raw)
  Cc: ConTeXT Mailing List

Well, I have played around a bit, and I find the following in enco-win:

\defineactivecharacter © {\copyright{}}
\defineactivecharacter £ {\pounds{}}

so useencoding[win] you say and put £ instead of \pounds? Sorry, it says, "Undefined Control Sequence".

Now \copyright does the right thing in ConTeXT source so I conclude that both \copyright and \pounds are native TeX macros (ConTeXT is just a rather large set of TeX macros, you realise, and ConTeXT leaves much of the math stuff alone, which is why LaTeX and ConTeXT have parctically no difference on the math side of things).

So I try \language[uk} and make sure I've compiled the \uk format? No difference.

So I'm stuck, and it looks like you've got the same problem too. Hans?

Christopher

----- Original Message ----- 
From: "Ed L Cashin" <ecashin@coe.uga.edu>
To: "Christopher G D Tipper" <ctipper@hol.gr>
Cc: "ConTeXT Mailing List" <ntg-context@ntg.nl>
Sent: Wednesday, May 31, 2000 10:10 PM
Subject: Re: \pounds problem

> "Christopher G D Tipper" <ctipper@hol.gr> writes:
> 
> > I am trying to produce a £ symbol. I just want to use the standard
> > TeX \pounds as I don't want to be bothered with \language[uk] or
> > \useencoding[win]. The problem is that I get an "Undefined control
> > sequence" when \pounds is parsed. It seems to be a ConTeXT problem
> > because this particular document (which I have fully converted)
> > compiles under LaTeX and as I understand it \pounds is a TeX macro
> > which should be the same in LaTeX and ConTeXT.
> 
> What source said it was part of plain TeX?  I get this:
> 
>     kali:2:ecashin /tmp$ tex
>     This is TeX, Version 3.14159 (Web2C 7.3.1)
>     **\relax
>     
>     *\pounds
>     ! Undefined control sequence.
>     <*> \pounds
>                
>     ? X
>     No pages of output.
>     Transcript written on texput.log.
>     kali:2:ecashin /tmp$ 
> 
> ... on my tex, so "\pounds" isn't part of the plain macropackage.
> It's probably a LaTeXism.
> 
> -- 
> --Ed Cashin                     PGP public key:
>   ecashin@coe.uga.edu           http://www.coe.uga.edu/~ecashin/pgp/
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: \pounds problem
  2000-05-31 18:12 Christopher G D Tipper
@ 2000-05-31 19:10 ` Ed L Cashin
  2000-05-31 20:50   ` Christopher G D Tipper
  0 siblings, 1 reply; 10+ messages in thread
From: Ed L Cashin @ 2000-05-31 19:10 UTC (permalink / raw)
  Cc: ConTeXT Mailing List

"Christopher G D Tipper" <ctipper@hol.gr> writes:

> I am trying to produce a £ symbol. I just want to use the standard
> TeX \pounds as I don't want to be bothered with \language[uk] or
> \useencoding[win]. The problem is that I get an "Undefined control
> sequence" when \pounds is parsed. It seems to be a ConTeXT problem
> because this particular document (which I have fully converted)
> compiles under LaTeX and as I understand it \pounds is a TeX macro
> which should be the same in LaTeX and ConTeXT.

What source said it was part of plain TeX?  I get this:

    kali:2:ecashin /tmp$ tex
    This is TeX, Version 3.14159 (Web2C 7.3.1)
    **\relax

    *\pounds
    ! Undefined control sequence.
    <*> \pounds

    ? X
    No pages of output.
    Transcript written on texput.log.
    kali:2:ecashin /tmp$ 

... on my tex, so "\pounds" isn't part of the plain macropackage.
It's probably a LaTeXism.

-- 
--Ed Cashin                     PGP public key:
  ecashin@coe.uga.edu           http://www.coe.uga.edu/~ecashin/pgp/


^ permalink raw reply	[flat|nested] 10+ messages in thread

* \pounds problem
@ 2000-05-31 18:12 Christopher G D Tipper
  2000-05-31 19:10 ` Ed L Cashin
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher G D Tipper @ 2000-05-31 18:12 UTC (permalink / raw)


hi all,

I am trying to produce a £ symbol. I just want to use the standard TeX \pounds as I don't want to be bothered with \language[uk] or \useencoding[win]. The problem is that I get an "Undefined control sequence" when \pounds is parsed. It seems to be a ConTeXT problem because this particular document (which I have fully converted) compiles under LaTeX and as I understand it \pounds is a TeX macro which should be the same in LaTeX and ConTeXT.

Thanks for your help,
Christopher


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-06-02 20:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-02 20:25 \pounds problem Christopher G D Tipper
  -- strict thread matches above, loose matches on Subject: below --
2000-06-02 13:19 Christopher G D Tipper
2000-05-31 18:12 Christopher G D Tipper
2000-05-31 19:10 ` Ed L Cashin
2000-05-31 20:50   ` Christopher G D Tipper
2000-06-01 12:54     ` Ed L Cashin
2000-06-01 22:45     ` Hans Hagen
2000-06-02 13:00       ` Christopher G D Tipper
2000-06-02 13:39         ` Ed L Cashin
2000-06-02 13:55         ` Karsten Tinnefeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).