On Wed, Jun 29, 2005 at 04:05:07PM +0200, Rainer Dorsch wrote: > Hello, > > I defined a few latex macros like > > \newcommand{\SRx}[1]{\hyperref[headsrx#1 > {\MakeUppercase{sr}x\_\MakeTextUppercase{#1}}} > > which save some typing effort and allow reformatting of all SRx at a later > point in time. > > If this would be a complete paragraph, LyX support would be excellent by > defining a new .layout file. > Yes. That is a great way of using custom environments.
> But these macros are used within a paragraph. So far I have found nothing > else > than using ERT e.g. \SQx{abc} which is kind of ugly. Ideally I would like to > do some "special inserts SRx" which also should be bindable to a key. Now I > am wondering > > -> Did I just not find out how to do that in in LyX, but it is already > available? Kind of unlikely, I asked before on lyx-users: > http://www.mail-archive.com/lyx-users%40lists.lyx.org/msg40302.html > > -> Lyx 1.3.5 can't do that but it is impemented in a later version > > -> Nobody thought so far that is useful, but it in fact is and I should open > a > wishlist item bug report > Search the archives for "text styles". Text styles are not finished yet, and probably won't be for lyx 1.4. Beyt they do what you want: You can define new text styles (in addition to basic ones like "bold") and apply them over whatever selections you make. > -> Is that a completely wrong approach for what I want to achieve and the > feature would be completely useless. No - this is very useful. And there is a trick for getting limited text style functionality today. It is a hack: Lyx support colors, but many documents doesn't use them all. Each color you don't use can be redefined in the preamble to do something else, such as invoking a custom latex command. So when you need "your" command, use the corresponding color in the document. You won't get support for command parameters this way, though. Helge Hafting