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