From: Radhelorn <radhelorn@mail.ru>
Subject: Re: About \defineshortcut
Date: Wed, 21 Dec 2005 00:37:45 +0300 [thread overview]
Message-ID: <43A879A9.7080109@mail.ru> (raw)
In-Reply-To: <43A312FB.3080705@elvenkind.com>
Taco Hoekwater wrote:
>> For example after command:
>>
>> \defineshortcut [//] [] [style=\em]
>
>> I can get slash only by \textslash (which is expected) and it breaks
>> things like:
>>
>> \typefile {some/dir/file}
>>
>> So how to revert to previous meaning of '/'? It is possible to do it
>> only temporarily?
>
> Explicit \start a /b/ c \stop style grouping is normally best, but
> a shortcut is just an active character with a closing defimiter,
> so this will work for you special case:
>
> \catcode`\/=\other
> \typefile {some/dir/file}
> \catcode`\/=\active
>
I've experimented with various macros to undefine/temporarily disable
shortcuts and found that most convenient variant is to insert this
catcode changing into \typefile command. Why not to do this for every
command, that accepts path parameters? This slows process down too much?
But this is just an afterthought.
I think that \defineshortcut commands are most useful inside some
environment (start/stop pair). So it is possible to have such
environment that restores back all catcode changes (or other variable
changes) made inside it (like local variables in some programming
laguages)? This can have many other uses.
--
Radhelorn <radhelorn@mail.ru>
next prev parent reply other threads:[~2005-12-20 21:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 21:31 Radhelorn
2005-12-16 19:18 ` Taco Hoekwater
2005-12-17 12:38 ` Radhelorn
2005-12-17 13:49 ` Taco Hoekwater
2005-12-20 21:37 ` Radhelorn [this message]
2005-12-20 22:28 ` Hans Hagen
2005-12-21 7:53 ` Radhelorn
2005-12-21 9:06 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43A879A9.7080109@mail.ru \
--to=radhelorn@mail.ru \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).