* Environments and shortcuts
@ 2001-06-02 12:45 Giuseppe Bilotta
2001-06-04 10:14 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Bilotta @ 2001-06-02 12:45 UTC (permalink / raw)
Hello,
I know I should not be using shortcuts (they are not "official"),
but they're so usefull ... ok, here's the problem.
If I define a shortcut in an environment file, like
\startenvironment novel
\defineshortcut[color=red]
\stopenvironment
and the use \environment novel, the shortcut definition does not
work (all other definitions do, though). What might the problem
be?
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Environments and shortcuts
2001-06-02 12:45 Environments and shortcuts Giuseppe Bilotta
@ 2001-06-04 10:14 ` Hans Hagen
2001-06-05 10:34 ` Re[2]: " Giuseppe Bilotta
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2001-06-04 10:14 UTC (permalink / raw)
Cc: ntg-context
At 02:45 PM 6/2/01 +0200, Giuseppe Bilotta wrote:
>Hello,
>
>I know I should not be using shortcuts (they are not "official"),
>but they're so usefull ... ok, here's the problem.
>
>If I define a shortcut in an environment file, like
>
>\startenvironment novel
>
>\defineshortcut[color=red]
>
>\stopenvironment
>
>and the use \environment novel, the shortcut definition does not
>work (all other definitions do, though). What might the problem
>be?
since < > are used in macros (\ifnum etc) they are pushed popped when
loading critical files which means that after loading the env, the < has
it's old meaning. So, you need to add
\catcode`\<=\active
to the main file (\def\enableshortcuts{\catcode...} \enableshortcuts)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re[2]: Environments and shortcuts
2001-06-04 10:14 ` Hans Hagen
@ 2001-06-05 10:34 ` Giuseppe Bilotta
0 siblings, 0 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2001-06-05 10:34 UTC (permalink / raw)
Cc: ntg-context
Monday, June 04, 2001 Hans Hagen wrote:
HH> At 02:45 PM 6/2/01 +0200, Giuseppe Bilotta wrote:
>>Hello,
>>
>>I know I should not be using shortcuts (they are not "official"),
>>but they're so usefull ... ok, here's the problem.
>>
>>If I define a shortcut in an environment file, like
>>
>>\startenvironment novel
>>
>>\defineshortcut[color=red]
>>
>>\stopenvironment
>>
>>and the use \environment novel, the shortcut definition does not
>>work (all other definitions do, though). What might the problem
>>be?
HH> since < > are used in macros (\ifnum etc) they are pushed popped when
HH> loading critical files which means that after loading the env, the < has
HH> it's old meaning. So, you need to add
HH> \catcode`\<=\active
HH> to the main file (\def\enableshortcuts{\catcode...} \enableshortcuts)
Works like a chamr, thank you.
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-06-05 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-02 12:45 Environments and shortcuts Giuseppe Bilotta
2001-06-04 10:14 ` Hans Hagen
2001-06-05 10:34 ` Re[2]: " Giuseppe Bilotta
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).